/* ==========================================================================
   Shared Public Navigation — Álamo Propiedades
   Unified full-viewport-width architectural header — 100% consistent across
   Home, Catalog, Property Detail & Blog.
   ========================================================================== */

/* Main Sticky Full-Viewport Header Band — Identical on Every Page */
body:is(.home-page, :not(.home-page)) .site-header-band {
    --header-surface: #fcfcf9;
    --header-surface-scrolled: rgba(252, 252, 249, 0.92);
    --header-border: #d2ddd0;
    --header-tray-bg: #edf3e6;
    --header-tray-border: #cbd7c4;
    --header-cypress: #0f3d28;
    --header-cypress-hover: #165136;
    --header-poplar: #e3e859;
    --header-poplar-hover: #ecf16a;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky-nav);
    width: 100%;
    padding: 0;
    background: var(--header-surface);
    color: var(--header-cypress);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 4px 18px oklch(20% 0.04 155 / 0.045);
    transition:
        background-color 280ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)),
        border-color 280ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)),
        box-shadow 300ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1));
}

body:is(.home-page, :not(.home-page)) .site-header-band[data-scrolled="true"] {
    background: var(--header-surface-scrolled);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
    border-bottom-color: #c3d2c0;
    box-shadow: 0 12px 30px oklch(20% 0.05 155 / 0.10);
}

body:is(.home-page, :not(.home-page)) .site-header-band .site-header {
    position: relative;
    height: 92px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: height 280ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1));
}

body:is(.home-page, :not(.home-page)) .site-header-band[data-scrolled="true"] .site-header {
    height: 80px;
}

/* Brand mark */
body:is(.home-page, :not(.home-page)) .site-header-band .brand {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
    background: transparent;
    border-radius: 8px;
}

body:is(.home-page, :not(.home-page)) .site-header-band .brand img {
    width: 128px;
    height: 64px;
    object-fit: contain;
    transform-origin: left center;
    transition: transform 280ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)), opacity 180ms ease;
}

body:is(.home-page, :not(.home-page)) .site-header-band[data-scrolled="true"] .brand img {
    transform: scale(0.82);
}

/* Patio Navigation Capsule */
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links {
    position: relative;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px;
    border-radius: 999px;
    background: var(--header-tray-bg);
    border: 1px solid var(--header-tray-border);
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.72);
    font-family: var(--font-display);
    font-size: 14px;
    isolation: isolate;
}

/* Fluid GPU gliding hover pill */
body:is(.home-page, :not(.home-page)) .site-header-band .nav-hover-pill {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: var(--nav-pill-w, 0px);
    border-radius: 999px;
    background: color-mix(in oklab, #0f3d28 9.5%, transparent);
    transform: translate3d(var(--nav-pill-x, 0px), 0, 0);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition:
        transform 240ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)),
        width 240ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)),
        opacity 160ms ease;
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-links[data-hovering="true"] .nav-hover-pill {
    opacity: 1;
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-links[data-pill-ready="false"] .nav-hover-pill {
    transition: opacity 160ms ease;
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 19px;
    border-radius: 999px;
    color: #164430;
    font-weight: 500;
    letter-spacing: -0.012em;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    transition:
        color 180ms ease-out,
        background-color 200ms ease-out,
        box-shadow 220ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1));
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a:hover {
    color: #092c1c;
    text-decoration: none;
}

html:not(.js) body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a:hover {
    background: color-mix(in oklab, #0f3d28 9%, transparent);
}

/* Rich Deep Cypress Active Pill with Sunlit Poplar Indicator Dot */
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.is-active,
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a[aria-current="page"],
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.is-section-active {
    background: var(--header-cypress);
    color: #faf9f5;
    box-shadow:
        inset 0 1px 0 oklch(100% 0 0 / 0.14),
        0 3px 10px oklch(20% 0.06 155 / 0.22);
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.is-active:hover,
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a[aria-current="page"]:hover,
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.is-section-active:hover {
    color: #ffffff;
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.is-active::before,
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a[aria-current="page"]::before,
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.is-section-active::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--header-poplar);
    box-shadow: 0 0 0 2.5px rgba(227, 232, 89, 0.24);
    flex: none;
}

/* Right action cluster */
body:is(.home-page, :not(.home-page)) .site-header-band .header-actions {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Refined Architectural Cypress CTA with hairline divider & sunlit poplar diagonal arrow */
body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.nav-cta--mobile {
    display: none;
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:not(.nav-cta--mobile) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 46px;
    padding: 0 14px 0 20px;
    border-radius: 12px;
    background: linear-gradient(180deg, #175237 0%, #0e3a26 100%);
    color: #faf9f5;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.012em;
    border: 1px solid #0b301f;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 4px 12px oklch(20% 0.06 155 / 0.16),
        0 1px 2px oklch(20% 0.06 155 / 0.10);
    transition:
        transform var(--dur-press, 140ms) var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
        background 200ms ease,
        border-color 200ms ease,
        box-shadow 220ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1));
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta > span:first-child {
    padding-right: 14px;
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding-left: 12px;
    border-left: 1px solid rgba(250, 249, 245, 0.18);
    color: var(--header-poplar);
    flex: none;
    transition: border-color 200ms ease, color 200ms ease;
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.9;
    transition: transform 220ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}

@media (hover: hover) and (pointer: fine) {
    body:is(.home-page, :not(.home-page)) .site-header-band .brand:hover img {
        opacity: 0.88;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:hover {
        background: linear-gradient(180deg, #1c5f40 0%, #12462e 100%);
        border-color: #10402a;
        transform: translateY(-1px);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.22),
            0 10px 22px oklch(18% 0.06 155 / 0.22),
            0 2px 5px oklch(18% 0.06 155 / 0.12);
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:hover .nav-cta-icon {
        border-left-color: rgba(227, 232, 89, 0.35);
        color: #f1f578;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:hover .nav-cta-icon svg {
        transform: translate(2px, -2px);
    }
}

body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:active {
    transform: scale(0.97);
}

/* Focus visibility */
body:is(.home-page, :not(.home-page)) .site-header-band a:focus-visible,
body:is(.home-page, :not(.home-page)) .site-header-band button:focus-visible {
    outline: 2.5px solid #28713f;
    outline-offset: 3px;
}

/* Mobile menu trigger with smooth 3-bar -> X morph */
body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    background: var(--header-tray-bg);
    color: var(--header-cypress);
    border: 1px solid var(--header-tray-border);
    transition:
        background-color 200ms ease,
        border-color 200ms ease,
        color 200ms ease,
        transform var(--dur-press, 140ms) var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}

body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle svg {
    width: 21px;
    height: 21px;
    margin: 0;
}

body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle .hi-bar {
    transform-box: fill-box;
    transform-origin: center;
    transition:
        transform 240ms var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)),
        opacity 160ms ease;
}

body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle[aria-expanded="true"] {
    background: var(--header-cypress);
    border-color: var(--header-cypress);
    color: #faf9f5;
}

body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle[aria-expanded="true"] .hi-bar--1 {
    transform: translateY(5.25px) rotate(45deg);
}

body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle[aria-expanded="true"] .hi-bar--2 {
    opacity: 0;
    transform: scaleX(0.2);
}

body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle[aria-expanded="true"] .hi-bar--3 {
    transform: translateY(-5.25px) rotate(-45deg);
}

/* Tablet breakpoint */
@media (max-width: 1020px) {
    body:is(.home-page, :not(.home-page)) .site-header-band .site-header {
        display: flex;
        justify-content: space-between;
        gap: 14px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .brand img {
        width: 116px;
        height: 58px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links {
        font-size: 13.5px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a {
        min-height: 40px;
        padding: 8px 14px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta {
        min-height: 44px;
        padding: 0 12px 0 16px;
        font-size: 13.5px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta > span:first-child {
        padding-right: 11px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta-icon {
        padding-left: 10px;
    }
}

/* Narrow tablet / landscape safety (prevents horizontal crowding between 701px and 820px) */
@media (max-width: 820px) and (min-width: 701px) {
    body:is(.home-page, :not(.home-page)) .site-header-band .site-header {
        gap: 10px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .brand img {
        width: 96px;
        height: 48px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links {
        font-size: 13px;
        padding: 4px;
        gap: 2px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a {
        padding: 8px 10px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta {
        padding: 0 10px 0 12px;
        font-size: 13px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta > span:first-child {
        padding-right: 9px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta-icon {
        padding-left: 8px;
    }
}

/* Comfortable touch targets on hybrid / touch tablets */
@media (pointer: coarse) and (min-width: 701px) {
    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a {
        min-height: 44px;
    }
}

/* Mobile breakpoint */
@media (max-width: 700px) {
    body:is(.home-page, :not(.home-page)) .site-header-band .site-header,
    body:is(.home-page, :not(.home-page)) .site-header-band[data-scrolled="true"] .site-header {
        height: 76px;
        gap: 10px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .brand img {
        width: 108px;
        height: 54px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band[data-scrolled="true"] .brand img {
        transform: scale(0.92);
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .header-actions {
        gap: 8px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .header-actions .nav-cta--desktop {
        display: none;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle {
        display: grid;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-hover-pill {
        display: none;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        width: 100%;
        justify-self: stretch;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px;
        border-radius: 18px;
        background: rgba(252, 252, 249, 0.98);
        -webkit-backdrop-filter: blur(18px) saturate(140%);
        backdrop-filter: blur(18px) saturate(140%);
        border: 1px solid #cbd7c4;
        box-shadow: 0 18px 42px oklch(18% 0.05 155 / 0.16);
        font-size: 15px;
    }

    html.js body:is(.home-page, :not(.home-page)) .site-header-band .nav-links:not(.is-open):not(.is-closing) {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a:not(.nav-cta--mobile) {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 48px;
        padding: 12px 16px;
        border-radius: 12px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a:not(.nav-cta--mobile):not(.is-active):not([aria-current="page"]):hover {
        background: #edf3e6;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.nav-cta--mobile {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 50px;
        margin-top: 8px;
        padding: 0 16px 0 18px;
        border-radius: 12px;
        background: linear-gradient(180deg, #175237 0%, #0e3a26 100%);
        color: #faf9f5;
        font-size: 15px;
        font-weight: 500;
        border: 1px solid #0b301f;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.16),
            0 6px 14px oklch(20% 0.06 155 / 0.16);
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.nav-cta--mobile::before {
        display: none;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.nav-cta--mobile > span:first-child {
        padding-right: 12px;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.nav-cta--mobile .nav-cta-icon {
        height: 20px;
        padding-left: 12px;
        border-left: 1px solid rgba(250, 249, 245, 0.18);
        color: var(--header-poplar);
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-links a.nav-cta--mobile .nav-cta-icon svg {
        display: block;
        width: 15px;
        height: 15px;
    }

    html:not(.js) body:is(.home-page, :not(.home-page)) .site-header-band .site-header {
        height: auto;
        flex-wrap: wrap;
        padding-block: 10px;
    }

    html:not(.js) body:is(.home-page, :not(.home-page)) .site-header-band .nav-links {
        position: static;
        order: 4;
        flex-basis: 100%;
        margin-top: 8px;
    }

    html:not(.js) body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:is(.home-page, :not(.home-page)) .site-header-band .site-header,
    body:is(.home-page, :not(.home-page)) .site-header-band .brand img,
    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta-icon svg,
    body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle .hi-bar {
        transition: none;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band .nav-hover-pill {
        transition: opacity 140ms ease;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band,
    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta,
    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:not(.nav-cta--mobile),
    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta-icon,
    body:is(.home-page, :not(.home-page)) .site-header-band .menu-toggle {
        transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
    }

    body:is(.home-page, :not(.home-page)) .site-header-band[data-scrolled="true"] .brand img,
    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:hover,
    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:hover .nav-cta-icon svg,
    body:is(.home-page, :not(.home-page)) .site-header-band .nav-cta:active {
        transform: none;
    }
}

/* Floating WhatsApp action */
.floating-whatsapp {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 350;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #168343;
    color: #fff;
    box-shadow: 0 6px 20px #103e2b35;
    transition: background-color .18s, box-shadow .18s;
}

.floating-whatsapp svg {
    width: 30px;
    height: 30px;
}

.floating-whatsapp:hover {
    background: #106d36;
    box-shadow: 0 8px 24px #103e2b4a;
}

.floating-whatsapp:focus-visible {
    outline: 3px solid #103e2b;
    outline-offset: 5px;
}

@media (max-width: 700px) {
    .floating-whatsapp {
        right: 18px;
        bottom: max(18px, env(safe-area-inset-bottom));
        width: 54px;
        height: 54px;
    }

    .floating-whatsapp svg {
        width: 28px;
        height: 28px;
    }

    .site-footer {
        padding-bottom: max(84px, calc(72px + env(safe-area-inset-bottom)));
    }

    .footer-top nav a {
        min-width: 44px;
        padding-inline: 6px;
        justify-content: center;
    }
}
