/* /find-your-office/ — paid-traffic landing page. Reuses the service hero,
   locations page header/break/expect/FAQ bundles, the shared map widget, and
   ad-locations__btn primitives; only the ranked card list, distance badges,
   map placement, and sticky CTA bar are new. */

.ad-fyo__note {
    margin: var(--space-s, 1.8rem) 0 0;
    font-size: var(--ad-fluid-body, 1.5rem);
    color: var(--ad-color-teal-deep, #31aab9);
}

/* Same section rhythm as /locations (112px desktop / 64px mobile, explicit —
   .ad-page-section's padding var only exists on .ad-page-page wrappers).
   White ground so the cream cards read as cards. */
.ad-fyo__list-section {
    padding: 112px 0;
    background: var(--ad-color-white, #ffffff);
}

/* locations.css's full-bleed breakout puts overflow-x: hidden on
   .ad-locations-page, which silently computes overflow-y to auto and turns
   the wrapper into the sticky map's (non-scrolling) scroll container — so
   sticky never pinned. clip keeps the same horizontal clipping without
   creating a scroll container. Scoped to this page only. */
.ad-fyo.ad-locations-page {
    overflow-x: clip;
    overflow-y: visible;
}

/* Landing header: logo left, tap-to-call right. The base header CSS hides
   .main-header-v2__btn under 1100px (hamburger world) — the landing header
   has no hamburger, so the call button stays at every width (triple-class
   outweighs the base hide rule).

   The button's ONLY visual treatment (teal fill, padding, radius, type) lives
   inside header-footer.css's `@media (min-width: 1101px)` block, so re-showing
   it below 1100px used to leave it as bare underlined-free text. These rules
   restore the filled teal treatment — the same --ad-action-teal-* /
   --ad-button-* tokens .ad-locations__btn--filled uses — at every width. The
   desktop rule out-specifies these (#brx-header[...] .main-header-v2__btn is
   ID-level), so >=1101px renders exactly as before. */
.ad-site-header--landing .main-header-v2__container {
    justify-content: space-between;
}

.ad-site-header--landing .main-header-v2__btn.ad-site-header__landing-call {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-left: auto;
    padding: 1.2rem 2rem;
    border: var(--ad-button-border-width, 1px) solid var(--ad-action-teal-bg, #46c9ce);
    border-radius: var(--ad-button-radius, 4px);
    background-color: var(--ad-action-teal-bg, #46c9ce);
    font-family: var(--ad-font-primary);
    font-size: var(--ad-type-size-sm, 14px);
    font-weight: var(--ad-button-font-weight, 600);
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: var(--ad-action-teal-text, #ffffff);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.ad-site-header--landing .main-header-v2__btn.ad-site-header__landing-call:hover {
    background-color: var(--ad-action-teal-bg-hover, #31aab9);
    border-color: var(--ad-action-teal-bg-hover, #31aab9);
    color: var(--ad-action-teal-text, #ffffff);
}

/* Worst-case label ("Call South Austin") next to the 84px logo still clears
   320px, but tighten the box so it never crowds the gutter. */
@media (max-width: 480px) {
    .ad-site-header--landing .main-header-v2__btn.ad-site-header__landing-call {
        padding: 1rem 1.4rem;
        font-size: var(--ad-fluid-small, 1.3rem);
        letter-spacing: 0.3px;
    }
}

/* Manual ZIP / city picker */
.ad-fyo__picker {
    margin: -24px 0 40px;
}

.ad-fyo__picker-label {
    display: block;
    margin-bottom: 1rem;
    font-size: var(--ad-fluid-body, 1.5rem);
    color: var(--ad-color-teal-deep, #31aab9);
}

.ad-fyo__picker-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.ad-fyo__picker-zip,
.ad-fyo__picker-city {
    font: inherit;
    font-size: var(--ad-fluid-body, 1.5rem);
    padding: 1rem 1.4rem;
    border: 1px solid var(--ad-color-teal-alpha-26, rgba(70, 201, 206, 0.26));
    border-radius: 0.8rem;
    background: var(--ad-color-white, #ffffff);
    color: inherit;
}

.ad-fyo__picker-zip {
    width: 12rem;
}

.ad-fyo__picker-zip:focus,
.ad-fyo__picker-city:focus {
    outline: 2px solid var(--ad-color-teal, #46c9ce);
    outline-offset: 1px;
}

.ad-fyo__picker-error {
    margin: 0.8rem 0 0;
    font-size: var(--ad-fluid-small, 1.3rem);
    color: #b3261e;
}

.ad-fyo__about-link {
    margin: var(--space-l, 3.2rem) 0 0;
    text-align: center;
}

.ad-fyo__about-link .ad-locations__btn {
    display: inline-block;
}

.ad-fyo__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: var(--space-m, 2.4rem);
    align-items: start;
}

/* Sticky map: the column must stretch to the row's full height (the layout's
   align-items: start would otherwise shrink it to content height, leaving
   sticky no room to travel); the map itself then pins inside it. */
.ad-fyo__map-col {
    align-self: stretch;
}

.ad-fyo__map {
    position: sticky;
    top: 10rem;
    height: 56rem;
}

/* Maps are disabled off the production host; collapse the empty slot AND its
   grid track so staging/local still look finished. */
.ad-fyo__map-col:has(.is-unavailable) {
    display: none;
}

.ad-fyo__layout:has(.ad-fyo__map-col .is-unavailable) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 86rem;
    margin-inline: auto;
}

/* Mobile map disclosure — hidden entirely above the md edge, where the sticky
   map column below already shows the map. Keeping it display:none here is also
   what keeps its map root out of the lazy-init observer's reach on desktop, so
   only one Google map is ever instantiated. */
.ad-fyo__map-mobile {
    display: none;
}

.ad-fyo__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-s, 1.8rem);
}

.ad-fyo__card {
    display: flex;
    align-items: center;
    gap: var(--space-s, 1.8rem);
    padding: var(--space-s, 1.8rem);
    border: 1px solid var(--ad-color-teal-alpha-26, rgba(70, 201, 206, 0.26));
    border-radius: var(--ad-radius-l, 1.2rem);
    background: var(--ad-color-cream, #f9fbfb);
}

.ad-fyo__card-media {
    margin: 0;
    flex-shrink: 0;
    width: 11rem;
    align-self: stretch;
    border-radius: 0.8rem;
    overflow: hidden;
}

.ad-fyo__card-media img {
    width: 100%;
    height: 100%;
    min-height: 11rem;
    object-fit: cover;
    display: block;
}

.ad-fyo__card-main {
    flex: 1;
    min-width: 0;
}

.ad-fyo__card-region {
    margin: 0 0 0.4rem;
    font-size: var(--ad-fluid-small, 1.3rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ad-color-teal-deep, #31aab9);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.ad-fyo__pill {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: var(--ad-fluid-small, 1.3rem);
    color: var(--ad-color-white, #ffffff);
    background: var(--ad-color-teal, #46c9ce);
    border-radius: 999px;
    padding: 0.2rem 1rem;
}

.ad-fyo__card-title {
    margin: 0 0 0.6rem;
    font-size: var(--ad-fluid-h4, 2.2rem);
}

.ad-fyo__card-address,
.ad-fyo__card-hours {
    margin: 0 0 0.4rem;
    font-size: var(--ad-fluid-body, 1.5rem);
}

.ad-fyo__card-distance {
    margin: 0.6rem 0 0;
    font-weight: 600;
    font-size: var(--ad-fluid-body, 1.5rem);
    color: var(--ad-color-teal-active, #0ea9af);
}

.ad-fyo__card-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
}

.ad-fyo__sticky {
    display: none;
}

@media (max-width: 1023px) {
    .ad-fyo__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Cards are the conversion surface; the map is secondary on small
       screens and the accordion pattern already covers /locations. */
    .ad-fyo__map-col {
        position: static;
    }

    .ad-fyo__map {
        height: 34rem;
    }
}

@media (max-width: 767px) {
    .ad-fyo__list-section {
        padding: 64px 0;
    }

    /* Compress the fold: the cards are the conversion surface, so the hero
       photo goes and the copy tightens. */
    .ad-fyo__hero .ad-service-hero__media {
        display: none;
    }

    .ad-fyo__note {
        margin-top: 1rem;
    }

    .ad-fyo__picker {
        margin: -8px 0 32px;
    }

    /* The map would sit below all nine cards here — pure scroll cost. The
       disclosure below puts it back above the list, on demand. */
    .ad-fyo__map-col {
        display: none;
    }

    .ad-fyo__map-mobile {
        display: block;
        margin: 0 0 var(--space-s, 1.8rem);
    }

    .ad-fyo__map-toggle {
        width: 100%;
        min-height: 44px;
    }

    .ad-fyo__map-panel {
        margin-top: 1.2rem;
    }

    .ad-fyo__map--mobile {
        position: static;
        height: 60vh;
        border-radius: var(--ad-radius-l, 1.2rem);
        overflow: hidden;
    }

    /* Maps are disabled off the production host; the panel then carries the
       note instead of an empty grey box. */
    .ad-fyo__map-note {
        display: none;
        margin: 0;
        padding: var(--space-s, 1.8rem);
        border: 1px solid var(--ad-color-teal-alpha-26, rgba(70, 201, 206, 0.26));
        border-radius: var(--ad-radius-l, 1.2rem);
        background: var(--ad-color-cream, #f9fbfb);
        font-size: var(--ad-fluid-body, 1.5rem);
        text-align: center;
    }

    .ad-fyo__map-panel:has(.is-unavailable) .ad-fyo__map--mobile {
        display: none;
    }

    .ad-fyo__map-panel:has(.is-unavailable) .ad-fyo__map-note {
        display: block;
    }

    .ad-fyo__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Card photo becomes a short full-width banner instead of a squeezed
       side square. */
    .ad-fyo__card {
        flex-direction: column;
        align-items: stretch;
    }

    .ad-fyo__card-media {
        width: 100%;
        align-self: auto;
        border-radius: 0.8rem;
    }

    .ad-fyo__card-media img {
        min-height: 0;
        height: 12rem;
    }

    .ad-fyo__card-actions {
        width: 100%;
        flex-direction: row;
    }

    .ad-fyo__card-actions .ad-locations__btn {
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .ad-fyo__sticky {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 60;
        display: flex;
        gap: 1rem;
        padding: 1rem var(--gutter, 1.6rem) calc(1rem + env(safe-area-inset-bottom, 0px));
        background: var(--ad-color-white, #ffffff);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    }

    .ad-fyo__sticky .ad-locations__btn {
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .ad-fyo {
        padding-bottom: 8rem;
    }
}
