/* Top Bar */
.top-bar {
    background: #103558;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 0.8rem;
    padding: 0;
    border-bottom: none;
}

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

.top-bar-right {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 4px 8px;
}

.top-bar a:hover {
    color: #5ED4DB;
}

/* Header - Transparent by default */
.header {
    background-color: transparent;
    position: absolute;
    top: 41px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

/* Header when scrolled */
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(224, 224, 224, 0.3);
    position: fixed;
    top: 0;
}

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

/* Logo */
.header .logo {
    padding: 10px 0;
    text-decoration: none;
}

.hizo-logo {
    height: 40px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}

.header.scrolled .hizo-logo {
    filter: none;
}

.header .logo:hover .hizo-logo {
    transform: scale(1.05);
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: end;
}

nav#navLinks a {
    font-size: 13px;
}

.header .nav-links > a.cta-link {
   background: white !important;
   color: #1ea5de !important;
}

.header.scrolled .nav-links > a.cta-link {
   background: #1ea5de !important;
   color: white !important;
}

.nav-links > a,
.nav-links .dropbtn {
    padding: 18px 16px;
    text-decoration: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.header.scrolled .nav-links > a,
.header.scrolled .nav-links .dropbtn {
    color: #333333;
    text-shadow: none;
}

.nav-links > a:hover,
.nav-links .dropbtn:hover {
    background-color: #1ea5de;
    color: white;
    text-shadow: none;
}

.nav-links > a.cta-link {
    background: white;
    color: #1ea5de;
    border-radius: 4px;
    margin: 0 4px;
    padding: 8px 18px;
    text-shadow: none;
}

.nav-links > a.cta-link:hover {
    background: #f0f0f0;
    color: #103558;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .dropbtn {
    background: none;
    border: none;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #333333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: none;
    text-shadow: none;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #1ea5de;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mega Menu */
.mega-dropdown .dropdown-content.mega-menu {
    min-width: 650px;
    width: fit-content;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.mega-dropdown:hover .dropdown-content.mega-menu {
    display: grid;
}

.mobile-submenu {
    display: none;
}

.mega-column h4 {
    color: #1ea5de;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.mega-column a {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.mega-featured {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.featured-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-link {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border-radius: 6px;
}

.featured-link:hover {
    background-color: rgba(30, 165, 222, 0.1);
}

.featured-link strong {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.featured-link span {
    font-size: 0.75rem;
    color: #666;
}

.mega-cta {
    display: block;
    background: #1ea5de;
    color: white;
    text-align: center;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 1rem;
}

.mega-cta:hover {
    background: #103558;
}

/* Hamburger Icon */
.header .icon {
    display: none;
    padding: 18px 20px;
    cursor: pointer;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: white;
    transition: 0.3s;
    border-radius: 2px;
}

.header.scrolled .hamburger-line {
    background-color: #333333;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        z-index: 1000;
    }

    .hizo-logo {
        filter: none;
        height: 32px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 62px;
        left: 0;
        right: 0;
        height: calc(100vh - 62px);
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: stretch;
        justify-content: start;
        gap: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }

    .header.responsive .nav-links {
        display: flex;
    }

    .header .icon {
        display: block;
    }

    .hamburger-line {
        background-color: #333333;
    }

    .header.responsive .nav-links > a,
    .header.responsive .nav-links .dropbtn {
        text-align: left;
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
        color: #333333;
        text-shadow: none;
        background: white;
        flex-shrink: 0;
    }

    .header.responsive .nav-links > a.cta-link {
        background: white;
        color: #1ea5de;
        margin: 12px 20px;
        text-align: center;
        border: 1px solid #1ea5de;
        border-radius: 4px;
    }

    .header.responsive .dropdown {
        width: 100%;
    }

    .header.responsive .dropdown .dropbtn {
        width: 100%;
        display: block;
    }

    .header.responsive .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #f9f9f9;
        display: none;
    }

    .header.responsive .dropdown:hover .dropdown-content {
        display: none;
    }

    .header.responsive .dropdown.active .dropdown-content {
        display: block;
    }

    .header.responsive .dropdown-content a {
        padding: 16px 20px 16px 40px;
        border-bottom: 1px solid #e0e0e0;
    }

    .header.responsive .mega-menu {
        display: none !important;
    }

    .header.responsive .mega-dropdown .dropdown-content.mega-menu {
        display: none !important;
    }

    .header.responsive .mobile-submenu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: #f9f9f9;
    }

    .header.responsive .mega-dropdown.active .mobile-submenu {
        display: block;
    }

    .header.responsive .mobile-submenu-item {
        border-bottom: 1px solid #e0e0e0;
    }

    .header.responsive .mobile-submenu-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px 16px 40px;
        background-color: #f9f9f9;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        border-bottom: none;
    }

    .header.responsive .mobile-submenu-toggle::after {
        content: '▼';
        font-size: 0.7rem;
        transition: transform 0.3s ease;
    }

    .header.responsive .mobile-submenu-item.active .mobile-submenu-toggle::after {
        transform: rotate(180deg);
    }

    .header.responsive .mobile-submenu-level-2 {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: #fafafa;
    }

    .header.responsive .mobile-submenu-item.active .mobile-submenu-level-2 {
        display: block;
    }

    .header.responsive .mobile-submenu-level-2 li a {
        padding: 16px 20px 16px 60px;
        display: block;
        background-color: #fafafa;
        color: #333;
        text-decoration: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .header.responsive .mobile-submenu-level-2 li a:hover {
        background-color: #f0f0f0;
    }
}

/* Tablet */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .nav-links > a,
    .nav-links .dropbtn {
        padding: 16px 12px;
        font-size: 0.9rem;
    }

    .nav-links > a.cta-link {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .mega-dropdown .dropdown-content.mega-menu {
        min-width: 700px;
        gap: 1.5rem;
    }
}
