/* ============================================================
   MEDITERRANEAN THEME v1
   mi-sitio.es - tenant public sites
   Palette: Fraunces (display) + Inter (body)
   ============================================================ */

/* Decorative script font for menu section titles (self-hosted, licensed).
   Falls back to the Google font Allison, then generic cursive. */
@font-face {
    font-family: 'Autography';
    src: url('../fonts/Autography.woff2') format('woff2');
    font-display: swap;
}

/* --- Custom properties --- */
:root {
    --color-base:         #F5EFE6;
    --color-primary:      #2A6F97;
    --color-accent-warm:  #C66B3D;
    --color-accent-cool:  #8A9B6E;
    --color-cta:          #F2A65A;
    --color-ink:          #2A2A28;
    --color-muted:        #6B6660;
    --color-border:       #D8CFC1;
    --color-error:        #A8412A;
    --color-success:      #5C8F3C;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;
    --font-script:  'Autography', 'Allison', cursive;

    --radius-sm: 6px;
    --radius-md: 12px;

    /* Flat by default; the `elevation` token raises these for soft/lifted themes
       (card surfaces stay hairline on flat themes and legacy/un-themed sites). */
    --shadow-card:       none;
    --shadow-card-hover: none;

    --max-width:      1100px;
    --gutter:         clamp(24px, 4vw, 48px);
    --section-pad:    clamp(3.5rem, 7vw, 5.5rem);
    --header-height:  4rem;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--color-ink);
    background: var(--color-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* --- Accessibility --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    z-index: 999;
    transition: top 0.1s;
}
.skip-link:focus { top: 0; }

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Scroll-reveal - only runs when user has no motion preference.
   JS assigns [data-reveal] at runtime; no PHP changes needed. */
@media (prefers-reduced-motion: no-preference) {
    .module[data-reveal] {
        opacity: 0;
        transform: translateY(22px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    .module[data-reveal].is-revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Offset sticky header for in-page anchors */
section[id] { scroll-margin-top: calc(var(--header-height) + 1rem); }

/* --- Typography --- */
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-accent-warm); text-decoration: underline; }

/* --- Site header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: color-mix(in srgb, var(--section-bg, var(--color-header-bg, var(--color-base))) 96%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.site-header__logo {
    display: block;
    max-height: 2.5rem;
    width: auto;
    object-fit: contain;
}
.site-header__logo--size-small  { max-height: 1.75rem; }
.site-header__logo--size-medium { max-height: 2.5rem;  }
.site-header__logo--size-large  { max-height: 3.25rem; }
.site-header__brand {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--section-text-color, var(--color-primary));
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.site-header__brand:hover { color: var(--section-accent-color, var(--color-accent-warm)); text-decoration: none; }
.site-header__nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex: 1 1 0;
    min-width: 0;
    overflow: visible;
}
.site-nav__link {
    position: relative;
    font-size: var(--nav-link-size, 0.875rem);
    font-weight: 500;
    color: var(--nav-link-color, var(--section-text-color, var(--color-muted)));
    text-transform: var(--nav-link-transform, none);
    letter-spacing: var(--nav-link-tracking, normal);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}
/* Accent underline. Inert by default: --nav-underline is 0 unless a theme's
   nav_style token sets it to 1, so 'plain' / un-themed sites keep the old
   colour-fade-only hover with no visual change. */
.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.35rem;
    height: 2px;
    background: var(--section-accent-color, var(--color-accent-warm));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.site-nav__link:hover { color: var(--section-accent-color, var(--color-primary)); text-decoration: none; }
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(var(--nav-underline, 0)); }

/* "Más ▾" overflow dropdown */
.site-nav__more {
    position: relative;
    flex-shrink: 0;
}
.site-nav__more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.375rem 0.625rem;
    border: 1.5px solid color-mix(in srgb, var(--section-text-color, var(--color-muted)) 30%, transparent);
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--section-text-color, var(--color-muted));
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.site-nav__more-btn:hover { color: var(--section-accent-color, var(--color-primary)); border-color: currentColor; }
.site-nav__more-btn svg { width: 0.75rem; height: 0.75rem; transition: transform 0.2s; }
.site-nav__more.is-open .site-nav__more-btn svg { transform: rotate(180deg); }
.site-nav__more-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 10rem;
    background: color-mix(in srgb, var(--section-bg, var(--color-base)) 98%, transparent);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(42,42,40,0.12);
    list-style: none;
    margin: 0;
    padding: 0.375rem 0;
    z-index: 200;
}
.site-nav__more.is-open .site-nav__more-menu { display: block; }
.site-nav__more-link {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--section-text-color, var(--color-ink));
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.site-nav__more-link:hover {
    background: color-mix(in srgb, var(--section-accent-color, var(--color-primary)) 8%, transparent);
    color: var(--section-accent-color, var(--color-primary));
}

/* Mobile hamburger - only shown ≤ 768px (see RESPONSIVE) */
.site-header__nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1.5px solid color-mix(in srgb, var(--section-text-color, var(--color-muted)) 35%, transparent);
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--section-text-color, var(--color-muted));
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s;
}
.site-header__nav-toggle:hover,
.site-header__nav-toggle[aria-expanded="true"] {
    color: var(--section-accent-color, var(--color-primary));
    border-color: currentColor;
}
.site-header__nav-toggle svg { width: 1.25rem; height: 1.25rem; }

/* Click-to-call phone in header */
.site-header__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.875rem;
    border: 1.5px solid color-mix(in srgb, var(--section-text-color, var(--color-muted)) 35%, transparent);
    border-radius: 2rem;
    color: var(--section-text-color, var(--color-muted));
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.site-header__phone:hover {
    color: var(--section-accent-color, var(--color-primary));
    border-color: currentColor;
    background: color-mix(in srgb, var(--section-accent-color, var(--color-primary)) 6%, transparent);
    text-decoration: none;
}
.site-header__phone svg { width: 0.875rem; height: 0.875rem; flex-shrink: 0; }

/* --- Module base --- */
.module {
    padding: var(--section-pad) var(--gutter);
    font-family: var(--section-body-font, var(--font-body));
    color: var(--section-text-color, var(--color-ink));
}
.module__inner { max-width: var(--max-width); margin: 0 auto; }
.module__title {
    font-family: var(--section-heading-font, var(--font-display));
    font-size: 2.5rem;
    font-weight: var(--heading-weight, 500);
    text-transform: var(--heading-transform, none);
    letter-spacing: var(--heading-tracking, normal);
    text-align: var(--heading-align, left);
    color: var(--section-accent-color, var(--color-primary));
    line-height: 1.15;
    margin-bottom: 2.5rem;
}
/* Optional eyebrow/kicker above the title, pulled from the section's
   data-kicker attribute. Inert by default (--kicker-display: none) so plain /
   un-themed / legacy sites show the title alone - no visual change. The explicit
   per-property vars override the heading's own transform/tracking inheritance.
   See THEME_STYLE_AXES.md (section_head token). */
.module__title::before {
    content: attr(data-kicker);
    display: var(--kicker-display, none);
    font-family: var(--kicker-font, var(--font-body));
    font-size: var(--kicker-size, 0.8rem);
    font-weight: var(--kicker-weight, 600);
    line-height: 1.1;
    text-transform: var(--kicker-transform, uppercase);
    letter-spacing: var(--kicker-tracking, 0.18em);
    color: var(--section-accent-color, var(--color-accent-warm));
    margin-bottom: 0.6rem;
}
/* Generic in-content links get the accent colour - but NOT the hero CTAs,
   which are buttons and own their colour (.module a would otherwise win on
   specificity and override the outlined button's white text). */
.module a:not(.hero__cta) { color: var(--section-accent-color, var(--color-primary)); }

/* ============================================================
   HERO
   ============================================================ */
.module--hero {
    padding: 0;
    position: relative;
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: var(--hero-justify, center);
    background: var(--section-bg, var(--color-base));
    overflow: hidden;
}
.hero__media {
    position: absolute;
    inset: 0;
}
.hero__img,
.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.hero__slide.is-active { opacity: 1; }
.hero__img-placeholder {
    width: 100%;
    height: 100%;
    background-color: #7B8D9B;
    background-image: url('../img/hero-mediterranean.svg');
    background-size: cover;
    background-position: center center;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(42, 42, 40, var(--hero-overlay-opacity, 0.28));
}
.module--hero.has-image .hero__overlay,
.module--hero.has-video .hero__overlay {
    background: rgba(42, 42, 40, var(--hero-overlay-opacity, 0.45));
}

.hero__logo {
    z-index: 2;
    max-height: 3.5rem;
    max-width: 12rem;
    width: auto;
    object-fit: contain;
}
.hero__logo--size-small  { max-height: 2.25rem; max-width: 8rem;  }
.hero__logo--size-medium { max-height: 3.5rem;  max-width: 12rem; }
.hero__logo--size-large  { max-height: 5rem;    max-width: 16rem; }

/* Overlay placement - floating in the upper corner of the hero. */
.hero__logo--overlay {
    position: absolute;
    top: 1.5rem;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
}
.hero__logo--overlay-left   { left:  1.75rem; }
.hero__logo--overlay-right  { right: 1.75rem; }
.hero__logo--overlay-center { left: 50%; transform: translateX(-50%); }

/* Inline placement - part of the hero's vertical content stack. */
.hero__logo--inline {
    position: static;
    display: block;
    margin: 0 auto 1.25rem;
    filter: drop-shadow(0 1px 6px rgba(0,0,0,0.35));
}
.hero__logo--above-subhead { margin-top: 0.5rem; }
.hero__logo--above-cta     { margin-top: 0.75rem; }

.hero__body {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--hero-body-max, 52rem);
    padding: 4rem var(--gutter);
    text-align: var(--hero-text-align, center);
}
/* Applied automatically when an inline hero logo is present:
   distributes logo / headline / subhead / CTA vertically across the hero. */
.hero__body--spaced {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 76vh;
    padding-top: 3rem;
    padding-bottom: 3rem;
}
.hero__body--spaced .hero__subhead { margin-bottom: 0; }
.hero__headline {
    font-family: var(--section-heading-font, var(--font-display));
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: var(--heading-weight, 500);
    text-transform: var(--heading-transform, none);
    letter-spacing: var(--heading-tracking, normal);
    line-height: 1.1;
    color: #fff;
    margin-bottom: 0.875rem;
    max-width: var(--hero-headline-max, none);
}
.hero__subhead {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 2.25rem;
    line-height: 1.55;
    max-width: var(--hero-subhead-max, 40rem);
    margin-left: var(--hero-content-ml, auto);
    margin-right: auto;
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: var(--hero-ctas-justify, center);
}
.hero__cta {
    display: inline-flex;
    align-items: center;
    background: var(--cta-color, var(--color-cta));
    color: var(--color-ink);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-button, var(--radius-md));
    text-decoration: none;
    transition: background 0.2s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.2s;
    box-shadow: var(--shadow-button, 0 2px 0 rgba(42, 42, 40, 0.1));
}
.hero__cta:hover {
    color: var(--color-ink);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 42, 40, 0.18);
}
.hero__cta--outlined {
    background: transparent;
    color: var(--cta-color, #fff);
    border: 2px solid var(--cta-color, #fff);
    box-shadow: none;
    padding: calc(0.875rem - 2px) calc(2rem - 2px);
}
.hero__cta--outlined:hover {
    background: color-mix(in srgb, var(--cta-color, #fff) 14%, transparent);
    color: var(--cta-color, #fff);
    box-shadow: none;
}
.hero__cta--text {
    background: transparent;
    color: var(--cta-color, #fff);
    box-shadow: none;
    padding: 0.5rem 0;
}
.hero__cta--text:hover {
    background: transparent;
    color: var(--cta-color, #fff);
    text-decoration: underline;
    box-shadow: none;
}

/* --- Demo-only hero background switcher (vídeo / fotos) --- */
.hero__demo-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.hero__demo-layer.is-active { opacity: 1; }
.hero__demo-layer--video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero__demo-switch {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
}
.hero__demo-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.hero__demo-switch-btn svg { width: 1rem; height: 1rem; }
.hero__demo-switch-btn.is-active {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
}
.hero__demo-switch-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
@media (max-width: 600px) {
    .hero__demo-switch-btn span { display: none; }
    .hero__demo-switch-btn { padding: 0.45rem; }
}

/* ============================================================
   MENÚ DEL DÍA
   ============================================================ */
.module--menu-del-dia {
    background: var(--section-bg, #FDF6EC);
    border-top: 4px solid var(--color-cta);
}
.mdd__header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin-bottom: 2.5rem;
}
.mdd__title {
    font-family: var(--section-heading-font, var(--font-display));
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--section-accent-color, var(--color-primary));
    line-height: 1.15;
}
.mdd__price {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    flex-wrap: wrap;
}
.mdd__price-amount {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--color-accent-warm);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.mdd__price-label {
    font-size: 0.875rem;
    color: var(--color-muted);
}
.mdd__courses {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 3rem;
    margin-bottom: 2.5rem;
}
.mdd__course-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}
.mdd__options {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mdd__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-ink);
}
.mdd__option:last-child { border-bottom: none; }
.mdd__option--sold-out {
    color: var(--color-muted);
}
.mdd__option--sold-out span:first-child { text-decoration: line-through; }
.mdd__tag-agotado {
    font-size: 0.75rem;
    font-weight: 500;
    background: #fee2e2;
    color: var(--color-error);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.mdd__footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.mdd__drinks {
    font-size: 0.9375rem;
    color: var(--color-muted);
}
.mdd__notes {
    font-size: 0.875rem;
    color: var(--color-muted);
    font-style: italic;
}
.mdd__off-notice {
    color: var(--color-muted);
    font-style: italic;
    font-size: 1.0625rem;
}

/* ============================================================
   MENU (CARTA) - designed template with allergen icons + legend
   ============================================================ */
.module--menu {
    background: var(--section-bg, #fbfaf6);
    position: relative;
    overflow: hidden;
}
.menu-leaf-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}
.menu-page {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.menu__title { text-align: center; margin-bottom: 2.5rem; }

.menu-section { margin-top: 2.5rem; }
.menu-section:first-of-type { margin-top: 0; }
.menu-section__heading {
    display: flex;
    align-items: flex-end;
    margin-bottom: 1rem;
}
.menu-section__name {
    font-family: var(--section-heading-font, var(--font-script, var(--font-display)));
    font-size: 3.75rem;
    line-height: 0.85;
    color: var(--section-accent-color, var(--color-ink));
    font-weight: 400;
    letter-spacing: 0.5px;
    transform: translateY(2px);
    padding-left: 0.4rem;
    flex-shrink: 0;
}
.menu-section__rule {
    flex: 1;
    border-bottom: 1.2px solid var(--color-ink);
    margin-left: 0.75rem;
    margin-bottom: 1.1rem;
}
.menu-section__desc {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
    padding-left: 2.25rem;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-item {
    padding: 0.45rem 0 0.55rem 2.25rem;
    position: relative;
}
.menu-new-badge {
    position: absolute;
    left: 0.4rem;
    top: 0.6rem;
    width: 1.15rem;
    height: 1.15rem;
}
.menu-item__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.1rem;
}
.menu-item__name {
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.2px;
    color: var(--color-ink);
    text-transform: uppercase;
}
.menu-item__price {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-ink);
    font-variant-numeric: tabular-nums;
}
.menu-item__variant {
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--color-muted);
}
.menu-item__gf {
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.3px;
    color: var(--color-muted);
    text-transform: uppercase;
}
.menu-item__desc {
    font-size: 0.8125rem;
    color: var(--color-muted);
    line-height: 1.4;
    margin-top: 0.1rem;
    padding-right: 0.4rem;
}
.menu-item--unavailable .menu-item__name,
.menu-item--unavailable .menu-item__price {
    text-decoration: line-through;
    color: var(--color-muted);
}

.menu-allergens {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.25rem;
    vertical-align: middle;
}
.menu-allergen {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    border-radius: 50%;
    display: inline-block;
}

/* Section note callout (e.g. "Guarniciones: arroz, verduras... 2€") */
.menu-section__note {
    margin: 1.5rem 0 0;
    border: 1px solid var(--color-ink);
    padding: 0.7rem 1.2rem;
    text-align: center;
    font-size: 0.8125rem;
    letter-spacing: 0.2px;
    color: var(--color-ink);
}

/* EU-14 allergen legend at the bottom of every menu */
.menu-legend {
    margin-top: 3rem;
    border: 1px solid var(--color-ink);
    padding: 0.9rem 0.9rem 1.1rem;
    position: relative;
}
.menu-legend__title-wrap {
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 0.4rem;
}
.menu-legend__title {
    font-family: var(--section-heading-font, var(--font-script, var(--font-display)));
    font-size: 2.75rem;
    background: var(--section-bg, #fbfaf6);
    padding: 0 1.1rem;
    line-height: 1;
    display: inline-block;
    color: var(--color-ink);
}
.menu-legend__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.4rem 0 0;
}
.menu-legend__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    gap: 0.2rem;
}
.menu-legend__icon { width: 2.25rem; height: 2.25rem; }
.menu-legend__label {
    font-size: 0.45rem;
    font-weight: 600;
    color: var(--color-ink);
    letter-spacing: 0.2px;
    text-transform: uppercase;
    line-height: 1.15;
    word-break: break-word;
    hyphens: auto;
}

/* ============================================================
   ABOUT (Nosotros)
   ============================================================ */
.module--about { background: var(--section-bg, #fff); }
.about__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.module--about:not(.module--about--has-image) .about__layout { grid-template-columns: 1fr; }
.about__img {
    width: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-card, none);
}
.about__body {
    color: var(--section-text-color, var(--color-ink));
    font-family: var(--section-body-font, var(--font-body));
}
.about__lead {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 1.25rem;
    color: var(--section-accent-color, var(--color-primary));
    font-family: var(--section-heading-font, var(--font-display));
}
.about__body p + p { margin-top: 1rem; }

/* ============================================================
   PHILOSOPHY (Nuestra Filosofía)
   ============================================================ */
.module--philosophy { background: var(--section-bg, var(--color-base)); }
.philosophy__quote {
    margin: 0 auto 2rem;
    padding: 1.75rem 0;
    max-width: 42rem;
    border-top:    2px solid var(--section-accent-color, var(--color-cta));
    border-bottom: 2px solid var(--section-accent-color, var(--color-cta));
    font-family: var(--section-heading-font, var(--font-display));
    font-size: 1.75rem;
    line-height: 1.3;
    color: var(--section-text-color, var(--color-ink));
    text-align: center;
}
.philosophy__quote cite {
    display: block;
    margin-top: 0.875rem;
    font-size: 0.9375rem;
    font-style: normal;
    color: var(--section-accent-color, var(--color-primary));
}
.philosophy__body {
    font-family: var(--section-body-font, var(--font-body));
    color: var(--section-text-color, var(--color-ink));
    max-width: 42rem;
    margin: 0 auto;
    text-align: center;
}
.philosophy__body p + p { margin-top: 1rem; }

/* ============================================================
   HOURS
   ============================================================ */
.module--hours { background: var(--section-bg, var(--color-base)); }
.hours-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 32rem;
}
.hours-row__day,
.hours-row__slots {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}
.hours-row:last-child .hours-row__day,
.hours-row:last-child .hours-row__slots { border-bottom: none; }
.hours-row__day {
    font-weight: 500;
    padding-right: 2.5rem;
    color: var(--color-ink);
    width: 10rem;
}
.hours-row__slots { color: var(--color-ink); }
.hours-row--closed .hours-row__day,
.hours-row--closed .hours-row__slots { color: var(--color-muted); }

/* ============================================================
   GALLERY
   ============================================================ */
.module--gallery { background: var(--section-bg, #fff); }
.gallery-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}
.gallery-track::-webkit-scrollbar { height: 5px; }
.gallery-track::-webkit-scrollbar-track { background: transparent; }
.gallery-track::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
.gallery-item {
    flex: 0 0 auto;
    width: clamp(200px, 34vw, 260px);
    scroll-snap-align: start;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card, none);
    transition: box-shadow 0.25s ease;
}
.gallery-item:hover { box-shadow: var(--shadow-card-hover, var(--shadow-card, none)); }
.gallery-item__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
    transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-item__img { transform: scale(1.03); }
.gallery-item__placeholder {
    aspect-ratio: 1 / 1;
    background: var(--color-base);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.gallery-item__caption {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
    padding: 0 0.25rem;
}
.gallery--empty {
    color: var(--color-muted);
    font-style: italic;
}

/* ============================================================
   RESERVATIONS
   ============================================================ */
.module--reservations { background: var(--section-bg, var(--color-primary)); text-align: center; }
.module--reservations .module__title { color: #fff; }
.reservations__cta {
    display: inline-flex;
    align-items: center;
    background: var(--color-cta);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.0625rem;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-button, var(--radius-md));
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: var(--shadow-button, 0 2px 0 rgba(42, 42, 40, 0.15));
}
.reservations__cta:hover {
    background: #e89640;
    color: var(--color-ink);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42, 42, 40, 0.25);
}
.reservations__lead {
    color: #fff;
    font-size: 1.125rem;
    margin: 0 0 1.75rem;
    opacity: 0.85;
}
.reservations__contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.reservations__contact-list > li {
    flex: 1 1 0;
    min-width: 14rem;
    max-width: 28rem;
    display: flex;
}
.reservations__contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 2rem;
    width: 100%;
    min-width: 0;
    border-radius: var(--radius-button, var(--radius-md));
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.0625rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: var(--shadow-button, 0 2px 0 rgba(42, 42, 40, 0.15));
}
.reservations__contact-link svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}
.reservations__contact-link--phone {
    background: var(--color-cta);
    color: var(--color-ink);
}
.reservations__contact-link--phone:hover {
    background: #e89640;
    color: var(--color-ink);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42, 42, 40, 0.25);
}
.reservations__contact-link--email {
    background: rgba(255,255,255,0.92);
    color: var(--color-ink, #2a2a28);
    border: none;
}
.reservations__contact-link--email:hover {
    background: #fff;
    color: var(--color-ink, #2a2a28);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ============================================================
   LOCATION
   ============================================================ */
.module--location { background: var(--section-bg, var(--color-base)); }
.location-address {
    font-style: normal;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}
.location-address__line { display: block; }
.location-note {
    font-size: 0.9375rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--color-border);
    line-height: 1.55;
}
.location-note + .location-note { margin-top: 0.75rem; }
.location-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.location-map-link:hover {
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
}
.location-map-embed {
    position: relative;
    width: 100%;
    height: 360px;
    margin-top: 1.75rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* ============================================================
   CONTACT
   ============================================================ */
.module--contact { background: var(--section-bg, var(--color-ink)); }
.module--contact .module__title { color: var(--color-base); }
.contact-list { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }
.contact-item { font-size: 1.0625rem; }
/* Scoped under .module--contact so these win over the generic
   `.module a:not(.hero__cta)` accent-colour rule (which is more specific than a
   bare `.contact-item a` and would otherwise paint the dark primary on the dark
   contact background - invisible, e.g. Moderno's primary equals its ink). */
.module--contact .contact-item a {
    color: color-mix(in srgb, var(--color-base) 85%, transparent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.module--contact .contact-item a:hover {
    color: var(--color-cta);
    text-decoration: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--section-bg, var(--color-footer-bg, #1e1e1c));
    padding: 1.5rem var(--gutter);
}
.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-footer__name {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--section-text-color, color-mix(in srgb, var(--color-base) 70%, transparent));
}
.site-footer__copy {
    font-size: 0.8125rem;
    color: color-mix(in srgb, var(--section-text-color, var(--color-base)) 60%, transparent);
}
/* When the copyright is a link (footer_url set), match the "Creado con
   mi-sitio.es" badge link rather than the default link styling. */
a.site-footer__copy {
    color: var(--section-text-color, white);
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.15s;
}
a.site-footer__copy:hover {
    opacity: 0.7;
    text-decoration: none;
}
.site-footer__left {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.site-footer__social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.site-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--section-text-color, var(--color-base)) 30%, transparent);
    color: color-mix(in srgb, var(--section-text-color, var(--color-base)) 70%, transparent);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.site-footer__social a:hover {
    border-color: var(--section-text-color, var(--color-base));
    color: var(--section-text-color, var(--color-base));
    background: color-mix(in srgb, var(--section-text-color, var(--color-base)) 10%, transparent);
}
.site-footer__social svg {
    width: 1rem;
    height: 1rem;
}
.site-footer__badge {
    flex: 1;
    text-align: center;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
}
.site-footer__badge a {
    color: var(--section-text-color, white);
    text-decoration: none;
    opacity: 0.55;
    display: inline-block;
    transition: opacity 0.15s;
}
.site-footer__badge a:hover {
    opacity: 0.7;
    text-decoration: none;
}

/* ============================================================
   404
   ============================================================ */
.site-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1rem;
    text-align: center;
    padding: var(--gutter);
}
.site-404 h1 {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 500;
    color: var(--color-border);
    line-height: 1;
}
.site-404 p {
    font-size: 1.125rem;
    color: var(--color-muted);
}

/* ============================================================
   GALLERY LIGHTBOX
   ============================================================ */
.gallery-item__btn {
    display: block;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: zoom-in;
    border-radius: inherit;
    overflow: hidden;
}
.gallery-item__btn:focus-visible {
    outline: 2px solid var(--color-cta);
    outline-offset: 2px;
}
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.gallery-lightbox.is-visible { opacity: 1; pointer-events: auto; }
.gallery-lightbox__img {
    display: block;
    max-width: min(90vw, 1200px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.18s ease;
}
.gallery-lightbox__img.is-loading { opacity: 0; }
.gallery-lightbox__caption {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.875rem;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
.gallery-lightbox__counter {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    pointer-events: none;
}
.gallery-lightbox__btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 50%;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
}
.gallery-lightbox__btn:hover { background: rgba(255, 255, 255, 0.25); }
.gallery-lightbox__btn:focus-visible {
    outline: 2px solid var(--color-cta);
    outline-offset: 2px;
}
.gallery-lightbox__btn svg { width: 1.125rem; height: 1.125rem; }
.gallery-lightbox__btn--close { top: 1rem; right: 1rem; }
.gallery-lightbox__btn--prev {
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: background 0.15s, opacity 0.2s;
}
.gallery-lightbox__btn--next {
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: background 0.15s, opacity 0.2s;
}
.gallery-lightbox:hover .gallery-lightbox__btn--prev,
.gallery-lightbox:hover .gallery-lightbox__btn--next,
.gallery-lightbox__btn--prev:focus-visible,
.gallery-lightbox__btn--next:focus-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .gallery-lightbox,
    .gallery-lightbox__img,
    .gallery-lightbox__btn--prev,
    .gallery-lightbox__btn--next { transition: none; }
}
@media (max-width: 768px) {
    .gallery-lightbox__btn--prev { left: 0.5rem; opacity: 1; }
    .gallery-lightbox__btn--next { right: 0.5rem; opacity: 1; }
    .gallery-lightbox__caption { bottom: 4.5rem; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet - tighten nav gap */
@media (max-width: 900px) {
    .site-header__nav { gap: 1.25rem; }
}

/* Medium - hide phone label, show icon only */
@media (max-width: 1024px) {
    .site-header__phone-label { display: none; }
    .site-header__phone { padding: 0.4rem 0.5rem; }
}

/* Mobile - ≤ 768px */
@media (max-width: 768px) {
    /* Section nav becomes a dropdown panel under the sticky header, opened by
       the hamburger (site.js toggles .is-nav-open on .site-header). The
       priority-plus "Más" overflow is desktop-only - the panel lists every link. */
    .site-header__nav-toggle { display: inline-flex; order: 3; }
    .site-header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - 100%);
        overflow-y: auto;
        padding: 0.25rem 0;
        background: var(--section-bg, var(--color-header-bg, var(--color-base)));
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 8px 24px rgba(42,42,40,0.12);
    }
    .site-header.is-nav-open .site-header__nav { display: flex; }
    .site-header__nav .site-nav__more { display: none; }
    .site-header__nav .site-nav__link {
        padding: 0.75rem var(--gutter);
        font-size: 1rem;
    }
    .site-header__nav .site-nav__link::after { display: none; }
    /* The header can grow to two rows here (language switcher), taller than
       --header-height - keep jumped-to sections clear of it. */
    section[id] { scroll-margin-top: 6.5rem; }

    /* Two-row header: brand + phone on the top line, language switcher below.
       Cramming brand + 5 language codes + phone onto one ~360px line squished
       the brand (added when JIT translation introduced the switcher). Let the
       header grow to two rows instead - the switcher wraps to its own line. */
    .site-header { height: auto; }
    .site-header__inner {
        height: auto;
        flex-wrap: wrap;
        gap: 0.2rem 0.75rem;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }
    .site-header__brand { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .site-header__phone { order: 2; flex: 0 0 auto; }
    .site-header__lang { order: 4; flex-basis: 100%; gap: 0.1rem; }

    .module--hero { min-height: 75vh; }
    .hero__body { padding: 2.5rem var(--gutter) 3.5rem; }

    .mdd__courses { grid-template-columns: 1fr; gap: 1.75rem; }

    .about__layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .philosophy__quote { font-size: 1.375rem; padding: 1.25rem 0; }

    .contact-list { flex-direction: column; gap: 0.875rem; }

    .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .reservations__contact-list { flex-direction: column; align-items: stretch; }
    /* Let each button shrink to the screen and break long unbreakable tokens
       (e.g. a long reservations email) instead of forcing a min-content width
       that overflows the viewport. */
    .reservations__contact-list > li { min-width: 0; max-width: none; }
    .reservations__contact-link {
        min-width: 0;
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
        overflow-wrap: anywhere;
    }
}

/* Menu - tablet & smaller */
@media (max-width: 640px) {
    .menu-section__name { font-size: 2.75rem; }
    .menu-legend__title { font-size: 2rem; }

    /* Allergen legend: 14 items can't sit in one row on a phone (labels were
       crushed to ~6.8px vertical slivers). Switch to a 2-column grid with the
       icon beside a readable, left-aligned label. */
    .menu-legend__row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.55rem 0.9rem;
        justify-content: initial;
    }
    .menu-legend__item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.5rem;
    }
    .menu-legend__icon { width: 1.6rem; height: 1.6rem; flex-shrink: 0; }
    .menu-legend__label {
        font-size: 0.7rem;
        line-height: 1.2;
        word-break: normal;
        hyphens: none;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .menu-item__name, .menu-item__price { font-size: 0.8125rem; }
    .menu-item__desc { font-size: 0.75rem; }
}

/* ── Language switcher (header) ───────────────────────────────────────── */
.site-header__lang {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: wrap;
}
.site-lang__link {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: var(--color-muted, currentColor);
    opacity: 0.7;
    border-radius: var(--radius-button, var(--radius-md, 4px));
    transition: opacity 0.15s ease, color 0.15s ease;
}
.site-lang__link:hover { opacity: 1; }
.site-lang__link--active {
    opacity: 1;
    color: var(--color-primary, currentColor);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: default;
}
