/* --- Variables y Estilos Globales --- */

/* TEMA OSCURO (Tu diseño original - POR DEFECTO) */
:root {
  --primary-color: #ffc107; /* Amarillo/Dorado Original */
  --text-color: #f0f0f0; /* Texto Blanco */
  --text-color-light: #ccc; /* Texto Gris Claro */
  --shadow-color: rgba(6, 6, 6, 0.7); /* Sombra oscura */
  --bg-color: #040404; /* Fondo Carbón (Original) */
  --card-bg-color: #040404; /* Fondo de secciones (Original) */
  --menu-line-color: rgba(255, 255, 255, 0.2); /* Línea divisora blanca */
  --bg-opacity: 1; /* <-- OPACIDAD 1 PARA TU FONDO ORIGINAL */
  --switch-knob-color: #040404; /* Color del botón del switch */
}

/* TEMA CLARO (Nuevo diseño mejorado) */
html[data-theme="light"] {
  --primary-color: #b8860b; /* Dorado Oscuro (más sobrio) */
  --text-color: #3d3d3d; /* Texto Carbón (casi negro) */
  --text-color-light: #666666; /* Texto Gris Medio */
  --shadow-color: rgba(0, 0, 0, 0.1); /* Sombra suave */
  --bg-color: #f7f3e8; /* Fondo Beige/Crema (cálido) */
  --card-bg-color: #ffffff; /* Fondo de secciones Blanco (limpio) */
  --menu-line-color: rgba(0, 0, 0, 0.15); /* Línea divisora oscura */
  --bg-opacity: 0.3; /* <-- OPACIDAD SUTIL PARA EL FONDO */
  --switch-knob-color: #ffffff; /* Color del botón del switch */
}

/* --- Base --- */
body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Montserrat", sans-serif;
  color: var(--text-color); /* VARIABLE APLICADA */
  scroll-behavior: smooth;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease; /* Transición */
}

/* --- Contenedor del Fondo --- */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("./images/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
  opacity: var(--bg-opacity); /* VARIABLE DE OPACIDAD APLICADA */
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.4s ease; /* Transición */
}

/* --- Cabecera y Navegación --- */
header {
  width: 100%;
  padding: 25px 0;
  background-color: var(--card-bg-color); /* VARIABLE APLICADA */
  box-shadow: 0 4px 10px var(--shadow-color); /* VARIABLE APLICADA */
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Transición */
}

nav {
  padding: 0 5%;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* --- Ajuste al Content Wrapper --- */
.content-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  box-sizing: border-box;
}

.logo {
  font-weight: 700;
  font-size: 2rem;
  color: var(--primary-color); /* VARIABLE APLICADA */
  text-shadow: 1px 1px 5px var(--shadow-color); /* VARIABLE APLICADA */
}

nav ul {
  list-style: none;
  display: flex;
  gap: 50px;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: var(--text-color-light); /* VARIABLE APLICADA */
  font-weight: 700;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  padding-bottom: 8px;
  position: relative;
}

nav a:hover,
nav li:first-child a {
  color: var(--primary-color); /* VARIABLE APLICADA */
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--primary-color); /* VARIABLE APLICADA */
  left: 0;
  bottom: 0;
  transition: width 0.3s ease-in-out;
}

nav a:hover::after {
  width: 100%;
}

/* --- Sección Principal (Hero) --- */
main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  text-align: center;
  padding: 50px 5% 0 5%;
  box-sizing: border-box;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding-bottom: 5rem;
  width: 100%;
}

.hero-text h1 {
  font-size: 4.5rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: 3px;
  text-shadow: 4px 4px 15px var(--shadow-color); /* VARIABLE APLICADA */
  color: var(--primary-color); /* VARIABLE APLICADA */
}

.hero-text p {
  font-size: 1.3rem;
  margin: 0.8rem 0 0;
  color: var(--text-color-light); /* VARIABLE APLICADA */
}

.hero-image {
  max-width: 550px;
  margin: -3rem 0 -1rem;
  position: relative;
  z-index: 2;
}

.hero-image img {
  width: 100%;
  filter: drop-shadow(5px 5px 20px var(--shadow-color)); /* VARIABLE APLICADA */
}

/* --- Botones de Llamada a la Acción (CTA) --- */
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  margin-top: 2rem;
}

.cta-button a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  border: 2px solid var(--primary-color); /* VARIABLE APLICADA */
  border-radius: 50%;
  text-decoration: none;
  color: var(--text-color); /* VARIABLE APLICADA */
  font-weight: 700;
  font-size: 0.85rem;
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 0 15px var(--shadow-color); /* Sombra sutil */
}

.cta-button .icon {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
  color: var(--primary-color); /* VARIABLE APLICADA */
  transition: color 0.3s ease;
}

.cta-button a:hover {
  background-color: var(--primary-color); /* VARIABLE APLICADA */
  color: var(--card-bg-color); /* VARIABLE APLICADA */
  transform: scale(1.1);
  box-shadow: 0 0 25px var(--shadow-color); /* Sombra más intensa */
}

.cta-button a:hover .icon {
  color: var(--card-bg-color); /* VARIABLE APLICADA */
}

/* --- Sección About Us --- */
.about-us {
  background-color: var(--card-bg-color); /* VARIABLE APLICADA */
  padding: 80px 0;
  width: 100%;
  text-align: left;
  margin-top: 5rem;
  border-radius: 10px;
  box-shadow: 0 0 20px var(--shadow-color); /* VARIABLE APLICADA */
  transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Transición */
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.about-text {
  flex: 2;
  min-width: 300px;
}

.about-text h2 {
  font-size: 2.8rem;
  color: var(--primary-color); /* VARIABLE APLICADA */
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 5px var(--shadow-color); /* VARIABLE APLICADA */
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text-color-light); /* VARIABLE APLICADA */
}

.about-image {
  flex: 1;
  min-width: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 5px 15px var(--shadow-color); /* VARIABLE APLICADA */
  transition: transform 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.03);
}

/* --- Sección de Proceso Artesanal (Menú) --- */
.process-section {
  width: 100%;
  padding: 60px 0;
  text-align: center;
  border-radius: 10px;
  margin-top: 5rem;
}

.process-section h2 {
  font-size: 2.8rem;
  color: var(--primary-color); /* VARIABLE APLICADA */
  margin-bottom: 1rem;
  text-shadow: 1px 1px 5px var(--shadow-color); /* VARIABLE APLICADA */
}

.process-section > p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color-light); /* VARIABLE APLICADA */
  max-width: 800px;
  margin: 0 auto 3rem auto;
}

.process-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.process-card {
  background-color: var(--card-bg-color); /* VARIABLE APLICADA */
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--shadow-color); /* VARIABLE APLICADA */
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease, transform 0.3s ease,
    box-shadow 0.4s ease; /* Transición */
}

.process-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px var(--shadow-color); /* VARIABLE APLICADA */
}

.process-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 3px solid var(--primary-color); /* VARIABLE APLICADA */
}

.process-card-content {
  padding: 1.5rem;
  flex-grow: 1;
}

.process-card h3 {
  font-size: 1.5rem;
  color: var(--primary-color); /* VARIABLE APLICADA */
  margin: 0 0 0.5rem 0;
}

.process-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color-light); /* VARIABLE APLICADA */
  margin: 0;
  max-width: none;
}

/* --- Filtros de Imagen --- */
.process-card img,
.about-image img {
  filter: saturate(75%) brightness(95%) contrast(105%) sepia(10%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.process-card:hover img,
.about-image img:hover {
  filter: none;
}

/* --- Estilos para el Menú Completo --- */
.full-menu-section {
  width: 100%;
  margin-top: 6rem;
  padding: 40px;
  background-color: var(--card-bg-color); /* VARIABLE APLICADA */
  border-radius: 10px;
  box-shadow: 0 0 20px var(--shadow-color); /* VARIABLE APLICADA */
  box-sizing: border-box;
  transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Transición */
}

.menu-title {
  font-size: 2.8rem;
  color: var(--primary-color); /* VARIABLE APLICADA */
  text-align: center;
  margin-bottom: 3rem;
  text-shadow: 1px 1px 5px var(--shadow-color); /* VARIABLE APLICADA */
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.menu-category h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color); /* VARIABLE APLICADA */
  border-bottom: 2px solid var(--primary-color); /* VARIABLE APLICADA */
  padding-bottom: 10px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-item {
  margin-bottom: 1.5rem;
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.menu-item-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color); /* VARIABLE APLICADA */
}

.menu-item-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color); /* VARIABLE APLICADA */
  white-space: nowrap;
}

.menu-item-description {
  font-size: 0.95rem;
  color: var(--text-color-light); /* VARIABLE APLICADA */
  margin-top: 5px;
  line-height: 1.5;
  text-transform: uppercase;
}

.menu-category h3 i {
  font-size: 1.8rem;
  opacity: 0.8;
}

.menu-item:not(:last-child) {
  border-bottom: 2px dashed var(--menu-line-color); /* VARIABLE APLICADA */
  padding-bottom: 1.5rem;
}

/* --- Sección Ubicación --- */
.location-section {
  width: 100%;
  margin-top: 5rem;
  padding: 60px 40px;
  background-color: var(--card-bg-color); /* VARIABLE APLICADA */
  border-radius: 10px;
  box-shadow: 0 0 20px var(--shadow-color); /* VARIABLE APLICADA */
  box-sizing: border-box;
  text-align: center;
  transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Transición */
}

.location-section h2 {
  font-size: 2.8rem;
  color: var(--primary-color); /* VARIABLE APLICADA */
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 5px var(--shadow-color); /* VARIABLE APLICADA */
}

.location-address {
  font-size: 1.2rem;
  color: var(--text-color-light); /* VARIABLE APLICADA */
  line-height: 1.7;
  margin-bottom: 2rem;
}

.map-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 5px 15px var(--shadow-color); /* VARIABLE APLICADA */
}

.location-section iframe {
  width: 100%;
  max-width: 100%;
  height: 450px;
  border: none;
  border-radius: 8px;
}

.location-note {
  font-size: 1.5rem;
  color: var(--text-color-light); /* VARIABLE APLICADA */
  margin-top: 1.5rem;
  font-style: italic;
  text-decoration: none;
}

/* --- Footer --- */
footer {
  width: 100%;
  padding: 30px 0;
  text-align: center;
  margin-top: 5rem;
  border-top: 1px solid var(--menu-line-color); /* VARIABLE APLICADA */
  color: var(--text-color-light); /* VARIABLE APLICADA */
  font-size: 0.9rem;
}

/* --- Media Queries (Responsividad) --- */
@media (max-width: 900px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  nav {
    justify-content: center;
    gap: 1rem;
  }
  .nav__controls {
    justify-content: center;
    width: 100%;
  }

  .content-wrapper {
    padding: 0 3%;
  }

  .hero-text h1 {
    font-size: 3rem;
    letter-spacing: 1px;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .cta-button a {
    width: 100px;
    height: 100px;
    font-size: 0.75rem;
  }

  .cta-button .icon {
    font-size: 1.8rem;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text h2 {
    font-size: 2rem;
  }

  .process-section h2,
  .menu-title {
    font-size: 2.2rem;
  }

  .process-container {
    grid-template-columns: 1fr;
  }

  .menu-category h3 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  nav {
    flex-direction: column;
    gap: 15px;
  }

  nav ul {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo {
    font-size: 1.3rem;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-image {
    max-width: 90%;
  }

  .cta-buttons {
    gap: 1rem;
  }

  .cta-button a {
    width: 90px;
    height: 90px;
  }

  .about-us {
    padding: 60px 0;
  }

  .about-text h2 {
    font-size: 1.8rem;
  }

  .about-text p {
    font-size: 1rem;
  }

  .process-section,
  .full-menu-section {
    padding: 20px;
  }

  .process-section h2,
  .menu-title {
    font-size: 1.8rem;
  }

  .menu-item-name,
  .menu-item-price {
    font-size: 1rem;
  }

  .menu-item-description {
    font-size: 0.85rem;
  }
}

/* ===================================================
   ESTILOS DE SWITCH DE TEMA E IDIOMA
   =================================================== */

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

/* --- Botón de Idioma --- */
.lang-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

#lang-toggle-button {
  background: transparent;
  border: 1px solid var(--primary-color);
  border-radius: 20px;
  min-width: 50px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 0.8rem;
  text-transform: uppercase;
}

#lang-toggle-button:hover {
  background-color: var(--primary-color);
  color: var(--card-bg-color); /* Color de fondo de la tarjeta */
  transform: translateY(-2px);
}

/* --- Switch de Tema --- */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 24px;
  background-color: transparent;
  padding: 0;
  border: none;
}

.theme-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(
    --text-color-light
  ); /* Fondo del slider (gris claro en oscuro, gris medio en claro) */
  transition: background-color 0.4s ease;
  border-radius: 34px;
  border: 1px solid var(--text-color-light);
}

.slider:before {
  position: absolute;
  content: "\f186"; /* Ícono de LUNA (para tema oscuro default) */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(
    --switch-knob-color
  ); /* Color del botón (oscuro en tema oscuro) */
  transition: transform 0.4s ease, background-color 0.4s ease, color 0.4s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color-light); /* Color del icono (gris claro) */
}

/* Estilos para TEMA CLARO (cuando el checkbox está MARCADO) */
input[type="checkbox"]:checked + .slider {
  background-color: var(--text-color-light); /* Fondo del slider */
}

input[type="checkbox"]:checked + .slider:before {
  transform: translateX(17px); /* Mueve el botón a la derecha */
  content: "\f185"; /* Ícono de SOL */
  color: var(--text-color); /* Color del icono (oscuro) */
  background-color: var(
    --switch-knob-color
  ); /* Color del botón (blanco en tema claro) */
}