@charset "UTF-8";
/*
 * Estrel Tower — Mega Menu
 * 3-column fullscreen overlay (Figma Desktop 5-11)
 * Responsive: 3 col (>1024) → 2 col (768-1024) → 1 col (<768)
 */

/* ── Base overlay ── */
/* Menu always uses Sunrise palette, regardless of body theme.
   Override inherited Night colors with direct declarations. */
.estrel-mega-menu {
    --text-primary: #14172D;
    --text-secondary: rgba(20, 23, 45, 0.7);
    --text-accent: #FED3CD;
    --bg-primary: #FFF9F4;
    --border-color: rgba(20, 23, 45, 0.15);
    --hover-transition: 0.3s ease;
    color: #14172D !important;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.estrel-mega-menu a,
.estrel-mega-menu button,
.estrel-mega-menu span,
.estrel-mega-menu svg {
    color: #14172D !important;
}

.estrel-mega-menu.open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.estrel-mega-menu__overlay {
    position: absolute;
    inset: 0;
    background: #FED3CD;
}

/* Hide sticky booking when menu is open (body class set by JS) */
body.estrel-menu-open .estrel-sticky-booking {
    opacity: 0;
    pointer-events: none;
}

/* ── Content container ── */
.estrel-mega-menu__content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px var(--container-padding);
    max-width: var(--container-max);
    margin: 0 auto;
}

/* ── Compact header (tablet/mobile only) ── */
.estrel-mega-menu__header {
    display: none;
}

/* ── 3-column grid (Desktop) ── */
.estrel-mega-menu__grid {
    display: grid;
    grid-template-columns: 240px 1fr 1fr;
    gap: 0;
    flex: 1;
    padding-top: 40px;
    min-height: 0;
}

/* ── LEFT: Sidebar (Desktop) ── */
.estrel-mega-menu__sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(20, 23, 45, 0.15);
    padding-right: 40px;
    height: 100%;
}

.estrel-mega-menu__close {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: #14172D;
    font-family: var(--font-alpina);
    font-size: 20px;
    font-weight: 250;
    font-style: italic;
    cursor: pointer;
    padding: 0;
    margin-bottom: 60px;
    transition: opacity var(--hover-transition);
}

.estrel-mega-menu__close:hover { opacity: 0.7; }

.estrel-mega-menu__sidebar-link {
    display: block;
    font-family: var(--font-alpina);
    font-size: 34px;
    font-weight: 250;
    font-style: italic;
    color: #14172D;
    text-decoration: none;
    margin-bottom: 12px;
    transition: opacity var(--hover-transition);
}

.estrel-mega-menu__sidebar-link:hover { opacity: 0.7; }

.estrel-mega-menu__sidebar-bottom {
    margin-top: auto;
    padding-bottom: 20px;
}

/* Logo — Figma node 208:4795 (160×80 combined wordmark + "Tower") */
.estrel-mega-menu__logo {
    display: block;
    text-decoration: none;
    color: #14172D;
    margin-bottom: 24px;
}

.estrel-mega-menu__logo-svg {
    display: block;
    width: 160px;
    height: 80px;
}

/* Socials — Figma node 208:4781 (two 24×24 icons with 14px gap = 37.3 − 23.3) */
.estrel-mega-menu__socials {
    display: flex;
    gap: 14px;
}

.estrel-mega-menu__socials a {
    color: #14172D;
    transition: opacity var(--hover-transition);
}

.estrel-mega-menu__socials a:hover { opacity: 0.7; }

/* ── MIDDLE: Main navigation ── */
.estrel-mega-menu__nav {
    padding: 0 60px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.estrel-mega-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.estrel-mega-menu__list li {
    height: 48px;
    display: flex;
    align-items: center;
}

.estrel-mega-menu__link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-soehne);
    font-weight: 300;
    font-size: 28px;
    line-height: 1;
    color: #14172D;
    text-decoration: none;
    /* Reset <button> defaults so a <button>.estrel-mega-menu__link
       (used for non-navigable parent items) renders identically to <a>. */
    appearance: none;
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0;
    text-align: inherit;
    cursor: pointer;
    font-style: normal;
    transition: opacity var(--hover-transition);
}

.estrel-mega-menu__link:hover,
.estrel-mega-menu__link.is-active,
.estrel-mega-menu__link.is-hover {
    font-family: var(--font-alpina);
    font-size: 34px;
    font-weight: 250;
    font-style: italic;
    line-height: 1;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
}

.estrel-mega-menu__arrow {
    opacity: 0.6;
    transition: transform var(--hover-transition), opacity var(--hover-transition);
    flex-shrink: 0;
}

.estrel-mega-menu__link:hover .estrel-mega-menu__arrow,
.estrel-mega-menu__link.is-hover .estrel-mega-menu__arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ── RIGHT: Submenu panels ── */
.estrel-mega-menu__submenu {
    padding-left: 60px;
    border-left: 1px solid rgba(20, 23, 45, 0.15);
    overflow-y: auto;
    max-height: calc(100vh - 160px);
}

.estrel-mega-menu__panel {
    display: none;
}

.estrel-mega-menu__panel.is-visible {
    display: block;
    animation: menuFadeIn 0.3s ease both;
}

@keyframes menuFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.estrel-mega-menu__group {
    margin-bottom: 20px;
}

/* Standalone category links (no children) */
a.estrel-mega-menu__category {
    margin-bottom: 20px;
}

/* Remove bottom margin on last item to prevent 1px scroll overflow */
.estrel-mega-menu__panel > *:last-child {
    margin-bottom: 0;
}

.estrel-mega-menu__panel > .estrel-mega-menu__group:last-child .estrel-mega-menu__sublist {
    margin-bottom: 0;
}

.estrel-mega-menu__category {
    display: block;
    font-family: var(--font-alpina);
    font-size: 28px;
    font-weight: 250;
    font-style: italic;
    color: #14172D;
    text-decoration: none;
    margin-bottom: 6px;
    transition: opacity var(--hover-transition);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.estrel-mega-menu__sublist {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
}

.estrel-mega-menu__sublink {
    display: block;
    font-family: var(--font-soehne);
    font-size: 17px;
    font-weight: 300;
    color: #14172D;
    text-decoration: none;
    padding: 3px 0;
    transition: opacity var(--hover-transition);
}

.estrel-mega-menu__sublink:hover { opacity: 0.7; }

/* ── Stagger animation ── */
.estrel-mega-menu.open .estrel-mega-menu__link {
    animation: menuStagger 0.4s ease both;
}

.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(1) .estrel-mega-menu__link { animation-delay: 0.05s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(2) .estrel-mega-menu__link { animation-delay: 0.1s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(3) .estrel-mega-menu__link { animation-delay: 0.15s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(4) .estrel-mega-menu__link { animation-delay: 0.2s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(5) .estrel-mega-menu__link { animation-delay: 0.25s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(6) .estrel-mega-menu__link { animation-delay: 0.3s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(7) .estrel-mega-menu__link { animation-delay: 0.35s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(8) .estrel-mega-menu__link { animation-delay: 0.4s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(9) .estrel-mega-menu__link { animation-delay: 0.45s; }
.estrel-mega-menu.open .estrel-mega-menu__list li:nth-child(10) .estrel-mega-menu__link { animation-delay: 0.5s; }

@keyframes menuStagger {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════
   TABLET (768–1024px): 2 columns
   Sidebar collapses into header row
   ══════════════════════════════ */
@media (max-width: 1024px) {
    .estrel-mega-menu__header {
        display: flex;
        align-items: center;
        gap: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(20, 23, 45, 0.15);
        margin-bottom: 24px;
    }

    .estrel-mega-menu__header .estrel-mega-menu__close {
        margin-bottom: 0;
        margin-right: auto;
    }

    .estrel-mega-menu__header .estrel-mega-menu__sidebar-link {
        font-size: 24px;
        margin-bottom: 0;
    }

    .estrel-mega-menu__sidebar {
        display: none;
    }

    .estrel-mega-menu__grid {
        grid-template-columns: 1fr 1fr;
        padding-top: 0;
    }

    .estrel-mega-menu__nav {
        padding: 0 40px 0 0;
        max-height: calc(100vh - 240px);
    }

    .estrel-mega-menu__submenu {
        padding-left: 40px;
        max-height: calc(100vh - 240px);
    }

    .estrel-mega-menu__link {
        font-size: 22px;
    }

    .estrel-mega-menu__link:hover,
    .estrel-mega-menu__link.is-active,
    .estrel-mega-menu__link.is-hover {
        font-size: 26px;
    }

    .estrel-mega-menu__list li {
        height: 40px;
    }

    .estrel-mega-menu__category { font-size: 26px; }
    .estrel-mega-menu__sublink { font-size: 16px; }
}

/* ══════════════════════════════
   MOBILE (<768px): 1 column
   No submenu panels, only main nav
   ══════════════════════════════ */
@media (max-width: 767px) {
    .estrel-mega-menu__content {
        padding: 24px 20px;
        overflow-y: auto;
    }

    .estrel-mega-menu__header {
        display: flex;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(20, 23, 45, 0.15);
        margin-bottom: 16px;
    }

    .estrel-mega-menu__header .estrel-mega-menu__close {
        margin-bottom: 0;
        font-size: 18px;
    }

    /* Hide sidebar links in header on mobile — shown via sidebar at bottom */
    .estrel-mega-menu__header .estrel-mega-menu__sidebar-link {
        display: none;
    }

    /* Show sidebar at bottom on mobile (instead of hiding it) */
    .estrel-mega-menu__sidebar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        border-right: none;
        padding-right: 0;
        padding-top: 20px;
        border-top: 1px solid rgba(20, 23, 45, 0.15);
        margin-top: 20px;
        height: auto;
        order: 99;
    }

    .estrel-mega-menu__sidebar .estrel-mega-menu__close {
        display: none;
    }

    .estrel-mega-menu__sidebar .estrel-mega-menu__sidebar-link {
        font-size: 20px;
        margin-bottom: 0;
    }

    .estrel-mega-menu__sidebar-bottom {
        display: none;
    }

    .estrel-mega-menu__grid {
        grid-template-columns: 1fr;
        padding-top: 0;
        flex: 0 1 auto;
        display: flex;
        flex-direction: column;
    }

    .estrel-mega-menu__submenu { display: none; }

    /* Panels moved inline by JS get shown inside the nav list */
    .estrel-mega-menu__panel.is-mobile-inline.is-visible {
        display: block;
        padding: 8px 0 12px 20px;
        border-left: 2px solid rgba(20, 23, 45, 0.15);
        margin-bottom: 8px;
        animation: none;
    }

    .estrel-mega-menu__panel.is-mobile-inline .estrel-mega-menu__category {
        font-size: 20px;
    }

    .estrel-mega-menu__panel.is-mobile-inline .estrel-mega-menu__sublink {
        font-size: 15px;
    }

    .estrel-mega-menu__panel.is-mobile-inline .estrel-mega-menu__group {
        margin-bottom: 12px;
    }

    .estrel-mega-menu__nav {
        padding: 0;
        max-height: none;
        overflow-y: visible;
    }

    .estrel-mega-menu__link { font-size: 22px; }

    .estrel-mega-menu__link:hover,
    .estrel-mega-menu__link.is-active,
    .estrel-mega-menu__link.is-hover {
        font-size: 24px;
    }

    /* Touch targets ≥ 44px (WCAG 2.5.5) */
    .estrel-mega-menu__list li {
        height: auto;
        min-height: var(--touch-target-min);
    }

    .estrel-mega-menu__link {
        align-self: stretch;
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0;
    }

    /* Close button touch target ≥ 44px */
    .estrel-mega-menu__header .estrel-mega-menu__close {
        min-height: var(--touch-target-min);
        align-items: center;
    }

    .estrel-mega-menu__content {
        max-height: 100vh !important;
        max-height: 100dvh !important;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch;
    }

}
