/* ══════════════════════════════════════════════════════════
   ESTATE EDITION — Polished Luxury Design System
   Soft shadows, warm gold, refined transitions.
   ══════════════════════════════════════════════════════════ */

:root {
    --navy: #0F1923;
    --gold: #C9A96E;
    --gold-l: #DBC490;
    --gold-d: #A88B52;
    --cream: #F5F5F0;
    --charcoal: #333333;
    --gray: #6B7280;
    --white: #FFFFFF;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    position: relative;
}

img,
video,
iframe {
    max-width: 100%;
}

::selection {
    background: var(--gold);
    color: var(--white);
}

/* ── Scrollbar ──────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

/* ── Navbar ─────────────────────────────── */
#navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Brand Logo */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    max-width: calc(100vw - 6rem);
    flex-shrink: 1;
    color: var(--navy);
    text-decoration: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.brand-logo:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.brand-logo--text {
    gap: 0;
}

.brand-logo--image {
    gap: 0;
}

.brand-logo__image {
    display: block;
    width: auto;
    max-width: 220px;
    max-height: 52px;
    object-fit: contain;
}

.brand-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
}

.brand-wordmark {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.05;
    min-width: 0;
}

.brand-wordmark strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.03rem;
    letter-spacing: 0.08em;
    color: var(--navy);
    font-weight: 700;
    text-transform: uppercase;
}

.brand-wordmark small {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    color: var(--gold-d);
    text-transform: uppercase;
    margin-top: 0.2rem;
}

@media (max-width: 640px) {
    .brand-logo {
        gap: 0.5rem;
        max-width: calc(100vw - 5.75rem);
    }

    .brand-logo__image {
        max-width: 170px;
        max-height: 42px;
    }

    .brand-wordmark strong {
        font-size: 0.88rem;
        letter-spacing: 0.06em;
    }

    .brand-wordmark small {
        font-size: 0.5rem;
        letter-spacing: 0.14em;
    }
}

/* Hamburger Animation */
body.menu-open #menu-toggle span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open #menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.menu-open #menu-toggle span:nth-child(3) {
    width: 1.25rem;
    transform: translateY(-4px) rotate(-45deg);
}

/* ── Hero ──────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--navy);
}

.hero-bg img,
.hero-bg video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg img {
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.5s ease-in-out, transform 8s ease-out;
}

.hero-bg img.active,
.hero-bg video.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(15, 25, 35, 0.65) 0%,
            rgba(15, 25, 35, 0.45) 40%,
            rgba(15, 25, 35, 0.75) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 800px;
}

.about-vision-gallery {
    display: grid;
    gap: 1rem;
}

.about-vision-gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #f4efe6;
    box-shadow: 0 24px 60px rgba(15, 25, 35, 0.16);
}

.about-vision-gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-vision-gallery.is-single .about-vision-gallery-card {
    aspect-ratio: 4 / 5;
}

.about-vision-gallery-main,
.about-vision-gallery-secondary {
    display: grid;
    gap: 1rem;
}

.about-vision-gallery.is-multi .about-vision-gallery-main .about-vision-gallery-card,
.about-vision-gallery.is-multi .about-vision-gallery-secondary .about-vision-gallery-card {
    min-height: 220px;
}

@media (min-width: 1024px) {
    .about-vision-gallery.is-multi {
        grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
        align-items: stretch;
    }

    .about-vision-gallery.is-single {
        max-width: 560px;
    }

    .about-vision-gallery.is-multi .about-vision-gallery-main {
        min-height: 720px;
    }

    .about-vision-gallery.is-multi .about-vision-gallery-main .about-vision-gallery-card {
        height: 100%;
    }

    .about-vision-gallery-secondary.count-1 {
        grid-template-rows: 1fr;
    }

    .about-vision-gallery-secondary.count-2 {
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .about-vision-gallery-secondary.count-3 {
        grid-template-rows: repeat(3, minmax(0, 1fr));
    }
}

/* ── Search Bar ────────────────────────── */
.search-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0;
}

.search-bar input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--charcoal);
    outline: none;
}

.search-bar input::placeholder {
    color: #999;
}

.search-bar select {
    padding: 1rem 1rem;
    border: none;
    border-left: 1px solid #eee;
    background: transparent;
    font-size: 14px;
    color: var(--charcoal);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.search-bar button {
    padding: 0.9rem 2rem;
    background: var(--gold);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.search-bar button:hover {
    background: var(--gold-d);
    box-shadow: 0 6px 24px rgba(201, 169, 110, 0.4);
    transform: translateY(-1px);
}

/* Dynamic Theme Utilities */
.ui-bg-primary {
    background-color: var(--theme-primary);
}

.ui-bg-primary-hover:hover {
    background-color: var(--theme-primary-hover);
}

.ui-btn-primary {
    background-color: var(--theme-primary);
    color: var(--theme-text-on-primary);
    border: 1px solid var(--theme-primary);
    transition: all 0.25s ease;
}

.ui-btn-primary:hover {
    background-color: var(--theme-primary-hover);
    border-color: var(--theme-primary-hover);
}

.ui-text-primary {
    color: var(--theme-text-primary);
}

.ui-text-secondary {
    color: var(--theme-text-secondary);
}

.ui-bg-page {
    background-color: var(--theme-bg-page);
}

.ui-bg-surface {
    background-color: var(--theme-bg-surface);
}

.ui-border-theme {
    border-color: var(--theme-border);
}

.ui-navbar-bg {
    background-color: var(--theme-bg-navbar);
}

.ui-footer-bg {
    background-color: var(--theme-bg-footer);
}

@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        border-radius: 20px;
        padding: 0.75rem;
    }

    .search-bar input {
        border-bottom: 1px solid #eee;
    }

    .search-bar select {
        border-left: none;
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    .search-bar button {
        width: 100%;
        justify-content: center;
        border-radius: 12px;
    }
}

/* ── Stats ─────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Property Cards ────────────────────── */
.property-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.08);
    border-color: rgba(201, 169, 110, 0.2);
}

.property-card .card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.property-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card:hover .card-img img {
    transform: scale(1.06);
}

/* ── Buttons ───────────────────────────── */
.btn-gold,
.btn-navy,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-gold {
    padding: 0.85rem 2rem;
    background: var(--gold);
    color: white;
}

.btn-gold:hover {
    background: var(--gold-d);
    box-shadow: 0 8px 28px rgba(201, 169, 110, 0.35);
    transform: translateY(-2px);
}

.btn-navy {
    padding: 0.85rem 2rem;
    background: var(--navy);
    color: white;
}

.btn-navy:hover {
    background: #162636;
    box-shadow: 0 8px 28px rgba(15, 25, 35, 0.25);
    transform: translateY(-2px);
}

.btn-outline {
    padding: 0.8rem 1.8rem;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    color: var(--charcoal);
    font-weight: 500;
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ── Reveal Animations ─────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.reveal-stagger>*:nth-child(1) {
    transition-delay: 0s;
}

.reveal-stagger>*:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-stagger>*:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-stagger>*:nth-child(4) {
    transition-delay: 0.3s;
}

.reveal-stagger>*:nth-child(5) {
    transition-delay: 0.4s;
}

.reveal-stagger>*:nth-child(6) {
    transition-delay: 0.5s;
}

/* ── WhatsApp Float ────────────────────── */
#whatsapp-float {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#whatsapp-float:hover {
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.35);
}

/* ── Utilities ─────────────────────────── */
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-none::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .listing-hero-breadcrumb {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .listing-specs-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .listing-specs-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        width: 100%;
    }

    .listing-specs-price {
        width: 100%;
        text-align: left;
        font-size: 2rem;
        line-height: 1.1;
        word-break: break-word;
    }

    .listing-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .listing-card-header>* {
        max-width: 100%;
    }

    .listing-gallery-slide {
        width: calc(100vw - 5.5rem);
        max-width: 100%;
    }

    .listing-sidebar {
        position: static;
        top: auto;
    }

    .listing-fab-label {
        display: none;
    }

    .mobile-slider-card,
    .mobile-testimonial-card {
        width: min(20.5rem, calc(100vw - 3.5rem));
        max-width: calc(100vw - 3.5rem);
    }

    .mobile-card-actions,
    .mobile-inline-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .mobile-card-actions > *,
    .mobile-inline-actions > * {
        max-width: 100%;
    }

    .mobile-card-actions > a {
        align-self: flex-start;
    }

    .mobile-metric-row {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
