/* ========================================
   Las 3 Estaciones — Menu Page
   QR-friendly, responsive, bilingual
   ======================================== */

:root {
    color-scheme: light;

    /* Fixed brand colours — identical in both themes */
    --black: #1a1a1a;
    --white: #fff;
    --brown: #5C3D2E;
    --brown-dark: #3E2723;
    --gold: #C8A96E;

    /* Theme tokens — swapped by dark mode */
    --surface: #ffffff;
    --cream: #faf8f5;
    --light-bg: #f8f6f3;
    --heading: #1a1a1a;
    --dark: #2c2c2c;
    --text: #4a4a4a;
    --text-light: #6f6a64;   /* 5.4:1 on white, passes WCAG AA */
    --border: #e8e4df;
    --accent: #5C3D2E;
    --btn-bg: #1a1a1a;
    --btn-fg: #ffffff;

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Nunito', -apple-system, sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --surface: #1e1a17;
    --cream: #14110f;
    --light-bg: #1a1613;
    --heading: #f2ede7;
    --dark: #e4ded7;
    --text: #c6bfb6;
    --text-light: #9a9188;
    --border: #363029;
    --accent: #d9ae86;
    --btn-bg: #f2ede7;
    --btn-fg: #1a1512;
}

/* Text size levels chosen in the accessibility panel */
:root[data-font="1"] { font-size: 112.5%; }
:root[data-font="2"] { font-size: 125%; }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ========================================
   HEADER
   ======================================== */
.menu-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-logo img {
    height: 48px;
    width: auto;
}

.menu-header-text {
    flex: 1;
}

.menu-header-text h1 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.2;
}

.menu-header-text p {
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-top: 2px;
}

/* Language Switch */
.lang-switch {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.lang-btn {
    padding: 6px 10px;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    background: var(--surface);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:first-child {
    border-radius: 20px 0 0 20px;
}

.lang-btn:last-child {
    border-radius: 0 20px 20px 0;
}

.lang-btn:not(:first-child) {
    border-left: none;
}

.lang-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.lang-btn:hover + .lang-btn {
    border-left-color: var(--accent);
}

.lang-btn.active {
    background: var(--brown);
    color: var(--white);
    border-color: var(--accent);
}

.lang-btn.active + .lang-btn {
    border-left-color: var(--accent);
}

/* ========================================
   CATEGORY NAV
   ======================================== */
.menu-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 89px;
    z-index: 40;
}

.menu-nav::-webkit-scrollbar { display: none; }

.menu-nav-btn {
    flex: 0 0 auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-light);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.menu-nav-btn i {
    font-size: 1rem;
    margin-bottom: 2px;
}

.menu-nav-btn:hover { color: var(--accent); }

.menu-nav-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ========================================
   MENU CONTENT
   ======================================== */
.menu-content {
    flex: 1;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.menu-category {
    display: none;
}

.menu-category.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.category-header {
    padding: 32px 0 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.category-header h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--heading);
    margin-bottom: 6px;
}

.category-header p {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

/* Items */
.items-list {
    display: flex;
    flex-direction: column;
}

.item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-info h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 3px;
}

.item-info p {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
}

.item-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    padding-top: 2px;
}

.extras-note {
    text-align: center;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* ========================================
   FOOTER
   ======================================== */
.menu-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-info p {
    font-size: 0.8rem;
    color: var(--text-light);
}

.footer-info a {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    transition: opacity 0.2s;
}

.footer-info a:hover { opacity: 0.7; }

.footer-back {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-light);
    transition: color 0.2s;
}

.footer-back:hover { color: var(--accent); }

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet+ */
@media (min-width: 768px) {
    .menu-header {
        padding: 24px 40px;
        justify-content: center;
        gap: 20px;
    }

    .menu-logo img { height: 56px; }

    .menu-header-text h1 { font-size: 1.8rem; }

    .menu-nav {
        justify-content: center;
        gap: 8px;
        padding: 0 40px;
    }

    .menu-nav-btn {
        flex: none;
        padding: 16px 32px;
        flex-direction: row;
        gap: 8px;
        font-size: 0.75rem;
    }

    .menu-content { padding: 0 40px 60px; }

    .category-header {
        padding: 48px 0 32px;
    }

    .category-header h2 { font-size: 2.8rem; }

    .item { padding: 22px 0; }
    .item-info h3 { font-size: 1.25rem; }
    .item-info p { font-size: 0.85rem; }
}

/* Desktop */
@media (min-width: 1024px) {
    .menu-header {
        padding: 28px 60px;
    }

    .menu-content {
        max-width: 800px;
        padding: 0 60px 80px;
    }

    .items-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 48px;
    }

    .item {
        border-bottom: 1px solid var(--border);
    }
}

/* Small phones */
@media (max-width: 380px) {
    .menu-header { padding: 16px 16px; gap: 12px; }
    .menu-logo img { height: 40px; }
    .menu-header-text h1 { font-size: 1.25rem; }
    .menu-content { padding: 0 16px 32px; }
    .category-header h2 { font-size: 1.8rem; }
    .menu-nav { top: 72px; }
    .lang-btn { padding: 5px 8px; font-size: 0.6rem; }
}

/* ========================================
   ACCESIBILIDAD — tema y tamaño de texto
   ======================================== */
.a11y {
    position: fixed;
    left: 30px;
    bottom: 30px;
    z-index: 95;
}

.a11y-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transition: background 0.3s, transform 0.3s;
}

.a11y-toggle:hover {
    background: var(--accent);
    color: var(--white);
    transform: scale(1.08);
}

.a11y-panel {
    position: absolute;
    left: 0;
    bottom: 56px;
    width: 232px;
    padding: 18px 18px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 16px 44px rgba(0,0,0,0.20);
}

.a11y-panel[hidden] { display: none; }

.a11y-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 14px;
}

.a11y-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
}

.a11y-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.a11y-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 4px;
    font-family: var(--font-sans);
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text);
    background: var(--light-bg);
    border: 1.5px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
}

.a11y-btn i { font-size: 0.9rem; }

.a11y-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.a11y-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.a11y-btn--font { padding: 10px 4px; }
.a11y-btn--font span { line-height: 1; font-weight: 700; }

.a11y-reset {
    width: 100%;
    padding: 8px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-light);
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.a11y-reset:hover { color: var(--accent); border-color: var(--accent); }

/* Stays clear of the mobile bottom nav */
@media (max-width: 768px) {
    .a11y { left: 16px; bottom: 78px; }
    .a11y-panel { width: 216px; }
}


/* The menu page has no bottom nav, so the button can sit lower */
@media (max-width: 768px) {
    .a11y { bottom: 20px; }
}
