﻿/* ============================================================
   VISIBILITY FIXES (DO NOT REMOVE)
   ============================================================ */
@media (min-width: 1025px) {
    .mobile-only { display: none !important; }
}
@media (max-width: 1024px) {
    .desktop-only { display: none !important; }
}

/* ============================================================
   2026 HEADER & NAVIGATION STYLES (Font Awesome Only)
   ============================================================ */
:root {
    --header-height: 70px;
    --mobile-top-height: 60px;
    --mobile-bottom-height: 65px;
    --color-dark: #0F172A;
    --color-brand: #3B82F6;
    --color-bg-glass: rgba(255, 255, 255, 0.95);
}

body {
    padding-top: var(--header-height);
}

/* --- DESKTOP HEADER --- */
.nw-site-header {
    background: var(--color-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    height: var(--header-height);
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #f1f5f9;
}

.nw-header-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 100%; padding: 0 30px; max-width: 1400px; margin: 0 auto;
}

.site-title-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 900; font-size: 24px; color: var(--color-dark);
    text-transform: uppercase; letter-spacing: -1px; text-decoration: none;
}
.brand-accent { color: var(--color-brand); margin: 0 4px; font-size: 18px; }

/* Search Bar (Desktop) */
.nw-header-search-wrap { flex: 1; max-width: 600px; margin: 0 40px; position: relative; }
.search-input-wrapper { position: relative; display: flex; align-items: center; }
.search-icon-left { position: absolute; left: 15px; color: #94a3b8; font-size: 14px; }
.search-input {
    width: 100%; height: 44px; padding: 0 20px 0 40px;
    border-radius: 50px; border: 1px solid #e2e8f0;
    background: #f8fafc; font-family: 'Inter', sans-serif; font-size: 14px;
    transition: all 0.3s ease;
}
.search-input:focus { border-color: var(--color-brand); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

/* Menu Button */
.menu-toggle-btn {
    background: transparent; border: 1px solid #e2e8f0;
    padding: 0 18px; border-radius: 50px; height: 40px;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    color: var(--color-dark); font-weight: 700; font-size: 14px;
    transition: 0.2s;
}
.menu-toggle-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* --- MOBILE HEADER & BOTTOM NAV --- */
@media (max-width: 1024px) {
    .desktop-only { display: none !important; }
    body { 
        padding-top: var(--mobile-top-height); 
        padding-bottom: var(--mobile-bottom-height); /* Space for bottom nav */
    }
    
    .nw-mobile-top-bar {
        display: flex; justify-content: space-between; align-items: center;
        padding: 0 20px; height: var(--mobile-top-height);
        background: var(--color-bg-glass); backdrop-filter: blur(10px);
        position: fixed; top: 0; left: 0; width: 100%; z-index: 1001;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-top-search-btn {
        background: none; border: none; font-size: 20px; color: var(--color-dark); cursor: pointer;
    }

    /* 
       =======================================================
       MOBILE SEARCH BAR FIX (Hidden by default, shows via JS)
       ======================================================= 
    */
    .nw-mobile-search-bar-wrap {
        position: fixed;
        top: var(--mobile-top-height);
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 10px 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        z-index: 1000;
        
        /* Hide logic: pushed up, invisible, and hidden */
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Active state applied by JavaScript */
    .nw-mobile-search-bar-wrap.is-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* The App-Style Bottom Nav */
    .mobile-bottom-nav {
        position: fixed; bottom: 0; left: 0; width: 100%;
        height: var(--mobile-bottom-height);
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        display: flex; justify-content: space-around; align-items: center;
        z-index: 9998; /* Just below modals */
        box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
        padding-bottom: env(safe-area-inset-bottom); /* iPhone notch fix */
    }

    .bottom-nav-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        color: #64748b; text-decoration: none; font-size: 10px; font-weight: 600;
        width: 25%; height: 100%; background: none; border: none;
    }
    .bottom-nav-item i { font-size: 20px; margin-bottom: 4px; transition: 0.2s; }
    .bottom-nav-item.active, .bottom-nav-item:hover { color: var(--color-brand); }
    .bottom-nav-item.active i { transform: translateY(-2px); }
}

/* Live Search Dropdown Styles */
.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-top: 10px;
    z-index: 9999;
    overflow: hidden;
    display: none; /* JS isay toggle karegi */
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #F1F5F9;
    text-decoration: none;
    color: #0F172A;
    transition: 0.2s;
}
.search-result-item:hover { background: #F8FAFC; }
.search-result-item:last-child { border-bottom: none; }

.search-thumb {
    width: 40px; height: 40px; border-radius: 8px;
    object-fit: cover; margin-right: 12px;
}

.search-meta h4 { margin: 0; font-size: 14px; font-weight: 700; color: #0F172A; }
.search-meta p { margin: 0; font-size: 11px; color: #64748B; }

.search-badge {
    margin-left: auto; font-size: 9px; font-weight: 800;
    text-transform: uppercase; color: var(--color-brand);
    background: #EFF6FF; padding: 2px 8px; border-radius: 4px;
}

/* ============================================================
   MOBILE HEADER OVERFLOW FIX
   ============================================================ */
@media (max-width: 1024px) {
    .nw-mobile-top-bar {
        box-sizing: border-box !important; /* Padding ko width ke andar adjust karta hai */
        width: 100% !important;
        max-width: 100vw !important; /* Screen se bahar jane se rokta hai */
        padding: 0 20px !important;
    }

    .mobile-top-search-btn {
        padding: 10px; /* Click karne ki jagah (Tap target) ko behtar banata hai */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Horizontal scroll ko completely block karne ke liye */
    body {
        overflow-x: hidden !important;
    }
}
