/* css/header.css */
:root {
    --primary-gold: #FFD700;
    --secondary-gold: #FFC107;
    --accent-gold: #FFA500;
    --dark-gold: #B8860B;
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --accent-blue: #2563eb;
    --success-color: #10b981;
    --glass-bg: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(255, 215, 0, 0.2);
    --glass-shadow: 0 8px 32px rgba(30, 64, 175, 0.1);
    --blur-intensity: blur(20px);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 70px;
    background: #f8f9fa;
    overflow-x: hidden;
}

/* Professional White Glassmorphism Header */
.glass-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1030;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-intensity);
    -webkit-backdrop-filter: var(--blur-intensity);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 8px 0;
    transition: var(--transition);
    left: 0;
    right: 0;
}

.glass-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    flex-wrap: wrap;
}

/* Logo Section - Clean White */
/* Logo Section - Transparent */
.logo-section {
    flex-shrink: 0;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.logo {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

/* Filter Indicators Section */
.filter-indicators {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: 10px;
    flex: 1;
    min-width: 0;
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-blue);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    animation: slideIn 0.3s ease;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-tag:hover {
    background: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.filter-tag-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 10px;
    flex-shrink: 0;
}

.filter-remove:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.clear-all-filters {
    background: var(--secondary-gold);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.clear-all-filters:hover {
    background: var(--accent-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Search Section - Professional White */
.search-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 700px;
    min-width: 0;
}

/* City Selector - Clean White */
.city-selector {
    position: relative;
    min-width: 160px;
    flex-shrink: 0;
}

.city-select-btn {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 160px;
    height: 44px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    justify-content: space-between;
}

.city-select-btn:hover {
    border-color: var(--secondary-gold);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
    transform: translateY(-1px);
}

.city-select-btn i {
    font-size: 14px;
    color: var(--secondary-gold);
}

.city-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    color: var(--primary-blue);
}

/* FIXED: City Dropdown Container - Proper positioning */
.city-dropdown-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    padding: 15px;
    z-index: 1050;
    display: none;
    margin-top: 8px;
    animation: slideDown 0.3s ease;
    max-height: 80vh;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.city-search-box {
    position: relative;
    margin-bottom: 15px;
}

.city-search-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: var(--transition);
    font-weight: 500;
    color: #1e293b;
}

.city-search-input:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.city-search-input::placeholder {
    color: #6b7280;
}

.city-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-gold);
    font-size: 16px;
}

.cities-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-gold) transparent;
}

.cities-list::-webkit-scrollbar {
    width: 6px;
}

.cities-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.cities-list::-webkit-scrollbar-thumb {
    background: var(--secondary-gold);
    border-radius: 3px;
}

.city-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: #1e293b;
    margin-bottom: 4px;
    border: 1px solid transparent;
    background: white;
}

.city-option:hover {
    background: #fefce8;
    border-color: var(--secondary-gold);
    transform: translateX(5px);
    text-decoration: none;
    color: #1e293b;
}

.city-option-name {
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    font-size: 14px;
}

.city-property-count {
    background: var(--secondary-gold);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.detect-location-btn {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.detect-location-btn:hover {
    background: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Megamenu Styles - Complete Hierarchy View */
.megamenu-container {
    position: relative;
    flex-shrink: 0;
}

.megamenu-btn {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    height: 44px;
    font-weight: 600;
    color: var(--primary-blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.megamenu-btn:hover {
    border-color: var(--secondary-gold);
    transform: translateY(-1px);
}

.megamenu-btn i {
    font-size: 14px;
    color: var(--secondary-gold);
}

/* FIXED: Megamenu Content - Proper positioning and overflow */
.megamenu-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 900px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    z-index: 1050;
    display: none;
    margin-top: 8px;
    animation: slideDown 0.3s ease;
    padding: 0;
    max-height: 80vh;
    overflow: hidden;
}

.megamenu-hierarchy {
    display: flex;
    height: 500px;
}

/* States Column */
.megamenu-states {
    width: 220px;
    background: #f8fafc;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    scrollbar-width: thin;
}

.megamenu-states::-webkit-scrollbar {
    width: 6px;
}

.megamenu-states::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.megamenu-states::-webkit-scrollbar-thumb {
    background: var(--secondary-gold);
    border-radius: 3px;
}

.state-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.state-item:hover {
    background: #f1f5f9;
}

.state-item.active {
    background: white;
    border-right: 3px solid var(--secondary-gold);
    font-weight: 700;
    color: var(--primary-blue);
}

.state-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.state-count {
    background: var(--secondary-gold);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Cities Column */
.megamenu-cities {
    width: 220px;
    background: white;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    scrollbar-width: thin;
}

.megamenu-cities::-webkit-scrollbar {
    width: 6px;
}

.megamenu-cities::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.megamenu-cities::-webkit-scrollbar-thumb {
    background: var(--secondary-gold);
    border-radius: 3px;
}

.city-hierarchy-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.city-hierarchy-item:hover {
    background: #fefce8;
}

.city-hierarchy-item.active {
    background: #fefce8;
    border-right: 2px solid var(--secondary-gold);
    font-weight: 600;
}

.city-hierarchy-name {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-hierarchy-count {
    background: var(--success-color);
    color: white;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Localities Column */
.megamenu-localities {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.megamenu-localities::-webkit-scrollbar {
    width: 6px;
}

.megamenu-localities::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.megamenu-localities::-webkit-scrollbar-thumb {
    background: var(--secondary-gold);
    border-radius: 3px;
}

.locality-section {
    display: none;
}

.locality-section.active {
    display: block;
}

.locality-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.locality-section-title i {
    color: var(--secondary-gold);
    font-size: 14px;
}

.localities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.locality-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    color: #1e293b;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
}

.locality-item:hover {
    background: #fefce8;
    border-color: var(--secondary-gold);
    transform: translateY(-2px);
    text-decoration: none;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.1);
}

.locality-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.locality-count {
    background: var(--secondary-gold);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 8px;
}

.no-localities {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 20px;
    font-size: 14px;
}

/* Search Form - Professional White */
.search-form-container {
    display: flex;
    align-items: center;
    flex: 1;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
    height: 44px;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 0;
}

.search-form-container:focus-within {
    border-color: var(--secondary-gold);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1), 0 2px 8px rgba(255, 193, 7, 0.15);
}

.property-type-select {
    border: none;
    background: transparent;
    padding: 0 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    outline: none;
    border-right: 1px solid #e5e7eb;
    min-width: 120px;
    height: 100%;
    cursor: pointer;
    flex-shrink: 0;
}

.property-type-select option {
    background: white;
    color: #1e293b;
    font-weight: 500;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
    height: 100%;
    font-weight: 500;
    color: #1e293b;
    min-width: 0;
}

.search-input::placeholder {
    color: #6b7280;
    font-weight: 500;
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 5px;
    flex-shrink: 0;
}

.voice-search-btn, .search-submit-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: #6b7280;
    flex-shrink: 0;
}

.voice-search-btn:hover {
    background: #f3f4f6;
    color: var(--secondary-gold);
}

.search-submit-btn {
    background: var(--secondary-gold);
    color: white;
}

.search-submit-btn:hover {
    background: var(--accent-gold);
    transform: scale(1.05);
}

/* FIXED: Search Suggestions - Proper positioning */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    margin-top: 8px;
    animation: slideDown 0.3s ease;
}

.suggestion-item {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    color: #1e293b;
}

.suggestion-item:hover {
    background: #fefce8;
    transform: translateX(5px);
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
}

.suggestion-details {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.suggestion-type {
    font-size: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    margin-left: 8px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.type-locality {
    background: var(--success-color);
    color: white;
}

.type-city {
    background: var(--primary-blue);
    color: white;
}

.type-property {
    background: var(--accent-gold);
    color: white;
}

/* Actions Section - Professional */
.actions-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.post-property-btn {
    background: var(--secondary-gold);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    height: 44px;
    flex-shrink: 0;
}

.post-property-btn:hover {
    background: var(--accent-gold);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    text-decoration: none;
}

/* Profile Icon - Replaced profile picture */
.profile-dropdown {
    position: relative;
    flex-shrink: 0;
}

.profile-btn {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    height: 44px;
    min-width: 60px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    justify-content: center;
}

.profile-btn:hover {
    border-color: var(--secondary-gold);
    transform: translateY(-1px);
}

.profile-icon {
    font-size: 20px;
    color: var(--primary-blue);
    transition: var(--transition);
}

.profile-btn:hover .profile-icon {
    color: var(--secondary-gold);
}

.profile-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    white-space: nowrap;
    display: none;
}

/* FIXED: Dropdown Menu - Proper positioning */
.dropdown-menu {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    padding: 8px;
    margin-top: 8px !important;
    animation: slideDown 0.3s ease;
    z-index: 1050;
    position: absolute;
    right: 0;
    left: auto;
    min-width: 200px;
}

.dropdown-item {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    transition: var(--transition);
    color: #1e293b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: #fefce8;
    color: #1e293b;
    transform: translateX(5px);
}

.dropdown-item i {
    color: var(--secondary-gold);
    width: 16px;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1100;
}

.toast {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: #1e293b;
}

/* Loading states */
.loading-suggestions {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-style: italic;
    font-weight: 500;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-weight: 500;
}

/* Focus states for accessibility */
.city-select-btn:focus,
.search-input:focus,
.property-type-select:focus,
.post-property-btn:focus,
.profile-btn:focus,
.megamenu-btn:focus {
    outline: 2px solid var(--secondary-gold);
    outline-offset: 2px;
}

/* Smooth transitions */
.city-select-btn,
.search-form-container,
.post-property-btn,
.profile-btn,
.dropdown-item,
.suggestion-item,
.city-option,
.megamenu-btn,
.state-item,
.city-hierarchy-item,
.locality-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Voice search animation */
.voice-search-active {
    animation: pulse 1.5s infinite;
    background: var(--success-color) !important;
    color: white !important;
}

@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); 
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); 
    }
}

/* ========== MOBILE RESPONSIVE STYLES - OPTIMIZED ========== */
@media (max-width: 1199.98px) {
    .header-container {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 10px;
    }
    
    .logo-section {
        order: 1;
        flex: 0 0 auto;
    }
    
    .megamenu-container {
        order: 2;
        flex: 0 0 auto;
    }
    
    .city-selector {
        order: 3;
        flex: 0 0 auto;
    }
    
    .filter-indicators {
        order: 4;
        width: 100%;
        margin-top: 8px;
        margin-left: 0;
        gap: 6px;
    }
    
    .search-section {
        order: 5;
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
    }
    
    .actions-section {
        order: 6;
        margin-left: auto;
        flex: 0 0 auto;
    }
    
    .megamenu-content {
        width: 95vw;
        left: 2.5vw;
    }
}

@media (max-width: 991.98px) {
    body {
        padding-top: 130px;
    }
    
    .glass-header {
        padding: 8px 0;
    }
    
    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 10px;
    }
    
    .logo-section {
        order: 1;
        flex: 0 0 auto;
        padding: 6px 12px;
    }
    
    .logo {
        height: 28px;
    }
    
    .megamenu-container {
        order: 2;
        flex: 0 0 auto;
    }
    
    .megamenu-btn {
        padding: 8px 12px;
        font-size: 12px;
        height: 40px;
    }
    
    .city-selector {
        order: 3;
        flex: 0 0 auto;
        min-width: 120px;
    }
    
    .city-select-btn {
        min-width: 120px;
        height: 40px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .filter-indicators {
        order: 4;
        width: 100%;
        margin-top: 8px;
        margin-left: 0;
        gap: 4px;
    }
    
    .filter-tag {
        max-width: 140px;
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .clear-all-filters {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .search-section {
        order: 5;
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
    }
    
    .search-form-container {
        height: 40px;
    }
    
    .property-type-select {
        min-width: 100px;
        padding: 0 10px;
        font-size: 12px;
    }
    
    .search-input {
        font-size: 13px;
        padding: 0 10px;
    }
    
    .actions-section {
        order: 6;
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
    }
    
    .post-property-btn {
        height: 40px;
        padding: 8px 15px;
        font-size: 12px;
        flex: 1;
        margin-right: 8px;
    }
    
    .profile-dropdown {
        flex: 0 0 auto;
    }
    
    .profile-btn {
        height: 40px;
        padding: 8px;
        min-width: 50px;
    }
    
    .profile-name {
        display: none;
    }
    
    .city-dropdown-container {
        width: 280px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .megamenu-content {
        width: 95vw;
        left: 2.5vw;
    }
    
    .megamenu-hierarchy {
        height: 400px;
        flex-direction: column;
    }
    
    .megamenu-states, .megamenu-cities {
        width: 100%;
        height: 120px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .localities-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-top: 140px;
    }
    
    .header-container {
        flex-direction: column;
        gap: 6px;
        padding: 0 8px;
    }
    
    .logo-section {
        order: 1;
        width: 100%;
        text-align: center;
        padding: 6px 0;
    }
    
    .logo {
        height: 26px;
    }
    
    .megamenu-container {
        order: 2;
        width: 100%;
    }
    
    .megamenu-btn {
        width: 100%;
        justify-content: center;
        height: 38px;
    }
    
    .city-selector {
        order: 3;
        width: 100%;
    }
    
    .city-select-btn {
        width: 100%;
        justify-content: space-between;
        height: 38px;
    }
    
    .filter-indicators {
        order: 4;
        width: 100%;
        margin-top: 6px;
        margin-left: 0;
        justify-content: center;
    }
    
    .filter-tag {
        max-width: 120px;
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .clear-all-filters {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .actions-section {
        order: 5;
        width: 100%;
        justify-content: space-between;
        margin-top: 6px;
    }
    
    .search-section {
        order: 6;
        width: 100%;
        margin-top: 6px;
    }
    
    .megamenu-content {
        width: 98vw;
        left: 1vw;
    }
    
    .post-property-btn {
        height: 38px;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .profile-btn {
        height: 38px;
        padding: 6px;
    }
}

@media (max-width: 575.98px) {
    body {
        padding-top: 150px;
    }
    
    .header-container {
        padding: 0 5px;
        gap: 4px;
    }
    
    .logo {
        height: 24px;
    }
    
    .megamenu-btn, 
    .city-select-btn,
    .search-form-container,
    .post-property-btn,
    .profile-btn {
        height: 36px;
        font-size: 11px;
    }
    
    .filter-indicators {
        gap: 3px;
    }
    
    .filter-tag {
        max-width: 100px;
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .clear-all-filters {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .property-type-select {
        min-width: 80px;
        padding: 0 8px;
        font-size: 11px;
    }
    
    .search-input {
        font-size: 12px;
        padding: 0 8px;
    }
    
    .search-input::placeholder {
        font-size: 11px;
    }
    
    .megamenu-content {
        width: 98vw;
        left: 1vw;
    }
    
    .megamenu-hierarchy {
        height: 350px;
    }
    
    .megamenu-states, .megamenu-cities {
        height: 100px;
    }
    
    .localities-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .locality-item {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    @media (max-width: 380px) {
        .actions-section {
            flex-direction: column;
            gap: 6px;
        }
        
        .post-property-btn {
            margin-right: 0;
            width: 100%;
        }
        
        .profile-dropdown {
            width: 100%;
        }
        
        .profile-btn {
            width: 100%;
            justify-content: center;
        }
    }
}

/* Ensure proper scrolling on mobile */
@media (max-width: 991.98px) {
    .glass-header {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
    }
    
    body {
        overflow-x: hidden;
    }
}

/* Prevent horizontal scrolling */
.glass-header {
    max-width: 100vw;
    overflow-x: hidden;
}

.header-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* FIXED: Ensure dropdowns appear above all content */
.city-dropdown-container,
.megamenu-content,
.search-suggestions,
.dropdown-menu {
    z-index: 1050 !important;
}

/* FIXED: Prevent header from creating scrollbars when dropdowns are open */
.glass-header {
    overflow: visible !important;
}

.header-container {
    overflow: visible !important;
}

/* FIXED: Ensure dropdowns don't get cut off by header */
.city-selector,
.megamenu-container,
.search-section,
.profile-dropdown {
    position: relative;
    z-index: 1051;
}

/* FIXED: Better shadow for dropdowns to indicate they're above content */
.city-dropdown-container,
.megamenu-content,
.search-suggestions,
.dropdown-menu {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important;
}
/* === DROPDOWN VISIBILITY FIXES === */
.city-dropdown-container {
    display: none;
}

.city-dropdown-container.active {
    display: block !important;
}

.megamenu-content {
    display: none;
}

.megamenu-content.active {
    display: block !important;
}

/* Ensure dropdowns appear above content */
.city-selector,
.megamenu-container {
    position: relative;
    z-index: 1000;
}

/* Make buttons clearly clickable */
.city-select-btn,
.megamenu-btn {
    cursor: pointer;
    transition: background-color 0.2s;
}

.city-select-btn:hover,
.megamenu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}