/* Header, footer, drawer, hero — La Barra QR menu. */

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--line-subtle);
    box-shadow: var(--shadow-0);
    transition: box-shadow var(--dur-base) var(--ease-brand);
}

/* Fixed header no longer occupies flow — every page needs the same amount
   of breathing room reserved at the top. */
body {
    padding-top: var(--header-height);
}

/* Real depth feedback tied to the user's own scrolling, instead of a
   shadow that sits there permanently regardless of context. */
.site-header.is-scrolled { box-shadow: var(--shadow-1); }

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp4);
    height: 100%;
    padding: 0 var(--sp4);
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    min-width: 0;
}

.site-header__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 2px;
}

.site-header__name {
    font-family: var(--font-display);
    text-transform: uppercase;
    color: var(--fg-primary);
    font-size: 18px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-header__wordmark {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.site-header__burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    color: var(--fg-primary);
}

/* Search bar */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp3);
    margin: 0 var(--sp4) var(--sp3);
    padding: 0 var(--sp5);
    height: 60px;
    background: var(--surface-1);
    border: 1px solid var(--line-strong);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--dur-fast) var(--ease-brand), background-color var(--dur-fast) var(--ease-brand);
}

.search-bar:focus-within {
    background: var(--surface-2);
    border-color: var(--fg-primary);
}

/* Mechanical "shutter" sweep on focus instead of a plain border-color
   change — ties to the brushed-metal material language. */
.search-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--metal-line), transparent);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

.search-bar:focus-within::before {
    animation: search-shutter 280ms var(--ease-brand);
}

@keyframes search-shutter {
    0% { opacity: .35; transform: scaleX(0); }
    60% { opacity: .18; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1); }
}

.search-bar__icon { color: var(--fg-tertiary); display: flex; }

.search-bar__input {
    flex: 1;
    border: 0;
    background: none;
    color: var(--fg-primary);
    font-family: var(--font-body);
    font-size: 18px;
    min-width: 0;
}

.search-bar__input::placeholder { color: var(--fg-tertiary); }
.search-bar__input:focus { outline: none; }

/* ── Category drawer ────────────────────────────────────────────────────── */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-brand);
}

.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw);
    background: var(--bg-alt);
    border-left: 1px solid var(--line);
    border-top-left-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
    z-index: 61;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--dur-base) var(--ease-brand);
}

/*
 * CSS class drives the actual show/hide — GSAP (js/main.js) only layers a
 * nicer easing on top when it's available. This way the drawer still opens
 * correctly if the GSAP CDN fails to load or is blocked.
 */
.drawer.is-open { transform: translateX(0); }

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp4);
    border-bottom: 1px solid var(--line-subtle);
}

.drawer__title {
    font-family: var(--font-display);
    color: var(--fg-primary);
    letter-spacing: 0.04em;
}

.drawer__close { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--fg-primary); }

/* Page-nav — Inicio/Menú/Eventos, sits above the category list so the
   drawer doubles as sitewide navigation, not just a category jump list. */
.drawer__pages {
    padding: var(--sp3) 0;
    border-bottom: 1px solid var(--line);
}

.drawer__page-item {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    padding: var(--sp3) var(--sp4);
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-secondary);
    border-left: 3px solid transparent;
    transition: background-color var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand);
}

.drawer__page-icon { width: 18px; height: 18px; }

.drawer__page-item:hover { color: var(--fg-primary); background: var(--surface-1); }

.drawer__page-item.is-active {
    color: var(--fg-primary);
    background: var(--surface-2);
    border-left-color: var(--fg-primary);
}

.drawer__list { overflow-y: auto; padding: var(--sp3) 0; }

.drawer__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp3);
    padding: var(--sp3) var(--sp4);
    color: var(--fg-tertiary);
    border-left: 3px solid transparent;
    transition: background-color var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand);
}

.drawer__item:hover { color: var(--fg-secondary); background: var(--surface-1); }

.drawer__item.is-active {
    color: var(--fg-primary);
    background: var(--surface-2);
    border-left-color: var(--fg-primary);
    box-shadow: var(--shadow-elevation);
}

.drawer__item.is-dimmed { opacity: .32; }

.drawer__item-label { display: inline-flex; align-items: center; gap: var(--sp3); }
.drawer__item-icon { width: 16px; height: 16px; }
.drawer__count { color: var(--fg-tertiary); font-size: 11px; }

/* ── Drawer parent groups — plain-text label + nested children, or a
   "no disponible" line when the owner closed that whole top-level category
   (see MenuChromeService::drawerCategories() / CategoryVisibilityService) ── */
.drawer__group-label {
    display: block;
    padding: var(--sp3) var(--sp4) 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-tertiary);
}

.drawer__group-children { display: flex; flex-direction: column; }
.drawer__group-children .drawer__item { padding-left: var(--sp6); }

.drawer__item--closed {
    color: var(--fg-tertiary);
    font-style: italic;
    cursor: default;
}

.drawer__item--closed:hover { background: none; color: var(--fg-tertiary); }

.drawer__footer-link {
    margin-top: auto;
    padding: var(--sp4);
    border-top: 1px solid var(--line-subtle);
}

/* ── Hero slider ────────────────────────────────────────────────────────── */
.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: clamp(440px, 78vh, 680px);
    background: var(--bg);
}

/* Shorter on /menu than on the home hero — gives the two views a distinct
   rhythm instead of repeating the same full-viewport slider everywhere. */
.hero-slider--menu {
    min-height: clamp(280px, 44vh, 420px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-slow) var(--ease-brand);
}

.hero-slide.is-active { opacity: 1; pointer-events: auto; z-index: 1; }

.hero-slide__bg { position: absolute; inset: 0; overflow: hidden; background: var(--bg-alt); }

.hero-slide__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    will-change: transform;
}

.hero-slide.is-active .hero-slide__bg img { animation: hero-kenburns 8s linear forwards; }

@keyframes hero-kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }

.hero-slide--pan-a .hero-slide__bg img { transform-origin: top left; }
.hero-slide--pan-b .hero-slide__bg img { transform-origin: center; }
.hero-slide--pan-c .hero-slide__bg img { transform-origin: bottom right; }

.hero-slide__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, var(--bg) 0%, rgba(0, 0, 0, .15) 32%, rgba(0, 0, 0, .08) 55%),
        linear-gradient(100deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .42) 46%, rgba(0, 0, 0, .12) 78%);
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 720px;
    padding: var(--sp9) var(--sp4) var(--sp9);
}

.hero-slide__eyebrow {
    color: var(--fg-secondary);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: var(--sp3);
}

.hero-slide__title {
    font-size: var(--hero-title-size);
    line-height: 0.92;
    color: var(--fg-primary);
    word-break: break-word;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .4);
}

.hero-slider--menu .hero-slide__title { font-size: clamp(36px, 7vw, 76px); }
.hero-slider--menu .hero-slide__content { padding: var(--sp7) var(--sp4); }

.hero-slide__title--sub { font-size: clamp(30px, 6vw, 56px); }

.hero-slide__title--logo { line-height: 0; }

.hero-slide__wordmark {
    display: block;
    height: var(--hero-title-size);
    max-height: 96px;
    max-width: 100%;
    width: auto;
    filter: drop-shadow(0 4px 24px rgba(0, 0, 0, .4));
}

.hero-slide__subhead {
    margin-top: var(--sp4);
    max-width: 46ch;
    color: var(--fg-secondary);
    font-size: 15px;
}

.hero-slide__link { margin-top: var(--sp5); width: fit-content; background: var(--fg-primary); color: var(--bg); border: none; }

.hero-slider__progress {
    position: absolute;
    left: var(--sp4);
    right: var(--sp4);
    bottom: var(--sp4);
    z-index: 3;
    display: flex;
    gap: var(--sp2);
}

.hero-slider__bar {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, .25);
    position: relative;
    overflow: hidden;
    padding: 6px 0;
    display: flex;
    align-items: center;
}

.hero-slider__bar::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: rgba(255, 255, 255, .25); }

.hero-slider__bar-fill {
    position: absolute;
    left: 0; top: 6px;
    height: 2px;
    width: 100%;
    background: var(--fg-primary);
    box-shadow: var(--shadow-glow);
    transform: scaleX(0);
    transform-origin: left;
}

.hero-slider__bar.is-active .hero-slider__bar-fill { transition: transform linear; }
.hero-slider__bar.is-done .hero-slider__bar-fill { transform: scaleX(1); transition: none; }

@media (prefers-reduced-motion: reduce) {
    .hero-slide.is-active .hero-slide__bg img { animation: none; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    padding: var(--sp8) var(--sp4) var(--sp6);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp7);
    max-width: 1080px;
    margin: 0 auto;
}

@media (min-width: 720px) {
    .site-footer__grid { grid-template-columns: repeat(4, 1fr); }
}

.site-footer__name {
    font-family: var(--font-display);
    color: var(--fg-primary);
    font-size: 22px;
    letter-spacing: 0.02em;
}

.site-footer__note { margin-top: var(--sp3); color: var(--fg-secondary); font-size: 13.5px; }

.site-footer h3 {
    display: flex;
    align-items: center;
    gap: var(--sp2);
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 20px;
    letter-spacing: 0.02em;
    color: var(--fg-primary);
    margin-bottom: var(--sp4);
}

.site-footer__heading-icon { width: 16px; height: 16px; color: var(--fg-tertiary); }

.site-footer__nav ul, .site-footer__hours ul { display: flex; flex-direction: column; gap: var(--sp2); }
.site-footer__nav a { color: var(--fg-secondary); font-size: 14px; }
.site-footer__nav a:hover { color: var(--fg-primary); }

.site-footer__hours li {
    display: flex;
    justify-content: space-between;
    gap: var(--sp3);
    font-size: 13px;
    color: var(--fg-secondary);
    border-bottom: 1px solid var(--line-subtle);
    padding-bottom: var(--sp2);
}

.site-footer__hours li.is-closed { color: var(--fg-tertiary); }

.site-footer__location p { color: var(--fg-secondary); font-size: 13.5px; margin-bottom: var(--sp3); }

.site-footer__map {
    position: relative;
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
    background: var(--surface-1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/*
 * The unkeyed Google Maps `output=embed` iframe swallows scroll/touch
 * gestures and can hijack an in-page scroll as a click-through to Maps.
 * It starts non-interactive (pointer-events: none) so page scroll always
 * passes through; the overlay button below is the only way to opt in.
 */
.site-footer__map iframe { width: 100%; height: 100%; border: 0; filter: var(--image-filter); pointer-events: none; }

.site-footer__map-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp2);
    padding: var(--sp4);
    text-align: center;
    background: rgba(0, 0, 0, .28);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    border: none;
}

.site-footer__map-overlay .icon { width: 22px; height: 22px; }

.site-footer__map.is-map-active .site-footer__map-overlay { display: none; }
.site-footer__map.is-map-active iframe { pointer-events: auto; }

.site-footer__social { display: flex; gap: var(--sp3); }
.site-footer__social a {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--fg-primary);
    transition: background-color var(--dur-fast) var(--ease-brand);
}
.site-footer__social a:hover { background: var(--surface-1); }

.site-footer__cta { margin: var(--sp7) auto 0; max-width: 1080px; }

.site-footer__bottom {
    max-width: 1080px;
    margin: var(--sp7) auto 0;
    padding-top: var(--sp6);
    border-top: 1px solid var(--line-subtle);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp5);
}

.site-footer__url { color: var(--fg-tertiary); font-size: 11px; }

.site-footer__credits { color: var(--fg-tertiary); font-size: 12px; }

/* ── Bottom nav (mobile) ────────────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: flex;
    height: var(--bottom-nav-height);
    background: var(--surface-1);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--fg-tertiary);
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color var(--dur-fast) var(--ease-brand);
}

.bottom-nav__icon { width: 21px; height: 21px; }

.bottom-nav__item.is-active { color: var(--fg-primary); }

@media (min-width: 900px) {
    .bottom-nav { display: none; }
}

/*
 * Every page that renders the bottom nav needs room at the bottom so its
 * own content (and the floating WhatsApp button) never sits underneath the
 * fixed bar. `:has()` scopes this to exactly those pages without having to
 * thread a body class through every controller.
 */
body:has(> .bottom-nav) {
    padding-bottom: var(--bottom-nav-height);
}

@media (min-width: 900px) {
    body:has(> .bottom-nav) { padding-bottom: 0; }
}
