/* =============================================================================
   HOME — homepage-only section styles
   CR: fysh-home-reset-2026-06-27
   Loaded only by index.php via $page_css.
============================================================================= */

/* ── Hero ───────────────────────────────────────────────────────────────────
   Rapeseed field JPEG background. min-height accounts for the fixed header
   + search bar so the hero fills exactly the viewport below those bars.      */
.hero {
    position: relative;
    min-height: calc(100vh  - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('/assets/img/hero_bg_rapeseedfiled.JPEG');
    background-size: cover;
    background-position: center center;
}
.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 18, 40, 0.52) 0%,
        rgba(8, 18, 40, 0.72) 55%,
        rgba(8, 18, 40, 0.88) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 5rem 0 4rem;
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.hero__eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-lt);
    margin-bottom: 1rem;
}

.hero__heading {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.08;
    margin-bottom: 1.1rem;
}
.hero__heading em { font-style: italic; color: var(--gold-lt); }

.hero__sub {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.75;
    max-width: 540px;
    margin-bottom: 2.25rem;
}

/* Search form */
.hero__search {
    display: flex;
    width: 100%;
    max-width: 560px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(8, 18, 40, 0.35);
}
.hero__search input {
    flex: 1;
    min-width: 0;
    padding: 0.95rem 1.25rem;
    border: none;
    font-size: 0.9rem;
    font-family: var(--font-body);
    color: var(--slate);
    background: rgba(255, 255, 255, 0.96);
    outline: none;
}
.hero__search input::placeholder { color: var(--muted); }
.hero__search input:focus        { background: #fff; }
.hero__search .btn               { border-radius: 0; white-space: nowrap; flex-shrink: 0; }

@media (max-width: 520px) {
    .hero__search              { flex-direction: column; border-radius: var(--radius-md); }
    .hero__search input        { border-radius: var(--radius-md) var(--radius-md) 0 0; }
    .hero__search .btn         { border-radius: 0 0 var(--radius-md) var(--radius-md); }
}

/* ── Stats bar ──────────────────────────────────────────────────────────────
   Navy separator band between hero and featured listings.                    */
.stats-bar { background: var(--navy); padding: 2.25rem 0; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
}
/* 3 columns from tablet — two rows of 3 */
@media (min-width: 560px)  { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
/* Full single row on desktop */
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(6, 1fr); gap: 1rem; } }

/* ── Featured band ───────────────────────────────────────────────────────────
   PHP-driven horizontal-scroll carousel.
   Card visuals from css/components.css — not redefined here.                 */
.feat-band {
    background: var(--cream);   /* matches 'Customer Stories' section--alt */
    padding: 4.5rem 0;
    /* overflow:hidden removed — it was clipping card shadows at section level */
}

.feat-band__intro {
    text-align: center;
    max-width: 56rem;
    margin: 0 auto 2rem;
}

.feat-band__eyebrow {
    display: block;
    margin-bottom: 0.6rem;
}

.feat-band__title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.feat-band__lede {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0 auto;
    max-width: 46ch;
    line-height: 1.55;
}

/* ── Carousel ────────────────────────────────────────────────────────────────
   Architectural split:
   .feat-carousel-stage  — positions nav buttons (relative)
   .feat-carousel-scroll — handles horizontal scrolling ONLY (overflow-x:auto)
                           overflow-y is NOT constrained here
   .feat-carousel        — flex track; overflow:visible so card shadows,
                           hover lifts, and gold borders are never clipped

   Cards behave exactly as they do in any other grid on the page.            */
.feat-carousel-stage  { position: relative; }

.feat-carousel-scroll {
    overflow-x: auto;
    overflow-y: visible;
    /* top: 20px = 4px hover lift + 2px shadow blur + 14px safety margin
       browser coerces overflow-y to auto when overflow-x is auto, so the
       scroll wrapper can still clip — generous top padding is the guard.    */
    padding: 20px 4px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.feat-carousel-scroll::-webkit-scrollbar { display: none; }

.feat-carousel {
    display: flex;
    gap: 0;
    scroll-snap-type: x mandatory;
    /* overflow must stay visible — the scroll wrapper above handles clipping */
    overflow: visible;
    /* Inline padding keeps first/last card flush with container edge */
    padding: 0;
}

.feat-carousel > .property-card {
    flex: 0 0 100%;
    max-width: none;
    scroll-snap-align: start;
}

/* 2 cards */
@media (min-width: 640px) {
    .feat-carousel { gap: 1.5rem; }
    .feat-carousel > .property-card { flex: 0 0 calc(50% - 0.75rem); }
}

/* 3 cards — mirrors properties-grid repeat(3,1fr) gap:1.5rem */
@media (min-width: 1024px) {
    .feat-carousel > .property-card { flex: 0 0 calc(33.33% - 1rem); }
}

/* Constrain hover shadow to 2px inside the carousel so it stays within the
   scroll wrapper's clipping boundary regardless of browser overflow behaviour */
.feat-carousel > .property-card:hover {
    box-shadow: 0 2px 4px rgba(15, 35, 64, 0.20);
}
.feat-carousel > .property-card--featured:hover {
    box-shadow: 0 0 0 2px var(--gold), 0 2px 4px rgba(15, 35, 64, 0.20);
}

/* Whole-card anchor — fills card, resets link decoration */
.property-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Remove hover overrides — cards now behave identically to the rest of the page
   because the overflow context no longer interferes with them.               */
.property-card__placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    color: var(--muted);
}

/* Featured badge — canonical .property-badge sizing, positioned top-right */
.feat-band .property-card__thumb .property-badge--right {
    left: auto;
    right: 0.75rem;
}

/* ── Carousel navigation — mobile first ─────────────────────────────────────
   Mobile:  arrow buttons hidden; swipe native; progress counter below.
   Desktop: circular navy arrows sit at the stage edges; counter alongside.  */

/* Mobile counter + compact prev/next row — shown on all sizes, styled per bp */
.feat-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 0.75rem;
}
.feat-controls__count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
    flex: 1;
    text-align: center;
}

/* Mobile arrow buttons — compact, inline below carousel */
.feat-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--navy);
    border-radius: 50%;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--ease), color var(--ease), opacity var(--ease);
}
.feat-nav:hover:not(:disabled) { background: var(--navy); color: var(--white); }
.feat-nav:disabled             { opacity: 0.25; cursor: default; }
.feat-nav .ti                  { font-size: 18px; line-height: 1; }

/* Desktop — promote to side-mounted floating buttons */
@media (min-width: 768px) {
    /* Controls row becomes count-only strip (buttons move to stage sides) */
    .feat-controls {
        justify-content: flex-end;
        margin-top: 0.75rem;
    }
    .feat-controls__count { flex: 0; }

    /* Hide inline mobile buttons — replaced by absolute positioned ones */
    .feat-controls .feat-nav { display: none; }

    /* Stage-mounted desktop buttons */
    .feat-nav--stage {
        display: inline-flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 4;
        width: 44px;
        height: 44px;
        border: none;
        background: var(--navy);
        color: var(--white);
        box-shadow: 0 2px 12px rgba(8, 18, 40, 0.22);
    }
    .feat-nav--stage:hover:not(:disabled) { background: #1A3A6E; color: var(--white); }
    .feat-nav--stage.feat-nav--prev       { left: 0; }
    .feat-nav--stage.feat-nav--next       { right: 0; }
}

/* Empty state */
.feat-band__empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 0.5rem 0 2rem;
}
@media (min-width: 640px) {
    .feat-band__empty {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.feat-band__empty-head {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.35rem;
}
.feat-band__empty-sub {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.55;
}
.feat-band__empty-sub strong { color: var(--gold); }
.feat-band__cta { flex-shrink: 0; }

/* ── Why FYSH features ── .section class handles 4.5rem 0 padding via base.css */
.features-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Testimonials ── .section class handles padding */
.testimonials-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Agent CTA strip — padding aligned to 4.5rem to match all other sections */
.agent-strip { padding: 4.5rem 0; }
.agent-strip__inner {
    background: linear-gradient(135deg, var(--navy) 0%, #1a3d6e 100%);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}
.agent-strip__heading {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.6rem;
}
.agent-strip__heading em { font-style: italic; color: var(--gold-lt); }
.agent-strip__sub        { font-size: 0.9rem; color: rgba(255,255,255,0.65); line-height: 1.7; }
.agent-strip__actions    { display: flex; gap: 0.75rem; flex-wrap: wrap; }
@media (min-width: 900px) {
    .agent-strip__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 3rem 3.5rem;
    }
}
