/* ==========================================
   1. CINEMATIC HERO LAYOUT
   ========================================== */
.site-hero {
    position: relative;
    width: 100%;
    height: 100vh; /* Full viewport height */
    min-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Pushes content elegantly to the bottom */
    padding-bottom: 8vh;
    background-color: #000000;
    overflow: hidden;
}

.hero-media-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.8; /* Ensures white text pops without being unreadable */
    transform: scale(1.05); /* Prepped for GSAP animation */
}

/* * THE HEADER PROTECTOR: 
 * Ensures the transparent header text is always readable 
 */
.hero-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0.6) 0%,    /* Dark at top for header text */
        rgba(0, 0, 0, 0.1) 25%,    /* Clear in the middle */
        rgba(0, 0, 0, 0.5) 100%    /* Darker at bottom for search console */
    );
}

.hero-content-wrapper {
    position: relative;
    z-index: 10;
    max-width: var(--container-width, 1440px);
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--container-padding, 40px);
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 8vw, 7.5rem);
    line-height: 0.9;
    color: #ffffff;
    margin: 0 0 var(--space-2xl) 0;
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* ==========================================
   2. THE FLOATING CONSOLE (ULTRA-MINIMAL & CLEAR)
   ========================================== */
.hero-console-wrapper {
    background: #ffffff;
    /* This 6px padding creates a solid white protective frame so the black button NEVER blends into the background */
    padding: 6px; 
    margin-bottom: var(--space-lg);
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25); 
}

.hero-console-form {
    display: flex;
    width: 100%;
    height: 64px; /* Slim, sleek, and highly usable */
}

.console-group {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 24px; /* Tightened for a cleaner look */
    border-right: 1px solid rgba(0, 0, 0, 0.08); /* Crisp, faint dividers */
    background: #ffffff;
}

/* Remove the right border from the last group before the button */
.console-group:nth-last-child(2) {
    border-right: none; 
}

.location-group { flex: 2; }
.price-group { flex: 1.8; }
.bed-group { flex: 1; }

.console-label {
    font-family: var(--font-sans);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.15em; /* Tighter, more modern tracking */
    color: #777777; /* Clearer contrast than light gray */
    margin-bottom: 4px;
    font-weight: 600;
    display: block;
}

/* THE TYPOGRAPHY FIX: Switched to Sans-Serif for crystal clarity */
.console-input, 
.console-select {
    width: 100%;
    border: none;
    font-family: var(--font-sans); /* Swapped from serif to sans-serif */
    font-size: 15px; /* Perfect reading size, not bulky */
    font-weight: 500; /* Gives it a premium, structured feel */
    color: #111111;
    background: transparent;
    outline: none;
    cursor: pointer;
    appearance: none; 
    padding: 0;
    line-height: 1.2;
}

.console-input::placeholder {
    color: #111111;
}

/* MIN/MAX Price Layout - Perfectly balanced and left-aligned */
.price-input-row {
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    gap: 8px; 
    width: 100%;
}

.price-group .console-select {
    width: auto;
    flex: 1; 
    text-align: left !important; 
    direction: ltr !important; 
}

.price-separator {
    color: #aaaaaa;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    flex-shrink: 0;
}

/* The Search Button */
.hero-console-form > .console-btn {
    width: 140px; 
    flex-shrink: 0;
    background-color: #111111; /* True dark tone */
    color: #ffffff;
    border: none;
    height: 100%;
    text-transform: uppercase;
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.15em;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px; /* Softens the button inside the white frame */
    transition: background-color 0.3s ease;
}

.hero-console-form > .console-btn:hover { 
    background-color: #007769; /* Luxury Teal */
}

/* ==========================================
   3. AUTOCOMPLETE UI
   ========================================== */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: -1px; /* Align with border */
    width: calc(100% + 2px);
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-top: none;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all var(--transition-fast);
}

.autocomplete-results.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.autocomplete-item {
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #fafafa;
    transition: background-color var(--transition-fast);
    color: #1a1a1a; /* Force base text color */
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f9f9f9;
}

.autocomplete-item .location-name {
    font-family: var(--font-serif);
    font-size: 16px;
    color: #1a1a1a !important; /* Force override white hero text */
}

.autocomplete-item .location-count {
    font-family: var(--font-sans);
    font-size: 10px;
    color: #888888 !important; /* Force override white hero text */
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Loading Spinner */
.console-group.is-loading::after {
    content: '';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
}

@keyframes spin-loader {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ==========================================
   4. TRUST BADGES (GLASSMORPHISM)
   ========================================== */
.hero-trust-badges {
    display: flex; /* Swapped from inline-flex */
    width: fit-content; /* Keeps the glass background tight to the text */
    margin: 15px auto 0 auto; /* The 'auto' left/right forces it to dead-center */
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: var(--font-sans);
    font-size: 11px;
    color: #ffffff;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
}

.hero-trust-badges .dot {
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   5. RESPONSIVE QUERIES
   ========================================== */
@media (max-width: 1024px) {
    .hero-console-form { 
        flex-direction: column; 
        height: auto; 
        gap: 6px; /* Spacing between rows on mobile */
    }
    .console-group { 
        border-right: none; 
        border-bottom: 1px solid rgba(0,0,0,0.05); 
        padding: 16px 20px; 
    }
    .console-group:nth-last-child(2) {
        border-bottom: none;
    }
    .hero-console-form > .console-btn { 
        width: 100%; 
        height: 60px; 
        border-radius: 2px;
    }
}

@media (max-width: 600px) {
    .hero-headline { font-size: clamp(3rem, 10vw, 4rem); }
    
    /* Stack badges on very small mobile screens to prevent overflow */
    .hero-trust-badges {
        flex-direction: column;
        gap: 8px;
        padding: 15px 20px;
        border-radius: 10px;
    }
    .hero-trust-badges .dot { display: none; }
}