/* =============================================================================
 * homepage.css — medinaproperti.com
 * UI/UX Phase 11 — Homepage HTML cleanup & performance optimization
 * -----------------------------------------------------------------------------
 * Self-contained styling for the rebuilt semantic homepage (index.html).
 * Reproduces the approved Phase-10 appearance without any Elementor/OceanWP/
 * LiteSpeed generated CSS. Loads after design-system.css (tokens + reset +
 * base typography) and alongside site-header.css / site-footer.css.
 * Mobile-first where practical; a single desktop breakpoint at 900px handles
 * the two-column layouts. Uses design-system tokens throughout.
 * ========================================================================== */

/* ---------------------------------------------------------------------------
 * 0. MINIMAL RESET
 *    design-system.css is intentionally additive and does NOT reset the UA
 *    body margin or set border-box (it previously depended on the WordPress
 *    normalize stylesheet, now removed from the homepage). This file loads
 *    only on the homepage, so this reset is effectively homepage-scoped.
 * ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Base typography — design-system.css sets the font only on the ds- classes,
 * header, footer and inputs, so main content otherwise falls back to the
 * browser default serif. Establish the intended sans stack for the homepage. */
body { font-family: var(--font-base); color: var(--color-text); font-size: var(--fs-body); line-height: var(--lh-body); }
img, svg { max-width: 100%; }
img { height: auto; }

/* ---------------------------------------------------------------------------
 * 1. PAGE SHELL
 * ------------------------------------------------------------------------- */
.home #main-content { display: block; }
.home-section { padding: 46px 0; }
.home-container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}
.home main { overflow-x: clip; }

/* Section header: small left hatch accent + heading */
.home-section__head { margin-bottom: 22px; }
.section-hatch {
  width: 56px;
  height: 12px;
  margin-bottom: 6px;
  background: repeating-linear-gradient(-55deg,
    var(--color-heading) 0 2px, transparent 2px 6px);
}
.home-section__title {
  font-size: 32px;
  line-height: 1.2;
  color: var(--color-heading);
  font-weight: var(--fw-heading);
  margin: 0;
}

/* ---------------------------------------------------------------------------
 * 2. BUTTONS (homepage variants, reproducing the approved styles)
 * ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: filter .2s ease, background-color .2s ease;
}
.btn__caret { width: 10px; height: 12px; flex: none; fill: currentColor; }

/* Filled gold action (Survey Lokasi, Proyek Kami, Jelajahi Andalusia) */
.btn--gold { background: var(--color-accent); color: var(--color-heading); padding: 14px 30px; }
.btn--gold:hover { filter: brightness(.94); }

/* Filled dark-teal action (Send Message) */
.btn--teal { background: var(--color-heading); color: #fff; padding: 15px 40px; font-size: 15px; }
.btn--teal:hover { filter: brightness(1.12); }

/* Text link with gold underline accent (Lihat Proyek, Tentang Kami) */
.btn--link {
  background: none;
  color: var(--color-heading);
  font-weight: 500;
  padding: 0 0 5px;
  border-bottom: 3px solid var(--color-accent);
}
.btn--link:hover { color: var(--color-primary-hover); }

.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------------------------------------------------------------------------
 * 3. FORM CONTROLS (survey + contact) — one consistent field system
 * ------------------------------------------------------------------------- */
.home form input[type="text"],
.home form input[type="email"],
.home form input[type="tel"],
.home form input[type="date"],
.home form select,
.home form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  padding: 10px 14px;
  font-family: var(--font-base);
  font-size: 15px;
  color: var(--color-text);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.home form textarea { min-height: 120px; padding: 12px 14px; resize: vertical; }
.home form input:focus,
.home form select:focus,
.home form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(97, 206, 112, .18);
}
.home form ::placeholder { color: var(--color-muted); opacity: 1; }
.form-field { margin-bottom: 14px; }

/* ---------------------------------------------------------------------------
 * 4. HERO — 2-column conversion area (headline + CTA left, survey form right)
 * ------------------------------------------------------------------------- */
/* Full-bleed dark hero: inverted flat-lay photo behind a dark-teal wash so the
 * left intro text (now light) stays readable; the white form card sits on top. */
.home-hero {
  position: relative;
  background-color: var(--color-dark-teal);
  background-image:
    linear-gradient(rgba(4, 40, 42, 0.80), rgba(4, 40, 42, 0.74)),
    image-set(url(../images/bg-home-inverted.webp) type("image/webp"),
              url(../images/bg-home-inverted.jpg) type("image/jpeg"));
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.home-hero__inner {
  max-width: 1240px;
  margin-inline: auto;
  padding: 64px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 64px;
  align-items: center;
}
.home-hero__intro { max-width: 560px; }
.home-hero__eyebrow {
  color: #8ed6a0;              /* brand green, brightened for the dark bg */
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  text-transform: capitalize;
}
.home-hero__title {
  max-width: 520px;
  margin: 14px 0 18px;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1.08;
  color: #ffffff;
  font-weight: 700;
  text-transform: capitalize;
}
.home-hero__lead { max-width: 590px; margin: 0 0 20px; font-size: 15px; line-height: 1.75; color: rgba(255, 255, 255, 0.88); }
.home-hero__lead b { font-weight: 700; color: #ffffff; }
/* "lihat Proyek" link on the dark bg */
.home-hero__intro .btn--link { color: #ffffff; }
.home-hero__intro .btn--link:hover,
.home-hero__intro .btn--link:focus-visible { color: var(--color-gold, #f2b705); }

/* Survey form card — clean, minimal, no heavy shadow */
.home-survey {
  background: #fff;
  border: 1px solid #d8e2df;
  border-radius: 6px;
  box-shadow: none;
  padding: 28px;
}
.home-survey__title { font-size: 20px; line-height: 1.3; color: var(--color-heading); margin: 0 0 16px; }
.home-survey form { display: grid; gap: 12px; }
.home-survey .form-field { margin-bottom: 0; }
.home-survey form input[type], .home-survey form select, .home-survey form textarea { min-height: 48px; }
.home-survey .btn--gold { width: 100%; justify-content: center; min-height: 48px; margin-top: 4px; }

/* ---------------------------------------------------------------------------
 * 5. SOCIAL ICON ROW (inside the introduction)
 * ------------------------------------------------------------------------- */
.social-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 0; list-style: none; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; color: var(--color-heading);
  transition: color .2s ease;
}
.social-row a:hover { color: var(--color-primary); }
.social-row svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------------------------------------------------------------------------
 * 6. INTRODUCTION — balanced image + text split (image left, content right)
 * ------------------------------------------------------------------------- */
.home-introduction .home-container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: stretch;      /* image cell stretches to the text height */
}
.home-introduction__media { margin: 0; }
.home-introduction__media picture { display: block; height: 100%; }
.home-introduction__media img {
  display: block; width: 100%; height: 100%;
  min-height: 380px;         /* substantial image even when text is short */
  object-fit: cover;
  border-radius: var(--radius-small);
}
.home-introduction__content { align-self: center; }
.home-introduction__content .section-hatch { margin-bottom: 12px; }
.home-introduction__title {
  font-size: 32px; line-height: 1.2; color: var(--color-heading);
  font-weight: 700; margin: 0 0 16px; text-transform: capitalize;
}
.home-introduction__text { font-size: 15px; line-height: 1.75; margin: 0 0 24px; }
.home-introduction__text b { font-weight: 700; }
.home-introduction__foot { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------------
 * 7. FEATURE GRIDS (why-us: 3-up, benefits: 4-up as 2×2)
 * ------------------------------------------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.home-why-us .feature-grid { grid-template-columns: repeat(3, 1fr); } /* 3-up on desktop */
.home-benefits .feature-grid { grid-template-columns: repeat(2, 1fr); }
.feature { display: block; }
.feature__icon {
  width: 46px; height: 46px; margin-bottom: 12px;
  color: var(--color-primary);
}
.feature__icon svg { width: 46px; height: 46px; fill: currentColor; }
/* Varied on-brand icon colors — each icon-box SVG a different hue (cycled) */
.feature:nth-child(5n+1) .feature__icon { color: #4bb95c; } /* green */
.feature:nth-child(5n+2) .feature__icon { color: #0e8f86; } /* teal */
.feature:nth-child(5n+3) .feature__icon { color: #d99e00; } /* amber */
.feature:nth-child(5n+4) .feature__icon { color: #2f9fa6; } /* cyan-teal */
.feature:nth-child(5n)   .feature__icon { color: #033537; } /* dark teal */
.feature__title { font-size: 18px; line-height: 1.3; color: var(--color-heading); font-weight: 700; margin: 0 0 8px; }
.feature__desc { font-size: 15px; line-height: 1.7; color: var(--color-text); margin: 0; }

/* Benefits section uses the site's teal-tinted accent on titles/icons as before */
.home-benefits .home-section__title,
.home-benefits .feature__title { color: var(--color-dark-teal); }

/* Bordered feature boxes (homepage "Kenapa…" + "Apa yang…" only): static,
 * minimal, 1px border, small radius, equal spacing, equal height per row. */
.home-why-us .feature-grid,
.home-benefits .feature-grid { gap: 24px; align-items: stretch; }
.home-why-us .feature,
.home-benefits .feature {
  border: 1px solid #d9e3df;
  border-radius: 6px;
  padding: 24px;
  height: 100%;
  background: #fff;
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
 * 8. OPPORTUNITY — balanced text + image split (content left, image right)
 * ------------------------------------------------------------------------- */
.home-opportunity .home-container {
  max-width: 1240px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}
.home-opportunity__inner { max-width: none; margin: 0; }
.home-opportunity__inner .section-hatch { margin-bottom: 12px; }
.home-opportunity__title {
  font-size: 30px; line-height: 1.22; color: var(--color-heading);
  font-weight: 700; margin: 0 0 16px; text-transform: capitalize;
}
.home-opportunity__text { font-size: 15px; line-height: 1.75; margin: 0 0 26px; }
.home-opportunity__text b { font-weight: 700; }
.home-opportunity__media { margin: 0; }
.home-opportunity__media img,
.home-opportunity__media picture { display: block; width: 100%; height: auto; }
.home-opportunity__media img { border-radius: var(--radius-small); object-fit: cover; }

/* ---------------------------------------------------------------------------
 * 9. PROJECT CTA — full-bleed dark-teal band
 * ------------------------------------------------------------------------- */
.home-project-cta {
  background: var(--color-dark-teal);
  padding: 48px 0;
}
.home-project-cta .home-container {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.home-project-cta__title { color: #fff; font-size: 28px; line-height: 1.25; font-weight: 700; margin: 0; max-width: 680px; }
.home-project-cta__title b { font-weight: 800; }

/* ---------------------------------------------------------------------------
 * 10. CONTACT — form (left) + info column (right), top-aligned
 * ------------------------------------------------------------------------- */
.home-contact { padding: 52px 0 60px; }
.home-contact__title { text-align: center; font-size: 44px; line-height: 1.2; color: var(--color-heading); font-weight: 700; margin: 0 0 36px; }
.home-contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.home-contact__info { font-size: 15px; line-height: 1.7; color: var(--color-text); }
.home-contact__info-item { display: flex; gap: 12px; margin-bottom: 16px; }
.home-contact__info-item:last-child { margin-bottom: 0; }
.home-contact__info-icon { flex: none; width: 26px; height: 26px; color: var(--color-heading); }
.home-contact__info-icon svg { width: 26px; height: 26px; fill: currentColor; }
.home-contact__info a { color: var(--color-text); text-decoration: none; }
.home-contact__info a:hover { color: var(--color-primary); }
.home-contact__hours { color: var(--color-muted); }
.home-contact .btn--teal { display: inline-flex; margin-top: 4px; }

/* ---------------------------------------------------------------------------
 * 11. FLOATING WHATSAPP BUTTON (replaces the Joinchat plugin)
 * ------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  transition: transform .2s ease, filter .2s ease;
}
.whatsapp-float:hover { filter: brightness(1.05); transform: translateY(-2px); }
.whatsapp-float:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; }

/* ---------------------------------------------------------------------------
 * 12. RESPONSIVE — stack the two-column areas on tablets/phones
 * ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .home-hero__inner { gap: 40px; padding: 48px 24px 56px; }
}
@media (max-width: 900px) {
  .home-introduction .home-container { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .home-introduction__media img { min-height: 240px; }
  .home-opportunity .home-container { grid-template-columns: 1fr; gap: 24px; }
  .home-contact__grid { grid-template-columns: 1fr; gap: 28px; }
  .home-opportunity__inner { margin-left: 0; }
  .home-contact__title { font-size: 34px; }
  .home-introduction__title, .home-opportunity__title { font-size: 26px; }
}
@media (max-width: 860px) {
  .home-hero__inner { grid-template-columns: 1fr; gap: 28px; padding: 40px 20px 48px; }
}
@media (max-width: 767px) {
  .home-container { padding-inline: 16px; }
  .feature-grid,
  .home-why-us .feature-grid,
  .home-benefits .feature-grid { grid-template-columns: 1fr; gap: 24px; }
  .home-project-cta .home-container { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------------
 * 13. REDUCED MOTION
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn, .home form input, .home form select, .home form textarea,
  .social-row a, .whatsapp-float, .home-contact__info a { transition: none; }
}
