/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* padding: 20px 0; */
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* background: var(--primary-dark); */
    background-color: #2087c4;
    height: 83px;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-dark));
    opacity: 1;
    transition: opacity 0.45s ease, background 0.45s ease;
    z-index: -1;
}

.header.scrolled {
    background-color: #2087c4;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    /* padding: 10px 0; */
    box-shadow: 0 4px 20px rgba(22, 33, 61, 0.4);
    height: 60px;
}

.header.scrolled::after {
    opacity: 1;
}


.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 40px;
    height: 100%;
}

.logo img {
    height: 43px;
    width: auto;
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0);
}

.header.scrolled .logo img {
    height: 34px;
    transform: translateY(-1px);
}

/* Desktop Navigation */
.nav-desktop {
    flex: 1;
    height: 100%;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    height: 100%;
}

.nav-list li {
    display: flex;
    align-items: center;
    height: 100%;
}


.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-sm);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.header.scrolled .nav-link {
    padding: 8px 14px;
    font-size: 13px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: right;
}

.nav-link i {
    font-size: 10px;
    transition: transform var(--transition-fast);
}

/* Mega Menu */
.nav-dropdown {
    position: relative;
}

.mega-menu {
    position: fixed;
    top: 83px;
    left: 0;
    right: 0;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.header.scrolled .mega-menu {
    padding-top: 11px;
    top: 50px;
}

.nav-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

.mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    background: var(--primary-dark);
    border-top: 1px solid rgba(91, 184, 232, 0.2);
    border-bottom: 1px solid rgba(91, 184, 232, 0.15);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 184, 232, 0.3) transparent;
}

.mega-menu-inner::-webkit-scrollbar {
    width: 4px;
}

.mega-menu-inner::-webkit-scrollbar-thumb {
    background: rgba(91, 184, 232, 0.3);
    border-radius: 2px;
}

.mega-col {
    padding: 24px 10px;
    border-right: 1px solid rgba(91, 184, 232, 0.1);
}

.mega-col:last-child {
    border-right: none;
}

.mega-heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #5bb8e8;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(91, 184, 232, 0.15);
    line-height: 1.4;
    /* ← allows heading to wrap on narrow viewports */
}

.mega-col ul {
    list-style: none;
}

.mega-col li {
    margin-bottom: 2px;
}

.mega-col a {
    display: block;
    padding: 7px 10px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.mega-col a:hover {
    background: rgba(91, 184, 232, 0.1);
    color: var(--white);
    padding-left: 16px;
}


/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-search {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 15px;
}

.btn-search:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.header.scrolled .btn-search {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.btn-quote {
    padding: 10px 24px;
    background: var(--white);
    color: #1476ad;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    border: solid 3px #5bb8e8;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-quote:hover {
    background: #059DCC;
    color: var(--white);
    border-color: #bbdaee;
}

.header.scrolled .btn-quote {
    padding: 8px 20px;
    font-size: 12px;
    box-shadow: 0 0 12px rgba(27, 133, 195, 0.3);
}

.btn-lang {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header.scrolled .btn-lang {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lang:hover {
    border-color: var(--white);
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: rgba(11, 25, 41, 0.97);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 90%;
    max-width: 700px;
    position: relative;
    transform: translateY(20px);
    transition: transform var(--transition-slow);
}

.search-overlay.active .search-overlay-inner {
    transform: translateY(0);
}

.search-input {
    width: 100%;
    padding: 20px 0px 20px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 32px;
    font-weight: 300;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-close {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.search-close:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--primary-dark);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-header img {
    height: 28px;
    width: auto;
}

.mobile-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.mobile-close:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-list {
    list-style: none;
    padding: 12px 0;
    flex: 1;
}

.mobile-nav-list>li>a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-fast);
}

.mobile-nav-list>li>a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-dd-arrow {
    font-size: 11px;
    transition: transform var(--transition-fast);
}

.mobile-dropdown-parent.open .mobile-dd-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    background: rgba(0, 0, 0, 0.2);
}

.mobile-dropdown-parent.open .mobile-dropdown {
    max-height: 600px;
}

.mobile-dropdown a {
    display: block;
    padding: 10px 24px 10px 40px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    transition: all var(--transition-fast);
}

.mobile-dropdown a:hover {
    color: var(--primary);
    padding-left: 48px;
}

@media (max-width:992px) {
    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .header-actions {
        gap: 8px;
    }

    .header-container {
        justify-content: space-between;
    }

    .btn-quote {
        display: none;
    }

    .btn-lang {
        display: none;
    }
}