/* --- RESET & VARIABLES (Header Scope Only) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-blue: #0d6efd;
    --brand-blue-dark: #0a58ca;
    --brand-gold: #ffc107;
    --brand-gold-hover: #ffca2c;
    --text-white: #ffffff;
    --text-dark: #111827;
    --bg-light: #f4f6f9;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
}

/* --- MAIN NAVBAR WRAPPER (100% FULL WIDTH) --- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar {
    background: var(--brand-blue);
    width: 100%;
    position: relative; /* Essential for absolute mobile dropdown positioning */
}

/* Inner Shell for Max-Width Alignment */
.nav-container {
    max-width: 1425px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.logo img:hover {
    transform: scale(1.02);
}

/* --- NAV LINKS --- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-white);
    padding: 0.5rem 0.85rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--brand-gold);
    background: rgba(255, 255, 255, 0.1);
}

/* --- SEARCH BOX --- */
.search-box {
    flex: 0 1 300px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--text-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.search-input-wrap:focus-within {
    border-color: var(--brand-gold);
}

.search-input-wrap input {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.search-input-wrap button {
    background: var(--brand-gold);
    border: none;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: background 0.2s ease;
}

.search-input-wrap button:hover {
    background: var(--brand-gold-hover);
}

.search-input-wrap button svg {
    width: 18px;
    height: 18px;
}

/* --- MENU TOGGLE BUTTON (HIDDEN ON DESKTOP) --- */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    transition: background 0.2s ease;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-toggle svg {
    width: 28px;
    height: 28px;
}


/* --- ALERT BAR (MARQUEE) --- */
.alert-bar {
    background: var(--brand-gold);
    border-bottom: 2px solid #e0a800;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.alert-label {
    background: #111827;
    color: var(--brand-gold);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.65rem 1rem;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 4px 0 8px rgba(0,0,0,0.15);
}

.marquee-container {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeScroll 35s linear infinite;
}

/* Pause on hover for better readability */
.alert-bar:hover .marquee-content {
    animation-play-state: paused;
}

.alert-item {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.alert-item a {
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.alert-item a:hover {
    color: #1a365d;
    text-decoration: underline;
}

.alert-divider {
    margin: 0 1.25rem;
    color: #856404;
    font-weight: bold;
}

@keyframes marqueeScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}


/* ========================================================
   --- TABLET RESPONSIVE (Max-Width: 1024px) --- 
======================================================== */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0.75rem 1.25rem;
        gap: 1rem;
    }

    .logo img {
        height: 38px;
    }

    .nav-links a {
        padding: 0.4rem 0.6rem;
        font-size: 0.88rem;
    }

    .search-box {
        flex: 0 1 220px;
    }

    .alert-label {
        font-size: 0.75rem;
        padding: 0.6rem 0.75rem;
    }

    .alert-item {
        font-size: 0.88rem;
    }
}


/* ========================================================
   --- MOBILE RESPONSIVE (Max-Width: 540px) --- 
======================================================== */
@media (max-width: 540px) {
    .nav-container {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
    }

    .logo img {
        height: 36px;
    }

    /* STRICTLY SHOW MENU BUTTON ON PHONES */
    .menu-toggle {
        display: flex;
        order: 2;
    }

    /* SEARCH BAR MOVES TO FULL WIDTH BELOW LOGO & MENU */
    .search-box {
        flex: 1 1 100%;
        order: 3;
        margin-top: 0.6rem;
    }

    .search-input-wrap input {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* ABSOLUTE DROPDOWN NAV LINKS FOR MOBILE */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--brand-blue-dark);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 12px 24px rgba(0,0,0,0.35);
        border-top: 1px solid rgba(255,255,255,0.15);
        z-index: 999;
    }

    /* SHOW WHEN JS ADDS 'ACTIVE' CLASS */
    .nav-links.active {
        display: flex;
        animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .nav-links a {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
        display: block;
        text-align: left;
    }

    .nav-links a:hover,
    .nav-links a:active {
        background: var(--brand-gold);
        color: var(--text-dark);
    }

    /* Hide alert label on phone screens */
    .alert-label {
        display: none;
    }

    /* 👇 Isme explicit vertical padding aur height add ki gayi hai */
    .alert-bar {
        padding: 0.65rem 0; /* Upar aur niche proper space jisse bar mota dikhe */
        min-height: 42px;   /* Minimum height fix kar di taaki kabhi patla na ho */
    }

    /* 👇 Font size thoda badha diya taaki mobile par clearly padhne me aaye */
    .alert-item {
        font-size: 0.92rem;
        line-height: 1.4;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}