/* =====================================================
   Propertype — Premium Dark Design System
   A modern glassmorphism real estate theme
   ===================================================== */

/* =====================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ===================================================== */
:root {
    /* Background Colors */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-glass: rgba(17, 24, 39, 0.6);
    --bg-glass-light: rgba(255, 255, 255, 0.03);
    --bg-hover: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(15, 23, 42, 0.8);

    /* Accent Colors */
    --accent-primary: #10b981;
    --accent-secondary: #14b8a6;
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #06b6d4 100%);
    --accent-warm: #f59e0b;
    --accent-warm-gradient: linear-gradient(135deg, #f59e0b, #ef4444);
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-red: #ef4444;
    --accent-success: #22c55e;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #10b981;
    --text-white: #ffffff;
    --text-dark: #0f172a;

    /* Border Colors */
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-hover: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(16, 185, 129, 0.3);
    --border-input: rgba(148, 163, 184, 0.2);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 35px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.15);
    --shadow-glow-strong: 0 0 60px rgba(16, 185, 129, 0.25);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --container-max: 1280px;
    --container-wide: 1440px;
    --header-height: 72px;
    --sidebar-width: 300px;

    /* Glassmorphism */
    --glass-blur: blur(20px);
    --glass-blur-strong: blur(40px);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background gradient effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(20, 184, 166, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    background: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-white);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

::selection {
    background: rgba(16, 185, 129, 0.3);
    color: var(--text-white);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =====================================================
   3. LAYOUT & CONTAINER
   ===================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-4xl) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-sm);
}

.section-header .section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* =====================================================
   4. HEADER & NAVIGATION
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header-glass {
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-glass);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-white);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.logo-text span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-white);
    background: var(--bg-hover);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--transition-fast);
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    transition: all var(--transition-fast);
}

.menu-toggle span::before { transform: translateY(-6px); }
.menu-toggle span::after { transform: translateY(6px); }

.menu-toggle.active span {
    background: transparent;
}

.menu-toggle.active span::before {
    transform: rotate(45deg);
}

.menu-toggle.active span::after {
    transform: rotate(-45deg);
}

/* Mobile Sidebar */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-glass);
    z-index: 999;
    padding: calc(var(--header-height) + var(--space-xl)) var(--space-lg) var(--space-lg);
    transition: right var(--transition-slow);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-nav-overlay.active {
    opacity: 1;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 14px 16px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--text-white);
    background: rgba(16, 185, 129, 0.1);
}

.mobile-nav-link svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* =====================================================
   5. BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: var(--text-white);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Ripple effect */
.btn-primary::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    border-color: var(--border-glass-hover);
    background: var(--bg-hover);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: var(--text-white);
    background: var(--bg-hover);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-full {
    width: 100%;
}

/* =====================================================
   6. FORMS & INPUTS
   ===================================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: var(--bg-secondary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
    transition: all var(--transition-fast);
}

.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.form-error {
    font-size: 0.8rem;
    color: var(--accent-red);
    margin-top: var(--space-xs);
}

/* =====================================================
   7. CARDS
   ===================================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Property Card */
.property-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.property-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.property-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.property-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: var(--space-xs);
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.badge-featured {
    background: var(--accent-warm-gradient);
    color: white;
}

.badge-verified {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.badge-new {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
}

.badge-rent {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.badge-sell {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.property-card-shortlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2;
}

.property-card-shortlist:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
}

.property-card-shortlist svg {
    width: 18px;
    height: 18px;
    color: white;
}

.property-card-shortlist.active svg {
    fill: #ef4444;
    color: #ef4444;
}

.property-card-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 16px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.property-card-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.property-card-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    margin-left: 4px;
}

.property-card-body {
    padding: 16px 18px 18px;
}

.property-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-title a {
    color: inherit;
    text-decoration: none;
}

.property-card-title a:hover {
    color: var(--accent-primary);
}

.property-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.property-card-location svg {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.property-card-specs {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-glass);
}

.property-card-spec {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.property-card-spec svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.property-card-spec strong {
    color: var(--text-primary);
    font-weight: 600;
}

.property-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid var(--border-glass);
}

.property-card-posted {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.property-card-agent {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.property-card-agent img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* =====================================================
   8. HERO SECTION
   ===================================================== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 50% 50% at 50% 30%, rgba(16, 185, 129, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 30% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    z-index: -1;
}

/* Floating decorative orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

.hero-orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.15);
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 200px;
    height: 200px;
    background: rgba(59, 130, 246, 0.1);
    top: 60%;
    right: -3%;
    animation-delay: -2s;
}

.hero-orb-3 {
    width: 150px;
    height: 150px;
    background: rgba(139, 92, 246, 0.1);
    bottom: 10%;
    left: 20%;
    animation-delay: -4s;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =====================================================
   9. SEARCH BAR
   ===================================================== */
.search-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.search-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    justify-content: center;
}

.search-tab {
    padding: 10px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-tab:hover {
    color: var(--text-primary);
    border-color: var(--border-glass-hover);
}

.search-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.search-box {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 18px;
    border-right: 1px solid var(--border-glass);
}

.search-field:last-of-type {
    border-right: none;
}

.search-field svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-field input,
.search-field select {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-field input::placeholder {
    color: var(--text-muted);
}

.search-field select {
    cursor: pointer;
    appearance: none;
    color: var(--text-secondary);
}

.search-field select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-btn {
    padding: 14px 32px;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: calc(var(--radius-xl) - 4px);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    white-space: nowrap;
}

.search-btn:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    transform: scale(1.02);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

/* =====================================================
   10. STATS SECTION
   ===================================================== */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    padding: var(--space-2xl) 0;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* =====================================================
   11. PROPERTY GRID
   ===================================================== */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

/* =====================================================
   12. CITY CARDS
   ===================================================== */
.city-scroll {
    display: flex;
    gap: var(--space-lg);
    overflow-x: auto;
    padding-bottom: var(--space-md);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

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

.city-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
}

.city-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.city-card-image {
    height: 140px;
    overflow: hidden;
    position: relative;
}

.city-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.city-card:hover .city-card-image img {
    transform: scale(1.1);
}

.city-card-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.6));
}

.city-card-body {
    padding: 14px 16px;
}

.city-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
}

.city-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-card-price {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.city-card-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =====================================================
   13. LOCALITY CARDS
   ===================================================== */
.locality-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    text-decoration: none;
    display: block;
}

.locality-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.locality-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--space-sm);
}

.locality-card-price {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.locality-card-price strong {
    color: var(--accent-primary);
}

.locality-card-appreciation {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.locality-card-appreciation.positive {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-success);
}

.locality-card-appreciation.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* =====================================================
   14. FOOTER
   ===================================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: var(--space-4xl) 0 var(--space-xl);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.footer-brand p {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    color: var(--text-white);
    border-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.1);
}

.footer-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =====================================================
   15. BREADCRUMBS
   ===================================================== */
.breadcrumbs {
    padding: var(--space-md) 0;
}

.breadcrumbs ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.breadcrumbs li {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--accent-primary);
}

.breadcrumb-sep {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.5;
}

/* =====================================================
   16. PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination-num:hover {
    color: var(--text-white);
    border-color: var(--border-glass-hover);
}

.pagination-num.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination-btn:hover {
    color: var(--text-white);
    border-color: var(--accent-primary);
}

.pagination-dots {
    color: var(--text-muted);
    padding: 0 4px;
}

/* =====================================================
   17. FLASH MESSAGES / ALERTS
   ===================================================== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--accent-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-warm);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-blue);
}

/* =====================================================
   18. FILTER CHIPS
   ===================================================== */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover,
.filter-chip.active {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.08);
}

.filter-chip-remove {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
}

/* =====================================================
   19. SKELETON LOADING
   ===================================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        rgba(255,255,255,0.05) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 22px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-image {
    height: 220px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* =====================================================
   20. MISCELLANEOUS
   ===================================================== */
.divider {
    width: 100%;
    height: 1px;
    background: var(--border-glass);
    margin: var(--space-xl) 0;
}

.text-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Main content spacing */
.main-content {
    padding-top: var(--header-height);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Agent badge styling */
.agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
}

.agent-badge-verified {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.agent-badge-premium {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.agent-badge-top {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warm);
    border: 1px solid rgba(245, 158, 11, 0.3);
}
