.navbar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1200;
    display: flex;
    justify-content: center;
    transition: background 180ms ease;
    /* outer wrapper background change */
}


/* Outer navbar default (transparent) */

.navbar {
    background: transparent;
}

ul {
    margin: 0 !important;
}


/* ---------- Inner container ---------- */

.nav-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 28px;
    /* large top desktop size */
    transition: all 280ms cubic-bezier(.2, .9, .25, 1);
}


/* Brand & logo (use display none swap to avoid blank space) */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo {
    height: 60px;
    display: block;
}


/* keep constant unless desktop scrolled changes it */

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}


/* nav links */

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    padding: 6px 8px;
    color: #fff;
    transition: color 150ms ease;
}

.bl {
    color: black;
}

.cl-1 {
    background: white !important;
}

.nav-links .cta {
    border-radius: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: #111;
}


/* hamburger (no animation when toggled) */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 2000;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 24px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}


/* Color change on scroll */

.navbar.scrolled .hamburger span {
    background: #111;
}


/* Open (X) state */

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}


/* ---------- DESKTOP scrolled (original effect) ---------- */

.navbar.scrolled .nav-inner {
    max-width: 1100px;
    background: #fff;
    padding: 10px 22px;
    margin: 10px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(16, 24, 40, 0.08);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.navbar.scrolled .nav-links a {
    color: #111;
}

.navbar.scrolled .nav-links .cta {
    background: #111;
    color: #fff;
    border-color: transparent;
}


/* logo swap on desktop */

.navbar.scrolled .logo-light {
    display: none;
}

.navbar.scrolled .logo-dark {
    display: block;
    height: 60px;
}

.close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    margin-bottom: 20px;
}

@media (max-width:880px) {
    .navbar.scrolled .close-btn {
        color: #fff;
    }
    /* stays white always */
}


/* ---------- Hamburger transforms to close (X) ---------- */

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* ---------- MOBILE: override rules at <=880px ---------- */

@media (max-width:880px) {
    /* Layout: keep inner full-width and DO NOT animate/shrink it when scrolled */
    .nav-inner {
        padding: 16px 16px;
        /* your desired mobile padding at top */
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        background: transparent;
        /* inner will stay transparent by default */
        transition: none;
        /* no animation */
    }
    /* On mobile we still want outer navbar background to change on slightest scroll,
         so we will set .navbar.scrolled to a solid color (instant change) */
    .navbar.scrolled {
        background: #ffffff;
        /* instant white background behind the full-width inner */
        box-shadow: 0 2px 14px rgba(16, 24, 40, 0.06);
    }
    /* BUT the mobile menu overlay should NOT change color when scrolled.
         We'll keep the overlay menu background fixed (dark) regardless of .scrolled */
    .nav-links {
        display: none;
        /* hidden by default */
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        flex-direction: column;
        padding: 80px 20px;
        background: rgba(0, 0, 0, 0.92);
        /* always dark overlay */
        transition: none;
        /* no animation */
    }
    .nav-links.open {
        display: flex;
    }
    /* instant show/hide */
    /* Link colors inside overlay */
    .nav-links a {
        color: #fff;
        font-size: 18px;
        margin: 8px 0;
    }
    /* When scrolled, DO NOT change overlay color or link color */
    .navbar.scrolled .nav-links {
        background: rgba(0, 0, 0, 0.92);
    }
    .navbar.scrolled .nav-links a {
        color: #fff;
    }
    /* Hamburger visible on mobile */
    .hamburger {
        display: flex;
    }
    /* Make hamburger color visible depending on outer navbar background:
         - when scrolled: outer is white -> make lines dark
         - at top: outer is transparent over hero -> keep lines white */
    .navbar .hamburger span {
        background: #fff;
    }
    /* default (over hero) */
    .navbar.scrolled .hamburger span {
        background: #111;
    }
    /* after scroll -> dark lines */
    /* LOGO behavior on mobile:
         - use display swap but DON'T change logo size when scrolled (user asked: no padding on logo when scroll up)
         - so both logos keep same height and inner padding unchanged */
    .logo {
        height: 36px;
    }
    .logo-light {
        display: block;
    }
    .logo-dark {
        display: none;
    }
    .navbar.scrolled .logo-light {
        display: block;
    }
    /* keep light logo visible if you prefer */
    .navbar.scrolled .logo-dark {
        display: none;
    }
    /* keep logo constant on mobile */
    /* If you want dark logo after scroll on mobile, change above two lines accordingly */
}