/* Header CSS */

.upper-header {
    background-color: var(--dark-blue-bg);
    color: var(--dark-white);
    padding: var(--space-xs) var(--space-xl);
    width: 100%;
    font-size: var(--mini-text);
    overflow: hidden;
    position: relative;
}
.upper-header-contact-links{
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.upper-header-content {
    display: flex;
    align-items: center;
    gap: var(--section-gap)!important;
    justify-content: space-between;
    width: 100%;
}

.upper-header-item a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--dark-white);
    white-space: nowrap;

}

.upper-header-item a img {
    width: var(--mini-icon);
    height: var(--mini-icon);
}

.upper-header-content.scroll-active:hover {
    animation-play-state: paused;
}

.upper-header-content.scroll-active {
    animation: headerScroll 18s linear infinite;
}

/* Auto Loop Scroll */
@keyframes headerScroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}






/* ! Navigation */

.navbar {
    padding: var(--nav-padding);
    padding-right: 0;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 1000;
    
    /* background-color: var(--light-white); */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);

    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        padding 0.3s ease;
}

.navbar>div {
    height: 100%;
    padding-right: var(--section-gap);
}


.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;

}

.nav-btn {
    color: var(--medium-white) !important;
}

.nav-logo a img {
    height: var(--logo-height);
    width: auto;
}

.nav-links-box {
    display: flex;
}

.nav-links {
    display: flex;
    align-items: stretch;
    gap: var(--big-gap);
    list-style: none;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links li {
    display: flex;
    height: auto;
}

.nav-links li a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;

    color: var(--dark-blue-bg);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--small-para);
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-links li a:hover {
    color: var(--medium-blue-bg);
    font-weight: 600;
}

.nav-links li a.active {
    color: var(--light-blue-bg);
    font-weight: 700;
}

.nav-links li a.active::after {
    /* content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 5px;
    background: url("../../images/icons/nav-active.svg") no-repeat center;
    background-size: 100% 100%; */
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 5px;

    background-image: url("../../images/icons/nav-active.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.nav-links li a:hover {
    color: var(--medium-blue-bg);
}


/* Blue Button Styles */


.btn-icon {
    width: var(--medium-icon);
    height: auto;
    margin-left: var(--space-md);
    object-fit: contain;
}

/* Button styling in hamburger overlay */
.ham-btn-full {
    width: 100%;
    font-size: var(--big-para);
}

.ham-btn-full:hover {
    background-color: var(--medium-blue-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* !hamburger menu */
.hamburger {
    position: relative;
    gap: var(--space-md);
    display: none;
    justify-content: center;
    align-items: center;
    height: max-content;
}

.navbar.nav-collapsed .nav-links-box {
    display: none;
}

.navbar.nav-collapsed .hamburger {
    display: flex;
}

.nav-toggle {
    /* display: none; */
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    justify-self: center;
    height: 100%;
}

.nav-toggle img:hover {
    filter: brightness(0.8);

}

.nav-toggle img {
    width: auto;
    height: var(--ham-icon-height);
    object-fit: contain;
}

/* Hamburger Overlay */
.hamburger-overlay {
    position: fixed;
    top: calc(var(--upper-header-height, 0px) + var(--navbar-height, 0px));
    right: var(--section-gap);

    width: 400px;
    max-width: 100vw;
    padding: var(--space-lg);

    background-color: var(--dark-blue-bg);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;

    overflow: hidden;
    z-index: 9999;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform-origin: top center;
    clip-path: inset(0 0 100% 0 round 0 0 16px 16px);

    transition:
        clip-path 0.95s cubic-bezier(.22, 1, .36, 1),
        opacity 0.2s ease,
        visibility 0s linear 0.95s;
}

/* open */
.hamburger-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    clip-path: inset(0 0 0 0 round 0 0 16px 16px);

    transition:
        clip-path 0.95s cubic-bezier(.22, 1, .36, 1),
        opacity 0.2s ease,
        visibility 0s;
}


.ham-close {
    display: flex;
    justify-content: flex-end;
}

.ham-close button {
    background: none;
    border: none;
    cursor: pointer;
}

.ham-close button img {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ham-close button:hover img {
    transform: scale(1.05) translateY(-3px);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3));
}

.ham-logo {
    display: flex;
    justify-content: flex-start;
}

.ham-logo img {
    height: var(--ham-logo-height);
    width: auto;
    margin-bottom: var(--space-md);
}

.ham-seperator {
    height: 12px;
    width: 100%;
    margin: var(--space-sm) 0;
    background-image: url("../../images/icons/ham-seperator.svg");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 100% 100%;
    opacity: 0.5;
    /* background-image: linear-gradient(to right,  var(--dark-white), transparent); */

}

.ham-link-box {
    display: flex;
    flex-direction: column;
    /* gap: var(--space-lg); */
    padding: 0 var(--space-sm);
}

.ham-links a {
    color: var(--medium-white);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--small-para);
    transition: all 0.3s ease;
    position: relative;
    padding: 0 var(--space-sm);
}

.ham-links li {
    list-style: none;
    width: 100%;
}




/* trans-btn in dark overlay context */
.hamburger-overlay .trans-btn,
.ham-quote .trans-btn {
    color: var(--medium-white);
    border-color: var(--medium-white);
}

.hamburger-overlay .trans-btn:hover,
.ham-quote .trans-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-white);
}

.trans-btn-icon {
    width: var(--medium-icon);
    height: auto;
    margin-right: var(--space-md);
    object-fit: contain;
}

.ham-btns {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* ! Responsive */
/* tablet */
@media (max-width: 768px) {
    .navbar>div {
        padding-right: var(--space-lg);
    }

    .hamburger-overlay {
        right: var(--space-lg);
    }
    .upper-header {
        padding: var(--space-xs) var(--space-lg);
    }

    

    .upper-header-item a {
        gap: var(--space-sm);
    }
}

/* mobile */
@media (max-width: 576px) {
    .navbar>div {
        padding-right: var(--space-md);
    }

    .hamburger-overlay {
        /* make the overlay cover the entire viewport on mobile */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        transform-origin: top;
        padding: var(--space-md);
        /* keep stacking above other content */
        z-index: 9999;
    }
    .upper-header {
        padding: var(--space-xs) var(--space-md);
    }
    
    .upper-header-item a {
        gap: var(--space-xs);
    }
}
