@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&family=Playfair+Display:wght@400;700&display=swap');

:root {
  /* 60-30-10 Color System */
  --color-fondo: #FDFBF7;
  /* 60% */
  --color-primario: #EA235A;
  /* 30% */
  --color-acento: #04B1AF;
  /* 10% */
  --color-texto-oscuro: #2C2C2C;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
}


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

body {
  background-color: var(--color-fondo);
  color: var(--color-texto-oscuro);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

h2 {
  color: var(--color-primario);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

/* Header Styles */
/* Navbar y Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-primario);
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--color-primario);
}

/* Hero Section */
.hero {
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  /* Simulated dark background with linear-gradient */
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../img/hero-bg.jpg') center/cover;
  color: white;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  color: white;
  max-width: 800px;
}

/* CTA Button */
.btn-cta {
  background-color: var(--color-primario) !important;
  color: #FFFFFF !important;
  font-family: var(--font-body);
  padding: 1.2rem 3rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(234, 35, 90, 0.4);
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-cta:hover {
  background-color: var(--color-acento) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(4, 177, 175, 0.6);
}

/* Productos Section */
.productos-section {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--color-fondo);
}

/* h2 properties inherited globally */

.productos-subtitle {
  font-size: 1.1rem;
  color: var(--color-texto-oscuro);
  margin-bottom: 3rem;
}

.grid-productos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .grid-productos {
    grid-template-columns: repeat(4, 1fr);
  }
}

.producto-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  aspect-ratio: 3 / 4;
}

.producto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.producto-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 25px 20px 15px 20px;
  color: #FFFFFF !important;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  text-align: left;
  font-size: 1.2rem;
  z-index: 2;
  font-family: var(--font-body);
  font-weight: 600;
}

.productos-action {
  margin-top: 3rem;
}

/* Outline Button (Now Solid Main Button) */
.btn-outline {
  display: inline-block;
  background-color: var(--color-primario) !important;
  color: #FFFFFF !important;
  font-family: var(--font-body);
  padding: 1.2rem 3rem;
  border-radius: 50px;
  border: none !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(234, 35, 90, 0.4);
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-outline:hover {
  background-color: var(--color-acento) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(4, 177, 175, 0.6);
}

/* Sabores Section */
.sabores-section {
  background-color: #ffffff;
  padding: 4rem 2rem;
  text-align: center;
}

.sabores-section h2 {
  margin-bottom: 1rem;
}



.sabores-action {
  margin-top: 3rem;
}

/* Tiendas Section */
.tiendas-section {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--color-fondo);
}

.locales-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.locales-info h3 {
  color: var(--color-primario);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-size: 1.8rem;
}

.locales-info p {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.8;
}

.locales-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tienda-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tienda-card h3 {
  font-size: 1.5rem;
  color: var(--color-texto-oscuro);
  margin-bottom: 1rem;
}

.tienda-card p {
  color: #666;
  margin-bottom: 2rem;
  flex-grow: 1;
}

/* Historia Section */
.historia-section {
  padding: 4rem 2rem;
  background-color: var(--color-fondo);
}

.historia-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 60px auto;
  text-align: left;
}

.historia-info h3 {
  color: var(--color-primario);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-size: 1.8rem;
}

.historia-info p {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.historia-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Contact Section */
.contacto-page {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.contacto-page h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.contacto-page > p {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 40px;
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
  font-family: inherit;
}

.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus {
  border-color: var(--color-acento);
  outline: none;
}

.contacto-info {
  background: #f9f9f9;
  padding: 40px;
  border-radius: 15px;
}

.contact-item {
  margin-bottom: 25px;
}

.contact-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--color-primario);
  font-size: 14px;
  text-transform: uppercase;
}

.contact-item a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--color-acento);
}

.coming-soon {
  color: #888;
  font-style: italic;
  margin: 0;
}

.mensaje-exito {
  text-align: center;
  padding: 30px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 8px;
  margin-top: 20px;
  border: 1px solid #c8e6c9;
}

/* Empleo Section Specifics */
.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
  font-size: 14px;
}

.legal-check input {
  width: auto;
  margin-top: 5px;
}

.legal-check a {
  color: var(--color-primario);
  text-decoration: underline;
}

.legal-text {
  font-size: 11px;
  color: #777;
  margin-top: 15px;
  text-align: justify;
  line-height: 1.4;
}

.info-trabajo {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
}

.info-trabajo h3 {
  font-size: 28px;
  margin-bottom: 40px;
  color: var(--color-primario);
}

.ventajas-empleo {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.ventaja-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.ventaja-item i {
  font-size: 24px;
  color: var(--color-primario);
  background-color: rgba(234, 35, 90, 0.1);
  padding: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.ventaja-texto strong {
  display: block;
  font-size: 18px;
  color: #222;
  margin-bottom: 8px;
}

.ventaja-texto p {
  margin: 0;
  line-height: 1.6;
  color: #555;
  font-size: 15px;
}

#form-trabajo button[type="submit"] {
  display: block;
  margin: 0 auto;
}

/* Eventos Section */
.eventos-page {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.eventos-page h2 {
  margin-bottom: 0.5rem;
}

.eventos-intro {
  max-width: 600px;
  margin: 0 auto 50px;
  font-size: 18px;
  color: #555;
}

.eventos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  text-align: left;
}

.evento-card {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.evento-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 25px;
}

.evento-card h3 {
  color: var(--color-primario);
  margin-bottom: 15px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

.evento-card p {
  margin-bottom: 30px;
  color: #444;
  flex-grow: 1;
  line-height: 1.6;
}

.evento-card .btn-cta {
  display: block;
  text-align: center;
}

/* Productos Galeria Dinamica */
.productos-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 5%;
  text-align: center;
}

.productos-hero {
  margin-bottom: 60px;
}

.categoria-visual {
  margin-bottom: 80px;
  text-align: left;
}

.categoria-visual h3 {
  font-size: 32px;
  color: var(--color-primario);
  margin-bottom: 10px;
}

.cat-desc {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
}

.ampersand {
  font-family: "Times New Roman", Times, serif;
  font-size: 0.85em;
  font-weight: normal;
}

.foto-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 15px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  font-weight: bold;
  font-size: 18px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

footer {
  background-color: var(--color-primario);
  color: #FFFFFF;
  padding: 60px 20px 20px 20px;
}

footer, footer * {
  color: #FFFFFF;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.footer-contact {
  margin-top: 1.5rem;
  line-height: 1.5;
}

.footer-contact a {
  text-decoration: underline;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.footer-contact a:hover {
  opacity: 1;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  display: block;
  color: #FFFFFF;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 0.8;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social i {
  font-size: 24px;
  transition: color 0.3s ease;
}

.footer-social i:hover {
  color: var(--color-acento);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .locales-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  .historia-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  .historia-img-wrapper {
    order: -1;
  }
  #grid-productos {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
    .footer-social {
    justify-content: center;
  }
  
  /* Mobile Menu Styles */
  .hamburger {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: -100%; 
    width: 100%;
    background-color: #fff;
    flex-direction: column;
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    max-height: calc(100vh - 80px); /* Resta la altura del header aprox */
    overflow-y: auto; /* Activa el scroll vertical si el contenido es más alto */
    padding-bottom: 20px; /* Da un respiro al último enlace */
  }
  .nav-links li {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-links.active {
    left: 0; /* Aparece al hacer clic */
  }
  .contacto-grid {
    grid-template-columns: 1fr;
  }
  .eventos-grid {
    grid-template-columns: 1fr;
  }
  .swiper-slide.foto-item { width: 85% !important; }
}

/* --- ESTILOS EXCLUSIVOS HOME --- */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 0 5% 40px 5%;
}
.home-card {
    aspect-ratio: 4/5;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.home-card:hover {
    transform: scale(1.03);
}
.home-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

/* Responsive Home */
@media (max-width: 900px) {
    .grid-productos { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 480px) {
    .grid-productos { grid-template-columns: 1fr; }
}

/* --- OVERRIDE SWIPER (Teal Color) --- */
:root {
    --swiper-theme-color: #04B1AF !important;
}
.swiper { 
    width: 100%; 
    padding-bottom: 60px !important; /* Crea el colchón de espacio debajo de las fotos */
}
.swiper-pagination {
    bottom: 0 !important; /* Empuja los puntos al fondo del colchón, fuera de la foto */
}
.swiper-slide.foto-item { 
    width: 380px !important; 
    height: 475px !important; /* Fuerza la proporción 4:5 */
    background-color: #f5f5f5; /* Fondo gris elegante si falta foto */
    position: relative; 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}
.swiper-pagination-bullet { 
    width: 12px; 
    height: 12px; 
    background: #ccc !important; 
    opacity: 1 !important; 
    transition: all 0.3s ease; 
}
.swiper-pagination-bullet-active { 
    background-color: #04B1AF !important; 
    transform: scale(1.3); 
}

/* --- CARTA DE SABORES Y DESTACADOS --- */
.filtros-container { display: flex; flex-direction: column; gap: 20px; margin-bottom: 50px; align-items: center; }
.filtro-grupo { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.filtro-titulo { font-weight: bold; margin-right: 10px; color: #333; }

.btn-filtro { padding: 8px 20px; border: 2px solid #eee; border-radius: 30px; background: transparent; color: #666; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.btn-filtro:hover { border-color: #04B1AF; color: #04B1AF; }
.btn-filtro.active { background: #04B1AF; border-color: #04B1AF; color: white; }

.grid-menu-sabores {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas exactas en PC */
    gap: 30px;
    padding-bottom: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- CARTA DE SABORES (DISEÑO UNIFICADO F4F4F4) --- */
.sabor-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background-color: #F4F4F4; /* Fondo unificado de toda la tarjeta */
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sabor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* Contenedor de foto */
.sabor-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1; 
    padding: 0; 
    background-color: #F4F4F4;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: -1px; /* TRUCO VITAL: Solapa 1px con el texto para eliminar cualquier línea invisible */
}

.sabor-img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block; /* Elimina el espacio fantasma de las imágenes inline */
    /* Hemos eliminado el mix-blend-mode para evitar que resalte bordes del JPG */
    transition: transform 0.4s ease;
}
.sabor-card:hover .sabor-img { transform: scale(1.05); }

/* Franja inferior con el texto pegado */
.sabor-label-container {
    padding: 5px 10px 15px 10px; /* Mínimo espacio superior para pegar el texto a la bola */
    text-align: center;
    background-color: #F4F4F4; /* Mismo color */
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sabor-label {
    color: var(--color-primario, #333); 
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0;
    line-height: 1.2;
}

/* Overlay Verde (Hover / Tap) */
.sabor-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(4, 177, 175, 0.95); /* Teal corporativo */
    color: white;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 25px; text-align: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    z-index: 3;
}
.sabor-card:hover .sabor-overlay { opacity: 1; visibility: visible; }
.sabor-overlay h3 { margin-bottom: 10px; font-family: "Playfair Display", serif; font-size: 1.3rem; }
.sabor-desc { font-size: 0.9rem; margin-bottom: 15px; line-height: 1.4; }
.sabor-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badge-alergeno { font-size: 0.7rem; text-transform: uppercase; background: white; color: #04B1AF; padding: 4px 10px; border-radius: 20px; font-weight: bold; }

/* Responsive para la cuadrícula */
@media (max-width: 900px) {
    .grid-menu-sabores { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 480px) {
    .grid-menu-sabores { grid-template-columns: 1fr; }
}

/* --- PÁGINA DE HELADERÍAS (Z-PATTERN) --- */
.heladerias-page { max-width: 1200px; margin: 0 auto; padding: 60px 5%; }
.heladerias-hero { text-align: center; margin-bottom: 60px; }
.heladerias-hero h2 { font-size: 2.8rem; margin-bottom: 15px; }

.local-section {
    display: flex;
    align-items: stretch; /* Para que el mapa y la info tengan la misma altura */
    gap: 50px;
    margin-bottom: 100px;
    background: #fff;
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.local-section.invertido { flex-direction: row-reverse; }

.local-map-wrapper { 
    flex: 1.2; 
    border-radius: 20px; 
    overflow: hidden; 
    min-height: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.local-map-wrapper iframe { width: 100%; height: 100%; border: 0; }

.local-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.local-info h2 { text-align: left; margin-bottom: 15px; color: var(--color-primario); }
.local-direccion { font-size: 1.1rem; color: #444; margin-bottom: 25px; display: flex; gap: 10px; line-height: 1.4; }
.local-direccion i { color: var(--color-primario); font-size: 1.4rem; }

.horarios-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}
.horario-col { background: #f9f9f9; padding: 20px; border-radius: 15px; }
.horario-col h4 { 
    font-family: var(--font-body); 
    color: #04B1AF; 
    font-size: 0.95rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.horario-col ul { list-style: none; padding: 0; }
.horario-col li { font-size: 0.85rem; margin-bottom: 6px; display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding-bottom: 4px; }
.horario-col li span { font-weight: 600; }
.horario-col li.cerrado { color: var(--color-primario); }

.local-acciones { display: flex; gap: 15px; flex-wrap: wrap; }
.local-acciones .btn-cta { flex: 1; min-width: 160px; text-align: center; padding: 1rem 1.5rem; }

@media (max-width: 900px) {
    .local-section, .local-section.invertido { flex-direction: column; padding: 20px; }
    .local-map-wrapper { min-height: 300px; }
    .horarios-grid { grid-template-columns: 1fr; }
}

/* --- ESTILOS COMPARTIDOS (MARCA) --- */
.ampersand { font-family: "Times New Roman", Times, serif; font-weight: normal; font-size: 1.1em; }

/* --- PÁGINA ESPECIALIDADES (GRID SIMÉTRICO PREMIUM) --- */
.especialidades-page { padding: 40px 0 80px 0; background-color: var(--color-fondo); }
.especialidades-hero, .historia-hero { text-align: center; padding: 20px 5% 60px 5%; }
.especialidades-hero h2, .historia-hero h2 { font-size: 3.5rem; color: var(--color-primario); margin-bottom: 15px; }
.especialidades-hero p, .historia-hero p { font-size: 1.2rem; color: #666; max-width: 700px; margin: 0 auto; line-height: 1.6; }

.seccion-especialidad, .historia-section { max-width: 1200px; margin: 0 auto 100px auto; padding: 0 5%; }
.seccion-header, .historia-header { text-align: center; margin-bottom: 40px; }
.seccion-header h3, .historia-header h3 { font-family: var(--font-heading); font-size: 2.5rem; color: var(--color-texto-oscuro); margin-bottom: 10px; }
.seccion-header p, .historia-header p { color: #777; font-size: 1.1rem; max-width: 700px; margin: 0 auto; }

/* Base de Tarjetas de Galería (A prueba de balas) */
.galeria-grid {
    display: grid;
    /* Cambiado a 2 columnas fijas para mayor impacto visual */
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px; /* Limitamos un poco el ancho para que las fotos no sean gigantescas */
    margin: 0 auto;
    margin-bottom: 40px;
}
.galeria-item { 
    position: relative; 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); 
    background-color: #f4f4f4;
    width: 100%; 
    aspect-ratio: 4 / 5; 
}
.galeria-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.galeria-item:hover img { transform: scale(1.05); }
.galeria-label { 
    position: absolute; bottom: 0; left: 0; width: 100%; 
    padding: 40px 20px 20px; 
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%); 
    color: white; font-family: var(--font-heading); font-size: 1.25rem; 
    margin: 0; pointer-events: none; z-index: 2; text-align: center;
}

.btn-centrado {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 40px;
    text-align: center;
}

/* Banner Final (Especialidades) */
.banner-agora { background: linear-gradient(135deg, var(--color-acento), #039391); color: white; padding: 60px 5%; text-align: center; border-radius: 20px; max-width: 1000px; margin: 0 auto; box-shadow: 0 15px 40px rgba(4, 177, 175, 0.3); }
.banner-agora h3 { font-size: 2.5rem; margin-bottom: 15px; font-family: var(--font-heading); color: white; }
.banner-agora p { font-size: 1.2rem; margin-bottom: 30px; color: white; max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* Corrección de contraste para el botón del banner final */
.banner-agora .btn-cta {
    background-color: var(--color-primario) !important; 
    color: white !important;
    border: 2px solid var(--color-primario) !important;
}
.banner-agora .btn-cta:hover {
    background-color: white !important; 
    color: var(--color-acento) !important; 
    border-color: white !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Responsive Especialidades */
/* Responsive Especialidades y Sabores */
@media (max-width: 1024px) {
    /* Ajustes opcionales para tablets si se requiere */
}

@media (max-width: 768px) {
    /* Grilla Especialidades a 2 columnas en móvil */
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; /* Reducimos el gap para que quepa bien en móvil */
    }

    /* Grilla Sabores a 2 columnas en móvil */
    .grid-menu-sabores {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Ajustes de texto para que quepan en las tarjetas más pequeñas de móvil */
    .sabor-label {
        font-size: 0.9rem;
        padding: 8px 5px;
    }
    
    .galeria-label {
        font-size: 1rem;
        padding: 20px 10px 10px;
    }

    /* Ajuste del botón para que no salte a dos líneas */
    .btn-cta {
        padding: 12px 20px;
        font-size: 0.9rem;
        white-space: nowrap; /* Fuerza a que el texto se quede en una sola línea */
    }
}

@media (max-width: 480px) {
    /* Mantenemos 2 columnas en móvil pequeño */
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* --- PÁGINA HISTORIA (TIMELINE ASIMÉTRICO Y DINÁMICO) --- */
.historia-page-content { background-color: var(--color-fondo); padding: 80px 0; overflow-x: hidden; }

.timeline-container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

/* Estilos para el efecto de scroll (Fade In) */
.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    visibility: hidden;
    will-change: opacity, transform;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.timeline-bloque {
    display: flex;
    align-items: center;
    gap: 100px;
    margin-bottom: 120px;
}
.timeline-bloque.invertido { flex-direction: row-reverse; }

.timeline-img-wrapper {
    flex: 1.1;
    position: relative;
}
.timeline-img-wrapper img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.timeline-bloque:hover .timeline-img-wrapper img {
    transform: translateY(-10px) scale(1.02);
}

/* Detalle del año flotante */
.timeline-year {
    position: absolute;
    top: -20px;
    left: -20px;
    background-color: var(--color-primario);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(234, 35, 90, 0.3);
    z-index: 2;
}
.timeline-bloque.invertido .timeline-year {
    left: auto;
    right: -20px;
    background-color: var(--color-acento);
    box-shadow: 0 10px 20px rgba(4, 177, 175, 0.3);
}

.timeline-texto {
    flex: 1;
    padding: 20px 0;
}
.timeline-texto h3 {
    font-size: 2.8rem;
    color: var(--color-texto-oscuro);
    margin-bottom: 25px;
    line-height: 1.2;
}
.timeline-texto p {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.8;
}

/* Cierre final (Historia) */
.historia-cierre { text-align: center; margin-top: 80px; padding: 60px 5%; background-color: #fff; border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); max-width: 1000px; margin-left: auto; margin-right: auto; }
.historia-cierre h3 { font-size: 2.2rem; color: var(--color-primario); margin-bottom: 20px; }

/* Responsive Historia */
@media (max-width: 900px) {
    .timeline-bloque, .timeline-bloque.invertido { flex-direction: column; gap: 40px; margin-bottom: 80px; }
    .timeline-img-wrapper { width: 100%; }
    .timeline-year { top: -15px; left: 20px !important; right: auto !important; }
    .timeline-texto { text-align: left; }
    .timeline-texto h3 { font-size: 2.2rem; }
}

/* --- FIX: DESBORDAMIENTO TEXTO TARJETAS MÓVIL --- */
@media (max-width: 768px) {
    .sabor-card {
        overflow: hidden !important; /* Fuerza a que nada salga de los bordes redondeados */
    }
    
    .sabor-overlay {
        padding: 15px 10px !important;
        overflow-y: auto !important; /* Permite scroll interno si la descripción es muy larga */
        justify-content: flex-start !important; /* Alinea arriba para evitar cortes superiores */
    }
    
    .sabor-overlay h3 {
        font-size: 1.25rem !important;
        margin-top: 10px;
        margin-bottom: 8px;
    }
    
    .sabor-overlay .sabor-desc {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        padding-bottom: 15px; /* Espacio extra al final para el scroll */
    }
}