/* ═══════════════════════════════════════════════════════════════
   navbar.css — Floating Pill Navbar & Mobile Drawer
   ═══════════════════════════════════════════════════════════════ */

/* ── Wrapper ── */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    display: flex;
    justify-content: center;
    height: 100px;
    background: #FFFFFF;
    border-bottom: 1px solid #00000014;
    box-shadow: 0px 11px 60px 0px #0000000F;
}

/* ── Pill ── */
.nav-pill {
    width: 100%;
    max-width: 1600px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    overflow: visible;
    height: 100%;
}

/* ── Left Section (Nav Links) — centered across the full pill ── */
.nav-left {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* ── Right Section (hidden on desktop, hamburger only on mobile) ── */
.nav-right {
    display: none;
    align-items: center;
    gap: var(--space-md);
}

/* Very small screens: show right section and push hamburger to the right */
@media (max-width: 579px) {
    .nav-right {
        display: flex;
        justify-content: flex-end;
        flex: 1;
    }
}

/* ── Logo (hidden but kept for structure) ── */
.nav-logo {
    display: none;
}

.nav-logo-img-wrapper {
    display: none;
}

.nav-logo img {
    display: none;
}

/* ── Link list ── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 3rem;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    position: relative;
}

.nav-link {
    position: relative;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-size: 20px;
    color: #151515B2;
    text-decoration: none;
    padding: 4px 0;
    transition: all var(--transition-base);
    z-index: var(--z-elevated);
    white-space: nowrap;
}

.nav-link::before {
    content: attr(data-text);
    content: attr(data-text) / "";
    height: 0;
    visibility: hidden;
    overflow: hidden;
    user-select: none;
    pointer-events: none;
    font-weight: 700;
    display: block;
}

@supports not (content: attr(data-text) / "") {
    .nav-link::before {
        content: attr(data-text);
    }
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--color-primary-hover);
    border-radius: 2px;
    transition: width var(--transition-slow) var(--transition-ease);
}

.nav-link.activ {
    font-weight: 700;
    font-style: normal;
    color: #151515;
}

.nav-link.activ::after {
    width: 100%;
}

.nav-link:not(.activ):hover {
    font-weight: 600;
    color: #151515;
}

.nav-link:not(.activ):hover::after {
    width: 100%;
}

/* ── Active indicator line (removed) ── */
#nav-indicator {
    display: none;
}

/* ── Hamburger ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    border: none;
    background: transparent;
    z-index: var(--z-hamburger);
    transition: opacity 0.3s ease;
}

.nav-hamburger:hover {
    opacity: 0.6;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--color-dark);
    border-radius: var(--radius-pill);
    transition:
        transform 0.3s,
        opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ── Mobile drawer ── */
.nav-mobile-drawer {
    display: flex;
    visibility: hidden;
    position: fixed;
    top: 100px;
    right: 5%;
    left: auto;
    width: 200px;
    height: auto;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 10px;
    padding: 10px;
    z-index: var(--z-drawer);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-drawer);
}

.nav-mobile-drawer.open {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
}

/* Prevent body scroll when drawer is open */
html.drawer-open,
html.drawer-open body {
    overflow: hidden;
}

/* ── Close button inside drawer ── */
.nav-drawer-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid rgba(26, 26, 46, 0.15);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-dark);
    transition:
        background 0.2s,
        color 0.2s,
        transform 0.2s,
        opacity 0.3s;
    line-height: 1;
}

.nav-drawer-close:hover {
    opacity: 0.6;
    transform: rotate(90deg);
}

/* ── Drawer nav links ── */
.nav-mobile-drawer .nav-link {
    position: relative;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-nav-link);
    text-decoration: none;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    transition:
        color 0.2s,
        transform 0.2s;
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 10px 7px 14px;
}

.nav-mobile-drawer .nav-link::after {
    display: none;
}

.nav-mobile-drawer .nav-link:hover,
.nav-mobile-drawer .nav-link.activ {
    color: var(--color-primary);
    transform: translateX(4px);
}

.nav-mobile-drawer .nav-link.activ::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--color-primary);
    border-radius: var(--radius-pill);
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

/* ── Extra Large desktop: keep full design ── */
@media (min-width: 1440px) {
    .nav-links {
        gap: 5rem;
    }
    
    .nav-right .btn-dark {
        width: 208px;
        max-width: 208px;
        height: 60px !important;
        min-height: 60px;
        max-height: 60px;
    }
}

/* ── Large desktop: standard spacing ── */
@media (min-width: 1280px) and (max-width: 1439px) {
    .nav-links {
        gap: 4rem;
    }
    
    .nav-right .btn-dark {
        width: 208px;
        max-width: 208px;
        height: 60px !important;
        min-height: 60px;
        max-height: 60px;
    }
}

/* ── Desktop: reduce spacing ── */
@media (min-width: 1024px) and (max-width: 1279px) {
    .nav-links {
        gap: 3rem;
    }
    
    .nav-link {
        font-size: 18px;
    }
    
    .nav-right .btn-dark {
        width: 208px;
        max-width: 208px;
        height: 60px !important;
        min-height: 60px;
        max-height: 60px;
        font-size: 18px;
        padding: 0 1.25rem;
        gap: 10px;
    }
}

/* ── Medium screens (tablet landscape): keep centered tabs, balanced spacing ── */
@media (min-width: 680px) and (max-width: 1023px) {
    .nav-links {
        gap: 2rem;
    }

    .nav-link {
        font-size: 16px;
    }
}

/* ── Narrow medium screens: compact centered tabs before hamburger takes over ── */
@media (min-width: 580px) and (max-width: 679px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 14px;
    }
}

/* ── Small screens: show hamburger, hide nav links ── */
@media (max-width: 579px) {
    .nav-left,
    .nav-links {
        display: none;
    }
    
    .nav-pill {
        justify-content: space-between;
        width: 100%;
    }

    .nav-right .btn-dark {
        display: inline-flex;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-mobile-drawer {
        display: flex;
    }
    
    .btn-dark {
        width: 180px;
        height: 54px;
        font-size: 17px;
        padding: 0 1rem;
        gap: 10px;
    }
}

/* ── Tablet portrait ── */
@media (max-width: 768px) {
    .nav-wrapper {
        height: 80px;
    }
    
    .nav-pill {
        justify-content: space-between;
        width: 100%;
    }
    
    .nav-mobile-drawer {
        top: 80px;
        width: 210px;
        right: var(--space-section-px);
    }
    
    .btn-dark {
        width: 160px;
        height: 50px;
        font-size: 16px;
        padding: 0 1rem;
        gap: 8px;
    }
    
    .btn-icon {
        width: 0.65rem;
        height: 0.65rem;
    }
}

/* ── Mobile landscape ── */
@media (max-width: 640px) {
    .nav-wrapper {
        height: 70px;
    }
    
    .nav-right {
        gap: 0.75rem;
    }
    
    .nav-right .btn-dark {
        width: 120px;
        height: 44px;
        font-size: 13px;
        padding: 0 0.65rem;
        gap: 6px;
    }
    
    .nav-mobile-drawer {
        top: 70px;
        width: 200px;
    }
}

/* ── Small phones: compact design ── */
@media (max-width: 479px) {
    .nav-wrapper {
        height: 70px;
    }
    
    .nav-right {
        gap: 0.5rem;
    }
    
    .nav-right .btn-dark {
        width: 105px;
        height: 40px;
        font-size: 12px;
        padding: 0 0.5rem;
        gap: 5px;
    }
    
    .nav-right .btn-dark p {
        font-size: 12px;
    }
    
    .nav-right .btn-icon {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .nav-mobile-drawer {
        top: 70px;
        width: 185px;
        right: 1rem;
        padding: 8px;
        border-radius: 10px;
    }
    
    .nav-hamburger span {
        width: 22px;
        height: 2px;
    }
    
    .nav-hamburger.open span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    
    .nav-hamburger.open span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

/* ── Extra small phones ── */
@media (max-width: 375px) {
    .nav-wrapper {
        height: 65px;
    }
    
    .btn-dark {
        width: 110px;
        height: 42px;
        font-size: 12px;
        padding: 0 0.5rem;
        gap: 4px;
    }
    
    .btn-dark p {
        font-size: 12px;
    }
    
    .btn-icon {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .nav-mobile-drawer {
        top: 65px;
    }
}
