/*
Theme Name: Avada Child
Description: Child theme for Avada theme
Author: ThemeFusion
Author URI: https://theme-fusion.com
Template: Avada
Version: 1.0.0
Text Domain:  Avada
*/

/* =================================================================
   12198 40TH ST ESTATE — luxury showcase support styles
   Apply the listed CSS classes to Avada Containers/Columns/Elements
   via the element's "CSS Class" field. Scoped so they only affect
   this property page. Remove this whole block to revert.
   ================================================================= */

/* ---- Brand tokens (estate palette) ---- */
:root {
    --estate-ink: #1c1c1c;        /* near-black text */
    --estate-gold: #b8965a;       /* muted antique gold accent */
    --estate-gold-deep: #94733b;  /* hover / borders */
    --estate-stone: #f5f2ec;      /* warm off-white sections */
    --estate-overlay: rgba(18, 16, 22, 0.42); /* hero photo overlay */
}

/*
 * Wellington Header (Gallery / Wellington pages — not homepage Estate Header).
 * Compact single row: logo left, hamburger right; height only as tall as needed.
 */
body:not(.home) .fusion-tb-header .fusion-fullwidth {
    min-height: 84px;
    max-height: 92px;
    box-sizing: border-box;
    padding-left: 16px !important;
    padding-right: 16px !important;
    background-image: none !important; /* kill leftover blue→grey gradient split */
    background-color: rgba(28, 28, 28, 0.88) !important;
}
body:not(.home) .fusion-tb-header .fusion-builder-row {
    align-items: center !important;
    min-height: inherit;
}
body:not(.home) .fusion-tb-header .fusion-imageframe img {
    max-height: 52px;
    width: auto;
    max-width: min(240px, 55vw);
    height: auto;
}
@media (max-width: 1024px) {
    body:not(.home) .fusion-tb-header .fusion-builder-row {
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    body:not(.home) .fusion-tb-header .fusion-layout-column {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    /* Logo takes remaining space; menu column hugs the hamburger */
    body:not(.home) .fusion-tb-header .fusion-builder-column-0 {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: calc(100% - 72px) !important;
    }
    body:not(.home) .fusion-tb-header .fusion-builder-column-1 {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 64px !important;
        margin-left: auto !important;
    }
}

/* ---- Typography rhythm — applies inside any estate-section or estate-hero container ---- */
.estate-section h1,
.estate-section h2,
.estate-section h3,
.estate-hero h1,
.estate-hero h2,
.estate-hero h3 {
    letter-spacing: 0.02em;
}
/* Avada wraps Text element content in .fusion-text > p, so we target both
   the wrapper div and the p inside. !important needed to beat Avada's
   compiled .fusion-text p specificity. */
.estate-eyebrow,
.estate-eyebrow p,
.estate-eyebrow .fusion-text,
.estate-eyebrow .fusion-text p {
    text-transform: uppercase !important;
    letter-spacing: 0.28em !important;
    font-size: 0.78rem !important;
    /* color left to Avada native Text Color setting */
    line-height: 1.4 !important;
}

/* ---- HERO (full-screen twilight image) ---- */
/* Put .estate-hero on the hero Container. Use the container's own
   background image + this overlay/typography polish on top. */
.estate-hero {
    position: relative;
}
.estate-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(18, 16, 22, 0.30) 0%,
        rgba(18, 16, 22, 0.15) 45%,
        rgba(18, 16, 22, 0.65) 100%
    );
    pointer-events: none;
    z-index: 0;
}
.estate-hero > .fusion-builder-row,
.estate-hero .fusion-row {
    position: relative;
    z-index: 1;
}
.estate-hero h1 {
    color: #fff !important;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
/* Hero overrides: subline/body copy goes warm-white over the photo.
   Eyebrow (.estate-eyebrow) color is controlled natively in Avada — excluded. */
.estate-hero .fusion-text:not(.estate-eyebrow) p {
    color: #f3ede1 !important;
}

/* ---- Gold rule / divider accent ---- */
.estate-rule {
    width: 64px;
    height: 2px;
    background: var(--estate-gold);
    margin: 18px auto;
    border: 0;
}

/* ---- Stat / fact strip ---- */
.estate-stat .fusion-counter-box,
.estate-stat {
    text-align: center;
}
.estate-stat .estate-stat-num {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1;
    color: var(--estate-ink);
    font-weight: 600;
}
.estate-stat .estate-stat-label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    color: var(--estate-gold-deep);
    margin-top: 6px;
}

/* ---- Gallery polish (apply .estate-gallery to the Gallery element) ---- */
.estate-gallery .fusion-image-gallery img,
.estate-gallery img {
    transition: transform 0.6s ease, filter 0.6s ease;
}
.estate-gallery .fusion-image-gallery a:hover img,
.estate-gallery a:hover img {
    transform: scale(1.04);
    filter: saturate(1.05);
}

/* ---- Section spacing & background — NOW NATIVE ----
   Removed container padding clamp and stone background override.
   Set natively in Avada:
   - Padding: Container -> Design tab -> Padding (Top/Bottom), per breakpoint.
   - Background color (#f5f2ec): Container -> Background tab -> Background Color. */

/* ---- Container 2 (fact strip) ----
   Spacing/padding controlled in Avada (no CSS override here). ---- */

/* ---- SEO overview (immediately below fact strip) ---- */
/* max-width removed — set natively on the Text element:
   Text → Design → Width / Max Width (Large). Previous CSS lock was 46rem (~736px). */
.estate-seo-intro .estate-seo-copy p,
.estate-seo-intro .fusion-text.estate-seo-copy p {
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
    color: var(--estate-ink) !important;
    text-align: left !important;
    margin-bottom: 1.15em !important;
}
.estate-seo-intro .estate-seo-copy p:last-child,
.estate-seo-intro .fusion-text.estate-seo-copy p:last-child {
    margin-bottom: 0 !important;
}
.estate-seo-intro .estate-rule {
    margin: 6px auto 28px;
}
.estate-seo-intro a {
    color: var(--estate-gold-deep);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}
.estate-seo-intro a:hover {
    color: var(--estate-gold);
}
.estate-seo-intro .fusion-title h2,
.estate-seo-intro h2 {
    color: var(--estate-ink) !important;
    font-weight: 400 !important;
    letter-spacing: 0.02em !important;
    line-height: 1.25 !important;
}

/* ---- Container 3 (interior gallery) — template ----
   Container padding is controlled in Avada (no CSS override here). */
/* ~50px vertical space between each row of two columns on large screens.
   On small screens columns stack (handled below) and use a tighter gap. */
@media (min-width: 1025px) {
    .estate-gallery .fusion-layout-column {
        margin-bottom: 50px !important;
    }
}

/* Stack galleries/interiors to a SINGLE column at <=1024px (tablet and below).
   Kept separate from the 800px mobile block so it stacks EARLIER (wider) without
   pulling header/hero/fact-strip mobile styles up to 1024px.
   The fact strip (.estate-stats) is excluded — it keeps its own layout. */
@media (max-width: 1024px) {
    .estate-section:not(.estate-stats) .fusion-layout-column {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* 2px white divider between stacked gallery elements.
       border-bottom ONLY, so the line is never doubled when columns stack.
       30px of breathing room between each element and the line. */
    .estate-gallery .fusion-layout-column {
        border-bottom: 2px solid #ffffff !important;
        padding-bottom: 30px !important;
        margin-bottom: 30px !important;
    }
    /* No trailing divider after the final element */
    .estate-gallery .fusion-layout-column:last-child {
        border-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /*
     * Homepage photo grids use fusion_lightbox (always clickable). Once columns
     * stack full-width, zoom/lightbox adds nothing — treat as static images.
     * Desktop (>1024) keeps lightbox. Scoped to body.home so Gallery page etc. stay intact.
     */
    body.home #content a.awb-lightbox {
        pointer-events: none !important;
        cursor: default !important;
    }
}

/* ---- Sticky inquire CTA bar (mobile-first conversion) ---- */
.estate-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    background: var(--estate-ink);
    color: #fff;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
}
.estate-sticky-cta a {
    color: #fff;
    border: 1px solid var(--estate-gold);
    padding: 8px 18px;
    border-radius: 2px;
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
    white-space: nowrap;
}
.estate-sticky-cta a:hover {
    background: var(--estate-gold);
    color: var(--estate-ink);
}
@media (min-width: 1025px) {
    /* Show the sticky bar only on tablet/mobile; desktop keeps header CTA. */
    .estate-sticky-cta { display: none; }
}

/* ---- Contact form polish (Avada Form or CF7 inside .estate-form) ---- */
.estate-form input[type="text"],
.estate-form input[type="email"],
.estate-form input[type="tel"],
.estate-form textarea,
.estate-form .fusion-form-input {
    border: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25) !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding-left: 0 !important;
}
.estate-form input:focus,
.estate-form textarea:focus {
    outline: 0 !important;
    border-bottom-color: var(--estate-gold) !important;
    box-shadow: 0 1px 0 0 var(--estate-gold) !important;
}
.estate-form button,
.estate-form .fusion-button {
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

/* ---- Hero H1 — refined scale, lighter weight, tighter tracking ---- */
/* Avada title size=2 maps to roughly 2.5–3rem; we reduce and soften it.
   font-weight 300 (light) lifts it from overbearing to editorial. */
.estate-hero .fusion-title h1,
.estate-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem) !important;
    font-weight: 300 !important;
    line-height: 1.18 !important;
    letter-spacing: 0.04em !important;
    color: #fff !important;
    text-shadow: 0 2px 32px rgba(0, 0, 0, 0.35) !important;
}

/* ---- Hero buttons — NOW NATIVE ----
   Removed CSS that forced the two hero button colors. Set each Button element
   natively: Button -> Design tab.
   - "Arrange a Private Showing" (solid gold): Gradient Top + Bottom Color = #b8965a,
     Border Color = #b8965a, Text Color = #ffffff; Hover gradient = #94733b.
   - "Explore the Gallery" (gold outline): Gradient Top + Bottom Color = transparent,
     Border Color = #b8965a, Border Size = 2, Text Color = #b8965a;
     Hover gradient = #b8965a, Hover Text = #ffffff. */

/* ---- Estate contact modal — Close matches Submit; shared action row ---- */
.fusion-modal.estate-contact-modal .fusion-form-submit-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.fusion-modal.estate-contact-modal .fusion-form-submit-field > .fusion-button-wrapper {
    margin: 0;
}
.fusion-modal.estate-contact-modal .modal-footer:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
}
.fusion-modal.estate-contact-modal .fusion-form-submit-field > .fusion-button[data-dismiss="modal"],
.fusion-modal.estate-contact-modal .modal-footer .fusion-button {
    --button_accent_color: var(--estate-gold-deep) !important;
    color: var(--estate-gold-deep) !important; /* #94733b — same as Submit */
    -webkit-text-fill-color: var(--estate-gold-deep) !important;
    background-color: #f6f2ea !important;
    background-image: none !important;
    border: 1px solid var(--estate-gold) !important; /* #b8965a */
    border-radius: 6px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0 !important;
    padding: 13px 29px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    min-height: 49px;
    box-sizing: border-box;
}
.fusion-modal.estate-contact-modal .fusion-form-submit-field > .fusion-button[data-dismiss="modal"]:hover,
.fusion-modal.estate-contact-modal .fusion-form-submit-field > .fusion-button[data-dismiss="modal"]:focus,
.fusion-modal.estate-contact-modal .modal-footer .fusion-button:hover,
.fusion-modal.estate-contact-modal .modal-footer .fusion-button:focus {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background-color: var(--estate-gold) !important;
    background-image: none !important;
    border-color: var(--estate-gold) !important;
}

/*
 * Sticky Estate Header is ~106px on mobile and sits over the default modal top.
 * Push the dialog below the header so button.close is clear and clickable.
 * Also raise z-index above the sticky bar as a backup.
 */
.fusion-modal.estate-contact-modal .modal-dialog {
    margin-top: 130px !important;
    max-height: calc(100% - 150px) !important;
}
.fusion-modal.estate-contact-modal.in,
.fusion-modal.estate-contact-modal.show {
    z-index: 100100 !important;
}
body.modal-open .modal-backdrop {
    z-index: 100090 !important;
}

/* ---- Mobile tuning ---- */
@media (max-width: 800px) {
    /* Hero: add side padding so eyebrow/text don't touch edges */
    .estate-hero .fusion-builder-row,
    .estate-hero .fusion-row {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* H1: smaller, center-aligned; sit below house facade on driveway */
    .estate-hero h1,
    .estate-hero .fusion-title h1 {
        font-size: clamp(1.6rem, 7.5vw, 2.2rem) !important;
        letter-spacing: 0.01em !important;
        text-align: center !important;
    }
    /*
     * Do NOT scale/pin the photo on small — that kills sky and over-shows driveway.
     * Keep natural cover framing; only nudge H1 into the photo's own driveway band.
     * Perfect mobile composition needs a dedicated portrait crop (see agent notes).
     */
    .estate-hero .fusion-title {
        margin-top: 280px !important;
        --awb-margin-top-small: 280px !important;
        --awb-margin-top-medium: 280px !important;
    }
    /* Prefer top-aligned hero stack on small (avoid vertical centering after subline removal) */
    .estate-hero.fusion-flex-container {
        align-content: flex-start !important;
        align-items: flex-start !important;
    }

    /* Eyebrow: one centered line (override desktop margin-left:120px) */
    .estate-eyebrow,
    .estate-eyebrow.fusion-text {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: center !important;
        --awb-margin-left: 0px !important;
    }
    .estate-eyebrow p,
    .estate-eyebrow .fusion-text p,
    .estate-eyebrow.fusion-text p {
        font-size: clamp(0.55rem, 2.7vw, 0.78rem) !important;
        letter-spacing: 0.08em !important;
        white-space: nowrap !important;
        text-align: center !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Subline and address: center on mobile */
    .estate-hero .fusion-text p {
        text-align: center !important;
    }

    /* Stat strip ONLY: keep 2 columns on mobile. */
    .estate-stats .fusion-layout-column {
        width: 50% !important;
        flex: 0 0 50% !important;
    }
}

/* ---- Global footer (Wellington Footer layout section) ---- */
.estate-footer {
    color: #cfc6b8;
}
.estate-footer .awb-menu a,
.estate-footer .fusion-menu a {
    color: #f3ede1 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.82rem !important;
}
.estate-footer .awb-menu a:hover,
.estate-footer .fusion-menu a:hover {
    color: var(--estate-gold) !important;
}
.estate-footer .estate-footer-copy,
.estate-footer .estate-footer-meta {
    margin-left: auto;
    margin-right: auto;
}
.estate-footer .estate-footer-legal {
    margin-top: 1.25em;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}
.estate-footer a.estate-design-credit {
    color: var(--estate-gold);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}
.estate-footer a.estate-design-credit:hover {
    color: #f3ede1;
}
.estate-footer .awb-menu__m-toggle,
.estate-footer .awb-menu__mobile-toggle {
    color: #f3ede1 !important;
}
