* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    width: 100%;
    min-width: 320px;
    font-family: sans-serif;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    color: white;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    font-weight: bold;
}

.logo img {
    height: clamp(80px, 8vw, 156px);
    width: auto;
    max-height: 100%;
    object-fit: contain;
}

.bar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: clamp(4rem, 10vh, 12.5rem);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 26px clamp(1rem, 1vw, 20px) 0;
    z-index: 1000;
    pointer-events: none;
}

.bar-menu > * {
    pointer-events: auto;
}

.bar-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.75) 100%);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-links li a {
    color: white !important;
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 100ms linear;
    width: 150px;
    height: 50px;
    font-family: 'Jomolhari', serif;
}

.nav-links li a span {
    display: inline-block;
    transition: transform 100ms linear;
    position: relative;
}

.nav-links li a span::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100%;
    height: 2px;
    background-color: white !important;
    transition: transform 100ms linear;
}

.nav-links li a:hover,
.nav-links li a:visited,
.nav-links li a:focus,
.nav-links li a:active,
.nav-links li a.current,
.nav-links li a.selected,
.nav-links li a.active {
    color: white !important;
}

.nav-links li a:hover span {
    transform: translateY(-20px);
}

.nav-links li a:hover span::after {
    transform: translateX(-50%) scaleX(1);
}

.hamburger-menu {
    display: none;
    width: 44px;
    height: 44px;
    position: fixed;
    top: 23px;
    right: 20px;
    z-index: 1100;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border: 0.2px solid #494949;
    border-radius: 6px;
    background-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hamburger-menu .bar {
    width: 34px;
    height: 4px;
    border-radius: 2px;
    opacity: 0.9;
    transition: 0.2s ease;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
    background-color: white;
}

.overlay {
    display: none; 
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1005;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 300ms ease, opacity 300ms ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.overlay.show {
    transform: translateX(0);
    opacity: 1;
}

.overlay .mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border-radius: 0;
    padding: 1rem;
}

.overlay .mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.overlay .mobile-nav li {
    margin: 1rem 0;
}

.overlay .mobile-nav li a {
    position: relative;
    font-size: 1.4rem;
    color: white !important;
    text-decoration: none;
    transition: color 150ms linear;
    font-family: 'Jomolhari', serif;
}

.overlay .mobile-nav li a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100%;
    height: 2px;
    background-color: white !important;
    transition: transform 150ms linear;
}

.overlay .mobile-nav li a:hover,
.overlay .mobile-nav li a:visited,
.overlay .mobile-nav li a:focus,
.overlay .mobile-nav li a:active,
.overlay .mobile-nav li a.current,
.overlay .mobile-nav li a.selected,
.overlay .mobile-nav li a.active {
    color: white !important;
}

.overlay .mobile-nav li a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.close-button {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 1010;
}

.close-button span {
    position: absolute;
    width: 34px;
    height: 4px;
    top: 50%;
    left: 50%;
    background-color: white;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
    transform-origin: center;
}

.close-button span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-button span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* === Desktop === */
@media screen and (min-width: 1024px) {
    .bar-menu {
        height: 200px;
        padding: 10px 20px 0;
        align-items: flex-start;
        display: flex !important;
    }

    .logo {
        font-size: 2.5rem;
        display: flex;
        align-items: flex-start;
        height: 156px;
    }

    .logo img {
        height: 156px;
        width: 156px;
        object-fit: contain;
        margin-top: 0;
    }

    .nav-links {
        display: flex !important;
        margin-top: 2.5rem;  
    }

    .hamburger-menu,
    .overlay {
        display: none !important;
    }
}

/* === Mobile / Tablet === */
@media screen and (max-width: 1023px) {
    .bar-menu {
        height: 90px;
        padding: 10px 20px 0;
        align-items: center;
    }

    .nav-links {
        display: none !important;
    }

    .hamburger-menu {
        display: flex !important;
    }
}

.hamburger-menu.oculto {
    z-index: 900;
    opacity: 0;
    pointer-events: none;
}
