/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #1e2a3a;
    --primary-dark: #141e2b;
    --primary-light: #2a3d54;
    --secondary: #1a1a2e;
    --accent: #D4AF37;
    --accent-light: #F0D060;
    --accent-dark: #B8960C;
    --gold-gradient: linear-gradient(135deg, #B8960C 0%, #FFD700 40%, #D4AF37 70%, #B8960C 100%);
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;
    --border: #e8e8e8;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.3; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.95rem; border: 2px solid transparent;
    cursor: pointer; transition: var(--transition); font-family: 'Inter', sans-serif;
    text-align: center; justify-content: center;
}
.btn-primary { background: var(--accent); color: #1a1a2e; border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(212,175,55,0.5); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-white { background: white; color: var(--primary); border-color: white; }
.btn-white:hover { background: transparent; color: white; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }
.btn-xs { padding: 0.35rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2.25rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--primary-dark); color: rgba(255,255,255,0.8);
    font-size: 0.85rem; padding: 0.5rem 0;
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-bar-left { display: flex; gap: 1.5rem; }
.top-bar-left a { color: rgba(255,255,255,0.8); display: flex; align-items: center; gap: 0.4rem; }
.top-bar-left a:hover { color: white; }
.top-bar-right { display: flex; gap: 1rem; }
.top-bar-right a { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.top-bar-right a:hover { color: var(--primary-light); }

/* ===== HEADER ===== */
.header {
    background: white; position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 1px 10px rgba(0,0,0,0.06);
    transition: var(--transition);
}
.header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 75px; }

/* Logo */
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--secondary); letter-spacing: -0.5px; }
.logo-accent { color: var(--accent); }
.logo-tagline { font-size: 0.65rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 2px; font-weight: 500; }

/* Nav */
.nav { display: flex; gap: 0.25rem; }
.nav-link {
    padding: 0.5rem 1rem; color: var(--text); font-weight: 500;
    font-size: 0.95rem; border-radius: var(--radius-sm);
    position: relative;
}
.nav-link:hover { color: var(--primary); background: rgba(10,126,140,0.05); }
.nav-link.active { color: var(--accent); }
.nav-link.active::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%); width: 20px; height: 3px;
    background: var(--accent); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 1rem; }

/* Mobile Toggle */
.mobile-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 5px;
}
.mobile-toggle span { width: 24px; height: 2.5px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== HERO ===== */
.hero {
    position: relative; min-height: 85vh; display: flex;
    align-items: center; overflow: hidden;
}

/* Slideshow */
.hero-slideshow { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.5s ease-in-out, transform 8s ease-in-out;
    will-change: opacity, transform;
}
.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(135deg, rgba(20,30,43,0.88) 0%, rgba(30,42,58,0.78) 50%, rgba(42,61,84,0.70) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 3rem 2rem 4rem; width: 100%; }

/* Hero Tagline */
.hero-tagline {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.75rem;
    font-weight: 500;
    animation: fadeInDown 0.8s ease forwards;
}

.hero-title-new {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    animation: fadeInDown 0.8s ease 0.1s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-title-new span {
    color: #f0c040;
}

/* Deprecated styles (kept for backwards compatibility if needed) */
.hero-title { font-size: 3.5rem; color: white; margin-bottom: 1rem; font-weight: 700; }
.hero-title span { color: #f0c040; }
.hero-subtitle { font-size: 1.15rem; color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 2.5rem; }

/* Hero Search */
.hero-search { max-width: 850px; margin: 0 auto 3rem; position: relative; z-index: 50; }
.search-box {
    display: flex; background: white; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); position: relative;
}
.search-field { flex: 1; display: flex; align-items: center; padding: 0 1.25rem; gap: 0.75rem; position: relative; }
.search-field i { color: var(--text-lighter); font-size: 1.1rem; }
.search-field input {
    border: none; outline: none; width: 100%; padding: 1rem 0;
    font-size: 1rem; font-family: 'Inter', sans-serif;
}
.search-select {
    border: none; border-left: 1px solid var(--border); padding: 1rem 1.25rem;
    font-size: 0.9rem; color: var(--text-light); background: white;
    font-family: 'Inter', sans-serif; cursor: pointer; outline: none;
    appearance: auto; min-width: 140px;
}
.search-btn { border-radius: 0; padding: 1rem 2rem; font-size: 1rem; }

/* Compact Search (in hero tabs section) */
.hero-search-compact {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    position: relative;
    z-index: 50;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.9s forwards;
}

.search-box-compact {
    display: flex;
    background: rgba(255,255,255,0.95);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.search-field-compact {
    flex: 1; display: flex; align-items: center;
    padding: 0 1.25rem; gap: 0.75rem;
}

.search-field-compact i { color: #999; font-size: 0.95rem; }

.search-field-compact input {
    border: none; outline: none; width: 100%;
    padding: 0.85rem 0; font-size: 0.9rem;
    font-family: 'Inter', sans-serif; background: transparent;
}

.search-select-compact {
    border: none; border-left: 1px solid #e0e0e0;
    padding: 0.85rem 1rem; font-size: 0.85rem;
    color: #666; background: transparent;
    font-family: 'Inter', sans-serif; cursor: pointer;
    outline: none; appearance: auto; min-width: 110px;
}

.search-btn-compact {
    border-radius: 0 50px 50px 0;
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
}

/* Search Typeahead Dropdown */
.search-typeahead {
    position: absolute; top: 100%; left: 0; right: 0;
    background-color: #ffffff !important; border-radius: 0 0 14px 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.25); z-index: 9999;
    max-height: 440px; overflow-y: auto;
    display: none; border-top: 3px solid var(--primary);
    margin-top: -1px; backdrop-filter: none;
    opacity: 1 !important;
    isolation: isolate;
}
.search-typeahead.show { display: block; background-color: #ffffff !important; }
.search-typeahead a, .search-typeahead div {
    background-color: #ffffff;
    position: relative;
}
.search-typeahead a:hover, .search-typeahead a:hover > div {
    background-color: #e6f4f5 !important;
}
.ta-item {
    display: flex !important; align-items: center !important; gap: 14px;
    padding: 12px 16px; text-decoration: none !important; color: var(--text);
    transition: background 0.15s; border-bottom: 1px solid #f0f0f0;
    cursor: pointer; flex-direction: row !important;
    background-color: #ffffff !important;
}
.ta-item:hover { background-color: #e6f4f5 !important; }
.ta-img {
    width: 90px !important; min-width: 90px !important; max-width: 90px !important;
    height: 64px !important; border-radius: 8px;
    object-fit: cover; flex-shrink: 0; background: #eee;
    display: inline-block !important;
}
.ta-info { flex: 1; min-width: 0; }
.ta-title {
    font-weight: 600; font-size: 0.92rem; color: var(--secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.3;
}
.ta-address {
    font-size: 0.78rem; color: #888; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ta-address i { margin-right: 4px; color: var(--primary); font-size: 0.7rem; }
.ta-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.ta-price {
    font-weight: 700; color: #fff; font-size: 0.82rem;
    background: var(--primary); padding: 2px 8px; border-radius: 4px;
}
.ta-details { font-size: 0.76rem; color: #999; }
.ta-view-all {
    display: block; padding: 14px 16px; text-align: center;
    color: var(--primary); font-weight: 600; font-size: 0.9rem;
    text-decoration: none; background: #f4fafb; border-radius: 0 0 14px 14px;
    border-top: 1px solid #e8f0f2;
}
.ta-view-all:hover { background: #e0f2f4; }
.ta-view-all i { margin-right: 6px; }
.ta-empty {
    padding: 28px 16px; text-align: center;
    color: #aaa; font-size: 0.9rem;
}
.ta-empty i { margin-right: 6px; }

/* Hero Stats */
.hero-stats { display: flex; justify-content: center; gap: 3rem; }
.stat { text-align: center; color: white; }
.stat-number { font-size: 2.25rem; font-weight: 700; font-family: 'Playfair Display', serif; }
.stat-plus { font-size: 1.5rem; font-weight: 700; color: #f0c040; }
.stat-label { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-top: 0.25rem; }

/* Hero Wave */
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; z-index: 3; }
.hero-wave svg { display: block; width: 100%; height: 80px; }

/* Hero Tabs */
.hero-tabs {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto 2.5rem;
    -webkit-justify-content: center;
    justify-content: center;
}
.hero-tabs > * { -webkit-flex: 1 1 300px; flex: 1 1 300px; max-width: 360px; }

.hero-tab {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 260px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    cursor: pointer;
    -webkit-transition: transform 0.4s, box-shadow 0.4s;
    transition: transform 0.4s, box-shadow 0.4s;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    /* Solid color fallback ON the tab itself — always visible regardless of child elements */
    background: #333;
}

/* Direct background on each tab variant as bulletproof fallback */
.hero-tab.hero-tab-sell { background: linear-gradient(135deg, #8b1e1e, #b43c28); background-color: #8b1e1e; }
.hero-tab.hero-tab-buy { background: linear-gradient(135deg, #0a3d62, #0a7e8c); background-color: #0a3d62; }
.hero-tab.hero-tab-agent { background: linear-gradient(135deg, #1a5c2e, #2d8a4e); background-color: #1a5c2e; }

.hero-tab:hover {
    -webkit-transform: translateY(-10px) scale(1.03);
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* Background image layer (enhancement — works in modern browsers, fails gracefully) */
.hero-tab-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    -webkit-transition: transform 0.6s;
    transition: transform 0.6s;
}

.hero-tab:hover .hero-tab-bg { -webkit-transform: scale(1.1); transform: scale(1.1); }

.hero-tab-sell .hero-tab-bg {
    background-color: #8b1e1e;
    background-image: url('https://images.unsplash.com/photo-1582407947092-83df40df1654?auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
}
.hero-tab-sell .hero-tab-bg::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(139,30,30,0.92), rgba(180,60,40,0.88));
}

.hero-tab-buy .hero-tab-bg {
    background-color: #0a3d62;
    background-image: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
}
.hero-tab-buy .hero-tab-bg::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(10,61,98,0.92), rgba(10,126,140,0.88));
}

.hero-tab-agent .hero-tab-bg {
    background-color: #1a5c2e;
    background-image: url('https://images.unsplash.com/photo-1560250097-0b93528c311a?auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
}
.hero-tab-agent .hero-tab-bg::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(26,92,46,0.92), rgba(45,138,78,0.88));
}

.hero-tab-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    padding: 32px 24px;
    width: 100%;
}

.hero-tab-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 26px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,0.3);
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}

.hero-tab:hover .hero-tab-icon {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.hero-tab-content h3 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.hero-tab-content p {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 16px;
    line-height: 1.5;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

.hero-tab-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 25px;
    background: rgba(255,255,255,0.2);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-tab:hover .hero-tab-cta {
    background: #fff;
    color: #1a1a2e;
}

/* ===== SECTIONS ===== */
.section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
    display: inline-block; background: rgba(10,126,140,0.1); color: var(--primary);
    padding: 0.35rem 1rem; border-radius: 20px; font-size: 0.85rem;
    font-weight: 600; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
}
.section-title { font-size: 2.25rem; color: var(--secondary); margin-bottom: 0.75rem; }
.section-desc { color: var(--text-light); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-cta { text-align: center; margin-top: 2.5rem; }

/* ===== LISTINGS FILTER ===== */
.listings-filter { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-btn {
    padding: 0.5rem 1.5rem; border: 2px solid var(--border); background: white;
    border-radius: 25px; cursor: pointer; font-weight: 500; font-size: 0.9rem;
    transition: var(--transition); font-family: 'Inter', sans-serif; color: var(--text-light);
}
.filter-btn:hover, .filter-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(10,126,140,0.05); }

/* ===== PROPERTY CARDS ===== */
.listings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }

.property-card {
    background: white; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: var(--transition);
}
.property-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.property-image {
    position: relative; height: 220px; overflow: hidden;
}
.property-img-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; color: rgba(255,255,255,0.3); font-size: 3rem;
}
.property-badge {
    position: absolute; top: 1rem; left: 1rem; padding: 0.3rem 0.9rem;
    border-radius: 5px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.property-badge.sale { background: var(--primary); color: white; }
.property-badge.rent { background: #e74c3c; color: white; }
.property-badge.new { background: var(--accent); color: white; }
.property-badge.pending { background: #6c757d; color: white; }

.property-fav {
    position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px;
    border-radius: 50%; background: rgba(255,255,255,0.9); border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #e74c3c; font-size: 1rem; transition: var(--transition);
}
.property-fav:hover { background: white; transform: scale(1.1); }
.property-fav.active i { font-weight: 900; }

.property-price {
    position: absolute; bottom: 1rem; left: 1rem; background: rgba(0,0,0,0.7);
    color: white; padding: 0.4rem 1rem; border-radius: 6px; font-weight: 700; font-size: 1.1rem;
}

.property-info { padding: 1.25rem; }
.property-title { font-size: 1.15rem; margin-bottom: 0.4rem; color: var(--secondary); }
.property-location { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.property-location i { color: var(--primary); font-size: 0.8rem; }

.property-features {
    display: flex; gap: 1rem; padding: 0.75rem 0;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.property-features span { font-size: 0.82rem; color: var(--text-light); display: flex; align-items: center; gap: 0.35rem; }
.property-features i { color: var(--primary); font-size: 0.85rem; }

.property-footer { display: flex; justify-content: space-between; align-items: center; }
.property-agent { display: flex; align-items: center; gap: 0.6rem; }
.agent-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.7rem; font-weight: 700;
}
.property-agent span { font-size: 0.82rem; color: var(--text-light); }

/* ===== SERVICES ===== */
.services-section { background: var(--bg-light); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }

.service-card {
    background: white; padding: 2rem; border-radius: var(--radius);
    box-shadow: var(--shadow); transition: var(--transition); text-align: center;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.service-icon {
    width: 70px; height: 70px; border-radius: 50%;
    background: rgba(10,126,140,0.1); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 1.25rem;
    transition: var(--transition);
}
.service-card:hover .service-icon { background: var(--primary); color: white; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; color: var(--secondary); }
.service-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; line-height: 1.6; }
.service-link { color: var(--primary); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.service-link:hover { gap: 0.7rem; }

/* ===== CTA SECTION ===== */
.cta-section { padding: 0 0 5rem; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.cta-card {
    padding: 3rem; border-radius: var(--radius); position: relative; overflow: hidden;
}
.cta-buy { background: linear-gradient(135deg, #1e2a3a, #2a3d54); }
.cta-sell { background: linear-gradient(135deg, #1a1a2e, #2d3436); }
.cta-card-content { position: relative; z-index: 2; color: white; }
.cta-card h3 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.cta-card p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }

/* ===== NEIGHBORHOODS ===== */
.neighborhoods-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto; gap: 1.25rem;
}
.neighborhood-card {
    position: relative; border-radius: var(--radius); overflow: hidden;
    min-height: 180px; cursor: pointer; transition: var(--transition);
}
.neighborhood-card.large { grid-column: span 2; }
.neighborhood-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.neighborhood-bg { position: absolute; inset: 0; transition: var(--transition); }
.neighborhood-card:hover .neighborhood-bg { transform: scale(1.05); }
.neighborhood-content {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 1.5rem; color: white;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.5));
}
.neighborhood-content h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.neighborhood-content p { font-size: 0.85rem; opacity: 0.85; }

/* ===== TESTIMONIALS ===== */
.testimonials-section { background: var(--bg-light); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.testimonial-card {
    background: white; padding: 2rem; border-radius: var(--radius);
    box-shadow: var(--shadow); transition: var(--transition);
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.testimonial-stars { color: #f0c040; margin-bottom: 1rem; font-size: 0.9rem; }
.testimonial-card p { font-size: 0.95rem; color: var(--text-light); line-height: 1.7; margin-bottom: 1.25rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.author-avatar {
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 0.85rem;
}
.testimonial-author strong { display: block; font-size: 0.95rem; color: var(--secondary); }
.testimonial-author span { font-size: 0.82rem; color: var(--text-lighter); }

/* ===== MORTGAGE CALCULATOR ===== */
.calculator-section { background: var(--bg-light); }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.calc-info .section-title { text-align: left; }
.calc-info .section-tag { text-align: left; }
.calc-info p { color: var(--text-light); margin-bottom: 1.5rem; line-height: 1.7; }
.calc-benefits { display: flex; flex-direction: column; gap: 0.75rem; }
.calc-benefits li { display: flex; align-items: center; gap: 0.75rem; color: var(--text); font-weight: 500; }
.calc-benefits i { color: var(--primary); }

.calc-form {
    background: white; padding: 2rem; border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.calc-field { margin-bottom: 1.25rem; }
.calc-field label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--secondary); }
.input-icon {
    display: flex; align-items: center; border: 2px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden; transition: var(--transition);
}
.input-icon:focus-within { border-color: var(--primary); }
.input-icon span { padding: 0.75rem 1rem; background: var(--bg-light); color: var(--text-light); font-weight: 600; }
.input-icon input {
    border: none; outline: none; padding: 0.75rem 1rem; width: 100%;
    font-size: 1rem; font-family: 'Inter', sans-serif;
}
.calc-field select {
    width: 100%; padding: 0.85rem 1rem; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 1rem; font-family: 'Inter', sans-serif;
    outline: none; cursor: pointer; background: white;
}
.calc-field select:focus { border-color: var(--primary); }

.calc-result {
    margin-top: 1.5rem; text-align: center; padding: 1.5rem;
    background: linear-gradient(135deg, #1e2a3a, #2a3d54);
    border-radius: var(--radius-sm);
}
.result-label { display: block; color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-bottom: 0.3rem; }
.result-amount { display: block; color: white; font-size: 2rem; font-weight: 700; font-family: 'Playfair Display', serif; }

/* ===== PARTNERS ===== */
.partners-grid {
    display: flex; justify-content: center; align-items: center;
    gap: 3rem; flex-wrap: wrap;
}
.partner-logo {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    color: var(--text-lighter); transition: var(--transition);
    padding: 1.5rem 2rem;
}
.partner-logo:hover { color: var(--primary); }
.partner-logo span { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* ===== NEWSLETTER ===== */
.newsletter-section {
    background: linear-gradient(135deg, #1e2a3a, #2a3d54);
    padding: 4rem 0;
}
.newsletter-content { text-align: center; color: white; max-width: 600px; margin: 0 auto; }
.newsletter-content h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.newsletter-content p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }
.newsletter-form { display: flex; gap: 0; max-width: 480px; margin: 0 auto; }
.newsletter-form input {
    flex: 1; padding: 0.85rem 1.25rem; border: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 1rem; outline: none; font-family: 'Inter', sans-serif;
}
.newsletter-form .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--secondary); border-color: var(--secondary); }
.newsletter-form .btn:hover { background: #2d3436; }

/* ===== FOOTER ===== */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-logo span { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: white; }
.footer-about p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.1); display: flex;
    align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7); transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: white; }

.footer-links h4, .footer-contact h4 { color: white; font-size: 1.1rem; margin-bottom: 1.25rem; font-family: 'Playfair Display', serif; }
.footer-links a { display: block; padding: 0.3rem 0; font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: var(--primary-light); padding-left: 5px; }
.footer-contact p { font-size: 0.9rem; margin-bottom: 0.75rem; display: flex; gap: 0.6rem; }
.footer-contact i { color: var(--primary-light); margin-top: 3px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.85rem; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.footer-bottom-links a:hover { color: var(--primary-light); }
.equal-housing { display: flex; align-items: center; gap: 0.4rem; }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 45px; height: 45px;
    border-radius: 50%; background: var(--primary); color: white;
    border: none; cursor: pointer; display: flex; align-items: center;
    justify-content: center; font-size: 1.1rem; box-shadow: var(--shadow-lg);
    transition: var(--transition); opacity: 0; visibility: hidden;
    z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== PAGE BANNER ===== */
.page-banner {
    background: linear-gradient(135deg, #141e2b 0%, #1e2a3a 60%, #2a3d54 100%);
    padding: 6rem 0 3rem; text-align: center; color: white;
    position: relative; overflow: hidden;
}
.page-banner::after {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-banner * { position: relative; z-index: 2; }
.page-banner h1 { font-size: 2.75rem; margin-bottom: 0.5rem; }
.page-banner p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 1rem; }
.breadcrumb { font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { margin: 0 0.4rem; }

/* ===== LISTING SEARCH BAR ===== */
.listing-search-section { padding: 2rem 0; background: var(--bg-light); border-bottom: 1px solid var(--border); }
.listing-search-bar {
    display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap;
}
.search-field-inline {
    flex: 1; display: flex; align-items: center; gap: 0.6rem;
    background: white; border: 2px solid var(--border); border-radius: var(--radius-sm);
    padding: 0 1rem; min-width: 250px;
}
.search-field-inline:focus-within { border-color: var(--primary); }
.search-field-inline i { color: var(--text-lighter); }
.search-field-inline input {
    border: none; outline: none; padding: 0.75rem 0;
    font-size: 0.95rem; width: 100%; font-family: 'Inter', sans-serif;
}
.listing-search-bar select {
    padding: 0.8rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.9rem; font-family: 'Inter', sans-serif; cursor: pointer; background: white; outline: none;
}
.listing-search-bar select:focus { border-color: var(--primary); }

.listings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.listings-count { color: var(--text-light); }
.listings-sort { display: flex; align-items: center; gap: 0.5rem; }
.listings-sort label { font-size: 0.9rem; color: var(--text-light); }
.listings-sort select {
    padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.9rem; font-family: 'Inter', sans-serif; outline: none;
}

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.page-btn {
    width: 42px; height: 42px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--border); color: var(--text-light); font-weight: 600;
    transition: var(--transition);
}
.page-btn:hover, .page-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(10,126,140,0.05); }

/* ===== AGENTS PAGE ===== */
.agents-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.agent-card {
    display: flex; gap: 1.75rem; background: white; padding: 2rem;
    border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition);
}
.agent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.agent-card-avatar {
    width: 100px; height: 100px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.75rem; font-weight: 700;
}
.agent-card-info h3 { font-size: 1.2rem; color: var(--secondary); margin-bottom: 0.25rem; }
.agent-title { display: block; font-size: 0.85rem; color: var(--primary); font-weight: 600; margin-bottom: 0.6rem; }
.agent-card-info p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.75rem; line-height: 1.6; }
.agent-stats { display: flex; gap: 1.5rem; margin-bottom: 0.75rem; }
.agent-stats div { text-align: center; }
.agent-stats strong { display: block; font-size: 1.1rem; color: var(--secondary); }
.agent-stats span { font-size: 0.75rem; color: var(--text-lighter); }
.agent-contact-links { display: flex; gap: 0.5rem; }
.agent-contact-links a {
    width: 35px; height: 35px; border-radius: 50%;
    background: rgba(10,126,140,0.1); display: flex; align-items: center;
    justify-content: center; color: var(--primary); font-size: 0.85rem;
    transition: var(--transition); position: relative; overflow: visible;
}
.agent-contact-links a:hover { background: var(--primary); color: white; }

/* Contact tooltips */
.contact-tooltip .tooltip-text {
    display: none;
    position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%); white-space: nowrap;
    background: #1e2a3a; color: #fff; font-size: 0.75rem;
    padding: 6px 12px; border-radius: 6px;
    pointer-events: none; z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.contact-tooltip .tooltip-text::after {
    content: ''; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: #1e2a3a;
}
.contact-tooltip:hover .tooltip-text {
    display: block;
}

.join-team-cta {
    margin-top: 3rem; background: linear-gradient(135deg, #1e2a3a, #2a3d54);
    border-radius: var(--radius); padding: 3rem; text-align: center;
}
.join-team-content { color: white; }
.join-team-content h3 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.join-team-content p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ===== ABOUT PAGE ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-content .section-title { text-align: left; }
.about-content .section-tag { text-align: left; }
.about-content p { color: var(--text-light); margin-bottom: 1rem; line-height: 1.7; }
.about-highlights { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.highlight {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem; background: var(--bg-light); border-radius: var(--radius-sm);
}
.highlight i { font-size: 1.5rem; color: var(--primary); min-width: 30px; text-align: center; }
.highlight strong { display: block; color: var(--secondary); }
.highlight span { font-size: 0.85rem; color: var(--text-light); }

.about-image-placeholder {
    width: 100%; min-height: 400px; border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center;
}

/* Values */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
.value-card {
    text-align: center; padding: 2rem 1.5rem; background: white;
    border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition);
}
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.value-icon {
    width: 70px; height: 70px; border-radius: 50%;
    background: rgba(10,126,140,0.1); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 1rem; transition: var(--transition);
}
.value-card:hover .value-icon { background: var(--primary); color: white; }
.value-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--secondary); }
.value-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

/* Timeline */
.timeline { max-width: 700px; margin: 0 auto; position: relative; }
.timeline::before {
    content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
    width: 3px; background: linear-gradient(var(--primary), var(--primary-light));
    border-radius: 2px;
}
.timeline-item { position: relative; padding-left: 55px; margin-bottom: 2rem; }
.timeline-dot {
    position: absolute; left: 12px; top: 5px; width: 19px; height: 19px;
    border-radius: 50%; background: var(--primary); border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(10,126,140,0.2);
}
.timeline-content {
    background: white; padding: 1.5rem; border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.timeline-content h3 { color: var(--primary); font-size: 1.25rem; margin-bottom: 0.4rem; }
.timeline-content p { color: var(--text-light); font-size: 0.95rem; }

/* ===== CONTACT PAGE ===== */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; }
.contact-form-section h2 { font-size: 1.75rem; margin-bottom: 0.5rem; color: var(--secondary); }
.contact-form-section > p { color: var(--text-light); margin-bottom: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--secondary); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.85rem 1rem; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.95rem; font-family: 'Inter', sans-serif;
    outline: none; transition: var(--transition); background: white;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 120px; }

.contact-info-card {
    background: var(--bg-light); padding: 2rem; border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.contact-info-card h3 { font-size: 1.25rem; color: var(--secondary); margin-bottom: 1.25rem; }
.contact-info-item {
    display: flex; gap: 1rem; margin-bottom: 1.25rem;
}
.contact-info-item:last-child { margin-bottom: 0; }
.contact-info-item i { color: var(--primary); font-size: 1.1rem; margin-top: 3px; }
.contact-info-item strong { display: block; color: var(--secondary); font-size: 0.95rem; margin-bottom: 0.2rem; }
.contact-info-item p { font-size: 0.9rem; color: var(--text-light); }
.contact-info-item a { color: var(--primary); }

.contact-map {
    margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden;
}
.map-placeholder {
    min-height: 200px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 2rem;
}

.contact-social-card {
    background: var(--bg-light); padding: 1.5rem; border-radius: var(--radius);
}
.contact-social-card h3 { font-size: 1.1rem; color: var(--secondary); margin-bottom: 1rem; }
.social-links-large { display: flex; flex-direction: column; gap: 0.5rem; }
.social-links-large a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 1rem; border-radius: var(--radius-sm);
    background: white; color: var(--text); font-weight: 500;
    font-size: 0.9rem; transition: var(--transition);
}
.social-links-large a:hover { background: var(--primary); color: white; }
.social-links-large a i { width: 20px; text-align: center; }

/* ===== ANIMATIONS ===== */
@-webkit-keyframes fadeInUp {
    from { opacity: 0.2; -webkit-transform: translateY(40px); transform: translateY(40px); }
    to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0.2; -webkit-transform: translateY(40px); transform: translateY(40px); }
    to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@-webkit-keyframes fadeInDown {
    from { opacity: 0; -webkit-transform: translateY(-20px); transform: translateY(-20px); }
    to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; -webkit-transform: translateY(-20px); transform: translateY(-20px); }
    to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

.animate-in { -webkit-animation: fadeInUp 0.6s ease forwards; animation: fadeInUp 0.6s ease forwards; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .listings-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .agents-grid { grid-template-columns: 1fr; }
    .calc-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .neighborhoods-grid { grid-template-columns: repeat(2, 1fr); }
    .neighborhood-card.large { grid-column: span 1; }

    .hero-tabs {
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: column;
        flex-direction: column;
        gap: 12px;
        padding: 0 16px;
    }
    .hero-tabs > * { -webkit-flex: none; flex: none; max-width: 100%; width: 100%; }
    .hero-tab {
        min-height: auto;
        -webkit-flex-direction: row;
        flex-direction: row;
    }
    .hero-tab-content {
        display: -webkit-flex;
        display: flex;
        -webkit-align-items: center;
        align-items: center;
        gap: 14px;
        text-align: left;
        padding: 16px 20px;
    }
    .hero-tab-content h3 { font-size: 16px; letter-spacing: 1.5px; margin-bottom: 0; }
    .hero-tab-content p { display: none; }
    .hero-tab-icon {
        width: 46px; height: 46px; min-width: 46px; font-size: 18px;
        margin: 0;
    }
    .hero-tab-cta {
        margin-left: auto; padding: 8px 16px; font-size: 12px; white-space: nowrap;
    }
    .hero-title-new { font-size: 1.5rem; margin-bottom: 1.2rem; }
}

@media (max-width: 768px) {
    .top-bar-left { display: none; }
    .top-bar-right { margin: 0 auto; }

    .nav {
        display: none; position: absolute; top: 75px; left: 0; right: 0;
        background: white; flex-direction: column; padding: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-top: 1px solid var(--border);
    }
    .nav.active { display: flex; }
    .nav-link.active::after { display: none; }
    .mobile-toggle { display: flex; }
    .header-actions .btn { display: none; }

    .hero { min-height: auto; }
    .hero-content { padding: 2rem 1rem 2.5rem; }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; }
    .search-box { flex-direction: column; }
    .search-select { border-left: none; border-top: 1px solid var(--border); }
    .search-btn { border-radius: 0; }
    .hero-stats { gap: 1rem; flex-wrap: wrap; margin-top: 0; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.75rem; }

    .hero-tagline { font-size: 0.7rem; letter-spacing: 2px; margin-bottom: 0.5rem; }
    .hero-title-new { font-size: 1.3rem; margin-bottom: 1rem; }
    .hero-tabs { gap: 10px; padding: 0 12px; margin-bottom: 1.5rem; }
    .hero-tab-content { padding: 14px 16px; gap: 12px; }
    .hero-tab-content h3 { font-size: 14px; letter-spacing: 1px; }
    .hero-tab-icon { width: 40px; height: 40px; min-width: 40px; font-size: 16px; }
    .hero-tab-cta { padding: 6px 14px; font-size: 11px; }

    .search-box-compact { border-radius: 10px; flex-wrap: wrap; }
    .search-field-compact input { padding: 0.7rem 0; font-size: 0.85rem; }
    .search-select-compact { border-left: none; border-top: 1px solid #e0e0e0; padding: 0.7rem 1rem; }
    .search-btn-compact { border-radius: 0 0 10px 10px; width: 100%; padding: 0.7rem; }
    .hero-search-compact { margin: 0 12px 1.5rem; }

    .hero-wave svg { height: 40px; }

    .section { padding: 3.5rem 0; }
    .section-title { font-size: 1.75rem; }

    .listings-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .cta-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .neighborhoods-grid { grid-template-columns: 1fr; }

    .listing-search-bar { flex-direction: column; }
    .listing-search-bar select { width: 100%; }
    .search-field-inline { width: 100%; }

    .page-banner { padding: 5rem 0 2.5rem; }
    .page-banner h1 { font-size: 2rem; }

    .agent-card { flex-direction: column; align-items: center; text-align: center; }
    .agent-stats { justify-content: center; }
    .agent-contact-links { justify-content: center; }

    .newsletter-form { flex-direction: column; }
    .newsletter-form input { border-radius: var(--radius-sm); }
    .newsletter-form .btn { border-radius: var(--radius-sm); }

    .partners-grid { gap: 1.5rem; }
    .partner-logo { padding: 1rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.85rem; }
    .hero-stats { gap: 1rem; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.75rem; }
    .property-features { gap: 0.5rem; flex-wrap: wrap; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
}

/* ===== BUYING / SELLING LEAD CAPTURE (floating) ===== */
.lead-capture-section {
    padding: 0; margin-top: -80px; position: relative; z-index: 5; margin-bottom: 2rem;
}
.lead-capture-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; max-width: 1100px; margin: 0 auto;
}
.lead-card {
    position: relative; border-radius: 14px; overflow: hidden; min-height: 220px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.35s, box-shadow 0.35s;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.lead-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.lead-card-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transition: transform 0.6s;
}
.lead-card:hover .lead-card-bg { transform: scale(1.08); }
.lead-card-buy .lead-card-bg {
    background: linear-gradient(135deg, rgba(10,61,98,0.9), rgba(10,126,140,0.88)),
        url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=800&q=80');
    background-size: cover; background-position: center;
}
.lead-card-sell .lead-card-bg {
    background: linear-gradient(135deg, rgba(139,30,30,0.9), rgba(180,60,40,0.85)),
        url('https://images.unsplash.com/photo-1582407947092-83df40df1654?auto=format&fit=crop&w=800&q=80');
    background-size: cover; background-position: center;
}
.lead-card-agent .lead-card-bg {
    background: linear-gradient(135deg, rgba(26,92,46,0.9), rgba(45,138,78,0.85)),
        url('https://images.unsplash.com/photo-1560250097-0b93528c311a?auto=format&fit=crop&w=800&q=80');
    background-size: cover; background-position: center;
}
.lead-card-content {
    position: relative; z-index: 2; text-align: center; color: #fff; padding: 28px 20px;
    width: 100%;
}
.lead-card-icon {
    width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
    font-size: 22px; backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,0.25);
    transition: background 0.3s;
}
.lead-card:hover .lead-card-icon { background: rgba(255,255,255,0.25); }
.lead-card-content h3 {
    font-size: 22px; font-weight: 700; letter-spacing: 3px; margin-bottom: 6px;
    font-family: 'Playfair Display', serif;
}
.lead-card-content p { font-size: 13px; opacity: 0.85; margin-bottom: 0; }
.lead-card-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2);
    margin-top: 14px; font-size: 14px; transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}
.lead-card:hover .lead-card-arrow { background: #fff; color: #1a1a2e; transform: translateX(4px); }
.btn-white {
    background: #fff; color: var(--primary); font-weight: 600;
    border: none; padding: 12px 28px; border-radius: 8px;
}
.btn-white:hover { background: #f0f0f0; }

/* Lead Modal */
.lead-modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 1000; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.lead-modal-overlay.show { display: flex; }
.lead-modal {
    background: #fff; border-radius: 16px; width: 620px; max-width: 94vw;
    max-height: 90vh; overflow-y: auto; padding: 0;
    box-shadow: 0 24px 80px rgba(0,0,0,0.3); animation: modalSlide 0.3s ease;
}
@keyframes modalSlide { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.lead-modal-close {
    position: absolute; top: 16px; right: 20px; background: none; border: none;
    font-size: 28px; color: #fff; cursor: pointer; z-index: 5; opacity: 0.8;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
}
.lead-modal-close:hover { opacity: 1; }
.lead-modal-header {
    position: relative; padding: 36px 32px 24px; text-align: center;
    background: linear-gradient(135deg, #141e2b, #1e2a3a); color: #fff;
    border-radius: 16px 16px 0 0;
}
.lead-modal-header.selling-mode {
    background: linear-gradient(135deg, #8b1e1e, #b43c28);
}
.lead-modal-icon {
    width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
    font-size: 22px; border: 2px solid rgba(255,255,255,0.3);
}
.lead-modal-header h3 { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.lead-modal-header p { font-size: 13px; opacity: 0.8; }
#leadForm, #agentApplyForm { padding: 24px 32px 32px; }
.lead-form-group { margin-bottom: 16px; }
.lead-form-group label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px; }
.lead-form-group label i { color: var(--primary); margin-right: 4px; }
.lead-form-group input, .lead-form-group textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; font-family: 'Inter', sans-serif; transition: border 0.2s;
}
.lead-form-group input:focus, .lead-form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,126,140,0.1);
}
.lead-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-submit-btn {
    width: 100%; padding: 14px; font-size: 15px; font-weight: 600;
    margin-top: 6px; border-radius: 10px;
}
.lead-form-status {
    text-align: center; margin-top: 12px; font-size: 14px; display: none;
    padding: 10px; border-radius: 8px;
}
.lead-form-status.show { display: block; }
.lead-form-status.success { background: #d4edda; color: #155724; }
.lead-form-status.error { background: #f8d7da; color: #721c24; }

/* Address autocomplete */
.address-autocomplete-wrap { position: relative; }
.address-suggestions {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border: 1px solid #ddd; border-top: none; border-radius: 0 0 8px 8px;
    max-height: 200px; overflow-y: auto; z-index: 50; display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.address-suggestions.show { display: block; }
.address-suggestion {
    padding: 10px 14px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; gap: 8px;
}
.address-suggestion:last-child { border-bottom: none; }
.address-suggestion:hover { background: #f0f9ff; }
.address-suggestion i { color: var(--primary); font-size: 12px; flex-shrink: 0; }

@media (max-width: 640px) {
    .lead-capture-grid { grid-template-columns: 1fr; }
    .lead-card { min-height: 220px; }
    .lead-card { min-height: 200px; }
    .lead-form-row { grid-template-columns: 1fr; }
    #leadForm, #agentApplyForm { padding: 20px; }
}
