/* Header Navigation - Enhanced with Logo Switching */
header {
    width: 100%;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 2rem;
    width: 100%;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    position: relative;
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    margin-top: 0;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.logo-img {
    height: auto; /* Increased size for desktop */
    width: auto;
    max-height: 200px;
    transition: opacity 0.3s ease, filter 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.logo-img.logo-dark {
    opacity: 0;
}

.logo-img.logo-light {
    opacity: 1;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(255,255,255,0.1);
    transition: color 0.3s ease;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
    margin-left: auto;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-menu a:hover {
    color: #FFD23F;
    background: rgba(255, 255, 255, 0.1);
}

/* Light mode navbar (over video/dark backgrounds) */
nav.nav-light {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
}

nav.nav-light .logo-img.logo-dark {
    opacity: 0;
}

nav.nav-light .logo-img.logo-light {
    opacity: 1;
}

nav.nav-light .logo-text,
nav.nav-light .nav-menu a {
    color: white;
}

nav.nav-light .nav-menu a:hover {
    color: #FFD23F;
    background: rgba(255, 255, 255, 0.1);
}

nav.nav-light .mobile-menu-btn span {
    background: white;
}

/* Dark mode navbar (over white sections) */
nav.nav-dark {
    background: rgba(255, 255, 255, 0.4); /* lighter, more transparent */
    border: 1px solid rgba(255, 255, 255, 0.25); /* subtle frosted border */
    backdrop-filter: blur(35px) saturate(200%);
    -webkit-backdrop-filter: blur(35px) saturate(200%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* soft depth */
}

nav.nav-dark .logo-img.logo-dark {
    opacity: 1;
}

nav.nav-dark .logo-img.logo-light {
    opacity: 0;
}

nav.nav-dark .logo-text {
    color: var(--primary-blue);
}

nav.nav-dark .nav-menu a {
    color: var(--text-dark);
}

nav.nav-dark .nav-menu a:hover {
    color: var(--secondary-blue);
    background: rgba(0, 81, 165, 0.05);
}

nav.nav-dark .mobile-menu-btn span {
    background: var(--text-dark);
}

/* Enhanced Products Dropdown */
.products-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    min-width: 480px;
    border: 1px solid rgba(0,0,0,0.06);
    backdrop-filter: blur(20px);
}

.nav-menu li.has-dropdown:hover .products-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Product Category Items */
.product-category {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
    background: transparent;
    text-decoration: none;
}

.product-category:hover {
    background: linear-gradient(135deg, rgba(0,81,165,0.05) 0%, rgba(255,210,63,0.05) 100%);
    transform: translateY(-2px);
}

.icon-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: transparent;
}

.product-category img {
    width: 38px;
    height: 38px;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.3s ease;
}

.product-category .icon-default {
    opacity: 1;
    transform: scale(1);
}

.product-category .icon-hover {
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
}

.product-category:hover .icon-default {
    opacity: 0;
    transform: scale(1.1) rotate(10deg);
}

.product-category:hover .icon-hover {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.product-category span {
    font-size: 0.99rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: capitalize;
    letter-spacing: 0.3px;
    white-space: nowrap;
    margin-left: 10px;
}

.product-category:hover span {
    color: var(--secondary-blue);
}

/* Contact Button */
.contact-nav-btn {
    background: #FFD23F !important;
    color: #000 !important;
    padding: 0.9rem 1.8rem !important;
    border-radius: 2 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease !important;
}

.contact-nav-btn:hover {
    background: #FFE066 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 210, 63, 0.3);
}

.contact-arrow {
    font-size: 0.8em;
    margin-left: 0.2em;
    transition: transform 0.3s ease;
}

.contact-nav-btn:hover .contact-arrow {
    transform: translateX(3px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s ease, background-color 0.3s ease;
}

/* Light mode (over video/dark backgrounds) */
nav.nav-light .mobile-menu-btn span {
    background: white;
}

/* Dark mode (over white sections) */
nav.nav-dark .mobile-menu-btn span {
    background: var(--primary-blue);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Animations */
@keyframes navFadeIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Responsive */
    @media (max-width: 1000px) {
 
    header {
        top: 0;
        padding: 0;
        margin-top: -10px;
    }
    
    nav {
        width: 100%;
        margin: 0;
        border-radius: 0;
        padding: 1.5rem 1rem;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border: 1.5px solid rgba(0, 43, 92, 0.1);
    }

    /* Ensure mobile menu button is visible in all states */
    nav .mobile-menu-btn span {
        background: var(--primary-blue);
    }

    nav.nav-light .mobile-menu-btn span {
        background: white;
    }
        /* Mobile logo styles with transitions */
    nav .logo-img {
        max-height: 200px;
        margin-top: 5px;
        margin-left: -4px;
        transition: opacity 0.3s ease, height 0.3s ease;
    }

    nav.nav-dark .logo-img.logo-dark {
        opacity: 1;
    }
    
    nav.nav-dark .logo-img.logo-light {
        opacity: 0;
    }

    nav.nav-light .logo-img.logo-dark {
        opacity: 0;
    }
    
    nav.nav-light .logo-img.logo-light {
        opacity: 1;
    }
    
    nav .logo-text {
        color: var(--primary-blue);
        transition: color 0.3s ease;
    }
    
    /* Mobile menu panel */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 60px 0 0;
        transition: left 0.3s ease;
        display: flex;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        padding: 12px 25px;
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        color: var(--text-dark) !important;
        background: transparent;
    }
    
    .nav-menu a:hover {
        background: rgba(0, 81, 165, 0.05);
        color: var(--secondary-blue) !important;
    }
    
    /* Mobile contact button */
    .nav-menu .contact-nav-btn {
        margin: 15px 25px;
        width: calc(100% - 50px);
        justify-content: center;
        background: #FFD23F !important;
        color: #000 !important;
        border-radius: 0 !important;
        border: none !important;
    }
    
    .nav-menu .contact-nav-btn:hover {
        background: #FFE066 !important;
        color: #000 !important;
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex;
        margin-right: 5px;
        margin-top: 11px;
    }
    
    /* Products dropdown mobile */
    .products-dropdown {
        position: relative;
        transform: none !important;
        left: 0 !important;
        min-width: unset;
        width: 100% !important;
        opacity: 0;
        visibility: visible;
        height: 0;
        overflow: hidden;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0 !important;
        background: rgba(0, 43, 92, 0.03);
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        top: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu li.show-dropdown .products-dropdown {
        opacity: 1;
        height: auto;
        padding: 10px 0;
    }
    
    .product-category {
        padding: 10px 25px 10px 40px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
        background: transparent;
        border-radius: 0;
    }
    
    .product-category:hover {
        background: rgba(0, 81, 165, 0.05);
        transform: none;
    }
    
    .icon-wrapper {
        width: 32px;
        height: 32px;
    }
    
    .product-category img {
        width: 32px;
        height: 32px;
    }
    
    .product-category span {
        color: var(--text-dark);
        font-size: 0.9rem;
    }
}

/* ===============================
   Desktop-only: Glassy Products Dropdown
   =============================== */
@media (min-width: 1001px) {
  /* High-contrast frosted panel */
  .products-dropdown {
    /* brighter + more opaque tint for readability */
    background:
      linear-gradient(180deg, rgba(252,253,255,0.92), rgba(246,248,253,0.86)) border-box;
    backdrop-filter: blur(36px) saturate(180%);
    -webkit-backdrop-filter: blur(36px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow:
      0 18px 50px rgba(8, 22, 44, 0.20),
      inset 0 1px 0 rgba(255,255,255,0.85);
    color: #0E1A2B; /* default text color inside */
  }
}
