:root {
    --primary-green: #0f7f41;
    --dark-green: #0a5c2f;
    --light-bg: #f4fdf7;
    --text-color: #333;
    --white: #ffffff;
    --font-main: 'Montserrat', sans-serif;
    --font-titles: 'Belanosima', sans-serif; 
    --header-height: 100px;

    /* Variables adicionales */
    --verde-oscuro: var(--dark-green);
    --verde-medio: #4f8f3f;
    --texto-secundario: #666666;
    --borde-suave: #dbece2;
}

/* --- RESET BÁSICO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important; /* Evita desplazamiento lateral indeseado */
    position: relative;
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: #fff;
    -webkit-font-smoothing: antialiased; /* Suaviza fuentes en Mac/iOS */
}

/* --- TIPOGRAFÍA GENERAL --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-titles);
    line-height: 1.2;
}


/* --------------------------------------------------- HEADER FIXED --- */
.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 3000 !important; 
    transition: all 0.3s ease;
}

.navbar-container {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.logo-mobile { display: none; } 
.logo-desktop img { 
    height: 75px; 
    margin: 0 30px; 
    transition: transform 0.3s;
    display: block;
}
.logo-desktop img:hover { transform: scale(1.05); }

/* --------------------------------------------------- IDIOMA SELECTOR --- */
.language-dropdown { 
    position: relative; 
    z-index: 2200; 
    font-family: var(--font-main);
    flex-shrink: 0; /* Evita que se aplaste si falta espacio */
}

/* Botón principal (El que se ve siempre) */
.lang-selected {
    display: flex; 
    align-items: center; 
    justify-content: space-between; /* Asegura espacio entre texto e ícono */
    gap: 10px;
    background-color: #fff;
    border: 1px solid #e0e0e0; /* Borde sutil */
    border-radius: 50px;       /* Forma de píldora */
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-green);
    transition: all 0.3s ease;
    min-width: 90px; /* Ancho mínimo para consistencia */
}

/* Efecto Hover en el botón principal */
.lang-selected:hover, 
.language-dropdown:hover .lang-selected {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-green);
}

/* Contenedor interno de imagen y texto */
.current-content { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

/* La imagen de la bandera seleccionada */
.lang-selected img { 
    width: 22px; 
    height: 22px; 
    border-radius: 50%; /* Bandera redonda */
    object-fit: cover; 
    display: block;
}

/* Flechita */
.language-dropdown .arrow-icon { 
    font-size: 0.75rem; 
    color: var(--primary-green); 
    transition: transform 0.3s ease; 
}

/* Rotar flecha al pasar el mouse */
.language-dropdown:hover .arrow-icon { 
    transform: rotate(180deg); 
}

/* --- MENÚ DESPLEGABLE (La lista de opciones) --- */
.lang-options {
    position: absolute; 
    top: calc(100% + 8px); /* Un poco separado del botón */
    right: auto; /* Alineado a la derecha */
    background-color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* Sombra elegante */
    border: 1px solid #f0f0f0;
    padding: 8px;
    min-width: 150px;
    border-radius: 12px;
    
    /* Animación de entrada */
    opacity: 0; 
    visibility: hidden;
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* Centrado respecto al botón */
    width: max-content; /* El ancho se adapta al contenido */
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Mostrar menú al hacer hover */
.language-dropdown:hover .lang-options { 
    transform: translateX(-50%) translateY(0); 
    opacity: 1; 
    visibility: visible; 
}

/* --- ESTILOS DE LAS OPCIONES INTERNAS --- */
/* Aquí usamos selectores directos para asegurar que agarre los botones del HTML */
.lang-options button {
    display: flex; 
    align-items: center; 
    gap: 12px;
    background: transparent; 
    border: none; 
    width: 100%; 
    padding: 10px 12px;
    border-radius: 8px; 
    cursor: pointer; 
    color: #555; 
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    transition: all 0.2s ease;
}

/* Hover sobre una opción */
.lang-options button:hover { 
    background-color: var(--light-bg); 
    color: var(--primary-green); 
    transform: translateX(3px); /* Pequeño movimiento a la derecha */
}

/* Imágenes dentro de las opciones (IMPORTANTE: Esto evita que se vean gigantes) */
.lang-options button img { 
    width: 22px; 
    height: 22px; 
    border-radius: 50%; 
    object-fit: cover; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Menu */
#mobile-menu-btn {
    display: none; 
}
.nav-menu { display: flex; list-style: none; align-items: center; margin: 0; padding: 0; height: 100%; }
.nav-item { height: 100%; display: flex; align-items: center; position: relative; }
.nav-link {
    text-decoration: none; color: var(--primary-green);
    font-weight: 700; font-size: 1rem; padding: 0 25px; height: 100%;
    display: flex; align-items: center; text-transform: uppercase;
    transition: all 0.3s; border-bottom: 4px solid transparent; white-space: nowrap;
}
.arrow-icon.rotate { transform: rotate(180deg) !important; }
.nav-link:hover, .nav-link.active-page { border-bottom: 2px solid var(--primary-green); color: var(--dark-green); }
.nav-item:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.dropdown-content {
    display: none; position: absolute; top: var(--header-height); left: 50%;
    transform: translateX(-50%); background-color: var(--white); min-width: 240px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); z-index: 999; text-align: center; padding: 20px 0;
}
.dropdown-content.show {
    display: block !important;
    opacity: 1 !important;        /* <--- AGREGAR ESTO */
    visibility: visible !important; /* <--- AGREGAR ESTO */
    animation: fadeIn 0.3s ease;
}
.dropdown-content a { display: block; padding: 10px 20px; color: var(--primary-green); text-decoration: none; font-weight: 600; font-size: 1rem; }
.dropdown-content a:hover { background-color: var(--light-bg); color: var(--primary-green); }
@keyframes fadeIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* --- -------------------------------------------HERO SECTION --- */
.hero, .hero-gal {
     margin-top: var(--header-height);
    width: 100%;
    height: 80vh; 
    background-size: cover;
    background-position: center;
    position: relative; /* Importante para contener el overlay */
}


.hero-overlay {
    position: absolute; /* Se sale del flujo para cubrir todo */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Un poco más oscuro para leer mejor */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Nivel base */
}

.hero-inner-content {
    width: 100%; max-width: 1200px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; gap: 30px;
}

.hero-col-logo img {
    max-width: 500px; height: auto; display: block;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3));
}

/* --- HERO SECTION MODIFICADO --- */

/* Agregamos .hero-col-text h1 al selector para que aplique los estilos */
.hero-col-text h1, 
.hero-col-text h2, 
.hero-col-text-gal h2 {
    font-family: var(--font-titles); 
    color: var(--white); /* <--- ESTO PONE EL TEXTO EN BLANCO */
    font-size: 2.5rem; 
    max-width: 900px;
    text-transform: uppercase; 
    text-align: center;
    font-weight: 300; /* Aumenté el peso para que se lea mejor sobre la imagen */
    line-height: 1.2;
    /* Sombra más fuerte para mejorar lectura sobre el cultivo */
    text-shadow: 0px 2px 10px rgba(0,0,0,0.8); 
    margin: 0;
}

.content-container {
    width: 100%; max-width: 1100px; margin: 0 auto;
    padding: 60px 20px; background-color: var(--white);
}

.section-title {
    font-family: var(--font-titles); color: var(--primary-green);
    text-align: center; font-size: 2.5rem; font-weight: 100;
    margin-bottom: 40px; text-transform: uppercase; letter-spacing: 1px;
}

/* --- SPLIT SECTION (Video/Text) --- */
.split-section {
    display: flex; align-items: center; gap: 40px; margin-bottom: 30px;
}
.split-video {
    flex: 1; border-radius: 8px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15); background: #000; line-height: 0;
}
.split-video video { width: 100%; height: auto; display: block; object-fit: cover; }
.split-text { flex: 1; }
.split-text p, .full-width-text p {
    text-align: justify; line-height: 1.8; color: #555;
    font-size: 1.1rem; margin: 0;
}
.full-width-text p { margin-bottom: 70px; }

/* ---------------------------------------------------------- SECCIÓN VALORES --- */
.valores {
    padding: 80px 20px; position: relative; overflow: hidden;
    margin-top: var(--header-height);
}
.contenedor-valores { max-width: 1100px; margin: 0 auto; position: relative; z-index: 2; }
.valores .hero-text {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; margin-bottom: 20px; width: 100%;
}
.valores .hero-text h2 {
    color: var(--primary-green); font-size: 2.5rem;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 25px; font-weight: 100;
}
.valores .hero-text p {
    max-width: 900px; font-family: var(--font-main);
    color: #555; line-height: 1.6; font-size: 1rem; margin-bottom: 10px;
}

.iconos-valores {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 40px; margin: 20px 0 40px 0; width: 100%;
}
.valor {
    width: 160px; /* AUMENTADO: Antes era 140px */
    display: flex; 
    flex-direction: column;
    align-items: center; 
    text-align: center; 
    transition: transform 0.3s ease;
}
.valor:hover { transform: translateY(-5px); }
.valor img { 
    width: 130px;   /* AUMENTADO: Antes era 80px */
    height: 130px;  /* AUMENTADO: Antes era 80px */
    object-fit: contain; 
    margin-bottom: 15px; 
}
.valor p { font-family: var(--font-titles); font-weight: 100; color: #000; font-size: 0.95rem; line-height: 1.2; }

/* ---------------------------------------------------- GALERÍA --- */
.separator-leaf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;      /* Espacio entre líneas e icono */
    margin-bottom: 50px; /* Espacio extra hacia abajo para separar de la galería */
    margin-top: 10px; /* Espacio extra hacia arriba */
}

.separator-leaf .line {
    width: 50px;    /* Largo de la línea */
    height: 2px;    /* Grosor */
    background-color: var(--primary-green); /* Usa tu verde corporativo */
    border-radius: 2px;
}

.separator-leaf i {
    color: var(--primary-green);
    font-size: 1.2rem; /* Tamaño de la hojita */
}
.galeria-simple-header {
    margin-top: var(--header-height); /* Para que no quede debajo del menú fijo */
    width: 100%;
    padding: 60px 20px 10px 20px; /* Espaciado similar a la sección valores */
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.galeria-simple-header h2 {
    font-family: var(--font-titles);
    color: var(--primary-green); /* El mismo verde de "Valores" */
    font-size: 3.5rem;
    font-weight: 100;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
}
.gallery-section {
    width: 100%; background-color: #ffffff; padding: 10px 20px 80px 20px;
    display: flex; justify-content: center; overflow: hidden;
}
.gallery-wrapper {
    display: flex; justify-content: space-between; width: 100%;
    max-width: 1200px; gap: 25px;
}
.gallery-column { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.column-header {
    background-color: var(--primary-green); color: var(--white);
    padding: 8px 25px; border-radius: 50px; font-size: 1rem;
    font-weight: 200; text-transform: uppercase; margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15); white-space: nowrap; z-index: 5;
}
.column-window {
    width: 100%; height: 550px; background-color: #fff; border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); position: relative;
    overflow-y: auto; overflow-x: hidden;
    -ms-overflow-style: none; scrollbar-width: none; cursor: grab;
}
.column-window:active { cursor: grabbing; }
.column-window::-webkit-scrollbar { display: none; }
.column-track { display: flex; flex-direction: column; gap: 0; width: 100%; }
.column-track img {
    display: block; width: 100%; height: 250px; object-fit: cover;
    border-radius: 8px; margin-bottom: 20px; flex-shrink: 0;
    pointer-events: auto !important; user-select: none;
}

.column-track img:hover {
    opacity: 0.9;
    transform: scale(0.98); /* Pequeño efecto al pasar el mouse */
}

.lightbox-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 5000; /* Por encima de todo, incluso del menú */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 5001;
}

.lightbox-close:hover {
    color: var(--primary-green);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.certificados {
  display: flex; justify-content: center; align-items: center;
  gap: 60px; margin: 40px auto; flex-wrap: wrap; /* Importante para responsivo */
}
.certificados img { width: 200px; height: auto; object-fit: contain; }

/* --- POR QUÉ ELEGIRNOS --- */
.seccion-elegirnos {
    background-color: #ffffff; padding: 80px 20px;
    margin-top: var(--header-height);
}
.seccion-elegirnos h2 {
    color: var(--primary-green); text-align: center;
    font-size: 2.5rem; font-weight: 100; text-transform: uppercase; margin-bottom: 60px;
}
.contenedor-principal {
    max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 50px;
}
.bloque-item {
    display: flex; align-items: center; justify-content: center;
    gap: 60px; width: 100%;
}
.iconoytexto {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; width: 220px; flex-shrink: 0; font-weight: 100;
}
.iconoytexto img {
    width: 130px;   /* ANTES: 90px -> AHORA: 130px */
    height: 130px;  /* ANTES: 90px -> AHORA: 130px */
    object-fit: contain;
    margin-bottom: 15px; 
    transition: transform 0.3s ease;
}
.iconoytexto img:hover { transform: scale(1.1); }
.iconoytexto b { font-family: var(--font-titles); font-size: 1.1rem; color: #000; }
.texto-descripcion {
    flex: 1; font-family: var(--font-main); color: #555;
    font-size: 1rem; line-height: 1.6; text-align: justify; margin: 0;
}
/* --- SECCIÓN PROCESOS (Desktop) --- */
.procesos {
  position: relative;
  width: 100%;
  padding: 80px 0;
}

.procesos-mobile {
  display: none; /* Se activa en media query */
}

.proceso-row {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 20px;
  padding: 80px 10%;
  align-items: center;
}

.proceso-col img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.proceso-col h3,
.mobile-slide h3 {
    color: var(--primary-green);
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 200;
}

.proceso-col p,
.mobile-slide p {
    font-size: 16px; /* Aumentado ligeramente para lectura */
    line-height: 1.6;
    color: #333;
}

.procesos::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 60px;
  background-color: #0b7c2f;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.proceso-col { text-align: left; }
.image-col { display: flex; }

/* Alineaciones específicas Desktop */
.proceso-col.left.image-col { justify-content: flex-end; }
.proceso-col.right.image-col { justify-content: flex-start; }
.proceso-col.left.image-col .img-box { margin-right: -20px; }
.proceso-col.right.image-col .img-box { margin-left: -20px; }

.text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.text-col h3 {
  font-size: 40px;
  margin-bottom: 20px;
  line-height: 1.25;
}

.text-col p {
  font-size: 20px; /* Ajustado para balance */
  line-height: 1.7;
  max-width: 520px;
}

.text-col.left { padding-left: 60px; padding-right: 20px; justify-self: end; }
.text-col.right { padding-right: 60px; padding-left: 20px; justify-self: start; }

.img-box {
  width: 100%;
  max-width: 500px;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.img-box img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
}
/* --- ESTILOS MEJORADOS DEL FORMULARIO --- */
.contacto { 
  width: 100%; 
  max-width: 900px; /* Un poco más estrecho para elegancia */
  margin: 0px auto 80px; /* Margin-top pequeño porque el título ya hizo el trabajo */
  padding: 0 20px;
}
.section-title-contact {
  font-family: var(--font-titles); color: var(--primary-green);
    text-align: center; font-size: 3rem; font-weight: 100;
  margin-top: 140px; /* Separación del header */
  margin-bottom: 10px;
}

/* El contenedor del Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 25px; /* Espacio entre columnas y filas */
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); /* Sombra elegante ("Card") */
    margin-top: 20px;
    border: 1px solid var(--borde-suave);
}

/* Los campos individuales */
.field { 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
  margin: 0; /* El gap del grid maneja el espacio ahora */
}

/* Clase para elementos que ocupan todo el ancho (textarea y botón) */
.span-2 {
    grid-column: span 2;
}

.field label { 
  font-size: 0.9rem; 
  color: var(--dark-green); /* Usando tus variables */
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-left: 5px;
}

.field input, .field textarea, .field select {
  width: 100%; 
  border: 2px solid #edf5f0; /* Borde muy sutil */
  background: #f8fbf9; /* Fondo casi blanco, muy limpio */
  padding: 15px 18px; /* Más espacio interno para confort */
  border-radius: 12px; /* Bordes más redondeados y modernos */
  outline: none;
  font-family: var(--font-main);
  font-size: 1rem;
  color: #333;
  transition: all 0.3s ease;
}

/* Efecto al hacer clic en un input */
.field input:focus, .field textarea:focus {
  border-color: var(--primary-green);
  background: #fff;
  box-shadow: 0 4px 15px rgba(15, 127, 65, 0.1); /* Resplandor verde suave */
  transform: translateY(-2px); /* Pequeño movimiento hacia arriba */
}

.field textarea { 
  min-height: 150px; 
  resize: vertical; 
}

/* Botón de envío */
.actions { 
  display: flex; 
  justify-content: center; 
  margin-top: 10px; 
}

.btn {
  border: none; 
  background: var(--primary-green); 
  color: var(--white); 
  padding: 16px 50px;
  border-radius: 50px; /* Botón tipo "píldora" */
  cursor: pointer; 
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  box-shadow: 0 10px 20px rgba(15, 127, 65, 0.25);
  transition: all 0.3s ease;
  width: 100%; /* Botón ancho en móviles, ajustable luego */
  max-width: 400px;
}

.btn:hover { 
  background-color: var(--dark-green); 
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(15, 127, 65, 0.35);
}

.btn:active {
    transform: translateY(-1px);
}

/* ANIMACIONES */
.animate-from-center {
  opacity: 0;
  transform: translateX(0);
  transition: all 0.8s ease;
}
.left.animate-from-center { transform: translateX(80px); }
.right.animate-from-center { transform: translateX(-80px); }
.animate-from-center.show { opacity: 1; transform: translateX(0); }
/* --- CATÁLOGO --- */
.catalogo { width: min(1200px, 94%); margin: 40px auto; }
.catalogo__intro {
    margin-bottom: 30px; text-align: center; max-width: 800px;
    margin-left: auto; margin-right: auto;
}
.catalogo__intro h2 {
    color: var(--primary-green); font-size: 2rem;
    margin-bottom: 10px; font-weight: 200;
}
.tiles {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px;
}
.tile {
    position: relative; border-radius: 12px; overflow: hidden;
    background: #fff; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 1px solid var(--borde-suave); transition: all 0.3s ease;
}
.tile:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); border-color: var(--primary-green); }
.tile img {
    width: 100%; height: 150px; object-fit: cover; display: block; transition: transform 0.5s ease;
}
.tile:hover img { transform: scale(1.1); }
.tile__label {
    padding: 12px; text-align: center; font-weight: 700;
    font-size: 0.95rem; color: var(--dark-green);
    background: var(--white); border-top: 1px solid #f0f0f0;
}

#results {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Fondo oscuro transparente */
    z-index: 5000; /* Por encima del header y todo lo demás */
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px); /* Efecto borroso en el fondo */
    opacity: 0;
    transition: opacity 0.3s ease;
}
/* Clase para activar el modal */
#results.active {
    display: flex;
    opacity: 1;
}
/* Estilos de la tarjeta cuando está dentro del modal */
.card {
    position: relative; 
    display: grid; 
    grid-template-columns: 45% 55%; /* Imagen grande a la izquierda, texto a la derecha */
    width: 100%;
    max-width: 900px; /* Ancho máximo del modal */
    max-height: 85vh; /* Altura máxima para evitar que se corte en laptops */
    background: #fff; 
    border-radius: 16px; 
    overflow: hidden; /* Importante para bordes redondos */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: zoomInCard 0.3s ease-out forwards;
}
/* Animación de entrada suave */
@keyframes zoomInCard {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
/* Imagen dentro del modal */
.card__img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    background-color: #f9f9f9;
    min-height: 300px; /* Altura mínima visual */
}

/* Cuerpo de texto con scroll interno si es necesario */
.card__body { 
    padding: 40px; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    overflow-y: auto; /* Permite scroll solo en el texto si es muy largo */
}

.card__title {
    color: var(--primary-green); 
    font-weight: 300; 
    font-family: var(--font-titles);
    font-size: 2.5rem; 
    margin: 0;
    line-height: 1.1;
    display: flex; 
    align-items: center; 
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card__title .badge {
    height: 12px; 
    width: 12px; 
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary-green); 
    display: inline-block;
    margin-top: 5px;
}

.meta {
    font-family: var(--font-main);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a4a4a;
}

/* Botón de cerrar flotante */
.card__close {
    position: absolute; 
    top: 15px; 
    right: 15px; 
    width: 40px; 
    height: 40px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.9); 
    border: none;
    border-radius: 50%;
    color: var(--verde-oscuro);
    font-weight: bold; 
    cursor: pointer; 
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.card__close:hover { 
    background: var(--primary-green); 
    color: #fff; 
    transform: rotate(90deg);
}

/* Texto vacío o placeholder (ya no se usa tanto, pero se deja por seguridad) */
.empty {
    display: none;
}
@keyframes pop { from{ transform:scale(.98); opacity:.8; } to{ transform:scale(1); opacity:1; } }

/* --- FOOTER --- */
footer {
    background-color: var(--primary-green); color: var(--white);
    padding: 50px 20px; width: 100%; position: relative;
}
.footer-container {
    width: 100%; max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-around; align-items: center;
    flex-wrap: wrap; gap: 20px;
}
.footer-col {
    flex: 1; min-width: 200px; margin: 10px 0;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.footer-col i { font-size: 1.8rem; margin-bottom: 15px; display: block; }
.footer-col p { margin: 5px 0; font-size: 0.95rem; line-height: 1.4; }
.footer-col img { max-width: 180px; height: auto; object-fit: contain; }

.whatsapp-float {
    position: fixed; width: 60px; height: 60px; bottom: 25px; right: 25px;
    background-color: #25d366; color: #FFF; border-radius: 50%;
    text-align: center; font-size: 35px; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3); text-decoration: none;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); }

.intro-principal {
    margin-top: var(--header-height); /* Empuja el contenido debajo del menú fijo */
    padding: 80px 20px 40px 20px;     /* Espaciado generoso */
    background-color: var(--white);
    text-align: center;
}

.intro-principal h2 {
    color: var(--primary-green);      /* Color verde corporativo */
    font-family: var(--font-titles);
    font-size: 2.2rem;                /* Tamaño grande */
    font-weight: 100;                 /* Estilo fino (light) */
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
    max-width: 1000px;
    margin: 0 auto;                   /* Centrar horizontalmente */
}


/* ================================================================= */
/* ============= MEDIA QUERIES UNIFICADAS Y ORGANIZADAS ============= */
/* ================================================================= */

/* ================================================================= */
/* ============= MEDIA QUERIES UNIFICADAS Y ORGANIZADAS ============= */
/* ================================================================= */

/* --- 1. PANTALLAS GRANDES (Desktop) --- */
@media (min-width: 1240px) {
    .nav-item.nav-cta {
        display: flex;
        align-items: center;
        margin-left: 30px;
    }

    .nav-item.nav-cta a {
        white-space: nowrap !important;
        display: inline-block !important;
        width: auto !important;
        text-decoration: none !important;
        border-bottom: none !important;
        background-color: var(--primary-green) !important;
        color: #ffffff !important;
        border-radius: 50px !important;
        padding: 12px 35px !important;
        line-height: 1 !important;
        font-weight: 700;
        font-size: 0.95rem;
        border: 2px solid var(--primary-green) !important;
        box-shadow: 0 5px 15px rgba(15, 127, 65, 0.25);
        transition: all 0.3s ease;
    }

    .nav-item.nav-cta a:hover {
        background-color: var(--dark-green) !important;
        border-color: var(--dark-green) !important;
        color: #ffffff !important;
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(15, 127, 65, 0.35);
        text-decoration: none !important;
    }

    .nav-menu .arrow-icon { display: none !important; }
    .dropdown-content.show { display: block; animation: fadeIn 0.3s ease; }
    .arrow-icon.rotate { transform: rotate(180deg); }
    .nav-link { padding: 0 65px; }
    
    /* Hover en desktop para idioma */
    .language-dropdown:hover .lang-options { opacity: 1; visibility: visible;  transform: translateX(-50%) translateY(0); /* <--- CORRECCIÓN: Agregamos translateX(-50%) */ }
    .language-dropdown:hover .arrow-icon { transform: rotate(180deg); }

    /* --- HERO & GENERAL DESKTOP --- */
    .hero, .hero-gal { height: 90vh; }
    .hero-col-text h1 { font-size: 2rem; line-height: 1.2; }
    .hero-col-logo img { max-width: 600px; }
    
    .section-title, 
    .galeria-simple-header h2, 
    .seccion-elegirnos h2,
    .valores .hero-text h2 { font-size: 3rem; }

    .full-width-text p, .split-text p, .texto-descripcion {
        font-size: 1.2rem; line-height: 1.9;
    }

    .column-window { height: 700px; }
    .column-track img { height: 300px; }
    .procesos { padding: 100px 0; }
    .proceso-row { gap: 60px; padding: 80px 5%; }
    .text-col h3 { font-size: 3.5rem; }
    .text-col p { font-size: 1.3rem; max-width: 650px; }
    .img-box { max-width: 600px; }
    .tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 30px; }
    .tile img { height: 200px; }
    footer { padding: 80px 20px; }
    .footer-col p { font-size: 1.05rem; }
    
    .contenedor-valores { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
    .valores .hero-text h2 { font-size: 2.5rem; margin-bottom: 20px; }
    .valores .hero-text p { font-size: 1.1rem; max-width: 900px; margin-left: auto; margin-right: auto; }
    
    .separator-leaf { margin: 25px 0 45px 0; }
    .separator-leaf .line { width: 60px; }
    
    .iconos-valores { display: flex; flex-wrap: nowrap; justify-content: center; gap: 60px; margin-bottom: 60px; }
    .iconoytexto img { width: 160px; height: 160px; margin-bottom: 25px; }
    .iconoytexto { width: 260px; }
    .valor { width: auto; min-width: 140px; }
    .valor img { width: 170px; height: 170px; margin-bottom: 30px; transition: transform 0.3s ease; }
    .valor:hover img { transform: scale(1.1); }
    .valor p { font-size: 1rem; font-weight: 600; }
}

/* --- 2. TABLETS Y LAPTOPS PEQUEÑAS (max-width: 1239px) --- */
@media (max-width: 1239px) {

    /* --- HEADER --- */
    .header { height: 80px; z-index: 3000 !important; }
    .navbar { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
    .logo-desktop { display: none !important; }
    
    .logo-mobile { 
        display: block; position: absolute; left: 50%; top: 50%;
        transform: translate(-50%, -50%); z-index: 3001; 
    }
    .logo-mobile img { height: 50px; width: auto; }

    /* --- HAMBURGUESA --- */
    #mobile-menu-btn {
        order: 2; display: flex !important; align-items: center; justify-content: flex-end;
        width: 44px; height: 44px; background: transparent; border: none; cursor: pointer;
        z-index: 3100; padding: 0; margin-left: 0;  
    }
    #mobile-menu-btn i { font-size: 1.8rem; color: var(--primary-green); transition: transform 0.3s ease, color 0.3s ease; }
    #mobile-menu-btn.active i { transform: rotate(90deg); color: var(--dark-green); }

    /* --- MENÚ LATERAL --- */
    .nav-menu {
        position: fixed; top: 0; right: -100%; left: auto; width: 85%; max-width: 320px; height: 100vh;
        background-color: var(--white); flex-direction: column; align-items: flex-start;
        padding-top: 100px; box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 3005 !important; overflow-y: auto;
    }
    .nav-menu.active { right: 0; }
    
    .nav-item { width: 100%; height: auto; border-bottom: 1px solid #f0f0f0; display: flex; flex-direction: column; align-items: flex-start; }
    .nav-link { 
        width: 100%; padding: 20px 25px; display: flex; justify-content: space-between; 
        align-items: center; font-size: 1rem; height: auto; border-bottom: none; color: var(--text-color); 
    }
    .nav-link:hover { background-color: #f9f9f9; color: var(--primary-green); border-bottom: none; }

    .dropdown-content {
        position: static !important; transform: none !important; width: 100%; box-shadow: none;
        border-top: 1px solid #eee; background-color: #fbfbfb; padding: 0;
        display: none; opacity: 1; visibility: visible;
    }
    .dropdown-content.show { display: block !important; opacity: 1 !important; visibility: visible !important; animation: fadeIn 0.3s ease; }
    .dropdown-content a {
        text-align: left; padding: 15px 25px 15px 50px; border-bottom: 1px solid #eee; 
        display: block; font-size: 0.95rem; color: var(--dark-green) !important; font-weight: 600;
    }
    .dropdown-content a:last-child { border-bottom: none; }

    .nav-item.nav-cta { border-bottom: none; padding: 30px 25px; width: 100%; display: flex; justify-content: center; }
    .nav-item.nav-cta a {
        background-color: var(--primary-green); color: #ffffff !important; width: 100%;
        justify-content: center; border-radius: 50px; padding: 15px; text-align: center;
        font-weight: 700; box-shadow: 0 4px 10px rgba(15, 127, 65, 0.2); text-decoration: none !important;
        border-bottom: none !important; display: flex; align-items: center;
    }
    .nav-item.nav-cta a:hover { background-color: var(--dark-green); transform: translateY(-2px); border-bottom: none !important; }

    /* --- IDIOMA TABLET/MÓVIL (CORREGIDO) --- */
    .language-dropdown { 
        order: 1; 
        margin-right: auto; 
        margin-left: 0; 
        position: relative; 
        z-index: 3002;
    }
    
    .lang-selected {
        padding: 5px 12px;
        min-width: auto;
        height: 40px;
    }
    
    /* El menú desplegable se alinea a la izquierda */
    .lang-options { 
        left: 0; 
        right: auto;
        transform: translateY(10px); 
        top: 100%; 
        width: max-content;
    }
    
    .language-dropdown:hover .lang-options { 
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .language-dropdown.active-lang .lang-options { 
        opacity: 1; visibility: visible; transform: translateY(0); 
    }
    .language-dropdown.active-lang .arrow-icon { transform: rotate(180deg); }

    #menu-overlay {
        display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.6); z-index: 3004; opacity: 0; visibility: hidden; transition: all 0.3s ease;
    }
    #menu-overlay.active { opacity: 1; visibility: visible; }

    /* --- GENERAL TABLET --- */
    .hero-inner-content { flex-direction: column; justify-content: center; text-align: center; gap: 20px; }
    .hero-col-text h1 { text-align: center; font-size: 1.7rem; }
    .hero-col-logo img { max-width: 400px; }
    .split-section { flex-direction: column; }
    .split-video, .split-text { width: 100%; }

    /* --- MODAL TABLET --- */
    .card { 
        grid-template-columns: 1fr; grid-template-rows: auto 1fr; 
        display: flex; flex-direction: column; max-height: 85vh; width: 90%; 
    }
    .card__img { width: 100%; height: 250px; flex-shrink: 0; }
    .card__body { overflow-y: auto; padding: 30px; }

    .form-grid { grid-template-columns: 1fr; padding: 30px 20px; }
    .span-2 { grid-column: span 1; }
}

/* --- 3. MÓVILES (Smartphone Portrait - max-width: 768px) --- */
@media (max-width: 768px) {

    /* --- IDIOMA MÓVIL (CORREGIDO Y ESTILIZADO) --- */
    .language-dropdown {
        margin-left: 0;
    }

    .lang-selected {
        padding: 4px 10px !important;
        height: 34px;
        gap: 6px;
        border-radius: 50px;
    }
    
    .current-content {
        font-size: 0.75rem; 
        font-weight: 700;
    }

    .lang-selected img { width: 18px; height: 18px; }
    .language-dropdown .arrow-icon { font-size: 0.65rem; }

    .lang-options {
        min-width: 120px; 
        left: 0; 
        top: 45px; 
        padding: 5px;
    }
    
    .lang-options button {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .lang-options button img {
        width: 18px;
        height: 18px;
    }

    /* --- GENERAL MÓVIL --- */
    .separator-leaf { margin: 20px 0 30px 0; }
    .catalogo { margin: 10px auto; }
    
    section, .procesos, .seccion-elegirnos, .valores, .catalogo, .footer-container {
        padding-left: 20px !important; padding-right: 20px !important;
        padding-top: 40px !important; padding-bottom: 10px !important;
    }

    h1 { font-size: 1.8rem !important; text-align: center; }
    h2, .section-title { font-size: 1.6rem !important; text-align: center; line-height: 1.3; margin-bottom: 5px !important; }
    h3 { font-size: 1.4rem !important; text-align: center; }
    p { font-size: 1rem !important; text-align: center !important; margin-bottom: 20px !important; } 

    /* --- PROCESOS MÓVIL --- */
    .procesos { display: none; } 
    .procesos-mobile { display: block; padding-top: 1px !important; }
    .procesos-mobile .img-box { width: 100%; max-width: 320px; height: 240px; margin: 0 auto 20px auto; overflow: hidden; border-radius: 8px; }
    .procesos-mobile .img-box img { width: 100%; height: 100%; object-fit: cover; }
    
    .mobile-slider { display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; gap: 40px; scroll-snap-type: none; }
    .mobile-slide { min-width: 100%; scroll-snap-align: none; }
    .mobile-slide h3 { margin-top: 5px; font-size: 1.5rem; margin-bottom: 10px; }
    .mobile-slide p { font-size: 1rem; line-height: 1.5; color: #555; }

    .valores { background: #fff; }
    .iconos-valores { gap: 30px; }
    .valor { width: 100%; max-width: 180px;} 
    
    .galeria-simple-header { padding-top: 40px; padding-bottom: 20px; }
    .galeria-simple-header h2 { font-size: 1.6rem; }
    .gallery-wrapper { flex-direction: column; gap: 30px; max-width: 100vw; }
    .gallery-column { width: 100%; }
    .column-header { text-align: center; width: 100%; max-width: 280px; }
    
    .column-window {
        width: 100%; height: 270px; border-radius: 0; background: transparent; box-shadow: none;
        overflow-y: hidden; overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    .column-track { flex-direction: row; width: max-content; height: 100%; padding-left: 20px; }
    .column-track img { width: 260px; height: 250px; margin-right: 15px; margin-bottom: 0; }

    .certificados { flex-direction: column; gap: 30px; }
    .certificados img { width: 160px; }

    .seccion-elegirnos { margin-top: 20px; }
    .bloque-item { flex-direction: column; text-align: center; gap: 20px; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid #f0f0f0; }
    .bloque-item:last-child { border: none; }
    .iconoytexto { order: -1; width: 100%; } 
    .texto-descripcion { text-align: center; text-align-last: center; }

    .footer-container { flex-direction: column; gap: 40px; }
    .footer-col { width: 100%; margin: 0; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 20px; }
    .footer-col:last-child { border: none; }

    .split-text p, .full-width-text p { text-align: center; } 
    .hero-col-logo img { max-width: 200px; margin: 0 auto; }
    
    .hero-col-text h1 { color: #ffffff !important; font-size: 1.4rem !important; text-shadow: 1px 1px 5px rgba(0,0,0,0.9); }
    .hero-col-logo img { max-width: 300px; }
    
    /* --- CONTACTO --- */
    .contacto { padding: 0 15px; margin-bottom: 40px; }
    .contacto h2 { margin-top: 25px; font-size: 1.5rem; }
    .field input, .field textarea { font-size: 16px; padding: 14px; }
    .actions { display: block; }
    .btn { width: 100%; padding: 15px; font-size: 1.1rem; }

    /* --- MODAL MÓVIL (CARD) --- */
    .card {
        width: 90%; max-height: 80vh; display: flex; flex-direction: column;
        overflow: hidden; background: #fff; border-radius: 12px;
    }
    .card__img { height: 160px; min-height: 160px; flex-shrink: 0; width: 100%; object-fit: cover; }
    .card__body { padding: 15px 20px; overflow-y: auto; flex-grow: 1; }
    .card__title { font-size: 1.3rem !important; margin-bottom: 8px; }
    .meta { font-size: 0.85rem !important; line-height: 1.4; text-align: left !important; margin: 0; color: #444; }
    
    .card__close {
        top: 8px; right: 8px; width: 30px; height: 30px; font-size: 16px;
        background: rgba(255, 255, 255, 0.95); box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
}