/**
 * VoteWithPride - Modern Glass Header
 * Always visible with glass effect
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --vwp-header-bg: rgba(15, 23, 42, 0.95);
    --vwp-glass-blur: 20px;
    --vwp-pride-gradient: linear-gradient(90deg,
        #e40303, #ff8c00, #ffed00, #008026, #24408e, #732982, #e40303);
    --vwp-accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --vwp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Hide Top Bar
   ============================================ */
.top-bar,
#header .top-bar {
    display: none !important;
}

/* ============================================
   Main Header - Dark Glass Background
   ============================================ */
#header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    background: var(--vwp-header-bg) !important;
    backdrop-filter: blur(var(--vwp-glass-blur)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--vwp-glass-blur)) saturate(180%) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Pride stripe */
#header::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: var(--vwp-pride-gradient) !important;
    background-size: 200% 100% !important;
    animation: prideShimmer 6s linear infinite !important;
    z-index: 100 !important;
}

@keyframes prideShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ============================================
   Logo Section
   ============================================ */
#main-header {
    background: transparent !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    border: none !important;
    display: block !important;
}

#main-header .container {
    max-width: 1300px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

#main-header .row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Logo styling */
#logo {
    display: block !important;
}

#logo a.logo {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    transition: var(--vwp-transition) !important;
}

#logo a.logo:hover {
    opacity: 0.9 !important;
    transform: scale(1.02) !important;
}

#logo .logo_img {
    max-height: 70px !important;
    width: auto !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)) !important;
}

#logo h1,
#logo h1 a {
    color: #ffffff !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Tagline */
.main_quote,
#main-header blockquote,
#main-header blockquote p {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.8rem !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    margin: 5px 0 0 0 !important;
    padding: 0 !important;
    border: none !important;
}

.main_quote::before,
#main-header blockquote::before {
    display: none !important;
}

/* Hide newsletter/form area */
.top_newsletter {
    display: none !important;
}

/* ============================================
   Navigation Bar
   ============================================ */
#lower-header {
    background: rgba(255, 255, 255, 0.06) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: none !important;
    padding: 0 20px !important;
    margin: 0 !important;
}

#lower-header .container {
    max-width: 1300px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Navigation list */
#navigation {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 12px 0 !important;
    flex-wrap: wrap !important;
}

/* Nav items */
#navigation > li {
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

#navigation > li > a,
#navigation > li > span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 12px 22px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: var(--vwp-transition) !important;
    backdrop-filter: blur(10px) !important;
}

/* Hover effect */
#navigation > li > a:hover,
#navigation > li > span:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Active state */
#navigation > li.current-menu-item > a,
#navigation > li.current_page_item > a,
#navigation > li.current-menu-ancestor > a {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* Home icon */
#navigation > li:first-child > a {
    padding: 12px 16px !important;
}

/* CTA Button */
#navigation > li.donate-button > a,
#navigation > li > a[href*="candidate-submission"],
#navigation > li > a[href*="submit-responses"],
#navigation > li:last-child > a {
    background: var(--vwp-accent-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4) !important;
}

#navigation > li.donate-button > a:hover,
#navigation > li > a[href*="candidate-submission"]:hover,
#navigation > li > a[href*="submit-responses"]:hover,
#navigation > li:last-child > a:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5) !important;
}

/* ============================================
   Dropdown Menus
   ============================================ */
#navigation ul.sub-menu,
#navigation .sub-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    min-width: 230px !important;
    background: rgba(20, 30, 48, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
    padding: 10px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.25s ease !important;
    z-index: 99999 !important;
    list-style: none !important;
}

#navigation > li:hover > ul.sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Dropdown items */
#navigation ul.sub-menu li a {
    display: block !important;
    padding: 12px 16px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    border: none !important;
}

#navigation ul.sub-menu li a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding-left: 20px !important;
}

/* ============================================
   Mobile Menu Button
   ============================================ */
#menu-button {
    display: none !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 16px !important;
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    transition: var(--vwp-transition) !important;
}

#menu-button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

#menu-button div {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

#menu-button div span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background: #ffffff !important;
    border-radius: 2px !important;
    transition: var(--vwp-transition) !important;
}

#menu-button > span:last-child {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #ffffff !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
}

/* ============================================
   Page Content Spacing
   ============================================ */
body {
    padding-top: 0 !important;
}

.wrapper-container {
    padding-top: 150px !important;
}

body.admin-bar .wrapper-container {
    padding-top: 182px !important;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1100px) {
    #navigation > li > a,
    #navigation > li > span {
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 991px) {
    #menu-button {
        display: flex !important;
    }
    
    #lower-header .container {
        justify-content: flex-end !important;
    }
    
    #navigation {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 15px !important;
        right: 15px !important;
        flex-direction: column !important;
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border-radius: 16px !important;
        padding: 15px !important;
        gap: 6px !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    #navigation.opened,
    .menu-active #navigation {
        display: flex !important;
    }
    
    #navigation > li {
        width: 100% !important;
    }
    
    #navigation > li > a {
        width: 100% !important;
        justify-content: flex-start !important;
        border-radius: 10px !important;
    }
    
    #navigation ul.sub-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        background: rgba(0, 0, 0, 0.2) !important;
        box-shadow: none !important;
        border: none !important;
        margin-top: 6px !important;
        border-radius: 10px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .wrapper-container {
        padding-top: 130px !important;
    }
}

@media (max-width: 768px) {
    #main-header {
        padding: 12px 15px !important;
    }
    
    #logo .logo_img {
        max-height: 55px !important;
    }
    
    #logo h1,
    #logo h1 a {
        font-size: 1.3rem !important;
    }
    
    .main_quote {
        display: none !important;
    }
    
    .wrapper-container {
        padding-top: 110px !important;
    }
}

@media (max-width: 480px) {
    #logo .logo_img {
        max-height: 45px !important;
    }
    
    #menu-button > span:last-child {
        display: none !important;
    }
}

/* ============================================
   Theme Fixes
   ============================================ */

/* Remove old nav backgrounds */
body #navigation li > a {
    background-color: transparent !important;
}

/* Hide dropdown arrows */
#navigation .sub-arrow {
    display: none !important;
}

/* Add dropdown indicator */
#navigation > li.menu-item-has-children > a::after {
    content: '▾' !important;
    font-size: 0.7em !important;
    margin-left: 6px !important;
    opacity: 0.7 !important;
}

/* Fix wide layout padding */
body.wide #main-header,
body.wide #lower-header {
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Header animation */
#header {
    animation: headerFadeIn 0.5s ease-out !important;
}

@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
