/* ============================================================
   PROPERTY CORRIDORS — consolidated stylesheet
   (replaces the old style.css + the inline <style> in the layout)
   ============================================================ */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
    --navy-deep:     #081222;
    --navy:          #0F2342;
    --navy-mid:      #1B3A63;
    --emerald:       #059669;
    --emerald-light: #10B981;
    --emerald-soft:  #ECFDF5;
    --paper:         #F7F8FA;
    --surface:       #FFFFFF;
    --ink:           #0F172A;
    --ink-muted:     #64748B;
    --ink-faint:     #94A3B8;
    --line:          #E2E8F0;
    --amber:         #F59E0B;

    --crimson:       #B5271A;
    --cream:         #F7F4EF;
    --chalk:         #FAFAF8;
    --slate:         #4A5568;
    --mist:          #EAE7E1;

    /* legacy aliases: delete once no view uses var(--gold) */
    --gold:          var(--emerald);
    --gold-light:    var(--emerald-light);

    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

    --card-radius:       16px;
    --card-shadow:       0 4px 32px rgba(11,31,58,0.08);
    --card-shadow-hover: 0 16px 48px rgba(11,31,58,0.14);
    --transition:        all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.15;
    color: var(--navy);
}
h1, h2, h3, h4, .font-display { font-family: var(--font-display); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ── Navbar ────────────────────────────────────────────────── */
#mainNav {
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 16px rgba(8,18,34,0.35);
}
#mainNav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.35); }
#mainNav .container { height: 100%; display: flex; align-items: center; }

.navbar-brand {
    display: flex; align-items: center; gap: 9px;
    text-decoration: none; margin-right: 28px; flex-shrink: 0;
}
.brand-icon {
    width: 32px; height: 32px; background: var(--emerald);
    border-radius: 7px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.82rem; flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-size: 1.15rem; color: #fff; letter-spacing: -0.01em; line-height: 1; }
.brand-name span { color: var(--emerald-light); }

.navbar-nav { margin-left: 12px; gap: 4px; }
.navbar-nav .nav-link {
    position: relative;
    height: 64px; display: flex; align-items: center; justify-content: center;
    padding: 0 16px;
    font-size: 0.88rem; font-weight: 600;
    color: rgba(255,255,255,0.62) !important;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}
.navbar-nav .nav-link::after {
    content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 70%; height: 3px; background: var(--emerald-light); border-radius: 3px 3px 0 0;
    opacity: 0; transition: opacity 0.15s;
}
.navbar-nav .nav-link:hover { color: #fff !important; }
.navbar-nav .nav-link:hover::after { opacity: 0.45; }
.navbar-nav .nav-link.active { color: #fff !important; }
.navbar-nav .nav-link.active::after { opacity: 1; }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn-sign-in {
    height: 36px; padding: 0 18px;
    border: 1.5px solid rgba(255,255,255,0.2); border-radius: 8px;
    background: transparent;
    font-size: 0.84rem; font-weight: 600; color: rgba(255,255,255,0.85);
    cursor: pointer; transition: all 0.2s;
    text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap;
}
.btn-sign-in:hover { border-color: var(--emerald-light); color: #fff; background: rgba(16,185,129,0.08); }

.navbar-toggler { border: none; padding: 4px 8px; color: #fff; }
.navbar-toggler:focus { box-shadow: none; }

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--navy);
        border-top: 1px solid rgba(255,255,255,0.08);
        padding: 8px 0 16px;
        position: absolute; top: 64px; left: 0; right: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
        z-index: 1050;
    }
    .navbar-nav { margin-left: 0; }
    .navbar-nav .nav-link {
        height: 46px; padding: 0 20px; justify-content: flex-start;
        border-left: 3px solid transparent;
    }
    .navbar-nav .nav-link::after { display: none; }
    .navbar-nav .nav-link.active { border-left-color: var(--emerald-light); background: rgba(255,255,255,0.04); }
    .navbar-nav .nav-link:hover { background: rgba(255,255,255,0.04); }
    .nav-right { padding: 10px 20px 0; margin-left: 0; }
    .btn-sign-in { width: 100%; justify-content: center; height: 42px; }
}

/* ── Logout toast ──────────────────────────────────────────── */
#logoutToast {
    position: fixed; top: 76px; right: 24px; z-index: 9999;
    background: var(--navy); color: #fff;
    padding: 13px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    box-shadow: 0 8px 28px rgba(8,18,34,0.3);
    display: flex; align-items: center; gap: 10px;
    animation: toastSlide 0.35s ease, toastFade 0.4s ease 3.5s forwards;
}
#logoutToast i.fa-circle-check { color: var(--emerald-light); font-size: 17px; }
#logoutToast button {
    background: none; border: none; color: rgba(255,255,255,0.5);
    font-size: 16px; cursor: pointer; margin-left: 8px; padding: 0; line-height: 1;
}
@keyframes toastSlide { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastFade  { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* ── Search section ────────────────────────────────────────── */
.search-section {
    background: #EDF8F6;
    padding: 32px 0 28px;
    border-bottom: 1px solid var(--mist);
    position: relative;
}

.status-badge-sale {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--emerald); color: #fff;
    padding: 6px 18px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.status-badge-sale::before {
    content: ''; width: 6px; height: 6px;
    background: rgba(255,255,255,0.7); border-radius: 50%;
    animation: blink 1.8s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.search-container-pill {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--mist);
    display: flex; align-items: stretch;
    padding: 6px 6px 6px 0;
    box-shadow: 0 4px 20px rgba(11,31,58,0.06);
    overflow: hidden;
}

.filter-group {
    flex: 1;
    padding: 8px 18px;
    border-right: 1px solid var(--mist);
    display: flex; flex-direction: column; justify-content: center;
}
.filter-group:last-of-type { border-right: none; }
.filter-group label {
    display: block;
    font-size: 0.68rem; font-weight: 600;
    color: #1a3660;
    letter-spacing: 0.1em; text-transform: uppercase;
    margin-bottom: 3px;
}
.filter-group .form-select {
    border: none; padding: 0;
    font-size: 0.88rem; font-weight: 500;
    color: var(--navy);
    background-color: transparent;
    cursor: pointer;
    box-shadow: none !important;
}
.filter-group .form-select:focus { outline: none; }

.btn-search-red {
    background: var(--emerald); color: #fff;
    border: none; border-radius: 10px;
    padding: 10px 28px;
    font-weight: 600; font-size: 0.88rem; letter-spacing: 0.04em;
    cursor: pointer; transition: var(--transition);
    white-space: nowrap; margin: 0 4px;
    display: flex; align-items: center; gap: 8px;
}
.btn-search-red:hover {
    background: var(--navy);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(181,39,26,0.3);
}

/* ── Map ───────────────────────────────────────────────────── */
.map-listing-header {
    background: #fff;
    border-bottom: 1px solid var(--mist);
    padding: 14px 24px;
    display: flex; align-items: center; gap: 12px;
}
.map-listing-header h5 { font-size: 0.95rem; font-weight: 600; color: var(--navy); margin: 0; }

.pill-for-sale {
    background: var(--emerald); color: #fff;
    font-size: 0.65rem; padding: 2px 10px;
    border-radius: 50px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
}

.map-section { background: var(--mist); }
#map { height: 480px; width: 100%; }
#map-loading-overlay { border-radius: 0 !important; }

.legend-radio-group { display: flex; flex-direction: column; gap: 4px; }
.legend-radio-label {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 12px; font-weight: 500;
    color: var(--navy); padding: 5px 8px; border-radius: 6px;
    transition: background 0.15s;
}
.legend-radio-label:hover { background: #EDF8F6; }
.legend-radio-label input[type="radio"] {
    accent-color: var(--crimson); width: 14px; height: 14px; cursor: pointer;
}
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Pulse ticker ──────────────────────────────────────────── */
.pulse-ticker {
    background: #fff;
    border-top: 1px solid var(--mist);
    border-bottom: 1px solid var(--mist);
}
.pulse-ticker .glass-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 14px 24px !important;
}
.pulse-dot {
    background: var(--crimson) !important;
    font-size: 0.65rem; letter-spacing: 0.06em;
    animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(181,39,26,0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(181,39,26,0); }
    100% { box-shadow: 0 0 0 0 rgba(181,39,26,0); }
}

/* ── Stats ─────────────────────────────────────────────────── */
.stats-section { padding: 72px 0; background: var(--chalk); }

.glass-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 28px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--mist);
    transition: var(--transition);
    height: 100%;
    cursor: pointer;
}
.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(201,169,110,0.25);
}

.stat-number {
    font-size: 3rem; font-weight: 700;
    color: var(--navy);
    line-height: 1; margin-bottom: 8px;
    transition: color 0.3s ease;
}
.stat-label {
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--slate);
}
.stat-sub {
    font-size: 0.78rem; color: #9CA3AF;
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid var(--mist);
}

.active-gold { border-top: 3px solid #1a3660 !important; }
.active-gold .stat-number { color: #1a3660 !important; }

.glass-card.accent-gold {
    background: linear-gradient(135deg, var(--navy) 0%, #1a3a60 100%);
    border-color: transparent;
    color: #fff;
}
.glass-card.accent-gold h1,
.glass-card.accent-gold h2,
.glass-card.accent-gold h3,
.glass-card.accent-gold h4,
.glass-card.accent-gold h5,
.glass-card.accent-gold .stat-number { color: #fff; }
.glass-card.accent-gold .stat-label { color: rgba(255,255,255,0.6); }
.glass-card.accent-gold:hover { border-color: #1a3660; }

.house-type-btn {
    border: 1px solid var(--mist) !important;
    border-radius: 10px !important;
    transition: var(--transition);
    cursor: pointer;
}
.house-type-btn:hover {
    border-color: #1a3660 !important;
    background: #EDF8F6 !important;
    transform: translateY(-2px);
}
.house-type-btn .h4 { color: var(--navy); }

.ai-stat-mini {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 16px;
}
.ai-stat-mini .h4 { font-size: 1.8rem; }

/* ── Charts ────────────────────────────────────────────────── */
.chart-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 28px;
    border: 1px solid var(--mist);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
}
.chart-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.chart-card h5 { font-size: 1.1rem; font-weight: 600; }
.chart-card .total-label { font-size: 1.6rem; color: var(--navy); }

/* ── Insight section ───────────────────────────────────────── */
.insight-section {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}
.insight-section::before {
    content: '';
    position: absolute; top: -120px; right: -120px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(201,169,110,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.insight-section h2 { font-size: 3rem; color: #fff; font-weight: 300; }
.insight-section h2 em { font-style: italic; color: var(--emerald-light); }

.insight-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(201,169,110,0.2);
    border-left: 3px solid #1a3660;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 16px;
    transition: var(--transition);
}
.insight-item:hover { background: rgba(255,255,255,0.08); border-left-color: var(--emerald-light); }
.insight-item h4 { color: #fff; font-size: 1.05rem; margin-bottom: 6px; }
.insight-item p { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin: 0; }

/* ── Section headings ──────────────────────────────────────── */
.section-label {
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: #1a3660;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px;
}
.section-label::before { content: ''; width: 24px; height: 1.5px; background: #1a3660; }
.section-title { font-size: 2.4rem; font-weight: 300; margin-bottom: 16px; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.6);
    padding: 64px 0 28px;
    font-size: 0.88rem;
}
footer h5 {
    font-family: var(--font-body);
    color: #fff; font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    margin-bottom: 18px;
}
footer p { line-height: 1.7; color: rgba(255,255,255,0.5); }
footer address p { margin-bottom: 10px; color: rgba(255,255,255,0.55); }

.footer-brand { font-family: var(--font-display); font-size: 1.4rem; color: #fff; margin-bottom: 14px; }
.footer-brand span { color: var(--emerald-light); }

.footer-link {
    display: block; color: rgba(255,255,255,0.55); text-decoration: none;
    margin-bottom: 11px; transition: color 0.15s;
}
.footer-link:hover { color: var(--emerald-light); }

.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7); text-decoration: none;
    transition: all 0.2s;
}
.footer-social a:hover { color: #fff; background: var(--emerald); border-color: var(--emerald); transform: translateY(-2px); }

.footer-newsletter .form-control {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    color: #fff; font-size: 0.85rem; padding: 10px 14px;
}
.footer-newsletter .form-control::placeholder { color: rgba(255,255,255,0.35); }
.footer-newsletter .form-control:focus { box-shadow: none; border-color: var(--emerald); background: rgba(255,255,255,0.08); }
.footer-newsletter .btn {
    background: var(--emerald); color: #fff; font-weight: 700; font-size: 0.85rem;
    padding: 10px 18px; border: none;
}
.footer-newsletter .btn:hover { background: var(--emerald-light); }

.footer-divider { border-color: rgba(255,255,255,0.1); margin: 48px 0 24px; }
.footer-copy { color: rgba(255,255,255,0.4); font-size: 0.82rem; }

/* Footer contact rows: icon + text aligned, links styled (no default blue) */
.footer-contact p { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-contact i { color: var(--emerald-light); width: 16px; flex: 0 0 16px; text-align: center; }
.footer-contact span,
.footer-contact a {
    color: rgba(255,255,255,0.55) !important;
    text-decoration: none !important;
    min-width: 0;
    overflow-wrap: anywhere;
    transition: color 0.15s;
}
.footer-contact a:hover { color: var(--emerald-light) !important; }
@media (max-width: 575px) {
    .footer-contact span, .footer-contact a { font-size: 0.85rem; }
}

/* ── Utilities ─────────────────────────────────────────────── */
.text-gold    { color: #1a3660 !important; }
.text-crimson { color: var(--crimson) !important; }
.bg-cream     { background: var(--cream) !important; }
.rounded-gold { border-radius: var(--card-radius); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .search-container-pill { flex-direction: column; border-radius: 12px; padding: 12px; gap: 4px; }
    .filter-group { border-right: none; border-bottom: 1px solid var(--mist); padding: 10px 4px; }
    .filter-group:last-of-type { border-bottom: none; }
    .btn-search-red { width: 100%; justify-content: center; margin-top: 8px; }
    #map { height: 360px; }
    .stat-number { font-size: 2.2rem; }
    .section-title { font-size: 1.8rem; }
    .insight-section h2 { font-size: 2rem; }
}