/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    width: 100%;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* fixed-header class is no longer needed for positioning, keeping purely for legacy compatibility if JS references it, 
   but styles are now default */
header.fixed-header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.header-wrapper {
    max-width: 1920px;
    width: 100%;
    height: auto;
    min-height: clamp(60px, 4.167vw, 80px); /* 80px */
    margin: 0 auto;
    padding: 0 2.135vw; /* 41px */
    display: flex;
    align-items: center;
}

.header-content {
    width: 100%;
    /* max-width: 1816px; Removed to align with banner 1838px width */
    height: auto; /* Let content define height, centered by wrapper */
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative; /* For absolute centering of nav */
}

.logo-section {
    width: 8.958vw; /* 172px */
    height: auto;
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: auto;
    height: auto;
    max-height: clamp(30px, 2.5vw, 48px); /* Optimized size for better vertical rhythm */
    object-fit: contain;
    margin-top: 5px; /* Optical adjustment: Shift down to fix 4-5px uneven top/bottom spacing */
}

.nav-menu {
    gap: clamp(30px, 3.02vw, 58px); /* 58px */
    align-items: center;
    display: flex;
    position: absolute;
    right: 0%;
    top: 50%;
    transform: translateY(-50%);
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: var(--text-md);
    font-weight: 550;
    font-family: var(--font-alibaba-puhuiti);
    letter-spacing: 0.034vw; /* 0.65px */
    line-height: 1.3;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-cta {
    background-color: var(--primary-color);
    border-radius: 10px;
    height: 25px;
    width: 100px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
}

/* Responsive - Large Screens */
@media (min-width: 1920px) {
    .header-wrapper {
        margin-left: auto;
        margin-right: auto;
        padding: 0 41px;
        min-height: 64px;
        margin-top: 0; /* Removed top margin for centering */
    }

    .header-content {
        height: auto;
    }

    .logo-section {
        width: 172px;
        height: auto;
    }

    .logo img {
        height: auto;
        max-height: 48px;
    }

    .nav-menu {
        gap: 58px;
    }

    .nav-link {
        letter-spacing: 0.65px;
        font-size: var(--text-md);
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .header-wrapper {
        width: 100%;
        max-width: 1024px;
        height: auto;
        min-height: 70px;
        padding: 10px 20px;
    }
    
    .header-content {
        justify-content: space-between; /* Restore justify-between for tablet */
    }

    .nav-menu {
        position: static; /* Reset absolute positioning */
        transform: none;
        gap: 30px;
        width: auto;
        margin: 0;
        padding: 0 20px;
        height: 50px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .header-wrapper {
        width: 100%;
        height: auto;
        min-height: 60px;
        padding: 10px 15px;
    }
    
    .header-content {
        width: 100%;
        margin: 0;
        padding: 0;
        height: 40px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        gap: 20px;
        transform: none;
    }
    
    .nav-menu.mobile-active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    
    .logo img {
        height: 28px;
        width: auto;
        max-width: 120px;
    }
}
