/* ============================================
   CLEAN RESPONSIVE HEADER FIX
   Simple and effective
   ============================================ */

/* MOBILE & TABLET (under 1024px) */
@media (max-width: 1023px) {
    /* Header: Logo + Hamburger button */
    .site-header .header-search-wrapper {
        display: none !important;
    }
    
    .site-header .header-nav-row {
        display: none !important;
    }
    
    .site-header .mobile-menu-btn {
        display: flex !important;
    }
    
    /* Mobile dropdown wrapper - hidden by default */
    .site-header .mobile-nav-wrapper {
        display: none !important;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
    }
    
    /* Show when active */
    .site-header .mobile-nav-wrapper.active {
        display: block !important;
    }
    
    /* Search in dropdown */
    .mobile-search-wrapper {
        display: block !important;
        padding: 0 1rem 1rem 1rem;
        border-bottom: 2px solid var(--border);
        margin-bottom: 0.5rem;
    }
    
    .mobile-search-form {
        position: relative;
        width: 100%;
    }
    
    .mobile-search-input {
        width: 100%;
        padding: 0.875rem 3.5rem 0.875rem 1rem;
        font-size: 0.9375rem;
        background-color: var(--muted);
        border: 2px solid var(--border);
        border-radius: var(--radius-lg);
        color: var(--foreground);
        transition: all 0.3s ease;
    }
    
    html[dir="rtl"] .mobile-search-input {
        padding-left: 3.5rem;
        padding-right: 1rem;
    }
    
    .mobile-search-input:focus {
        outline: none;
        border-color: var(--primary);
        background-color: var(--card);
        box-shadow: 0 0 0 3px hsl(189 65% 44% / 0.1);
    }
    
    .mobile-search-btn {
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gradient-primary);
        border: none;
        color: white;
        border-radius: var(--radius);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    html[dir="rtl"] .mobile-search-btn {
        right: auto;
        left: 0.5rem;
    }
    
    .mobile-search-btn:hover {
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    /* Mobile nav menu */
    .mobile-nav-wrapper .mobile-nav {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-nav-wrapper .nav-link {
        padding: 1rem 1.25rem !important;
        display: block !important;
        border-bottom: 1px solid var(--border);
        text-align: center !important;
        font-size: 1rem !important;
        color: var(--foreground) !important;
        transition: all 0.2s ease;
    }
    
    .mobile-nav-wrapper .nav-link:last-child {
        border-bottom: none;
    }
    
    .mobile-nav-wrapper .nav-link:hover,
    .mobile-nav-wrapper .nav-link.active {
        background-color: var(--turquoise-light) !important;
        color: var(--primary) !important;
    }
}

/* DESKTOP (1024px and above) */
@media (min-width: 1024px) {
    /* Hide mobile stuff */
    .site-header .mobile-menu-btn {
        display: none !important;
    }
    
    .site-header .mobile-nav-wrapper {
        display: none !important;
    }
    
    .mobile-search-wrapper {
        display: none !important;
    }
    
    /* Show desktop search in header */
    .site-header .header-search-wrapper {
        display: block !important;
        width: 20rem !important;
    }
    
    /* Show desktop navigation */
    .site-header .header-nav-row {
        display: block !important;
    }
}