/* ============================================================
   PINTXO CHILD THEME — menus.css
   Styles for: menus hero, tab selector, PDF viewer,
               download link.
   Depends on: header.css (for --color-* and --font-* tokens)
   ============================================================ */

/* ============================================================
   MENUS HERO
   ============================================================ */
.menus-hero {
    position: relative;
    height: clamp(340px, 52vh, 540px);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/*
 * Background image is passed via CSS custom property set inline
 * in menus.php: style="--menus-hero-bg: url('…');"
 * The element is pushed -8% on each edge so the parallax
 * translateY never reveals a gap at the top or bottom.
 */
.menus-hero__bg {
    position: absolute;
    inset: -8%;
    background-image: var(--menus-hero-bg);
    background-size: cover;
    background-position: center 40%;
    will-change: transform;
    z-index: 0;
}

/* Dark gradient — same feel as the landing-page carousel */
.menus-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(10, 4, 4, 0.90) 0%,
            rgba(10, 4, 4, 0.62) 55%,
            rgba(10, 4, 4, 0.28) 100%);
    z-index: 1;
}

.menus-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
}

.menus-hero__title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.1;
    margin: 0;
}

.menus-hero__divider {
    width: 48px;
    height: 2px;
    background: var(--color-burgundy);
    margin: 10px auto 0px auto;
}

/* ============================================================
   MENUS SECTION
   ============================================================ */
.menus-section {
    background: var(--color-cream);
    padding: clamp(3rem, 6vw, 5.5rem) 1.25rem clamp(4rem, 8vw, 7rem);
}

.menus-section__inner {
    max-width: 980px;
    margin: 0 auto;
}

/* ============================================================
   TAB NAV
   ============================================================ */
.menus-tabs {
    position: relative;
    display: flex;
    justify-content: center;
    border-bottom: 1.5px solid rgba(115, 8, 4, 0.18);
    /* --color-burgundy at low opacity */
    margin-bottom: 2.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.menus-tabs::-webkit-scrollbar {
    display: none;
}

.menus-tab {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.9rem 1.6rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-light);
    transition: color var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    outline-style: none;
}

.menus-tab:hover {
    color: var(--color-burgundy);
}

.menus-tab--active {
    color: var(--color-burgundy);
}

/* Animated underline — positioned by JS */
.menus-tab-ink {
    position: absolute;
    bottom: -1.5px;
    left: 0;
    height: 2px;
    background: var(--color-burgundy);
    transition: left var(--transition), width var(--transition);
    pointer-events: none;
}

/* ============================================================
   PDF VIEWER
   ============================================================ */
.menus-viewer {
    position: relative;
    background: #ede8e1;
    border: 1px solid rgba(115, 8, 4, 0.12);
    min-height: 680px;
    overflow: hidden;

    /* Subtle lattice pattern — echoes the landing page diamond bg */
    background-image:
        linear-gradient(rgba(115, 8, 4, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(115, 8, 4, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
}

.menus-panel {
    display: none;
    width: 100%;
    min-height: 680px;
}

.menus-panel--active {
    display: block;
    animation: menus-fade-in 0.38s ease;
}

@keyframes menus-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Iframe injected by menus.js on first tab activation */
.menus-panel iframe {
    display: block;
    width: 100%;
    height: 680px;
    border: none;
}

/* Loading spinner shown while PDF iframe loads */
.menus-viewer__loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.menus-viewer__loader.is-loading {
    opacity: 1;
}

.menus-viewer__loader::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 2px solid rgba(115, 8, 4, 0.2);
    border-top-color: var(--color-burgundy);
    border-radius: 50%;
    animation: menus-spin 0.75s linear infinite;
}

@keyframes menus-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   DOWNLOAD LINK
   ============================================================ */
.menus-download {
    margin-top: 1.25rem;
    text-align: right;
}

.menus-download__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-burgundy);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color var(--transition), border-color var(--transition);
}

.menus-download__link:hover {
    color: var(--color-burgundy-light);
    border-bottom-color: var(--color-burgundy-light);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
    .menus-tab {
        padding: 0.8rem 1.2rem;
        font-size: 0.68rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .menus-tabs {
        justify-content: flex-start;
    }

    .menus-viewer,
    .menus-panel {
        min-height: 480px;
    }

    .menus-panel iframe {
        height: 480px;
    }

    .menus-download {
        text-align: center;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .menus-tab {
        padding: 0.75rem 0.9rem;
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }
}