/* ============================================================
   SPARK SKOON — navbar.css
   Performance-first: only transform/opacity animated (GPU layer)
   Accessible: focus rings, skip link, aria-expanded states
   Responsive: desktop → tablet → mobile with smooth transitions
   ============================================================ */

/* ── Skip to Main (accessibility) ───────────────────────────── */
.skip-to-main {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background-color: #0D2863;
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border-radius: 0 0 6px 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-to-main:focus {
    top: 0;
}


header {
    width: 100%;
    display: flex;
    justify-content: center;
    max-width: 100%;
    height: 100px;
    padding-top: 10px;
    position: relative;



}


/* ── Nav Wrapper ─────────────────────────────────────────────── */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1240px, 100%);
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: linear-gradient(135deg, #f5f8fc 0%, #e3f2fd 50%, #ffffff 100%);
    border-bottom: 1px solid #E8EEF8;
    box-shadow: 0 8px 32px rgba(13, 40, 99, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    transition: all 0.3s ease;
    border-radius: 50px;
}


/* ── Logo ────────────────────────────────────────────────────── */
.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-logo img {
    height: 46px;
    width: auto;
    display: block;

    /* Prevent layout shift while loading */
    aspect-ratio: auto;
}


/* ── Desktop Navigation Links ────────────────────────────────── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: 0.5rem 0.85rem;
    color: #1A1A2E;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.22s ease, background-color 0.22s ease;
}

/* Animated underline indicator */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #1E88E5;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.nav-link:hover {
    color: #0D2863;
    background-color: #E3F2FD;
}

.nav-link:hover::after {
    width: calc(100% - 1.7rem);
}

/* Active state — applied to the current page link */
.nav-link.active {
    color: #0D2863;
    font-weight: 600;
}

.nav-link.active::after {
    width: calc(100% - 1.7rem);
    background-color: #1E88E5;
}

/* Focus ring for keyboard navigation */
.nav-link:focus-visible {
    outline: 2px solid #1E88E5;
    outline-offset: 2px;
}


/* ── Desktop CTA Area ────────────────────────────────────────── */
.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* WhatsApp icon button */
.nav-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 38px;
    background-color: #E8FFF1;
    color: #25D366;
    border-radius: 8px;
    font-size: 1.15rem;
    text-decoration: none;
    transition: background-color 0.22s ease, transform 0.2s ease;
}

.nav-whatsapp:hover {
    background-color: #25D366;
    color: #ffffff;
    transform: scale(1.07);
}

.nav-whatsapp:focus-visible {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}

/* Book a Clean CTA button */
.btn-book {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.25rem;
    background-color: #0D2863;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.22s ease, transform 0.2s ease;
}

.btn-book:hover {
    background-color: #1565C0;
    transform: translateY(-2px);
}

.btn-book:focus-visible {
    outline: 2px solid #1E88E5;
    outline-offset: 2px;
}

/* ── Nav Contact ─────────────────────────────────────────────── */
.nav-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-contact a {
    color: #0D2863;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-contact a:hover {
    color: #1E88E5;
}

/* ── Hamburger Button ─────────────────────────────────────────── */
.nav-hamburger {
    display: none;
    /* hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1.5px solid #E8EEF8;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: border-color 0.22s ease, background-color 0.22s ease;
}

.nav-hamburger:hover {
    border-color: #1E88E5;
    background-color: #E3F2FD;
}

.nav-hamburger:focus-visible {
    outline: 2px solid #1E88E5;
    outline-offset: 2px;
}

.hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #0D2863;
    border-radius: 2px;

    /*
      GPU-accelerated transforms only.
      No layout-triggering properties animated.
    */
    transform-origin: center;
    transition:
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease,
        width 0.25s ease;
}

/* ── Hamburger → X animation ── */
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
    width: 0;
    transform: scaleX(0);
}

.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ── Mobile Menu Panel ───────────────────────────────────────── */
.mobile-menu {
    background-color: #ffffff;
    border-top: 1px solid #E8EEF8;
    overflow: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 10;

    /*
      Animate max-height + opacity for smooth slide.
      GPU-composited: no reflow on repaint.
    */
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition:
        max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.28s ease,
        visibility 0s linear 0.35s;
}

.mobile-menu.open {
    max-height: 480px;
    opacity: 1;
    visibility: visible;
    transition:
        max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.28s ease,
        visibility 0s linear 0s;
}

.mobile-nav-links {
    list-style: none;
    padding: 0.75rem 1.5rem;
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 0.85rem 0;
    color: #1A1A2E;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #F0F4FC;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
    color: #1E88E5;
    padding-left: 6px;
}

.mobile-nav-link.active {
    color: #0D2863;
    font-weight: 600;
}

.mobile-nav-links li:last-child .mobile-nav-link {
    border-bottom: none;
}

/* Mobile menu footer CTAs */
.mobile-menu-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-cta {
    text-align: center;
    justify-content: center;
    padding: 0.85rem;
    font-size: 0.95rem;
    border-radius: 8px;
}

/* WhatsApp button in mobile menu */
.mobile-menu-footer .btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.22s ease;
}

.mobile-menu-footer .btn-whatsapp:hover {
    background-color: #1ebe5b;
}


/* ── Reduced Motion Support ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    .main-header,
    .nav-link,
    .nav-link::after,
    .nav-whatsapp,
    .btn-book,
    .hamburger-bar,
    .mobile-menu,
    .mobile-nav-link {
        transition: none !important;
        animation: none !important;
    }
}


/* ── Responsive Breakpoints ──────────────────────────────────── */

/* Tablet: hide Why Us text link to save space, keep others */
@media (max-width: 900px) {
    .nav-links {
        gap: 0;


    }

    .nav-link {
        padding: 0.5rem 0.65rem;
        font-size: 0.85rem;

    }
}

/* Mobile: hide desktop nav + cta, show hamburger */
@media (max-width: 768px) {

    .nav-wrapper {
        width: calc(100% - 2rem);
        max-width: 100%;
        left: 50%;
        transform: translateX(-50%);
        padding: 1rem;
        border-radius: 20px;
        margin-top: 1rem;
        margin-left: 0;
        margin-right: 0;
    }

    /* Hide desktop elements */
    .nav-links,
    .nav-cta,
    .nav-contact {
        display: none;
    }

    /* Show hamburger */
    .nav-hamburger {
        display: flex;
    }

    .nav-logo img {
        height: 40px;
    }
}