/* =========================================
   0. REFERENCIA DE BREAKPOINTS (Mobile First)
   =========================================
   - Móvil:       Estilos por defecto (0px en adelante)
   - Tablet:      @media (min-width: 768px)
   - Desktop:     @media (min-width: 1024px)
   - Large:       @media (min-width: 1200px)
   ========================================= */

/* =========================================
   1. VARIABLES (CUSTOM PROPERTIES)
   ========================================= */
:root {
  /* Paleta de Colores Alimentos SUPPER */

  /* CAMBIO AQUÍ: Usamos un rojo carmesí profundo. 
     Este tono es elegante y permite que las gotas rojas brillantes (#ff0000) 
     del logo destaquen por contraste sobre el navbar. */
  --primary-color: #a61c22; /* Rojo Carmesí Profundo (Institucional) */

  --secondary-color: #d4a017; /* Dorado/Beige */
  --accent-color: #f9f9f9; /* Fondo suave */

  /* Textos */
  --text-dark: #1a1a1a;
  --text-light: #ffffff; /* El texto sobre el navbar rojo será blanco */

  /* Tipografía */
  --font-main: "Montserrat", sans-serif;
  --font-title: "Playfair Display", serif;

  /* Layout & Espaciado */
  --max-width: 1200px;
  --header-height: 80px;
  --border-radius: 4px; /* Centralizamos el radio de borde */
}

/* =========================================
   2. RESET Y ESTILOS GLOBALES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  /* CRUCIAL: El padding no aumenta el tamaño total del elemento */
  box-sizing: border-box;
}

/* Pseudo-elementos heredan el box-sizing para evitar sorpresas */
*::before,
*::after {
  box-sizing: inherit;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base estándar para usar 'rem' si es necesario */
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--accent-color);
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased; /* Mejora renderizado de fuentes en Mac/iOS */
}

/* Reset de enlaces */
a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Reset de listas */
ul,
ol {
  list-style: none;
}

/* CRUCIAL: Imágenes Responsivas */
img,
video,
svg {
  max-width: 100%;
  height: auto; /* IMPORTANTE: Mantiene la proporción (aspect ratio) */
  display: block; /* Elimina espacio fantasma debajo de la imagen */
}

/* Previene desbordamiento en inputs */
input,
textarea,
button,
select {
  font-family: inherit;
  max-width: 100%;
}

/* Títulos */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* =========================================
   3. UTILIDADES GLOBALES
   ========================================= */
.container {
  width: 100%; /* Asegura que ocupe el ancho disponible en móviles */
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px; /* Padding seguro para móviles */
}

.section-padding {
  padding: 60px 0; /* 60px es mejor para móvil, subiremos a 80px en desktop */
}

/* Botones */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* =========================================
   3. HEADER / NAVEGACIÓN
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height); /* Usa la variable definida en Fase 1 */
  z-index: 1000; /* Asegura que flote sobre todo */
  background-color: var(--primary-color);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15); /* Sombra sutil */
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* --- LOGO --- */
.logo a {
  display: flex;
  align-items: center;
}

.header-logo-img {
  height: 50px; /* Altura fija para estabilidad */
  width: auto; /* Ancho automático */
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo a:hover .header-logo-img {
  transform: scale(1.05);
}

/* --- NAVEGACIÓN DESKTOP (Por defecto) --- */
.main-nav ul {
  display: flex;
  gap: 30px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding: 5px 0;
}

/* Efecto de línea (Underline) al pasar el mouse */
.main-nav a:not(.btn-contact)::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%; /* Nace del centro */
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-nav a:not(.btn-contact):hover::after {
  width: 100%;
}

.main-nav a:hover {
  color: var(--secondary-color);
}

/* --- BOTÓN DE CONTACTO (Estilo destacado) --- */
.main-nav .btn-contact {
  border: 2px solid var(--secondary-color);
  padding: 8px 24px;
  border-radius: 50px;
  color: var(--secondary-color);
  font-weight: 700;
  transition: all 0.3s ease;
}

.main-nav .btn-contact:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

/* --- MENÚ HAMBURGUESA (Oculto en Desktop) --- */
.menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* =========================================
   4. HERO SLIDER (CORREGIDO PARA SLIDE 1)
   ========================================= */
.hero-slider {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-height));
  min-height: 600px;
  max-height: 900px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #000;
}

/* --- Estructura Base del Slide --- */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease-in-out,
    visibility 0.8s;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* --- Contenido del Slide (GRID por defecto) --- */
.slide-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.slide-text-col {
  z-index: 10;
  color: #fff;
}
.slide-image-col {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.slide-product-img {
  height: auto;
  max-height: 480px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
}

/* =======================================================
   AJUSTE CRÍTICO: SLIDE 1 (FAMILIA) ESCRITORIO
   ======================================================= */
.slide.slide-vertical .slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Subimos todo al inicio del contenedor */
  justify-content: flex-start;
  gap: 0px;
  /* padding-top: 20px; Poco padding arriba para ganar espacio */
}

.slide-top-content {
  width: 100%;
  z-index: 10;
  margin-top: 10px; /* Margen mínimo */
}

/* Logo más pequeño en escritorio para dar espacio a la foto */
.hero-logo-large {
  width: 350px;
  max-width: 60%;
  height: auto;
  display: block;
  margin: 0 auto 0 auto;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.slide-bottom-content {
  width: 100%;
  z-index: 5;
  /* Empuja la imagen hacia abajo pero deja que crezca hacia arriba */
  margin-top: auto;
}

/* Imagen All Food: Permitimos que sea más alta */
.hero-product-img {
  max-width: 95%;
  max-height: 60vh; /* Aumentado para que se vea bien grande */
  width: auto;
  display: inline-block;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.4));
  transform-origin: bottom center;
  /* transform: translateY(100);*/
  padding-bottom: 100px;
  transform: scale(1.05);
}

/* Ajuste de Título para Slide 1 (Para que no ocupe tanto) */
.slide-top-content .slide-text h2 {
  font-size: 2.8rem; /* Un poco más pequeño que los otros slides */
  margin-bottom: 5px;
}

/* --- Tipografía General --- */
.slide-text-col h2,
.slide-text h2 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.slide-text-col p,
.slide-text p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 550px;
  font-weight: 500;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

/* Colores Texto */
.text-dark {
  color: #222 !important;
  text-shadow: none !important;
}
.text-dark-medium {
  color: #333 !important;
  text-shadow: none !important;
}
.text-light {
  color: #f9f9f9 !important;
}
.text-light-medium {
  color: #f0f0f0 !important;
}

/* Badges y Botones */
.badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.badge-primary {
  background: var(--primary-color);
  color: #fff;
}
.badge-blue {
  background: #003da5;
  color: #fff;
}
.badge-gold {
  background: var(--secondary-color);
  color: #fff;
}
.badge-green {
  background: #006837;
  color: #fff;
}
.badge-coffee {
  background: #4b2e2a;
  color: #fff;
}

.btn-blue {
  background: #003da5;
  color: #fff;
}
.btn-gold {
  background: var(--secondary-color);
  color: #fff;
}
.btn-green {
  background: #006837;
  color: #fff;
}
.btn-coffee {
  background: #4b2e2a;
  color: #fff;
}

.shadow-red {
  box-shadow: 0 4px 15px rgba(179, 32, 37, 0.4);
}
.shadow-gold {
  box-shadow: 0 4px 15px rgba(212, 160, 23, 0.4);
}
.shadow-dark {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* --- Controles --- */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 2rem;
  padding: 12px 18px;
  cursor: pointer;
  z-index: 20;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  border-radius: 4px;
}

.slider-btn:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--primary-color);
}

.prev-btn {
  left: 20px;
}
.next-btn {
  right: 20px;
}

/* =========================================
   5. SECCIONES: NOSOTROS Y FEATURES
   ========================================= */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.about-image {
  display: flex;
  justify-content: center;
}

.about-image img {
  border-radius: 8px;
  box-shadow: 10px 10px 0px var(--secondary-color);
  max-width: 100%;
  height: auto;
}

.link-arrow {
  display: inline-block;
  margin-top: 20px;
  color: var(--primary-color);
  font-weight: 700;
  border-bottom: 2px solid var(--secondary-color);
}

/* Features Section */
.features-section {
  background-color: var(--primary-color);
  padding: 80px 0;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.features-grid {
  display: grid;
  /* Ajustado a 250px para mejor soporte en móviles pequeños */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  /* IMPORTANTE: Quitamos align-items flex-start para que tengan igual altura */
}

.feature-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 30px;
  border-radius: 8px;
  text-align: center;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  height: 100%; /* Asegura que ocupe toda la altura disponible */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra el contenido verticalmente */
}

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.icon-wrapper {
  font-size: 3.5rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
  display: inline-block;
}

.feature-card h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #fff;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}
/* =========================================
   6. PRODUCTOS (CATÁLOGO ZIG-ZAG OPTIMIZADO)
   ========================================= */

/* --- Estilos Generales / Base --- */
.section-title {
  text-align: center;
  margin-bottom: 50px;
  padding: 0 15px; /* Margen de seguridad para móviles */
}

.section-title h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 80px; /* Gap base para escritorio */
  margin-top: 40px;
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

/* --- Estilos de la Columna de Imagen --- */
.product-img-col {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  /* Altura base para escritorio */
  height: 400px;
}

.product-img-col img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-row:hover .product-img-col img {
  transform: scale(1.05);
}

/* --- Estilos de la Columna de Texto --- */
.product-text-col {
  flex: 1;
  padding: 20px;
}

.product-text-col h4 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.product-text-col .subtitle {
  font-size: 1.1rem;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-text-col p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.8;
  text-align: justify; /* Considerar 'left' en móvil si se ve raro */
}

.specs {
  border-top: 1px solid #ddd;
  padding-top: 15px;
  margin-top: 10px;
}

.specs li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #333;
}

.specs li strong {
  color: var(--primary-color);
}
/* =========================================
   6. PRODUCTOS (CATÁLOGO ZIG-ZAG OPTIMIZADO)
   ========================================= */

/* --- Estilos Generales / Base --- */
.section-title {
  text-align: center;
  margin-bottom: 50px;
  padding: 0 15px;
}

.section-title h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
  margin-top: 40px;
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

/* --- Estilos de la Columna de Imagen (ESCRITORIO) --- */
.product-img-col {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  /* Altura base para escritorio */
  height: 400px;
}

.product-img-col img {
  max-width: 100%;
  max-height: 100%;
  /* 'contain' asegura que la imagen entera se vea sin cortarse */
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-row:hover .product-img-col img {
  transform: scale(1.05);
}

/* --- Estilos de la Columna de Texto --- */
.product-text-col {
  flex: 1;
  padding: 20px;
}

.product-text-col h4 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.product-text-col .subtitle {
  font-size: 1.1rem;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-text-col p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.8;
  text-align: justify;
}

.specs {
  border-top: 1px solid #ddd;
  padding-top: 15px;
  margin-top: 10px;
}

.specs li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #333;
}

.specs li strong {
  color: var(--primary-color);
}

/* =========================================
   8. FOOTER (OPTIMIZADO RESPONSIVE)
   ========================================= */
.site-footer {
  background-color: #111111; /* Negro suave */
  color: #b0b0b0; /* Texto gris plata */
  padding-top: 80px;
  position: relative;
  border-top: 5px solid var(--secondary-color); /* Línea dorada superior */
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr; /* Layout asimétrico elegante */
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- LOGO EN FOOTER --- */
.footer-logo {
  width: 200px;
  height: auto;
  margin-bottom: 25px;
  display: block;
}

/* --- TEXTOS GENERALES --- */
.footer-col p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-col h4 {
  color: #fff;
  font-family: var(--font-title);
  font-size: 1.3rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
  display: inline-block; /* Necesario para que el ::after se comporte bien */
  width: 100%; /* Ocupa el ancho para mantener alineación */
}

/* Línea dorada debajo de los títulos */
.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
}

/* --- LISTAS DE ENLACES --- */
.footer-col ul {
  padding: 0;
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: #b0b0b0;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
  transform: translateX(8px);
}

/* --- INFO DE CONTACTO --- */
.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.contact-info i {
  color: var(--secondary-color);
  font-size: 1.2rem;
}

/* --- REDES SOCIALES --- */
.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 1.2rem;
  transition: all 0.4s ease;
}

.social-icon:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--secondary-color);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(212, 160, 23, 0.3);
}

/* --- COPYRIGHT --- */
.copyright {
  text-align: center;
  padding: 25px 0;
  font-size: 0.85rem;
  background-color: #0a0a0a;
  color: #666;
}

.copyright strong {
  color: #fff;
}

/* =============================================================
   ESTILOS UNIFICADOS: PÁGINA SERVICIOS (MAQUILA, HORECA, PROCESOS)
   ============================================================= */

/* --- 1. HERO BREADCRUMB (Estilo Maquila) --- */
.page-hero.breadcrumb-style {
  width: 100%;
  height: 50vh;
  min-height: 400px;
  /* Flexbox para centrar el CONTENEDOR verticalmente */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  position: relative;
  background-image: url("../img/fondos/fondo-cafe-moca.webp"); /* Verifica tu ruta */
  background-size: cover;
  background-position: center;
  margin-top: 0;

  /* IMPORTANTE: Permite que el icono salga del div sin cortarse */
  overflow: visible;
  margin-bottom: 60px;
}

/* Contenedor interno: Alineación a la IZQUIERDA */
.page-hero.breadcrumb-style .hero-content {
  width: 100%;
  max-width: 1200px;
  z-index: 2;
  text-align: left; /* Texto a la izquierda */
  padding-left: 20px;

  /* Flex interno alineado al inicio (izquierda) */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-title {
  color: #fff;
  font-family: var(--font-title);
  font-size: 3.5rem;
  margin-bottom: 10px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  line-height: 1;
}

/* Título en Mayúsculas */
.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Navegación (Miga de pan) */
.breadcrumb-nav {
  display: flex;
  gap: 15px;
  padding: 0;
  list-style: none;
  justify-content: flex-start; /* Alineación izquierda */
}

.breadcrumb-nav li {
  color: #f0f0f0;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.breadcrumb-nav li a {
  color: #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.breadcrumb-nav li a:hover,
.breadcrumb-nav li.active {
  color: var(--secondary-color);
}

.breadcrumb-nav li:not(:last-child)::after {
  content: "/";
  margin-left: 15px;
  color: var(--secondary-color);
  font-weight: 700;
}

/* --- ICONO FLOTANTE --- */
.breadcrumb-icon-wrap {
  position: absolute;
  bottom: -40px; /* Cuelga hacia afuera */
  left: 50%;

  /* REGLA SOLICITADA: Desplazamiento específico para escritorio */
  transform: translateX(-650%);

  z-index: 10;
}

.icon-circle {
  width: 80px;
  height: 80px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 4px solid #fff;
  box-shadow:
    0 0 0 1px #e0e0e0,
    0 10px 30px rgba(0, 0, 0, 0.15);
}

.icon-circle i {
  font-size: 40px;
  color: var(--primary-color);
}

/* --- 2. FONDO DECORATIVO --- */
.bg-grain-pattern {
  background-color: #fff;
  background-image: url("../img/decoracion/grano-cafe-lineal.png");
  background-repeat: repeat;
  background-size: 150px;
  background-blend-mode: overlay;
}

/* --- 3. SECCIÓN HORECA (Panaderías/Espresso) --- */
.horeca-section {
  background-color: #fffbf0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.horeca-wrapper {
  display: flex;
  align-items: center;
  gap: 50px;
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.horeca-content {
  flex: 1;
}

.horeca-image {
  flex: 1;
  height: 400px;
}

.horeca-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.text-gold {
  color: var(--secondary-color);
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.lead-text {
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 20px;
}

/* Features Horeca */
.horeca-features {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.h-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.h-item i {
  font-size: 2rem;
  color: var(--primary-color);
  background: rgba(166, 28, 34, 0.1);
  padding: 10px;
  border-radius: 50%;
}

.h-item div {
  display: flex;
  flex-direction: column;
}

.h-item strong {
  color: var(--text-dark);
  font-size: 1rem;
}

.h-item span {
  color: #666;
  font-size: 0.9rem;
}

.mt-3 {
  margin-top: 2rem;
}

/* --- 4. SECCIÓN PROCESOS (Grid & Cards) --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.process-card {
  background-color: #ffffff;
  padding: 40px 30px;
  border-radius: var(--border-radius);
  text-align: center;
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border-bottom: 4px solid transparent;
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.process-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  border-bottom-color: var(--secondary-color);
}

.step-number {
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 5rem;
  font-weight: 900;
  color: var(--primary-color);
  opacity: 0.06;
  font-family: var(--font-title);
  line-height: 1;
  z-index: 0;
}

.process-card .icon-box {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.process-card h4 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.process-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* =========================================
   7. CONTACTO MAESTRO (UNIFICADO)
   ========================================= */
.contact-section {
  background-color: #f4f4f4;
  background: linear-gradient(135deg, #f9f9f9 0%, #e8e4db 100%);
  padding: 100px 0;
}

.contact-wrapper {
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

/* --- COLUMNA IZQUIERDA (INFO) --- */
.contact-info {
  flex: 1;
  background-color: var(--primary-color);
  color: #fff;
  padding: 50px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Patrón de fondo (Dots) */
.contact-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0PSI0IiBoZWlnaHQ9IjQiIGZpbGw9IiNiMzIwMjUiPjwvcmVjdD4KPHJlY3Qgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjEpIj48L3JlY3Q+Cjwvc3ZnPg==");
  opacity: 0.3;
  z-index: 0;
}

.contact-info h3,
.contact-info p,
.contact-info ul {
  position: relative;
  z-index: 1;
}

.info-title {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.info-text {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 40px;
  line-height: 1.6;
}

.info-details {
  list-style: none;
  padding: 0;
}

.info-details li {
  display: flex;
  align-items: flex-start; /* Alineación superior para textos largos */
  margin-bottom: 20px;
  font-size: 1rem;
}

.info-details li i {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-right: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 50%;
  margin-top: -5px; /* Pequeño ajuste óptico */
}

.info-decoration {
  position: absolute;
  bottom: -30px;
  right: -30px;
  opacity: 0.1;
  z-index: 0;
}

.info-decoration i {
  font-size: 15rem;
  color: #fff;
}

/* --- COLUMNA DERECHA (FORMULARIO) --- */
.contact-form {
  flex: 1.5;
  padding: 50px;
  background-color: #fff;
}

.form-title {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 30px;
}

/* Sistema de Grid para Inputs */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px; /* Margen inferior para separar filas */
}

/* Quitamos el margin-bottom individual de form-group dentro de form-row para usar el gap */
.form-row .form-group {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 25px; /* Para inputs que no están en row (como el textarea) */
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
}

/* --- ESTILO UNIFICADO: INPUTS, TEXTAREA Y SELECT --- */
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: var(--font-main); /* Asegura misma fuente */
  font-size: 0.95rem;
  background-color: #fafafa;
  color: #333;
  transition: all 0.3s ease;

  /* Reset para Select en navegadores (opcional, mejora consistencia) */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Recreamos la flecha del Select porque usamos appearance:none */
.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a61c22' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

/* Efecto Focus para todos */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(166, 28, 34, 0.1); /* Usando el rojo institucional */
}

/* Botón de Enviar */
.btn-block {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  font-weight: 700;
  padding: 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-block:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* =========================================
   9. GALERÍA DE IMÁGENES (CON SEPARADOR)
   ========================================= */

/* --- NUEVO: Estilo del Separador de Título --- */
.title-separator-img {
  display: block; /* Para poder usar margen automático y centrarla */
  margin: 15px auto 25px; /* Centrado horizontal + espaciado vertical */
  max-width: 180px; /* Un tamaño prudente, ajustable según tu gusto */
  height: auto; /* Mantiene la proporción */
}

/* --- Estilos de la Galería (Igual que antes) --- */
.gallery-section {
  background-color: #ffffff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  aspect-ratio: 1 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(166, 28, 34, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;

  /* AGREGA ESTA LÍNEA MÁGICA: */
  pointer-events: none;
}

.gallery-overlay i {
  color: var(--secondary-color);
  font-size: 3rem;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.15);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
  transform: scale(1);
}

/* =========================================
   ESTILOS DEL LIGHTBOX (VISOR)
   ========================================= */
.lightbox-modal {
  display: none; /* Oculto por defecto */
  position: fixed; /* Se queda fijo en la pantalla */
  z-index: 9999; /* Encima de todo */
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9); /* Fondo negro oscuro */
  backdrop-filter: blur(5px); /* Efecto borroso elegante detrás */
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* La imagen dentro del visor */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px; /* Que no sea gigante en pantallas ultra anchas */
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
  animation: zoom 0.3s; /* Animación de entrada */
}

/* Botón de Cerrar (X) */
.close-btn {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10000;
}

.close-btn:hover,
.close-btn:focus {
  color: var(--secondary-color); /* Dorado al pasar el mouse */
  text-decoration: none;
  cursor: pointer;
}
/* Animación de Zoom */
@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
/* ==========================================================================
   BLOQUE MAESTRO DE MEDIA QUERIES (ORGANIZADO, CENTRALIZADO Y CORREGIDO)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESKTOP / PANTALLAS GRANDES (min-width: 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .section-padding {
    padding: 80px 0;
  }

  /* Ajuste Galería Desktop */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   2. TABLET / ESCRITORIO PEQUEÑO (min-width: 769px)
   -------------------------------------------------------------------------- */
/* Lógica Zig-Zag para Productos (Solo aplica si NO es móvil) */
@media (min-width: 769px) {
  .product-row:nth-child(even) {
    flex-direction: row-reverse;
  }
}

/* --------------------------------------------------------------------------
   3. TABLET Y MÓVIL (max-width: 768px) - EL GRAN BLOQUE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* === HEADER & NAVEGACIÓN === */
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    padding: 20px 0;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
  }

  .main-nav a {
    display: block;
    font-size: 1.1rem;
    padding: 10px 0;
  }

  .main-nav .btn-contact {
    display: inline-block;
    margin-top: 10px;
  }

  .menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* === HOME: SLIDER === */
  .hero-slider {
    height: 100vh;
    min-height: auto;
  }

  .slide-content,
  .slide.slide-vertical .slide-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    padding-top: 80px;
    gap: 20px;
  }

  .slide-text-col,
  .slide-image-col {
    width: 100%;
  }

  .slide-top-content .slide-text h2 {
    font-size: 2.2rem;
  }
  .hero-logo-large {
    width: 220px;
  }

  .slide-text-col h2,
  .slide-text h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }

  .slide-text-col p,
  .slide-text p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .slide-image-col {
    margin-top: 20px;
  }
  .slide-product-img {
    max-height: 280px;
  }
  .slide-product-img-correccion {
    padding-bottom: 60px;
    transform: scale(1.15);
  }

  .hero-product-img {
    max-height: 35vh;
    margin-bottom: 60px;
    transform: scale(1);
    padding-bottom: 0px;
  }

  .slide-bottom-content {
    margin-top: 0;
  }
  .slider-btn {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
  }

  /* === SECCIONES GENERALES (Padding, Nosotros, Features) === */
  .section-padding {
    padding: 40px 0;
  }

  /* Corrección Sección Nosotros (Imagen abajo) */
  .grid-2-col {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .about-image {
    margin-top: 20px;
    order: -1; /* Opcional: Tu configuración original */
  }

  .about-image img {
    max-width: 80%;
    box-shadow: 5px 5px 0px var(--secondary-color);
  }

  /* Features */
  .features-section {
    padding: 60px 0;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .feature-card {
    padding: 30px 20px;
  }

  /* === CATÁLOGO DE PRODUCTOS (Corrección de Altura y Uniformidad) === */
  .products-list {
    gap: 60px;
  }

  .product-row {
    flex-direction: column !important;
    gap: 25px;
  }

  .product-img-col {
    width: 100%;
    /* CAMBIO: Altura reducida para que no se vean gigantes */
    height: 220px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff; /* Asegura fondo blanco */
    border-radius: 12px;
  }

  /* CAMBIO: Asegura que la imagen respete el espacio y no se deforme */
  .product-img-col img {
    max-height: 100%; /* No más altas que el contenedor */
    max-width: 85%; /* Deja un margen lateral para que se vea aireada */
    width: auto; /* Mantiene proporción */
    object-fit: contain; /* Se ajusta dentro sin recortarse */
  }

  .section-title h3 {
    font-size: 1.8rem;
  }
  .product-text-col {
    padding: 0 5px;
    text-align: center;
  }
  .product-text-col p {
    text-align: left;
    font-size: 0.95rem;
  }
  .product-text-col h4 {
    font-size: 1.6rem;
  }

  /* === FOOTER === */
  .site-footer {
    padding-top: 50px;
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .footer-logo {
    margin: 0 auto 20px auto;
  }
  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .social-links,
  .contact-info p,
  .footer-col ul li {
    justify-content: center;
  }
  .footer-col ul li a:hover {
    transform: translateX(0) scale(1.05);
  }

  /* === PÁGINA SERVICIOS (Maquila & Horeca) === */
  .page-hero.breadcrumb-style {
    height: 40vh;
    min-height: 300px;
  }
  .page-title {
    font-size: 2.5rem;
  }

  .page-hero.breadcrumb-style .hero-content {
    align-items: flex-start;
    padding-left: 20px;
  }

  .breadcrumb-icon-wrap {
    bottom: -30px;
    transform: translateX(-50%); /* Centrado exacto en móvil */
  }

  .icon-circle {
    width: 60px;
    height: 60px;
  }
  .icon-circle i {
    font-size: 30px;
  }

  .horeca-wrapper {
    flex-direction: column;
    padding: 20px;
  }
  .horeca-image {
    height: 250px;
    width: 100%;
    order: -1;
  }

  .process-grid {
    margin-top: 30px;
    gap: 25px;
  }
  .process-card {
    padding: 30px 20px;
  }
  .step-number {
    font-size: 4rem;
    top: -5px;
    opacity: 0.05;
  }
  .process-card .icon-box {
    font-size: 3rem;
    margin-bottom: 15px;
  }
  .process-card h4 {
    font-size: 1.3rem;
  }

  /* === SECCIÓN CONTACTO (Formulario Unificado) === */
  .contact-section {
    padding: 60px 0;
  }
  .contact-wrapper {
    flex-direction: column;
    width: auto;
    margin: 0 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }
  .contact-info,
  .contact-form {
    padding: 30px 25px;
  }
  .info-title,
  .form-title {
    font-size: 1.6rem;
    text-align: center;
  }
  .info-text {
    text-align: center;
    margin-bottom: 30px;
  }

  /* Romper Grid Inputs */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }
  .form-row .form-group {
    margin-bottom: 20px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px !important; /* Anti-zoom iOS */
    padding: 14px;
  }
  .info-decoration {
    display: none;
  }

  /* === GALERÍA & LIGHTBOX (Estilo Mosaico Edge-to-Edge) === */

  /* 1. Truco para que toque los bordes: Quitamos padding al contenedor solo aquí */
  .gallery-section .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  /* 2. Pero le devolvemos el padding al Título para que el texto NO toque los bordes */
  .gallery-section .section-title {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* 3. El Grid: 3 columnas apretadas */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 Columnas exactas */
    gap: 3px; /* Espacio blanco muy fino entre fotos (como en tu referencia) */
  }

  /* 4. Estilo de las fotos: Cuadradas y sin bordes redondos */
  .gallery-item {
    aspect-ratio: 1/1; /* Cuadrados perfectos */
    border-radius: 0; /* Quitamos bordes redondos para que se vea pegado */
    box-shadow: none; /* Quitamos sombra para que se vea plano y limpio */
  }

  /* Ajuste del separador */
  .title-separator-img {
    max-width: 140px;
    margin: 10px auto 20px;
  }

  /* Ajuste del Modal (Lightbox) */
  .modal-content {
    width: 95%;
  }
}
/* --------------------------------------------------------------------------
   4. MÓVIL PEQUEÑO (max-width: 480px) - AJUSTES FINALES
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .gallery-grid {
    /* CAMBIO: 2 columnas en lugar de 1. Así se ven dos fotos por fila (estilo Instagram) */
    grid-template-columns: repeat(3, 1fr);
    gap: 8px; /* Espacio aún más pequeño */
  }

  .gallery-item {
    /* Forzamos que sigan siendo cuadradas */
    aspect-ratio: 1/1;
  }
}

/* --------------------------------------------------------------------------
   5. ANIMACIONES (Keyframes)
   -------------------------------------------------------------------------- */
@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
