/* ==========================================================================
   VENTA EL TÚNEL — Estilo Editorial de Alta Gastronomía (Inspiración Arzak)
   ========================================================================== */

:root, [data-theme="dark"] {
  /* Paleta cromática: Modo Noche & Fuego (Terrenal, carbón, piedra y acentos fuego) */
  --bg-deep: #0e0d0c;
  --bg-surface: #171514;
  --bg-surface-elevated: #211e1c;
  --bg-stone: #2b2724;
  --bg-card: rgba(26, 23, 22, 0.75);
  
  --text-main: #f5f2eb;
  --text-muted: #a69f95;
  --text-subtle: #736c64;
  
  --accent-amber: #d48238;
  --accent-flame: #b84f23;
  --accent-gold: #c9a86a;
  --accent-wine: #6e262c;
  
  --border-subtle: rgba(245, 242, 235, 0.08);
  --border-medium: rgba(245, 242, 235, 0.16);
  --border-accent: rgba(212, 130, 56, 0.4);

  --font-serif: 'Cormorant Garamond', 'Cinzel', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  --transition-smooth: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --container-max: 1380px;
  --header-height: 84px;
}

[data-theme="light"] {
  /* Paleta cromática: Modo Sol de Málaga (Cal Andaluza, Lino, Teja y Rojo Almagre) */
  --bg-deep: #faf7f2;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f3ede2;
  --bg-stone: #e8ded0;
  --bg-card: rgba(255, 255, 255, 0.94);
  
  --text-main: #1f1c1a;
  --text-muted: #5e564d;
  --text-subtle: #8a7f72;
  
  --accent-amber: #a83827; /* Rojo almagre tradicional de la fachada y la olla */
  --accent-flame: #bf4330;
  --accent-gold: #b38338; /* Dorado albero y aceite de oliva virgen */
  --accent-wine: #7d2621;
  
  --border-subtle: rgba(31, 28, 26, 0.08);
  --border-medium: rgba(31, 28, 26, 0.16);
  --border-accent: rgba(168, 56, 39, 0.4);
}

/* Reset y Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 1024px) {
  html {
    scrollbar-gutter: stable;
  }
}

body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  line-height: 1.6;
  background-color: var(--bg-deep);
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-stone);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-amber);
}

/* Tipografía Editorial */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-gold);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.85rem;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--accent-amber);
  opacity: 0.9;
}

/* ==========================================================================
   HEADER & NAVEGACIÓN PRINCIPAL
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-smooth);
  background: linear-gradient(180deg, rgba(14, 13, 12, 0.85) 0%, rgba(14, 13, 12, 0) 100%);
}

.site-header.scrolled {
  background: rgba(14, 13, 12, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
}

.brand-wrapper {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-main);
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-top: 0.35rem;
  font-weight: 500;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-gold);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 2px 4px;
  transition: var(--transition-fast);
}

.lang-btn.active, .lang-btn:hover {
  color: var(--text-main);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent-amber);
  color: #fff;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition-smooth);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 130, 56, 0.25);
}

.btn-primary:hover {
  background: #e28e44;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 130, 56, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--text-main);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border-medium);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-outline:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(201, 168, 106, 0.06);
}

.menu-toggle-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-main);
}

.menu-toggle-btn:hover {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.05);
}

.menu-toggle-btn span {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: var(--text-main);
  transition: var(--transition-fast);
}

/* ==========================================================================
   MENU OVERLAY DE PANTALLA COMPLETA (LEADERS / ESTILO ARZAK)
   ========================================================================== */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: rgba(12, 11, 10, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2.5rem 4rem;
}

.overlay-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.overlay-close {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.overlay-close:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.overlay-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

/* Estilo Leaders de Arzak: Título con puntos continuos y paginación */
.leaders-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.leaders-menu li a {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.leaders-menu .menu-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  font-weight: 300;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.leaders-menu .leader-dots {
  flex: 1;
  margin: 0 1.2rem;
  border-bottom: 1px dotted rgba(245, 242, 235, 0.2);
  height: 1px;
  align-self: center;
}

.leaders-menu .menu-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.leaders-menu li a:hover .menu-title {
  color: var(--accent-amber);
  transform: translateX(8px);
}

.leaders-menu li a:hover .menu-num {
  color: #fff;
}

.overlay-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.overlay-mobile-footer {
  display: none;
}

.info-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6ed188;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #6ed188;
  border-radius: 50%;
  box-shadow: 0 0 10px #6ed188;
}

/* ==========================================================================
   HERO BILLBOARD (ESTILO ARZAK CON MANIFIESTO)
   ========================================================================== */
/* ==========================================================================
   HERO BILLBOARD (COMPOSICIÓN EDITORIAL CENTRADA Y SIMÉTRICA)
   ========================================================================== */
.hero-billboard {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 7rem 2rem 2.5rem 2rem;
  overflow: hidden;
  text-align: center;
}

.hero-media-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: brightness(0.62) contrast(1.12);
  transform: scale(1.04);
  animation: heroKenBurns 28s infinite alternate ease-in-out;
}

@keyframes heroKenBurns {
  0% { transform: scale(1.04) translateY(0); }
  100% { transform: scale(1.10) translateY(-1.2%); }
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(14, 13, 12, 0.48) 0%, rgba(14, 13, 12, 0.85) 70%, rgba(14, 13, 12, 0.98) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 940px;
  margin: auto auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5.8vw, 5.2rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
  max-width: 900px;
  margin: 0.8rem auto 1.4rem auto;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.95);
}

.hero-title em {
  font-style: italic;
  color: var(--accent-gold);
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 300;
  color: #f0eae1;
  max-width: 760px;
  line-height: 1.7;
  margin: 0 auto 2.5rem auto;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.hero-bottom-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid rgba(245, 242, 235, 0.15);
  padding-top: 1.5rem;
  width: 100%;
  max-width: var(--container-max);
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.hero-address {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* Bloque editorial de bienvenida posterior al hero */
.welcome-manifesto-block {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 5.5rem 3rem;
  text-align: center;
  position: relative;
}

.manifesto-inner {
  max-width: 860px;
  margin: 0 auto;
}

.manifesto-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-main);
  font-style: italic;
  margin: 1.5rem 0 1.2rem 0;
}

.manifesto-author {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

/* ==========================================================================
   CAPÍTULOS ASIMÉTRICOS EDITORIALES (ESTILO ARZAK)
   ========================================================================== */
.editorial-chapter {
  position: relative;
  padding: 9rem 4rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-deep);
}

.chapter-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5.5rem;
  align-items: center;
}

.chapter-container.reverse {
  grid-template-columns: 1fr 1fr;
  direction: rtl;
}

.chapter-container.reverse > * {
  direction: ltr;
}

.chapter-header {
  margin-bottom: 2rem;
}

.chapter-title {
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.chapter-subtitle {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.chapter-narrative {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.quote-highlight {
  border-left: 2px solid var(--accent-amber);
  padding-left: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
  font-style: italic;
  line-height: 1.5;
  margin: 1.5rem 0;
}

.chapter-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
}

.chapter-media img {
  width: 100%;
  height: 580px;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter-media:hover img {
  transform: scale(1.03);
}

.media-badge {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  background: rgba(14, 13, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-medium);
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
}

/* ==========================================================================
   SECCIÓN DE LA CARTA (INTERACTIVA Y EDITORIAL)
   ========================================================================== */
.menu-section {
  padding: 8rem 4rem;
  background: var(--bg-surface);
  position: relative;
}

.section-head-center {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.section-head-center h2 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin-bottom: 1rem;
}

.menu-tabs {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #fff;
  box-shadow: 0 4px 15px rgba(212, 130, 56, 0.25);
}

.menu-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
}

.dish-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  position: relative;
}

.dish-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.dish-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.dish-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--text-main);
  font-weight: 400;
}

.dish-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--accent-gold);
  font-weight: 500;
  white-space: nowrap;
}

.dish-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.dish-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  border-top: 1px solid rgba(245, 242, 235, 0.05);
  padding-top: 1rem;
}

.dish-tag {
  color: var(--accent-amber);
  font-weight: 600;
}

/* ==========================================================================
   SECCIÓN VERDIALES & MEMORIA
   ========================================================================== */
.verdiales-section {
  padding: 8rem 4rem;
  background: radial-gradient(circle at 20% 50%, rgba(110, 38, 44, 0.15) 0%, rgba(14, 13, 12, 1) 70%);
  border-bottom: 1px solid var(--border-subtle);
}

.verdiales-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: center;
}

.verdiales-badge-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem;
  position: relative;
}

.verdiales-date {
  font-family: var(--font-mono);
  font-size: 3rem;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.verdiales-legend {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   MOTOR INTERACTIVO DE RESERVAS Y ENCARGOS (MODAL & WIDGET)
   ========================================================================== */
.reservation-section {
  padding: 9rem 4rem;
  background: var(--bg-deep);
  position: relative;
}

.booking-widget-wrapper {
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
  margin-top: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}

.form-input, .form-select {
  background: var(--bg-deep);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(212, 130, 56, 0.2);
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-amber);
}

.booking-submit-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Modal Dialog Nativo (<dialog>) */
dialog.booking-modal {
  margin: auto;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 3rem;
  max-width: 540px;
  width: 90%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

dialog::backdrop {
  background: rgba(14, 13, 12, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(110, 209, 136, 0.15);
  color: #6ed188;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.reservation-code {
  font-family: var(--font-mono);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 1.2rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #090807;
  border-top: 1px solid var(--border-subtle);
  padding: 6rem 4rem 3rem 4rem;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

.footer-col p, .footer-col li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-col ul {
  list-style: none;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  border-top: 1px solid rgba(245, 242, 235, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   CONMUTADOR DE MODO SOL / MODO NOCHE (THEME TOGGLE)
   ========================================================================== */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-main);
  font-size: 1.15rem;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-amber);
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Iconos de sol y luna */
.sun-icon {
  display: block;
  line-height: 1;
}
.moon-icon {
  display: none;
  line-height: 1;
}

/* En modo claro se oculta el sol y se muestra la luna (para cambiar a noche) */
[data-theme="light"] .sun-icon {
  display: none;
}
[data-theme="light"] .moon-icon {
  display: block;
}

.mobile-theme-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.2rem;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   ADAPTACIONES VISUALES PARA MODO SOL (data-theme="light")
   ========================================================================== */
[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(250, 247, 242, 0.95) 0%, rgba(250, 247, 242, 0) 100%);
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(250, 247, 242, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .hero-gradient-overlay {
  background: radial-gradient(circle at 50% 48%, rgba(250, 247, 242, 0.42) 0%, rgba(250, 247, 242, 0.82) 65%, rgba(250, 247, 242, 0.98) 100%);
}

[data-theme="light"] .hero-title {
  color: #1f1c1a;
  text-shadow: 0 2px 25px rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .hero-title em {
  color: var(--accent-amber);
}

[data-theme="light"] .hero-tagline {
  color: #4a433c;
  text-shadow: 0 1px 15px rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .hero-image {
  filter: brightness(0.92) contrast(1.05);
}

[data-theme="light"] .hero-bottom-bar {
  border-top-color: rgba(31, 28, 26, 0.12);
}

[data-theme="light"] .welcome-manifesto-block {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .editorial-chapter {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .chapter-media {
  border-color: rgba(31, 28, 26, 0.1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .media-badge {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(31, 28, 26, 0.12);
  color: #1f1c1a;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .menu-section {
  background: #ffffff;
}

[data-theme="light"] .dish-card {
  background: #ffffff;
  border: 1px solid rgba(31, 28, 26, 0.09);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .dish-card:hover {
  border-color: var(--accent-amber);
  box-shadow: 0 14px 35px rgba(168, 56, 39, 0.12);
}

[data-theme="light"] .tab-btn {
  border-color: rgba(31, 28, 26, 0.15);
  color: #5e564d;
}

[data-theme="light"] .tab-btn:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

[data-theme="light"] .tab-btn.active {
  background: var(--accent-amber);
  color: #ffffff;
  border-color: var(--accent-amber);
  box-shadow: 0 4px 15px rgba(168, 56, 39, 0.25);
}

[data-theme="light"] .verdiales-section {
  background: radial-gradient(circle at 20% 50%, rgba(168, 56, 39, 0.07) 0%, rgba(250, 247, 242, 1) 70%);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .verdiales-badge-box {
  background: #ffffff;
  border: 1px solid rgba(31, 28, 26, 0.09);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .reservation-section {
  background: var(--bg-deep);
}

[data-theme="light"] .booking-widget-wrapper {
  background: #ffffff;
  border: 1px solid rgba(31, 28, 26, 0.09);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .form-input, 
[data-theme="light"] .form-select {
  background: #faf7f2;
  border-color: rgba(31, 28, 26, 0.16);
  color: #1f1c1a;
}

[data-theme="light"] dialog.booking-modal {
  background: #ffffff;
  border-color: rgba(31, 28, 26, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] dialog::backdrop {
  background: rgba(31, 28, 26, 0.6);
}

[data-theme="light"] .reservation-code {
  background: #faf7f2;
  border-color: rgba(31, 28, 26, 0.12);
  color: var(--accent-amber);
}

[data-theme="light"] .site-footer {
  background: #ede5d8;
  border-top: 1px solid rgba(31, 28, 26, 0.1);
}

[data-theme="light"] .footer-col h4 {
  color: #1f1c1a;
}

[data-theme="light"] .footer-col p, 
[data-theme="light"] .footer-col li,
[data-theme="light"] .footer-bottom {
  color: #5e564d;
}

[data-theme="light"] .overlay-menu {
  background: rgba(250, 247, 242, 0.98);
  color: #1f1c1a;
}

[data-theme="light"] .leaders-menu li a {
  color: #1f1c1a;
}

[data-theme="light"] .leader-dots {
  border-bottom-color: rgba(31, 28, 26, 0.2);
}

[data-theme="light"] .overlay-close {
  border-color: rgba(31, 28, 26, 0.16);
  color: #1f1c1a;
}

[data-theme="light"] .overlay-close:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

[data-theme="light"] .overlay-info-card {
  background: #ffffff;
  border-color: rgba(31, 28, 26, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .btn-primary {
  background: var(--accent-amber);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(168, 56, 39, 0.28);
}

[data-theme="light"] .btn-primary:hover {
  background: #8e2f20;
}

[data-theme="light"] .btn-outline {
  color: #1f1c1a;
  border-color: rgba(31, 28, 26, 0.22);
}

[data-theme="light"] .btn-outline:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  background: rgba(168, 56, 39, 0.05);
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #faf7f2;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #d8cdbe;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--accent-amber);
}

/* ==========================================================================
   RESPONSIVE DESIGN (OPTIMIZACIÓN MÓVIL FIRST & ADAPTATIVA)
   ========================================================================== */

/* TABLETS Y PANTALLAS MEDIANAS (< 1024px) */
@media (max-width: 1024px) {
  .site-header {
    padding: 0 2rem;
    height: 76px;
  }
  .nav-desktop {
    display: none;
  }
  .hero-billboard {
    padding: calc(76px + 2.5rem) 2rem 3rem 2rem;
  }
  .editorial-chapter, .menu-section, .verdiales-section, .reservation-section {
    padding: 6rem 2rem;
  }
  .chapter-container, .chapter-container.reverse {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    direction: ltr;
  }
  .verdiales-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .overlay-body {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .overlay-info-card {
    display: none;
  }
}

/* SMARTPHONES Y MÓVILES (iPhone 12/13/14 Pro, etc. < 768px) */
@media (max-width: 768px) {
  /* Cabecera compacta y sin desbordamiento */
  .site-header {
    padding: 0 1rem;
    height: 66px;
  }
  .site-header.scrolled {
    height: 62px;
  }
  .brand-title {
    font-size: 1.15rem;
    letter-spacing: 0.12em;
  }
  .brand-subtitle {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .header-actions .lang-selector {
    display: none; /* Se visualiza dentro del menú overlay para no saturar el móvil */
  }
  #btnReservarHeader {
    padding: 0.45rem 0.85rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }
  .menu-toggle-btn {
    width: 38px;
    height: 38px;
  }

  /* Hero Billboard Adaptado */
  .hero-billboard {
    min-height: 100svh;
    padding: calc(66px + 2rem) 1.15rem 2rem 1.15rem;
  }
  .hero-content {
    width: 100%;
    max-width: 100%;
  }
  .hero-title {
    font-size: clamp(1.85rem, 7.8vw, 2.5rem);
    line-height: 1.18;
    margin: 0.6rem auto 1.2rem auto;
  }
  .hero-tagline {
    font-size: clamp(0.92rem, 3.8vw, 1.05rem);
    line-height: 1.6;
    margin: 0 auto 1.8rem auto;
    padding: 0 0.5rem;
  }
  .hero-cta-group {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  .hero-cta-group .btn-primary, 
  .hero-cta-group .btn-outline {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.2rem;
  }
  .hero-bottom-bar {
    width: 100%;
    padding-top: 1.2rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }
  .hero-address {
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.78rem;
    text-align: center;
  }
  .hero-address span.sep {
    display: none;
  }

  /* Bloque de Bienvenida */
  .welcome-manifesto-block {
    padding: 3.5rem 1.2rem;
  }
  .manifesto-quote {
    font-size: clamp(1.15rem, 4.8vw, 1.5rem);
    line-height: 1.55;
    margin: 1rem 0;
  }
  .manifesto-author {
    font-size: 0.72rem;
  }

  /* Capítulos Editoriales */
  .editorial-chapter {
    padding: 4.5rem 1.15rem;
  }
  .chapter-container, 
  .chapter-container.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    direction: ltr;
  }
  .chapter-header {
    margin-bottom: 1.2rem;
  }
  .chapter-title {
    font-size: clamp(1.75rem, 6.5vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 0.8rem;
  }
  .chapter-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
  }
  .chapter-narrative {
    font-size: 0.92rem;
    line-height: 1.7;
    gap: 1rem;
    margin-bottom: 1.8rem;
  }
  .quote-highlight {
    font-size: 1.05rem;
    padding-left: 1rem;
    margin: 1.2rem 0;
  }
  .chapter-media {
    width: 100%;
    border-radius: var(--radius-md);
  }
  .chapter-media img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: 280px;
    object-fit: cover;
  }
  .media-badge {
    bottom: 0.75rem;
    left: 0.75rem;
    right: auto;
    padding: 0.45rem 0.8rem;
    font-size: 0.68rem;
    max-width: calc(100% - 1.5rem);
    white-space: normal;
    line-height: 1.3;
  }

  /* Selector de Salones en Capítulo 05 */
  .editorial-chapter .menu-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  .editorial-chapter .tab-btn {
    padding: 0.55rem 0.95rem;
    font-size: 0.75rem;
  }

  /* Sección de la Carta (Horizontal Scroll Snap en Pestañas) */
  .menu-section {
    padding: 4.5rem 1.15rem;
  }
  .section-head-center {
    margin-bottom: 2rem;
  }
  .section-head-center h2 {
    font-size: clamp(1.8rem, 6.5vw, 2.3rem);
  }
  .menu-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 0.4rem 0.2rem 0.8rem 0.2rem;
    gap: 0.5rem;
    justify-content: flex-start;
    scrollbar-width: none;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
  }
  .menu-tabs::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    white-space: nowrap;
    padding: 0.55rem 1rem;
    font-size: 0.75rem;
  }
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    width: 100%;
  }
  .dish-card {
    padding: 1.4rem 1.15rem;
  }
  .dish-title {
    font-size: 1.2rem;
  }
  .dish-price {
    font-size: 1.05rem;
  }
  .dish-desc {
    font-size: 0.85rem;
    line-height: 1.55;
    margin-bottom: 1rem;
  }

  /* Sección Verdiales */
  .verdiales-section {
    padding: 4.5rem 1.15rem;
  }
  .verdiales-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .verdiales-badge-box {
    padding: 1.8rem 1.2rem;
  }
  .verdiales-date {
    font-size: 2.2rem;
  }
  .verdiales-legend {
    font-size: 1.1rem;
  }

  /* Reservas & Widget */
  .reservation-section {
    padding: 4.5rem 1.15rem;
  }
  .booking-widget-wrapper {
    padding: 1.8rem 1.15rem;
    border-radius: var(--radius-md);
  }
  .booking-form {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .booking-submit-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 1.2rem;
  }
  .booking-submit-row .btn-primary {
    width: 100%;
    justify-content: center;
  }
  dialog.booking-modal {
    padding: 2rem 1.2rem;
    width: 92%;
    max-width: 360px;
    border-radius: var(--radius-md);
  }

  /* Menú Overlay de Pantalla Completa (Estilo Arzak Leaders) */
  .overlay-menu {
    padding: 1.5rem 1.15rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .overlay-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
  .overlay-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .overlay-info-card {
    display: none;
  }
  .overlay-mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    align-items: center;
    width: 100%;
  }
  .overlay-mobile-footer .overlay-lang-selector {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
  }
  .overlay-mobile-footer .mobile-call-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
  }
  .leaders-menu {
    gap: 1rem;
    width: 100%;
  }
  .leaders-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
  }
  .leaders-menu .menu-title {
    font-size: 1.15rem;
    line-height: 1.3;
  }
  .leader-dots {
    margin: 0 0.4rem;
    min-width: 8px;
    flex: 1;
  }
  .leaders-menu .menu-num {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  /* Footer */
  .site-footer {
    padding: 4rem 1.15rem 2rem 1.15rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.6rem;
    padding-top: 1.5rem;
  }
}

/* PANTALLAS MUY ESTRECHAS (< 380px, ej. iPhone SE) */
@media (max-width: 380px) {
  .brand-title {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }
  .brand-subtitle {
    font-size: 0.52rem;
  }
  #btnReservarHeader {
    padding: 0.4rem 0.65rem;
    font-size: 0.68rem;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .leaders-menu .menu-title {
    font-size: 1.05rem;
  }
}
