/*!
 * Premium Modern UI/UX Header (Final Optimized)
 * Fixes: 70px Normal Height, 68px Mobile Logo, Smooth Scroll Shrink, Touch Effects
 */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --google-black: #1a1a1c;
    --google-gray: #5f6368;
    --google-hover: #f3f4f6;
    --google-divider: #e5e7eb;
    --google-white: #ffffff;
    
    /* Premium Blue Accent for Links/Buttons */
    --brand-blue: #0f62fe;
    --brand-blue-hover: #0043ce;
    --brand-blue-soft: rgba(15, 98, 254, 0.06);
    
    --header-text-size: var(--header-font, 15px);
    
    /* Ultra Smooth Easing Curves */
    --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-apple: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
button { font: inherit; color: inherit; text-align: inherit; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--google-black);
    background: var(--google-white);
    -webkit-font-smoothing: antialiased;
}

/* ── Typography & Remove Global Underlines ─────────────────────────── */
.nav-link, .dropdown-item-name, .btn-book, .drawer-link, .drawer-sub-link-item, .logo-text-fallback, .drawer-book-btn {
    font-family: 'Inter Tight', sans-serif;
    text-decoration: none !important; 
}
a { text-decoration: none !important; }

/* ── Wrapper & Inner ────────────────────────────────────────── */
.header-wrapper {
    position: sticky;
    top: 0; z-index: 900;
    padding: 16px 24px;
    background: transparent;
    pointer-events: none;
    transition: padding 400ms var(--ease-smooth);
    will-change: padding;
}

.header-wrapper.scrolled { padding-block: 10px; }

.main-header, .header-inner { pointer-events: auto; }

.header-inner {
    width: min(100%, 1320px);
    height: 70px; /* Normal height for Desktop */
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 100px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 400ms var(--ease-smooth);
    will-change: height, box-shadow;
}

.header-wrapper.scrolled .header-inner {
    height: 60px; /* Scrolled height */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); /* Softer floating shadow */
    border-color: rgba(0,0,0,0.08);
}

/* ── Brand Logo ─────────────────────────────────────────────── */
.brand-logo {
    display: flex; align-items: center;
    text-decoration: none; flex: 0 0 auto;
    margin-left: 8px;
    transition: transform 300ms var(--ease-spring);
}
.brand-logo:hover { transform: scale(1.02); }
.brand-logo:active { transform: scale(0.96); }

.brand-logo img {
    height: 42px; width: auto;
    max-height: 42px !important;
    object-fit: contain;
    transition: all 400ms var(--ease-smooth);
    will-change: height, max-height;
}

.header-wrapper.scrolled .brand-logo img {
    height: 36px;
    max-height: 36px !important;
}

.brand-logo .img-desktop { display: block; }
.brand-logo .img-mobile { display: none; }
.logo-text-fallback { font-weight: 700; font-size: 20px; color: var(--google-black); }

/* ── Desktop Navigation ─────────────────────────────────────── */
.desktop-nav { display: flex; flex: 1 1 auto; justify-content: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav-item { position: relative; }
/* Bridges the visual gap between the nav-link and the dropdown so the
   hover state never breaks while the pointer travels between them.
   (Works together with the JS hover-intent delay below.) */
.nav-item.has-dropdown { padding-bottom: 22px; margin-bottom: -22px; }

.nav-link {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 18px; color: var(--google-gray);
    font-size: var(--header-text-size); font-weight: 600;
    border-radius: 100px; 
    transition: all 300ms var(--ease-smooth);
    position: relative; overflow: hidden; /* contains the ripple */
}
.nav-item:hover > .nav-link, .nav-item.active > .nav-link,
.nav-item.dropdown-open > .nav-link {
    color: var(--brand-blue); 
    background: var(--brand-blue-soft);
}
.nav-link:active { transform: scale(0.96); }

.drop-icon { width: 14px; height: 14px; transition: transform 300ms var(--ease-spring); }
.nav-item.has-dropdown:hover .drop-icon,
.nav-item.has-dropdown.dropdown-open .drop-icon { transform: rotate(180deg); }

/* ── Dropdown Menu ──────────────────────────────────────────── */
.dropdown-menu-list {
    position: absolute; 
    top: calc(100% + 8px); 
    left: 50%;
    min-width: 260px; 
    max-width: 320px;
    margin: 0; 
    padding: 10px; 
    list-style: none;
    background: var(--google-white); 
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none;
    transform: translateX(-50%) translateY(14px) scale(0.98); 
    transition: all 300ms var(--ease-smooth);
    z-index: 9999;
}
.nav-item.has-dropdown:hover .dropdown-menu-list,
.nav-item.has-dropdown.dropdown-open .dropdown-menu-list {
    opacity: 1; visibility: visible; pointer-events: auto; 
    transform: translateX(-50%) translateY(0) scale(1);
}
.dropdown-item-link {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 16px; color: var(--google-black); border-radius: 10px;
    transition: background 200ms ease;
    position: relative; overflow: hidden; /* contains the ripple */
}
.dropdown-item-link:hover { background: var(--google-hover); color: var(--brand-blue); }
.dropdown-item-link:active { transform: scale(0.98); }
.dropdown-item-name { font-size: 14px; font-weight: 600; }
.dropdown-item-desc { display: none; }

/* ── Buttons & Actions ──────────────────────────────────────── */
.header-actions { display: flex; align-items: center; margin-right: 4px; }

.btn-book, .drawer-book-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14.5px; font-weight: 600; border-radius: 100px;
    transition: all 300ms var(--ease-smooth);
    white-space: nowrap;
    position: relative; overflow: hidden; /* contains the ripple */
}
.btn-icon { flex-shrink: 0; }

/* Book Now (header) — soft outline style */
.btn-book {
    background: transparent;
    color: var(--brand-blue);
    border: 1.5px solid var(--brand-blue);
    padding: 8.5px 22px;
    min-height: 42px;
}
.btn-book:hover {
    background: var(--brand-blue-soft);
    border-color: var(--brand-blue-hover);
    color: var(--brand-blue-hover);
    transform: translateY(-2px);
}
.btn-book:active {
    transform: translateY(0) scale(0.97);
}

/* Book on WhatsApp (drawer footer) — solid, stays the stronger CTA */
.drawer-book-btn {
    background: var(--brand-blue);
    color: var(--google-white);
    border: 1.5px solid transparent;
}
.drawer-book-btn:hover {
    background: var(--brand-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 98, 254, 0.25);
}
.drawer-book-btn:active {
    transform: translateY(0) scale(0.97);
}

.btn-arrow { transition: transform 300ms var(--ease-spring); }
.btn-book:hover .btn-arrow, .drawer-book-btn:hover .btn-arrow { transform: translateX(4px); }

/* ── Ripple (created dynamically by header.js on click) ──────── */
.ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.55);
    animation: rippleEffect 550ms var(--ease-smooth) forwards;
}
/* Darker ripple on light-background targets so it stays visible */
.nav-link .ripple,
.dropdown-item-link .ripple,
.drawer-sub-link-item .ripple {
    background: rgba(15, 98, 254, 0.16);
}
@keyframes rippleEffect {
    from { transform: translate(-50%, -50%) scale(0); opacity: 0.5; }
    to   { transform: translate(-50%, -50%) scale(2.6); opacity: 0; }
}

/* ── Mobile Hamburger Toggle ────────────────────────────────── */
.menu-toggle-btn {
    display: none; align-items: center; justify-content: center;
    width: 48px; height: 48px; padding: 0;
    color: var(--google-black); background: transparent;
    border: none; border-radius: 50%; cursor: pointer;
    transition: all 300ms var(--ease-smooth);
    flex-shrink: 0;
}
.menu-toggle-btn:hover { background: var(--google-hover); }
.menu-toggle-btn:active { transform: scale(0.92); }

/* ── Overlay & Google Style Left Drawer ─────────────────────── */
.header-overlay {
    position: fixed; inset: 0; z-index: 990;
    background: rgba(15, 23, 42, 0.45); 
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 380ms var(--ease-smooth), visibility 380ms var(--ease-smooth);
}
.header-overlay.active { 
    opacity: 1; visibility: visible; pointer-events: auto; 
}

.mobile-drawer {
    position: fixed; top: 0; left: 0; z-index: 1000;
    width: min(85vw, 340px); height: 100vh; display: flex; flex-direction: column;
    background: var(--google-white); 
    border-radius: 0 24px 24px 0; 
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.18);
    transform: translateX(-100%); 
    visibility: hidden;
    transition: transform 380ms var(--ease-apple), visibility 380ms var(--ease-apple);
    will-change: transform;
    backface-visibility: hidden;
}
@supports (height: 100dvh) { .mobile-drawer { height: 100dvh; } }
.mobile-drawer.active { transform: translateX(0); visibility: visible; }

/* Drawer Header - Modern gradient brand bar */
.drawer-brand {
    padding: 22px 20px; 
    display: flex; align-items: center; justify-content: space-between;
    min-height: 68px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #4c8dff 100%);
    position: relative;
    overflow: hidden;
}
.drawer-brand::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(120px 120px at 90% -20%, rgba(255,255,255,0.25), transparent 70%);
    pointer-events: none;
}
.drawer-brand-name {
    font-family: 'Inter Tight', sans-serif;
    font-size: 18px; font-weight: 800; color: #fff;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}
.drawer-close-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    color: #fff; background: rgba(255,255,255,0.18); 
    border: none; border-radius: 50%; cursor: pointer;
    transition: all 300ms var(--ease-spring);
    position: relative; z-index: 1;
    flex-shrink: 0;
}
.drawer-close-btn:hover { background: rgba(255,255,255,0.32); transform: scale(1.06) rotate(90deg); }
.drawer-close-btn:active { transform: scale(0.9) rotate(90deg); }

/* Drawer Body */
.drawer-body {
    flex: 1 1 auto; padding: 14px 16px; overflow-y: auto; overscroll-behavior: contain;
    background: #fafbfc;
}
.drawer-body::-webkit-scrollbar { width: 5px; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--google-divider); border-radius: 10px; }

/* Drawer Links */
.drawer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.drawer-item {
    position: relative;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--google-divider);
    overflow: hidden;
}

.drawer-link {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px; color: var(--google-black); background: transparent; border: none;
    font-size: 15.5px; font-weight: 600; text-align: left; border-radius: 16px;
    cursor: pointer; 
    transition: all 300ms var(--ease-smooth);
}
.drawer-link > span { flex: 1 1 auto; min-width: 0; }
.drawer-drop-icon { flex-shrink: 0; }

.drawer-link:hover { 
    background: var(--brand-blue-soft); 
    color: var(--brand-blue);
}
.drawer-link:active { transform: scale(0.98); }
.drawer-item.open > .drawer-link { background: var(--brand-blue-soft); color: var(--brand-blue); }

/* Accordion Toggle */
.drawer-drop-icon { color: var(--google-gray); transition: transform 400ms var(--ease-spring); }
.drawer-item.open .drawer-drop-icon { transform: rotate(180deg); color: var(--brand-blue); }

/* Accordion Sub Menu */
.drawer-accordion-menu {
    display: grid; grid-template-rows: 0fr; margin: 0; border: none; 
    transition: grid-template-rows 400ms var(--ease-smooth);
}
.drawer-accordion-menu.active { grid-template-rows: 1fr; }
.drawer-accordion-inner { overflow: hidden; display: flex; flex-direction: column; gap: 3px; padding: 2px 8px 10px; margin: 0; list-style: none; }

.drawer-item.open {
    box-shadow: 0 4px 18px rgba(15, 98, 254, 0.08);
    border-color: rgba(15, 98, 254, 0.16);
}

.drawer-sub-link-item {
    display: flex; align-items: center; justify-content: space-between; 
    padding: 12px 14px 12px 30px; 
    color: var(--google-gray); text-decoration: none; border-radius: 12px;
    font-size: 14px; font-weight: 500;
    transition: all 250ms var(--ease-smooth);
    position: relative; overflow: hidden; /* contains the ripple */
}
.drawer-sub-link-item::before {
    content: '';
    position: absolute; left: 13px; top: 50%;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--google-divider);
    transform: translateY(-50%);
    transition: all 250ms var(--ease-smooth);
}
.drawer-sub-link-item:hover { 
    background: var(--brand-blue-soft); 
    color: var(--brand-blue);
}
.drawer-sub-link-item:hover::before {
    background: var(--brand-blue);
    transform: translateY(-50%) scale(1.7);
}
.drawer-sub-link-item:active { transform: scale(0.98); }
.drawer-sub-name { font-size: 14px; font-weight: 500; }

/* Drawer Footer */
.drawer-footer {
    padding: 20px; border-top: 1px solid var(--google-divider);
    display: flex; flex-direction: column; gap: 12px;
    background: #fff;
}
.drawer-contact-row a {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px; color: var(--google-gray); font-size: 14.5px; font-weight: 600;
    background: transparent; border-radius: 100px; border: 1px solid var(--google-divider);
    transition: all 300ms var(--ease-smooth);
}
.drawer-contact-row a:hover { 
    background: var(--google-hover); color: var(--google-black); transform: translateY(-1px);
}
.drawer-contact-row a:active { transform: scale(0.96); }
.drawer-book-btn { width: 100%; padding: 15px 20px; font-size: 15px; }


/* ══════════════════════════════════════════════════════════════════
   MOBILE MEDIA QUERIES (Perfect Scaling, True-Center Logo & 70px Height)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .header-wrapper { padding: 12px 16px; }
    .desktop-nav { display: none; }
    
    .header-inner {
        position: relative; /* anchor for absolute-centered logo */
        padding: 0 14px; 
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 70px; /* Tablet Normal Height */
    }

    .menu-toggle-btn { display: flex; flex-shrink: 0; }

    /* Logo is centered independently of side-content widths so it
       never drifts off-center when the Book Now button changes size. */
    .brand-logo {
        position: absolute;
        left: 40%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }
    .brand-logo:hover { transform: translate(-50%, -50%) scale(1.02); }
    .brand-logo:active { transform: translate(-50%, -50%) scale(0.96); }

    .brand-logo .img-desktop { display: none; }
    .brand-logo .img-mobile { display: block; }
    
    .brand-logo img { height: 60px; max-height: 60px !important; } 

    .header-wrapper.scrolled .brand-logo img { height: 46px; max-height: 46px !important; }

    .header-actions {
        flex-shrink: 0;
        margin-right: 0;
        position: relative;
        z-index: 1; /* keep button clickable above the absolutely-centered logo */
    }
}

@media (max-width: 640px) {
    .header-wrapper { padding: 8px; }
    
    .header-inner { 
        height: 70px; /* Mobile Normal Height */
        padding: 0 8px 0 8px; 
        border-radius: 100px; 
    }
    
    .menu-toggle-btn { width: 46px; height: 46px; }
    
    /* BIG LOGO ON MOBILE */
    .brand-logo img { 
        height: 54px; 
        max-height: 54px !important; 
    }

    /* Shrink Logo on Scroll on Mobile */
    .header-wrapper.scrolled .brand-logo img { 
        height: 50px; 
        max-height: 50px !important; 
    }

    /* Book Now button: same vertical center as hamburger, no overflow */
    .header-actions { display: flex; align-items: center; }
    .btn-book { 
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 14px; 
        height: 42px;
        min-height: 42px; 
        width: auto; 
        border-radius: 100px;
        font-size: 13.5px;
    }
    .btn-book span { display: inline-block; line-height: 1; }
}

@media (max-width: 380px) {
    .header-inner { padding: 0 6px; }
    .btn-book { padding: 0 10px; font-size: 12.5px; height: 40px; min-height: 40px; }
    .menu-toggle-btn { width: 42px; height: 42px; }
    .brand-logo img { height: 64px; max-height: 64px !important; }
}