/* ========================================
   HEADER STYLES
   ======================================== */
.main-header {
    position: fixed;
    top: 20px;
    left: 5%;
    right: 5%;
    width: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

/* Header at top - always white floating */
.main-header.at-top {
    background-color: white;
}

.main-header.at-top .logo-colored {
    display: block;
}

.main-header.at-top .logo-white {
    display: none;
}

.main-header.at-top .header-nav a:not(.contact-btn-pill) {
    color: #333;
}

.main-header.at-top .contact-btn-pill {
    background-color: #0b3d2e;
    color: white;
}

.main-header.at-top .hotline-btn {
    background-color: #f0f0f0;
    color: #333;
    border-color: #f0f0f0;
}

.main-header.at-top .hotline-btn:hover {
    background-color: #bfc932;
    border-color: #bfc932;
}

.main-header.at-top .language-dropdown select {
    color: #333;
    border-color: #333;
}

.main-header.at-top .header-separator {
    opacity: 0;
}

/* Header scrolled (white background with colored logo) */
.main-header.scrolled {
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-header.scrolled .logo-colored {
    display: block;
}

.main-header.scrolled .logo-white {
    display: none;
}

.main-header.scrolled .header-nav a:not(.contact-btn-pill) {
    color: #333;
}

.main-header.scrolled .contact-btn-pill {
    background-color: #0b3d2e;
    color: white;
}

.main-header.scrolled .hotline-btn {
    background-color: #f0f0f0;
    color: #333;
    border-color: #f0f0f0;
}

.main-header.scrolled .hotline-btn:hover {
    background-color: #bfc932;
    border-color: #bfc932;
}

.main-header.scrolled .language-dropdown select {
    color: #333;
    border-color: #333;
}

.main-header.scrolled .header-separator {
    opacity: 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    max-width: 100%;
}

.header-logo {
    flex: 0 0 auto;
}

.header-logo a {
    display: block;
    position: relative;
}

.header-logo img {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-white {
    display: none;
}

.header-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-nav a {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    color: #333;
}

.header-nav a:not(.contact-btn-pill)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #bfc932;
    transition: width 0.3s ease;
}

.header-nav a:not(.contact-btn-pill):hover::after {
    width: 100%;
}

.contact-btn-pill {
    background-color: #0b3d2e;
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 999;
}

.contact-btn-pill:hover {
    background-color: #bfc932;
    color: #0b3d2e;
}

/* Mega Menu Navigation */
.nav-item-dropdown {
    position: relative;
}

/* Invisible bridge to prevent hover gap */
.nav-item-dropdown::after {
    content: '';
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: 30px;
    pointer-events: none;
    z-index: 997;
}

.nav-item-dropdown:hover::after {
    pointer-events: all;
}

.nav-link-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.nav-link-dropdown svg {
    transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .nav-link-dropdown {
    color: #bfc932;
}

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

.mega-menu {
    position: fixed;
    top: 90px;
    left: 5%;
    right: 5%;
    width: 90%;
    background: white;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 998;
    max-height: 0;
    overflow: hidden;
}

.nav-item-dropdown:hover .mega-menu,
.mega-menu:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    max-height: 500px;
}

/* Remove bottom border radius from header when mega menu is open */
.main-header:has(.nav-item-dropdown:hover),
.main-header:has(.mega-menu:hover) {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.mega-menu-content {
    display: flex;
    gap: 60px;
    padding: 50px;
}

.mega-menu-intro {
    flex: 0 0 280px;
}

.mega-menu-intro h3 {
    font-size: 1.8rem;
    color: #0b3d2e;
    margin-bottom: 15px;
    font-weight: 700;
}

.mega-menu-intro p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.mega-menu-btn {
    display: inline-block;
    background-color: #0b3d2e !important;
    color: white !important;
    padding: 12px 28px;
    border-radius: 25px;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.mega-menu-btn::after {
    display: none !important;
}

.mega-menu-btn:hover {
    background-color: #bfc932 !important;
    color: #0b3d2e !important;
}

.mega-menu-links {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mega-menu-column a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.mega-menu-column a:hover {
    color: #bfc932;
    padding-left: 8px;
}

.header-utilities {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-dropdown select {
    padding: 8px 16px;
    border: 1px solid;
    border-radius: 4px;
    background-color: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-dropdown select:focus {
    outline: none;
    border-color: #bfc932;
}

.hotline-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: white;
    color: #333;
}

.hotline-btn:hover {
    background-color: #bfc932;
    border-color: #bfc932;
    color: #333;
}

.hotline-btn svg {
    width: 16px;
    height: 16px;
}

.header-separator {
    width: 90%;
    margin: 0 5%;
    height: 1px;
    background-color: white;
    transition: opacity 0.3s ease;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    transform-origin: center;
}

.main-header.scrolled .hamburger-menu span {
    background-color: #333;
}

.main-header.at-top .hamburger-menu span {
    background-color: #333;
}

.hamburger-menu.active span {
    background-color: #333;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: white;
    z-index: 999;
    transition: right 0.4s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-logo {
    padding: 30px 5% 20px;
    text-align: left;
}

.mobile-menu-logo img {
    height: 50px;
    width: auto;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 5% 40px;
    gap: 0;
}

.mobile-nav-item {
    text-decoration: none;
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    padding: 20px 0;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(50px);
}

.mobile-nav-item:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mobile header styles */
@media (max-width: 1024px) {
    .main-header {
        top: 15px;
        left: 5%;
        right: 5%;
        border-radius: 12px;
    }

    .header-nav {
        display: none;
    }

    .header-utilities {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .header-container {
        padding: 15px 30px;
    }

    .header-logo img {
        height: 50px;
    }
}

@media (max-width: 768px) {
    .main-header {
        left: 3%;
        right: 3%;
        top: 10px;
        max-width: calc(100vw - 6%);
    }

    .header-container {
        padding: 12px 20px;
    }

    .header-logo img {
        height: 45px;
    }
}
