/* ============================================================
   Premium Header Redesign — Citizen Opinion
   Glassmorphism, Gradient Underlines, Glow Effects, Micro-animations
   ============================================================ */

/* ── Header: Floating Glass Bar ────────────────────── */
.header {
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.92), rgba(15, 32, 55, 0.88)) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 153, 0, 0.12) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 153, 0, 0.08) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            #ff9900 15%,
            #ffb347 30%,
            #ff9900 50%,
            #e67e00 70%,
            #ff9900 85%,
            transparent 100%);
    opacity: 0.8;
    animation: headerShine 4s ease-in-out infinite;
}

@keyframes headerShine {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.header.scrolled {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 153, 0, 0.15) inset !important;
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.97), rgba(15, 32, 55, 0.95)) !important;
}

/* ── Logo Enhancement ──────────────────────────────── */
.logo {
    position: relative;
    transition: transform 0.3s ease !important;
}

.logo:hover {
    transform: scale(1.03);
}

.logo img {
    border: 2px solid rgba(255, 153, 0, 0.3) !important;
    box-shadow: 0 0 16px rgba(255, 153, 0, 0.2), 0 0 4px rgba(255, 153, 0, 0.1);
    transition: all 0.3s ease !important;
}

.logo:hover img {
    border-color: rgba(255, 153, 0, 0.6) !important;
    box-shadow: 0 0 24px rgba(255, 153, 0, 0.35), 0 0 8px rgba(255, 153, 0, 0.15);
}

.logo-text {
    color: #fff !important;
    letter-spacing: 0.3px;
}

.logo-text span {
    color: rgba(255, 153, 0, 0.65) !important;
    letter-spacing: 0.5px;
}

/* ── Nav Links: Gradient Underline + Glow ──────────── */
.nav-links a {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #ff9900, #ffb347, #ff9900);
    border-radius: 4px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.4);
}

.nav-links a::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: radial-gradient(circle at center, rgba(255, 153, 0, 0.08), transparent) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    border-radius: 8px !important;
    height: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

.nav-links a:hover {
    color: #fff !important;
    background: rgba(255, 153, 0, 0.08) !important;
    transform: translateY(-1px);
}

.nav-links a:hover::before {
    width: 60%;
}

.nav-links a:hover::after {
    opacity: 1 !important;
}

.nav-links a.active {
    color: #ff9900 !important;
    background: rgba(255, 153, 0, 0.1) !important;
    font-weight: 600 !important;
    text-shadow: 0 0 12px rgba(255, 153, 0, 0.3);
}

.nav-links a.active::before {
    width: 70%;
    height: 2.5px;
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.6), 0 0 24px rgba(255, 153, 0, 0.2);
}

.nav-links a.active::after {
    opacity: 1 !important;
    background: radial-gradient(circle at center bottom, rgba(255, 153, 0, 0.12), transparent 70%) !important;
}

/* ── Dropdown Menu: Premium Glass ──────────────────── */
.nav-dropdown-toggle {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px;
    transition: all 0.3s ease !important;
}

.nav-dropdown-toggle:hover {
    color: #fff !important;
    background: rgba(255, 153, 0, 0.08) !important;
}

.nav-dropdown-menu {
    background: linear-gradient(135deg, rgba(15, 30, 55, 0.97), rgba(20, 38, 65, 0.95)) !important;
    border: 1px solid rgba(255, 153, 0, 0.15) !important;
    border-radius: 14px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 153, 0, 0.05),
        0 0 30px rgba(255, 153, 0, 0.05) inset !important;
    backdrop-filter: blur(30px) !important;
    padding: 8px !important;
    animation: dropdownSlide 0.25s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── DROPDOWN ITEMS: nuclear reset — kill ALL inherited styles ── */
.nav-dropdown-menu li a,
.nav-dropdown-menu li a:link,
.nav-dropdown-menu li a:visited,
.nav-dropdown-menu li a:active,
.nav-dropdown-menu li a.active,
.nav-links li.nav-dropdown .nav-dropdown-menu li a,
.nav-links .nav-dropdown .nav-dropdown-menu li a,
.nav-links .nav-dropdown-menu a,
ul.nav-links li ul.nav-dropdown-menu li a {
    color: rgba(255, 255, 255, 0.8) !important;
    background: transparent !important;
    background-image: none !important;
    text-shadow: none !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    transition: all 0.25s ease !important;
    position: relative;
    overflow: visible !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.8) !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    box-shadow: none !important;
}

/* Kill ALL pseudo-elements on dropdown items */
.nav-dropdown-menu li a::before,
.nav-dropdown-menu li a::after,
.nav-links .nav-dropdown-menu li a::before,
.nav-links .nav-dropdown-menu li a::after,
.nav-links .nav-dropdown .nav-dropdown-menu li a::before,
.nav-links .nav-dropdown .nav-dropdown-menu li a::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    background: none !important;
}

/* Dropdown hover */
.nav-dropdown-menu li a:hover {
    background: rgba(255, 153, 0, 0.12) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    transform: translateX(4px);
    padding-left: 18px !important;
}

/* ── Dropdown OPEN state (click toggle) ────────────── */
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
    display: block !important;
    z-index: 9999 !important;
}

.nav-dropdown.open .nav-dropdown-toggle {
    color: #ff9900 !important;
    background: rgba(255, 153, 0, 0.12) !important;
}

/* ── Language Switcher: Pill with Glow ─────────────── */
.lang-switcher {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px !important;
    gap: 3px !important;
}

.lang-btn {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 11px !important;
    padding: 5px 11px !important;
    transition: all 0.3s ease !important;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.06);
}

.lang-btn.active {
    background: linear-gradient(135deg, #ff9900, #e67e00) !important;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(255, 153, 0, 0.4), 0 0 4px rgba(255, 153, 0, 0.2) !important;
    font-weight: 700 !important;
}

/* ── Header Action Icons ───────────────────────────── */
.header-actions a,
.header-actions .search-toggle,
.header-actions .notif-bell,
.header-actions a[href="settings.html"] {
    color: rgba(255, 255, 255, 0.65) !important;
    transition: all 0.3s ease !important;
    font-size: 18px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    position: relative;
}

.header-actions a:hover,
.header-actions .search-toggle:hover,
.header-actions .notif-bell:hover {
    color: #fff !important;
    background: rgba(255, 153, 0, 0.1);
    transform: translateY(-1px);
}

.notif-count {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    background: linear-gradient(135deg, #ff4444, #cc0000) !important;
    color: #fff !important;
    font-size: 10px !important;
    padding: 1px 5px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.3);
    animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ── Theme Toggle: Moon/Sun Glow ───────────────────── */
.theme-toggle {
    color: rgba(255, 255, 255, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    font-size: 16px !important;
}

.theme-toggle:hover {
    background: rgba(255, 200, 50, 0.12) !important;
    border-color: rgba(255, 200, 50, 0.25) !important;
    color: #ffc832 !important;
    box-shadow: 0 0 16px rgba(255, 200, 50, 0.15);
    transform: rotate(15deg);
}

/* ── Login Button: Premium Gradient ────────────────── */
.header-actions .btn-primary,
.header-actions .btn-sm {
    background: linear-gradient(135deg, #ff9900, #e67e00) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 8px 22px !important;
    border-radius: 22px !important;
    font-size: 13px !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(255, 153, 0, 0.3), 0 0 0 1px rgba(255, 153, 0, 0.1) inset !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.header-actions .btn-primary::before,
.header-actions .btn-sm::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    transition: opacity 0.3s ease;
}

.header-actions .btn-primary:hover,
.header-actions .btn-sm:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 24px rgba(255, 153, 0, 0.45), 0 0 0 1px rgba(255, 153, 0, 0.15) inset !important;
}

.header-actions .btn-primary:active,
.header-actions .btn-sm:active {
    transform: translateY(0) scale(0.98) !important;
}

/* ── Mobile Hamburger: Animated ────────────────────── */
.menu-toggle {
    color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.04);
}

.menu-toggle:hover {
    background: rgba(255, 153, 0, 0.1) !important;
    border-color: rgba(255, 153, 0, 0.2);
    color: #ff9900 !important;
}

/* ── Mobile Nav Open: Premium Slide ────────────────── */
@media (max-width: 768px) {
    .nav-links.open {
        background: #050e1e !important;
        border-top: none !important;
    }

    .nav-links.open a {
        color: rgba(255, 255, 255, 0.75) !important;
        padding: 14px 16px !important;
        border-radius: 12px !important;
        font-size: 15px !important;
        transition: all 0.25s ease;
    }

    .nav-links.open a:hover,
    .nav-links.open a.active {
        background: rgba(255, 153, 0, 0.1) !important;
        color: #ff9900 !important;
    }

    .nav-links.open .nav-dropdown-menu li a {
        padding: 14px 16px !important;
    }
}

/* ── Scrolled State: Tighter & Darker ──────────────── */
.header.scrolled .header-inner {
    height: 60px;
}

.header.scrolled .logo img {
    height: 38px;
    width: 38px;
}

/* ── Dark Mode Adjustments ─────────────────────────── */
[data-theme="dark"] .header {
    background: linear-gradient(135deg, rgba(5, 12, 25, 0.95), rgba(10, 18, 35, 0.92)) !important;
    border-bottom-color: rgba(255, 153, 0, 0.08) !important;
}

[data-theme="dark"] .nav-dropdown-menu {
    background: linear-gradient(135deg, rgba(8, 16, 30, 0.98), rgba(12, 22, 40, 0.96)) !important;
}