/* ===================================
   HEADER & NAVIGATION STYLES
   TanzaniaInvest-inspired Design
   =================================== */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

/* Header Container */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    transition: all 0.3s ease;
}

/* Scrolled header state */
.site-header.scrolled {
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.site-header.scrolled .top-utility-bar {
    background: white;
}

.site-header.scrolled .main-navigation {
    background: white !important;
}

.site-header.scrolled .nav-center {
    background: white !important;
}

.site-header.scrolled .nav-menu,
.site-header.scrolled .nav-menu-second {
    background: white !important;
}

.site-header.scrolled .nav-item {
    background: white !important;
}

.site-header.scrolled .nav-link {
    color: #000179 !important;
}

.site-header.scrolled .nav-link:hover,
.site-header.scrolled .nav-link.active {
    color: #000179 !important;
    background: rgba(0, 1, 121, 0.1);
}

.site-header.scrolled .dropdown-icon {
    color: #000179 !important;
}

.site-header.scrolled .dropdown-menu {
    border-color: rgba(0, 1, 121, 0.2);
}

.site-header.scrolled .desktop-search-toggle,
.site-header.scrolled .mobile-menu-toggle {
    color: #000179;
}

.site-header.scrolled .social-links a {
    color: #000179;
    border-color: rgba(0, 1, 121, 0.3);
}

.site-header.scrolled .logo-text {
    color: #000179;
}

/* Add top padding to body to prevent content from hiding behind fixed header */
body {
    padding-top: 180px; /* Increased to account for potential two-row navigation */
    overflow-y: auto; /* Ensure vertical scrolling is enabled */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    min-height: 100vh; /* Ensure body takes full viewport height */
}

/* Top Utility Bar */
.top-utility-bar {
    background: #000179; /* Primary Blue background */
    padding: 8px 0;
}

.utility-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility Left - Search Icon and Mobile Menu Toggle */
.utility-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.desktop-search-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.utility-left .mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    display: none; /* Hidden on desktop */
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 4px 0;
    transition: 0.3s;
}

/* Utility Center - Logo */
.utility-center .logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.logo-image {
    transition: all 0.3s ease;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 16px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

/* Utility Right - Social Media */
.utility-right .social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    text-decoration: none;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
}

/* Main Navigation Bar */
.main-navigation {
    background: #000179 !important; /* Primary Blue background */
    padding: 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    min-height: 60px;
    background: #000179;
}

/* Navigation Left - Search */
.nav-left .search-container {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.search-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* Search Dropdown */
.search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 2000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.search-overlay.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-content {
    padding: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #666;
    font-size: 16px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 40px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #9FCCEC;
    box-shadow: 0 0 0 3px rgba(159, 204, 236, 0.1);
}

.search-input:invalid {
    box-shadow: none;
    border-color: #ddd;
}

.search-input:placeholder-shown {
    border-color: #ddd;
}

.search-close {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.search-close:hover {
    background: #f8f9fa;
    color: #333;
}

/* Navigation Center - Main Menu */
/* .nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    background: #000179;
    /* background: #dc3545; */
    /* margin: 0;
    padding: 0; */
/* } */

/* .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    background: #000179;
}

.nav-item {
    position: relative;
    background: #000179;
} */

.nav-center {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: auto;         
    overflow-y: visible; /* Changed from hidden to visible to allow page scrolling */
    -webkit-overflow-scrolling: touch;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-menu {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    background: #000179;
    white-space: nowrap;
    position: relative;
    z-index: 10005; /* Higher z-index for first row navigation */
    transition: background 0.3s ease;
}

/* Second row navigation styling */
.nav-menu-second {
    background: #000179;
    border-top: 1px solid rgba(159, 204, 236, 0.2);
    padding-top: 0;
    margin-top: 0;
    position: relative;
    z-index: 1000; /* Lower z-index so dropdowns appear above */
    transition: background 0.3s ease;
}

.nav-menu-second .nav-item .nav-link {
    padding: 15px 16px; /* Slightly smaller padding for second row */
    font-size: 13px; /* Slightly smaller font for second row */
}

.nav-menu-second .nav-item {
    z-index: 1000; /* Lower z-index for second row items */
}

/* Ensure second row dropdowns have same styling as first row */
.nav-menu-second .dropdown-menu {
    background: white;
    border: 1px solid rgba(0, 1, 121, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: auto;
    max-width: 300px;
    width: fit-content;
}

/* Responsive navigation for two rows */
@media (max-width: 1200px) {
    .nav-menu-first,
    .nav-menu-second {
        justify-content: center;
    }
    
    .nav-menu-first .nav-item,
    .nav-menu-second .nav-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-center {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu-first,
    .nav-menu-second {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .nav-menu-second {
        border-top: 1px solid rgba(159, 204, 236, 0.3);
    }
}

.nav-item {
    position: relative;
    background: #000179;
    flex: 0 0 auto;
    border: none;
    outline: none;
    z-index: 10006; /* Higher z-index for navigation items */
    transition: background 0.3s ease;
}

.nav-center,
.nav-menu {
    overflow: visible;  /* allow dropdowns to be visible */
}


.nav-link {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    color: white !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    background: transparent;
    border: none;
    outline: none;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: transparent;
}

.nav-link .dropdown-icon {
    margin-left: 6px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Arrow rotation for Other dropdown items */
.nav-item.has-dropdown .dropdown-other .dropdown-item .dropdown-icon {
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.nav-item.has-dropdown .dropdown-other .dropdown-item:hover > .dropdown-link .dropdown-icon {
    transform: rotate(180deg);
}

.nav-item.has-dropdown:hover .nav-link {
    color: white;
    background: transparent;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: auto; /* Changed from 280px to auto to fit content */
    max-width: 300px; /* Added max-width for very long names */
    width: fit-content; /* Ensure dropdown fits its content */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10010; /* Increased z-index to appear above second row */
    margin-top: 0;
    border: 1px solid rgba(0, 1, 121, 0.1);
    padding: 0.5rem 0; /* Reduced padding */
}

.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 10011; /* Increased z-index to appear above second row */
}



.dropdown-list {
    list-style: none;
    margin: 0;
    padding: 8px 0; /* Reduced padding for more compact look */
}

.dropdown-item {
    margin: 0;
}

.dropdown-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px; /* Reduced padding for more compact look */
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-family: 'Inter', sans-serif; /* Consistent font family */
    font-size: 14px; /* Consistent font size */
    line-height: 1.4;
}

.dropdown-link:hover,
.dropdown-link.active {
    background: rgba(159, 204, 236, 0.1);
    color: #000179;
}

.dropdown-link .article-count {
    font-size: 11px;
    color: #666;
    background: #eee;
    padding: 2px 6px; /* Reduced padding */
    border-radius: 8px; /* Reduced border radius */
    font-family: 'Inter', sans-serif; /* Consistent font family */
}

/* Other dropdown: full-width, centered */
.nav-item.has-dropdown .dropdown-other {
    position: absolute;
    top: 100%;
    left: -500px;                      /* center relative to screen */
    transform: translateX(-50%) translateY(-10px);    /*adjust to true center */
    min-width: 80vw;                /* take 70% of screen for better column layout */
    max-width: 1200px;              /* prevent it from getting too wide */
    background: #000179;
    color: #fff;
    border-radius: 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    padding: 30px 40px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2500;                     /* higher z-index than main nav but lower than nested dropdowns */
}

/* show when hovering Other */
.nav-item.has-dropdown:hover > .dropdown-other {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* list vertical columns inside Other */
.nav-item.has-dropdown .dropdown-other .dropdown-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
}

/* Responsive column adjustments */
@media (max-width: 1200px) {
    .nav-item.has-dropdown .dropdown-other .dropdown-list {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .nav-item.has-dropdown .dropdown-other .dropdown-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* each category inside Other */
.nav-item.has-dropdown .dropdown-other .dropdown-item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item.has-dropdown .dropdown-other .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* link style inside Other */
.nav-item.has-dropdown .dropdown-other .dropdown-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-item.has-dropdown .dropdown-other .dropdown-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* subcategories dropdown inside Other */
.nav-item.has-dropdown .dropdown-other .dropdown-item .dropdown-menu {
    position: absolute;
    top: 100%;                         /* position below the category item */
    left: 0;                           /* align with the left edge of the category item */
    transform: translateY(-10px);      /* slide up from below */
    background: #fff;
    color: #000;
    min-width: 220px;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 3000;                     /* much higher z-index to prevent overlap issues */
    pointer-events: auto;              /* ensure dropdown can receive mouse events */
}

/* Prevent hover interference when nested dropdown is open */
.nav-item.has-dropdown .dropdown-other .dropdown-item:hover .dropdown-menu {
    pointer-events: auto;
}

/* Ensure the hover area extends to prevent accidental triggers */
.nav-item.has-dropdown .dropdown-other .dropdown-item .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;                        /* extend hover area above the dropdown */
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    pointer-events: auto;
}

/* show subcategories when hovering */
.nav-item.has-dropdown .dropdown-other .dropdown-item:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* links inside subcategories */
.nav-item.has-dropdown .dropdown-other .dropdown-menu .dropdown-link {
    color: #000;
    background: #fff;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.nav-item.has-dropdown .dropdown-other .dropdown-menu .dropdown-link:last-child {
    border-bottom: none;
}

.nav-item.has-dropdown .dropdown-other .dropdown-menu .dropdown-link:hover {
    background: rgba(0, 1, 121, 0.05);
    color: #000179;
    padding-left: 20px;
}


/* Navigation Right - Utility Links */
.nav-right .nav-utility {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-utility-item {
    margin: 0;
}

.nav-utility-link {
    display: block;
    padding: 20px 12px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.nav-utility-link:hover {
    background: rgba(159, 204, 236, 0.2);
    color: #9FCCEC;
}

/* Mobile Navigation */
.mobile-navigation,
#mobile-navigation,
div.mobile-navigation {
    position: fixed !important;
    top: 65px !important; /* Position right after mobile top bar (15px padding + ~50px height) */
    left: -100% !important; /* Hidden by default, shows when active */
    width: 300px !important;
    height: calc(100vh - 65px) !important; /* Adjusted height to match new top position */
    background: white !important;
    z-index: 2001 !important;
    transition: left 0.15s ease !important; /* Reduced from 0.3s to 0.15s for faster response */
    overflow-y: auto !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
    margin: 0 !important; /* Ensure no margin */
    padding: 0 !important; /* Ensure no padding */
    border: none !important; /* Override any inherited borders */
    outline: none !important; /* Override any inherited outlines */
    box-sizing: border-box !important; /* Ensure proper box model */
    min-height: auto !important; /* Override any min-height */
    max-height: none !important; /* Override any max-height */
    line-height: normal !important; /* Override any line-height */
    visibility: visible !important; /* Ensure visibility */
    opacity: 1 !important; /* Ensure opacity */
    display: block !important; /* Ensure display when active */
    transform: translateX(-100%) !important; /* Additional transform to ensure it's hidden */
    pointer-events: none !important; /* Disable interactions when hidden */
}

.mobile-navigation.active,
#mobile-navigation.active,
div.mobile-navigation.active {
    left: 0 !important;
    transform: translateX(0) !important; /* Show the navigation */
    pointer-events: auto !important; /* Re-enable interactions when visible */
}

.mobile-nav-header,
#mobile-navigation .mobile-nav-header,
div.mobile-navigation .mobile-nav-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 20px !important; /* Reduced top/bottom padding from 20px to 15px */
    background: #000179 !important;
    color: white !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 2003 !important;
    margin: 0 !important; /* Ensure no margin */
    border: none !important; /* Override any inherited borders */
    outline: none !important; /* Override any inherited outlines */
    box-sizing: border-box !important; /* Ensure proper box model */
}

.mobile-nav-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 2002;
    /* Ensure button is always visible */
    opacity: 1 !important;
    visibility: visible !important;
    /* Prevent inheritance issues */
    position: relative;
}

.mobile-nav-close:hover {
    color: #9FCCEC;
    transform: scale(1.1);
}

/* Ensure mobile nav close button is always visible and properly styled */
.mobile-nav-close,
#mobile-navigation .mobile-nav-close,
div.mobile-navigation .mobile-nav-close {
    /* Force visibility */
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Ensure proper positioning */
    position: relative !important;
    z-index: 2002 !important;
    /* Prevent any inherited styles from hiding it */
    background: none !important;
    border: none !important;
    outline: none !important;
    /* Ensure proper sizing */
    width: auto !important;
    height: auto !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

/* Ensure mobile nav close button is always visible in scrolled state */
.mobile-navigation.scrolled .mobile-nav-close,
#mobile-navigation.scrolled .mobile-nav-close,
div.mobile-navigation.scrolled .mobile-nav-close {
    /* Force visibility even in scrolled state */
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Ensure proper positioning */
    position: relative !important;
    z-index: 2002 !important;
    /* Prevent any inherited styles from hiding it */
    background: none !important;
    border: none !important;
    outline: none !important;
    /* Ensure proper sizing */
    width: auto !important;
    height: auto !important;
    min-width: 40px !important;
    min-height: 40px !important;
    /* Ensure color is visible */
    color: #000179 !important;
}

/* Mobile Top Bar - 3 Column Layout */
.mobile-top-bar {
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #000179;
    border-bottom: 1px solid rgba(159, 204, 236, 0.3);
}

.mobile-nav-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.mobile-logo-img {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.mobile-search-toggle {
    background: none;
    border: none;
    color: white; /* White when header is blue (not scrolled) */
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ensure button is clickable on mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Ensure proper sizing */
    min-width: 44px;
    min-height: 44px;
}

.mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}
    
    /* Remove duplicate mobile search close styles - they're defined in the main mobile search section */

.mobile-nav-content,
#mobile-navigation .mobile-nav-content,
div.mobile-navigation .mobile-nav-content {
    padding: 0 !important; /* Removed vertical padding to eliminate any gaps */
    margin: 0 !important; /* Ensure no margin */
    border: none !important; /* Override any inherited borders */
    outline: none !important; /* Override any inherited outlines */
    box-sizing: border-box !important; /* Ensure proper box model */
}

/* Ensure all direct children of mobile navigation don't inherit unwanted styles */
.mobile-navigation > *,
#mobile-navigation > *,
div.mobile-navigation > * {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #eee;
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(159, 204, 236, 0.1);
    color: #000179;
}

.mobile-nav-link i:first-child {
    margin-right: 10px;
    color: #9FCCEC;
}

.submenu-toggle {
    color: #666;
    transition: transform 0.3s ease;
}

.mobile-nav-item.has-submenu.active .submenu-toggle {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    display: none;
}

.mobile-nav-item.has-submenu.active .mobile-submenu {
    display: block;
}

.mobile-submenu-item {
    border-bottom: 1px solid #eee;
}

.mobile-submenu-link {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.mobile-submenu-link:hover {
    color: #000179;
}

/* Mobile Search - Old styles removed, new styles are in the media query below */

.mobile-search-input:focus {
    border-color: #9FCCEC;
    box-shadow: 0 0 0 3px rgba(159, 204, 236, 0.1);
}

.mobile-search-input:invalid {
    box-shadow: none;
    border-color: #ddd;
}

.mobile-search-input:placeholder-shown {
    border-color: #ddd;
}

.mobile-search-submit {
    background: #000179;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mobile-search-submit:hover {
    background: #9FCCEC;
    color: #000179;
}

/* Mobile Social */
.mobile-social {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mobile-social a {
    color: #666;
    font-size: 18px;
    transition: color 0.3s ease;
}

.mobile-social a:hover {
    color: #dc3545;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease; /* Reduced from 0.3s to 0.15s for faster response */
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-utility {
        display: none !important;
    }
    
    .nav-center {
        flex: 1;
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .nav-menu {
        gap: 0;
    }
    
    .nav-link {
        padding: 20px 12px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .utility-content {
        padding: 0 15px;
    }
    
    .nav-content {
        padding: 0 15px;
    }
    
    .utility-left .mobile-menu-toggle {
        display: none; /* Hide old mobile menu toggle */
    }
    
    .nav-center {
        display: none;
    }
    
    .nav-left {
        order: 1;
    }
    
    .nav-right {
        order: 3;
    }
    
    .nav-content {
        justify-content: space-between;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    /* Mobile search dropdown adjustments */
    .search-overlay {
        width: 300px;
        left: -100px;
    }
    
    /* Show mobile top bar */
    .mobile-top-bar {
        display: flex;
    }
    
    /* Hide desktop elements on mobile */
    .top-utility-bar,
    .main-navigation {
        display: none;
    }
    
    /* Adjust mobile navigation positioning for smaller screens */
    .mobile-navigation,
    #mobile-navigation,
    div.mobile-navigation {
        top: 65px !important; /* Consistent with main mobile navigation */
        height: calc(100vh - 65px) !important;
    }
}

@media (max-width: 480px) {
    .utility-content {
        padding: 0 10px;
    }
    
    .nav-content {
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .social-links {
        gap: 10px;
    }
    
    .social-links a {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    /* Very small screen search dropdown */
    .search-overlay {
        width: 280px;
        left: -120px;
    }
    
    /* Adjust mobile navigation positioning for very small screens */
    .mobile-navigation,
    #mobile-navigation,
    div.mobile-navigation {
        top: 65px !important; /* Consistent with main mobile navigation */
        height: calc(100vh - 65px) !important;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}

/* ===================================
   DESKTOP SEARCH OVERLAY STYLES
   =================================== */

/* Desktop Search Overlay - Always white background for comfort */
.desktop-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white !important;
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Desktop Search Overlay - Always white, never blue */
.site-header.scrolled .desktop-search-overlay {
    background: white !important;
}

/* Desktop Search Content - Always dark text for white background */
.desktop-search-overlay .search-header h2 {
    color: #000179 !important;
}

.desktop-search-overlay .desktop-search-close {
    color: #333 !important;
}

.desktop-search-overlay .desktop-search-close:hover {
    color: #000179 !important;
    background: rgba(0, 1, 121, 0.1) !important;
}

/* Desktop Search Form - Always dark for white background */
.desktop-search-overlay .search-input-wrapper {
    border-color: #ddd !important;
    background: #f8f9fa !important;
}

.desktop-search-overlay .search-icon {
    color: #666 !important;
}

.desktop-search-overlay .desktop-search-input {
    color: #333 !important;
}

.desktop-search-overlay .desktop-search-input::placeholder {
    color: #999 !important;
}

.desktop-search-overlay .search-submit-btn {
    background: #000179 !important;
    color: white !important;
}

.desktop-search-overlay .search-submit-btn:hover {
    background: #9FCCEC !important;
}

.desktop-search-overlay.active {
    display: block;
    opacity: 1;
}

.desktop-search-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(0, 1, 121, 0.2);
    background: transparent !important;
}

.search-header h2 {
    color: #000179;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.desktop-search-close {
    background: transparent !important;
    border: none !important;
    color: #333 !important;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    border-radius: 50%;
}

.desktop-search-close:hover {
    color: #000179 !important;
    background: rgba(0, 1, 121, 0.1) !important;
    transform: scale(1.1);
}

.desktop-search-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-input-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: #f8f9fa !important;
    border: 2px solid #ddd !important;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #000179 !important;
    box-shadow: 0 4px 20px rgba(0, 1, 121, 0.2);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666 !important;
    font-size: 18px;
}

.desktop-search-input {
    width: 100%;
    padding: 20px 60px 20px 60px;
    border: none;
    background: transparent;
    color: #333 !important;
    font-size: 18px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.desktop-search-input::placeholder {
    color: #999 !important;
    font-family: 'Inter', sans-serif;
}

.desktop-search-input:focus {
    border-color: #000179;
}

.search-submit-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #000179 !important;
    border: none;
    color: white !important;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.search-submit-btn:hover {
    background: #9FCCEC !important;
    transform: scale(1.05);
}

/* Two Column Navigation */
.desktop-search-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
    border-top: 1px solid rgba(0, 1, 121, 0.1);
}

.search-nav-column {
    text-align: center;
}

.nav-column-title {
    color: #000179;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.search-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-nav-list li {
    margin-bottom: 0.8rem;
}

.search-nav-list a {
    color: #495057;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 0;
    display: block;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    border-bottom: 1px solid transparent;
}

.search-nav-list a:hover {
    color: #000179;
    border-bottom-color: #000179;
    transform: translateX(5px);
}

/* Responsive Design for Desktop Search */
@media (max-width: 1024px) {
    .desktop-search-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 1.5rem 20px;
    }
}

@media (max-width: 768px) {
    .desktop-search-nav {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 20px;
    }
    
    .nav-column-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .search-nav-list a {
        font-size: 0.95rem;
        padding: 0.4rem 0;
    }
}

/* Search Results */
.search-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.results-header h3 {
    color: #000179;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.results-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.article-result {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 1, 121, 0.1);
}

.article-result:hover {
    background: white;
    transform: translateY(-2px);
    border-color: rgba(0, 1, 121, 0.3);
    box-shadow: 0 4px 20px rgba(0, 1, 121, 0.1);
}

.article-result-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.article-result-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    background: #9FCCEC;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-result-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.article-result-image.default {
    background: #9FCCEC;
    color: #000179;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-result-content h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.article-result-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.no-results {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 20px;
}

.no-results i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results p {
    font-size: 16px;
    margin: 0;
}

/* Loading and Error States */
.loading-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 20px;
}

.loading-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #9FCCEC;
}

.loading-state p {
    font-size: 16px;
    margin: 0;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Desktop horizontal scroll for many results - Banner-style layout */
@media (min-width: 769px) {
    .results-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0;
        padding: 0;
        /* Remove scrollbar completely for clean look */
        scrollbar-width: none;
        -ms-overflow-style: none;
        background: #000179;
        border-radius: 12px;
        margin: 20px 0;
    }
    
    .results-grid::-webkit-scrollbar {
        display: none;
    }
    
    .article-result {
        flex: 0 0 300px;
        min-width: 300px;
        background: transparent;
        border-radius: 0;
        overflow: hidden;
        box-shadow: none;
        transition: all 0.3s ease;
        border: none;
        position: relative;
        border-right: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .article-result:last-child {
        border-right: none;
    }
    
    .article-result:hover {
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .article-result-header {
        position: relative;
        height: 120px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .article-result-image {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        overflow: hidden;
        position: relative;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .article-result-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform 0.3s ease;
    }
    
    .article-result:hover .article-result-image img {
        transform: scale(1.1);
    }
    
    .article-result-image.default {
        background: linear-gradient(135deg, #9FCCEC 0%, #ffffff 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #000179;
        font-size: 1.5rem;
    }
    
    .article-result-content {
        padding: 20px;
        background: transparent;
        text-align: center;
    }
    
    .article-result-content h4 {
        color: white !important;
        font-size: 14px;
        font-weight: 600;
        margin: 0 0 15px 0;
        line-height: 1.4;
        font-family: 'Inter', sans-serif;
        text-align: center;
    }
    
    .article-result-content p {
        color: rgba(255, 255, 255, 0.9);
        font-size: 12px;
        margin: 0;
        line-height: 1.5;
        font-family: 'Inter', sans-serif;
        text-align: center;
    }
    
    .article-meta {
        display: none; /* Hide meta info for cleaner banner look */
    }
}

/* Article Meta */
.article-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 8px;
    display: block;
}

/* Mobile Responsiveness for Search - Clean list design like navigation */
@media (max-width: 768px) {
    .desktop-search-overlay {
        display: none !important;
    }
    
    .desktop-search-toggle {
        display: none;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 0;
        max-height: none;
        background: transparent;
        overflow-y: visible;
        padding: 0;
        display: block;
    }
    
    .article-result {
        padding: 0;
        background: transparent !important;
        border: none;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
        transition: none;
        border: none;
        height: auto;
        display: block;
        position: relative;
        margin-bottom: 0;
    }
    
    .article-result::before {
        display: none;
    }
    
    .article-result:hover {
        transform: none;
        box-shadow: none;
        border-color: transparent;
    }
    
    .article-result-header {
        display: none;
    }
    
    .article-result-content {
        padding: 16px 20px;
        background: transparent;
        width: 100%;
        display: block;
        align-items: stretch;
        justify-content: flex-start;
        z-index: 2;
        position: relative;
        border-bottom: 1px solid #e9ecef;
    }
    
    .article-result:last-child .article-result-content {
        border-bottom: none;
    }
    
    .article-result-content h4 {
        color: #333 !important;
        font-size: 16px;
        font-weight: 400;
        margin: 0;
        line-height: 1.5;
        font-family: 'Inter', sans-serif;
        text-align: left;
        letter-spacing: 0;
        text-decoration: none;
    }
    
    .article-result-content p {
        display: none;
    }
    
    .article-meta {
        display: none;
    }
    
    .mobile-search-results {
        max-height: 70vh;
        overflow-y: auto;
        padding: 0;
        background: white;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-results-content {
        padding: 0;
    }
    
    .mobile-search {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-search-content {
        min-height: 100vh;
        padding-bottom: 100px;
    }
}

/* Mobile Search Styles - Centered and Full Width */
/* Mobile Search - Independent Overlay */
/* Mobile Search - Always white background for comfort */
.mobile-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white !important;
    z-index: 2000;
    display: none;
    overflow-y: auto !important;
    /* Prevent mobile keyboard issues */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Ensure proper mobile behavior */
    transform: translateZ(0);
    backface-visibility: hidden;
    /* Additional mobile optimizations */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    /* Prevent any stacking issues */
    will-change: transform;
    /* Ensure proper stacking context */
    isolation: isolate;
    transition: background 0.3s ease;
}

/* Mobile Search - Always white, never blue */
.site-header.scrolled .mobile-search {
    background: white !important;
}

/* Mobile Search Content - Always dark text for white background */
.mobile-search .mobile-search-close {
    color: #333 !important;
}

.mobile-search .mobile-search-close:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Mobile Search Form - Always dark for white background */
.mobile-search .mobile-search-input-wrapper {
    border-color: #ddd !important;
    background: #f8f9fa !important;
}

.mobile-search .mobile-search-icon {
    color: #666 !important;
}

.mobile-search .mobile-search-input {
    color: #333 !important;
}

.mobile-search .mobile-search-input::placeholder {
    color: #999 !important;
}

.mobile-search .mobile-search-submit {
    background: #000179 !important;
    color: white !important;
}

.mobile-search .mobile-search-submit:hover {
    background: #9FCCEC !important;
}

.mobile-search .quick-menu-title {
    color: #333 !important;
}

.mobile-search .quick-menu-list a {
    color: #666 !important;
    border-bottom-color: #eee !important;
}

.mobile-search .quick-menu-list a:hover {
    color: #000179 !important;
    border-bottom-color: #000179 !important;
}

.mobile-search .mobile-results-header {
    background: white !important;
    color: #333 !important;
}

.mobile-search.active {
    display: block;
}

.mobile-search-content {
    padding: 2rem 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    padding-top: 3rem;
    margin-top: 2rem;
    min-height: 100vh;
    padding-bottom: 100px; /* Extra space for scrolling */
}

/* Header with Close Button */
.mobile-search-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    position: relative;
    min-height: 60px;
}

.mobile-search-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Search Form */
.mobile-search-form {
    margin-bottom: 2rem;
}

.mobile-search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-search-icon {
    color: #6c757d;
    margin-left: 1rem;
    margin-right: 0.5rem;
}

.mobile-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    background: transparent;
    font-family: 'Inter', sans-serif;
    /* Prevent mobile keyboard issues */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
    /* Ensure proper mobile behavior */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.mobile-search-input::placeholder {
    color: #6c757d;
    font-family: 'Inter', sans-serif;
}

.mobile-search-submit {
    background: #000179;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.mobile-search-submit:hover {
    background: #0000a0;
}

/* Mobile Search Additional Styles */
/* Quick Menu Categories */
.mobile-quick-menu {
    margin-top: 2rem;
}

.quick-menu-section {
    margin-bottom: 2rem;
}

.quick-menu-title {
    color: #000179;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.quick-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-menu-list li {
    margin-bottom: 0.5rem;
}

.quick-menu-list a {
    color: #495057;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s ease;
    border-bottom: 1px solid #f1f3f4;
    font-family: 'Inter', sans-serif;
}

.quick-menu-list a:hover {
    color: #000179;
    border-bottom-color: #000179;
}

/* Mobile Search Results */
.mobile-search-results {
    margin-top: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mobile-results-header {
    background: #000179;
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.mobile-results-content {
    padding: 1rem 1.5rem;
}

.mobile-result-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.mobile-result-item:last-child {
    border-bottom: none;
}

.mobile-result-title {
    color: #000179;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.mobile-result-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.mobile-result-meta {
    color: #adb5bd;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Inter', sans-serif;
}

.mobile-result-category {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
}

/* Loading and error states */
.loading-state,
.no-results {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
    font-family: 'Inter', sans-serif;
}

.loading-state i {
    font-size: 2rem;
    color: #000179;
    margin-bottom: 1rem;
}

.no-results i {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.no-results p {
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}


/* Main navigation z-index hierarchy */
.main-navigation {
    z-index: 1000;
}

/* Ensure main nav items don't interfere with nested dropdowns */
.nav-item.has-dropdown {
    z-index: 1001;
}

/* When Other dropdown is open, prevent main nav interference */
.nav-item.has-dropdown:hover .dropdown-other {
    z-index: 2500;
}

/* Nested dropdowns get highest priority */
.nav-item.has-dropdown .dropdown-other .dropdown-item .dropdown-menu {
    z-index: 3000;
}

/* Prevent hover interference with a transparent overlay */
.nav-item.has-dropdown .dropdown-other .dropdown-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Stable nested dropdown positioning that prevents overlap */
.nav-item.has-dropdown .dropdown-other .dropdown-item .dropdown-menu {
    position: absolute;
    top: 100%;                         /* position below the category item */
    left: 0;                           /* align with the left edge of the category item */
    transform: translateY(-10px);      /* slide up from below */
    background: #fff;
    color: #000;
    min-width: 220px;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 3000;                     /* much higher z-index to prevent overlap issues */
    pointer-events: auto;              /* ensure dropdown can receive mouse events */
}

/* Show nested dropdowns on hover */
.nav-item.has-dropdown .dropdown-other .dropdown-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ensure the Other dropdown itself has proper layering */
.nav-item.has-dropdown .dropdown-other {
    z-index: 2500;
}

/* Add a subtle hover area extension to prevent accidental exits */
.nav-item.has-dropdown .dropdown-other .dropdown-item {
    position: relative;
}

.nav-item.has-dropdown .dropdown-other .dropdown-item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    pointer-events: none;
}

/* Create a natural hover barrier using the nested dropdown space */
.nav-item.has-dropdown .dropdown-other .dropdown-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Extend the hover area of the nested dropdown to prevent interference */
.nav-item.has-dropdown .dropdown-other .dropdown-item:hover .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;                        /* extend above the dropdown */
    left: -20px;                       /* extend to the left */
    right: -20px;                      /* extend to the right */
    bottom: -20px;                     /* extend below the dropdown */
    background: transparent;
    pointer-events: none;
    z-index: 2999;                     /* just below the dropdown content */
}

/* Mobile adjustments for fixed header */
@media (max-width: 768px) {
    body {
        padding-top: 120px; /* Increased from 80px for better separation on mobile */
    }
    
    .mobile-navigation {
        top: 80px; /* Adjust mobile nav to account for fixed header */
    }
    
    .mobile-top-bar {
        position: relative;
        z-index: 10000;
    }
    
    /* Mobile scroll effect styles */
    .mobile-top-bar {
        transition: all 0.3s ease;
    }
    
    .mobile-top-bar.scrolled {
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-top-bar.scrolled .mobile-logo-img {
        /* Logo will be changed via JavaScript */
        transform: scale(1.1);
        transition: transform 0.3s ease;
    }
    
    .mobile-top-bar.scrolled .mobile-nav-toggle {
        color: #000179;
    }
    
    .mobile-top-bar.scrolled .mobile-search-toggle {
        color: #000179;
    }
    
    /* Mobile navigation scroll effect */
    .mobile-navigation {
        transition: all 0.3s ease;
    }
    
    .mobile-navigation.scrolled {
        background: white;
        border-color: rgba(0, 1, 121, 0.1);
    }
    
    .mobile-navigation.scrolled .mobile-nav-header h3 {
        color: #000179;
    }
    
    .mobile-navigation.scrolled .mobile-nav-close {
        color: #000179 !important;
        background: rgba(0, 1, 121, 0.1);
        border-radius: 50%;
        /* Ensure button is always visible in scrolled state */
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
        /* Force all visibility properties */
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
        /* Ensure proper positioning and sizing */
        position: relative !important;
        z-index: 2002 !important;
        width: auto !important;
        height: auto !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }
    
    .mobile-navigation.scrolled .mobile-nav-link {
        color: #000179;
    }
    
    .mobile-navigation.scrolled .mobile-nav-link:hover {
        color: #0000a0;
    }
    
    .mobile-navigation.scrolled .submenu-toggle {
        color: #000179;
    }
}

/* Ensure dropdowns work properly with fixed header */
.dropdown-menu {
    z-index: 10001; /* Higher than fixed header */
}

.dropdown-other {
    z-index: 10001; /* Higher than fixed header */
}

.nav-item.has-dropdown .dropdown-other .dropdown-item .dropdown-menu {
    z-index: 10002; /* Highest priority for nested dropdowns */
}

/* Logo styling */
.logo-image {
    height: 50px;
    width: auto;
    max-width: 300px; /* Increased from 200px for more significant width */
    min-width: 200px; /* Added minimum width to ensure it's always substantial */
    object-fit: contain;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

/* Scrolled logo styling */
.site-header.scrolled .logo-image {
    transform: scale(1.15);
    transition: transform 0.3s ease;
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .logo-image {
        height: 40px;
        max-width: 250px; /* Increased from 150px for mobile */
        min-width: 150px; /* Added minimum width for mobile */
    }
    
    /* Mobile scrolled logo scaling */
    .site-header.scrolled .logo-image {
        transform: scale(1.2);
    }
}

/* ===================================
   CRITICAL MOBILE NAVIGATION CLOSE BUTTON FIXES
   =================================== */

/* Ensure mobile navigation close button is ALWAYS visible and functional */
.mobile-nav-close,
#mobile-navigation .mobile-nav-close,
div.mobile-navigation .mobile-nav-close,
.mobile-navigation .mobile-nav-close,
.mobile-navigation.scrolled .mobile-nav-close,
#mobile-navigation.scrolled .mobile-nav-close,
div.mobile-navigation.scrolled .mobile-nav-close {
    /* Force visibility with highest priority */
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    /* Ensure proper positioning */
    position: relative !important;
    z-index: 9999 !important;
    
    /* Prevent any inherited styles from hiding it */
    background: none !important;
    border: none !important;
    outline: none !important;
    
    /* Ensure proper sizing */
    width: auto !important;
    height: auto !important;
    min-width: 40px !important;
    min-height: 40px !important;
    
    /* Ensure proper styling */
    color: inherit !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 0 !important;
    
    /* Prevent any transforms or filters that might hide it */
    transform: none !important;
    filter: none !important;
    clip: auto !important;
    clip-path: none !important;
    
    /* Ensure it's clickable */
    pointer-events: auto !important;
    user-select: none !important;
    
    /* Prevent any animations that might hide it */
    animation: none !important;
    transition: color 0.3s ease, transform 0.3s ease !important;
}

/* Specific styling for scrolled state */
.mobile-navigation.scrolled .mobile-nav-close,
#mobile-navigation.scrolled .mobile-nav-close,
div.mobile-navigation.scrolled .mobile-nav-close {
    color: #000179 !important;
    background: rgba(0, 1, 121, 0.1) !important;
    border-radius: 50% !important;
}

/* Hover effects */
.mobile-nav-close:hover,
#mobile-navigation .mobile-nav-close:hover,
div.mobile-navigation .mobile-nav-close:hover,
.mobile-navigation .mobile-nav-close:hover,
.mobile-navigation.scrolled .mobile-nav-close:hover,
#mobile-navigation.scrolled .mobile-nav-close:hover,
div.mobile-navigation.scrolled .mobile-nav-close:hover {
    color: #9FCCEC !important;
    transform: scale(1.1) !important;
    background: rgba(0, 1, 121, 0.2) !important;
}

/* Ensure mobile navigation header is always visible */
.mobile-nav-header,
#mobile-navigation .mobile-nav-header,
div.mobile-navigation .mobile-nav-header,
.mobile-navigation .mobile-nav-header,
.mobile-navigation.scrolled .mobile-nav-header,
#mobile-navigation.scrolled .mobile-nav-header,
div.mobile-navigation.scrolled .mobile-nav-header {
    /* Force visibility */
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    /* Ensure proper positioning */
    position: sticky !important;
    top: 0 !important;
    z-index: 9998 !important;
    
    /* Prevent any inherited styles from hiding it */
    background: #000179 !important;
    color: white !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    
    /* Ensure proper layout */
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

/* Scrolled state for mobile nav header */
.mobile-navigation.scrolled .mobile-nav-header,
#mobile-navigation.scrolled .mobile-nav-header,
div.mobile-navigation.scrolled .mobile-nav-header {
    background: white !important;
    color: #000179 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* ===================================
   ADDITIONAL OVERRIDE RULES FOR MAXIMUM COMPATIBILITY
   =================================== */

/* Override any potential CSS that might hide the close button */
.mobile-nav-close *,
#mobile-navigation .mobile-nav-close *,
div.mobile-navigation .mobile-nav-close *,
.mobile-navigation .mobile-nav-close *,
.mobile-navigation.scrolled .mobile-nav-close *,
#mobile-navigation.scrolled .mobile-nav-close *,
div.mobile-navigation.scrolled .mobile-nav-close * {
    /* Ensure all child elements are visible */
    display: inherit !important;
    opacity: inherit !important;
    visibility: inherit !important;
}

/* Override any potential CSS animations or transitions that might hide the button */
.mobile-nav-close,
#mobile-navigation .mobile-nav-close,
div.mobile-navigation .mobile-nav-close,
.mobile-navigation .mobile-nav-close,
.mobile-navigation.scrolled .mobile-nav-close,
#mobile-navigation.scrolled .mobile-nav-close,
div.mobile-navigation.scrolled .mobile-nav-close {
    /* Prevent any CSS animations from hiding the button */
    animation-fill-mode: none !important;
    animation-play-state: running !important;
    
    /* Ensure transitions don't interfere */
    transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease !important;
    
    /* Prevent any CSS transforms from hiding the button */
    transform-origin: center center !important;
    
    /* Ensure the button is always rendered */
    will-change: auto !important;
    backface-visibility: visible !important;
    perspective: none !important;
}

/* Override any potential CSS that might set display to none */
.mobile-nav-close[style*="display: none"],
#mobile-navigation .mobile-nav-close[style*="display: none"],
div.mobile-navigation .mobile-nav-close[style*="display: none"],
.mobile-navigation .mobile-nav-close[style*="display: none"],
.mobile-navigation.scrolled .mobile-nav-close[style*="display: none"],
#mobile-navigation.scrolled .mobile-nav-close[style*="display: none"],
div.mobile-navigation.scrolled .mobile-nav-close[style*="display: none"] {
    display: flex !important;
}

/* Override any potential CSS that might set opacity to 0 */
.mobile-nav-close[style*="opacity: 0"],
#mobile-navigation .mobile-nav-close[style*="opacity: 0"],
div.mobile-navigation .mobile-nav-close[style*="opacity: 0"],
.mobile-navigation .mobile-nav-close[style*="opacity: 0"],
.mobile-navigation.scrolled .mobile-nav-close[style*="opacity: 0"],
#mobile-navigation.scrolled .mobile-nav-close[style*="opacity: 0"],
div.mobile-navigation.scrolled .mobile-nav-close[style*="opacity: 0"] {
    opacity: 1 !important;
}

/* Override any potential CSS that might set visibility to hidden */
.mobile-nav-close[style*="visibility: hidden"],
#mobile-navigation .mobile-nav-close[style*="visibility: hidden"],
div.mobile-navigation .mobile-nav-close[style*="visibility: hidden"],
.mobile-navigation .mobile-nav-close[style*="visibility: hidden"],
.mobile-navigation.scrolled .mobile-nav-close[style*="visibility: hidden"],
#mobile-navigation.scrolled .mobile-nav-close[style*="visibility: hidden"],
div.mobile-navigation.scrolled .mobile-nav-close[style*="visibility: hidden"] {
    visibility: visible !important;
}

/* ===================================
   FINAL OVERRIDE - HIGHEST PRIORITY RULES
   =================================== */

/* Use the most specific selectors possible to ensure these rules take precedence */
body .mobile-navigation .mobile-nav-header .mobile-nav-close,
body #mobile-navigation .mobile-nav-header .mobile-nav-close,
body div.mobile-navigation .mobile-nav-header .mobile-nav-close {
    /* Force visibility with maximum priority */
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    /* Ensure proper positioning */
    position: relative !important;
    z-index: 9999 !important;
    
    /* Prevent any inherited styles from hiding it */
    background: none !important;
    border: none !important;
    outline: none !important;
    
    /* Ensure proper sizing */
    width: auto !important;
    height: auto !important;
    min-width: 40px !important;
    min-height: 40px !important;
    
    /* Ensure proper styling */
    color: inherit !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 0 !important;
    
    /* Prevent any transforms or filters that might hide it */
    transform: none !important;
    filter: none !important;
    clip: auto !important;
    clip-path: none !important;
    
    /* Ensure it's clickable */
    pointer-events: auto !important;
    user-select: none !important;
    
    /* Prevent any animations that might hide it */
    animation: none !important;
    transition: color 0.3s ease, transform 0.3s ease !important;
}

/* Specific styling for scrolled state with maximum priority */
body .mobile-navigation.scrolled .mobile-nav-header .mobile-nav-close,
body #mobile-navigation.scrolled .mobile-nav-header .mobile-nav-close,
body div.mobile-navigation.scrolled .mobile-nav-header .mobile-nav-close {
    color: #000179 !important;
    background: rgba(0, 1, 121, 0.1) !important;
    border-radius: 50% !important;
}

/* Hover effects with maximum priority */
body .mobile-navigation .mobile-nav-header .mobile-nav-close:hover,
body #mobile-navigation .mobile-nav-header .mobile-nav-close:hover,
body div.mobile-navigation .mobile-nav-header .mobile-nav-close:hover,
body .mobile-navigation.scrolled .mobile-nav-header .mobile-nav-close:hover,
body #mobile-navigation.scrolled .mobile-nav-header .mobile-nav-close:hover,
body div.mobile-navigation.scrolled .mobile-nav-header .mobile-nav-close:hover {
    color: #9FCCEC !important;
    transform: scale(1.1) !important;
    background: rgba(0, 1, 121, 0.2) !important;
}