*,
*::before,
*::after {
  box-sizing: border-box;
}

/* --- Reseteo Básico y Variables Globales --- */
:root {
  --azul-georiego: #0084D6;
  --verde-cultivo: #008037;
  --gris-oscuro: #333333;
  --gris-claro: #F4F7F6;
  --font-sans: 'Roboto', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: #FFFFFF;
  color: var(--gris-oscuro);
  line-height: 1.6;
}

/* --- Clases de Contenedor y Headers de Sección --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gris-oscuro);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Estilos de la Sección Hero --- */
.hero-section {
  position: relative;
  height: 75vh;
  min-height: 500px;
  /* La ruta correcta es ../ para "subir" un nivel desde la carpeta /css */
  /* También se recomienda renombrar el archivo sin espacios ni paréntesis, por ejemplo: 'reservorio-hero.jpg' */
  background-image: url('../images/Reservorios (6).jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

@media (max-width: 768px) {
  .hero-section {
    height: 100svh;
    min-height: 0;
    padding-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4), transparent);
}

.hero-content {
  position: relative;
  max-width: 900px;
  padding: 0 1rem;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-content p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--azul-georiego);
  color: white;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  margin-top: 2.5rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
}

.hero-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-button-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* --- Estilos de la Sección Divisiones --- */
.divisions-section {
  padding: 5rem 0;
  background-color: var(--gris-claro);
}

.divisions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.division-card {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  height: 400px;
  display: block;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  /* <-- Transición añadida */
}

.division-card:hover {
  transform: translateY(-8px);
  /* <-- Se levanta un poco más */
  box-shadow: 0 15px 30px rgba(0, 80, 130, 0.2);
  /* <-- Sombra más pronunciada y con color */
}

.division-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

.division-card:hover img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
}

.card-overlay h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}

.card-overlay p {
  margin-top: 0.5rem;
}

.card-link {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--azul-georiego);
  transition: color 0.3s;
}

.division-card:hover .card-link {
  color: white;
}

/* --- Estilos de la Sección Por Qué Georiego --- */
.why-us-section {
  padding: 5rem 0;
  background-color: white;
}

.why-us-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  text-align: center;
}

.why-us-item h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.why-us-item p {
  margin-top: 0.5rem;
  color: #666;
}

.why-us-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 4rem;
  width: 4rem;
  border-radius: 50%;
  background-color: var(--azul-georiego);
  color: white;
}

.why-us-icon svg {
  height: 2rem;
  width: 2rem;
}

/* --- Estilos para la Nueva Sección de Productos (INDEX) --- */
.products-section {
  padding: 5rem 0;
  background-color: white;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.product-card {
  position: relative;
  display: block;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  height: 350px;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.1);
}

.product-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  transition: background 0.3s;
}

.product-card:hover .product-card-title {
  background: linear-gradient(to top, rgba(0, 132, 214, 0.9), transparent);
}

.products-cta {
  text-align: center;
  margin-top: 3rem;
}

/* --- Estilos de la Sección CTA Final --- */
.cta-section {
  padding: 5rem 0;
  background-color: var(--azul-georiego);
  color: white;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
}

.cta-section p {
  margin-top: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.8);
}

.cta-button {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.5rem;
  background-color: white;
  color: var(--azul-georiego);
  font-weight: 700;
  border-radius: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
}

.cta-button:hover {
  background-color: var(--gris-claro);
  transform: translateY(-2px);
}

/* --- Media Queries para Diseño Responsivo --- */
@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 4.5rem;
  }

  .hero-content p {
    font-size: 1.25rem;
  }

  .divisions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-us-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Estilos del Header --- */
.main-header {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1600;
  width: 100%;
  overflow: visible;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
  /* 80px */
}

.header-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  /* Eliminamos los estilos de fuente que ya no se necesitan */
}

.header-logo img {
  max-height: 45px;
  /* Altura máxima para el logo. Ajusta si es necesario */
  width: auto;
  /* Mantiene la proporción original de la imagen */
  display: block;
  /* Evita espacios extra debajo de la imagen */
}

.header-nav {
  display: none;
  /* Oculto en móvil por defecto */
}

.header-nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: var(--gris-oscuro);
  font-weight: 500;
  transition: color 0.3s;
}

.header-nav a:hover {
  color: var(--azul-georiego);
}

.header-cta {
  display: none;
  /* Oculto en móvil por defecto */
  background-color: var(--azul-georiego);
  color: white;
  font-weight: 700;
  padding: 0.75rem 1.2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.3s;
}

.header-cta:hover {
  background-color: #0073b6;
  /* Un azul un poco más oscuro */
}

/* --- Estilos del Menú Móvil --- */
.header-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: block;
  /* Visible en móvil */
}

.header-hamburger svg {
  width: 2rem;
  /* 32px */
  height: 2rem;
  /* 32px */
  color: var(--gris-oscuro);
}

.mobile-menu-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1500;
  /* Oculto por defecto, controlado por JS */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.mobile-menu {
  position: absolute;
  top: 0;
  right: 0;
  /* Lo posicionamos a la derecha */
  width: 80%;
  max-width: 320px;
  /* Un ancho máximo para tablets */
  height: 100%;
  background-color: white;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  padding: 3rem 1.5rem;
  gap: 1rem;
  /* Sale de la pantalla por defecto */
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- ESTADO ABIERTO --- */
/* Esta clase se añadirá al <body> */
body.mobile-menu-is-open {
  overflow: hidden;
  /* Evita que el fondo se mueva */
}

body.mobile-menu-is-open .mobile-menu-container {
  opacity: 1;
  visibility: visible;
}

body.mobile-menu-is-open .mobile-menu {
  transform: translateX(0);
  /* Lo trae a la vista */
}

.mobile-cta {
  margin: 1rem 1.5rem 0;
  background-color: var(--azul-georiego);
  color: white !important;
  text-align: center;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.mobile-cta:hover {
  background-color: #0073b6 !important;
}

/* --- Media Query para Escritorio --- */
@media (min-width: 768px) {
  .header-nav {
    display: flex;
    /* Muestra el menú de navegación */
  }

  .header-cta {
    display: inline-block;
    /* Muestra el botón de contacto */
  }

  .header-hamburger {
    display: none;
    /* Oculta el botón hamburguesa */
  }
}

/* --- ESTILOS DEL NUEVO FOOTER --- */
.main-footer-reimagined {
  background-color: var(--gris-claro);
  color: var(--gris-oscuro);
  padding: 5rem 0 0 0;
  border-top: 1px solid #ddd;
}

.footer-layout {
  display: grid;
  grid-template-columns: 1fr;
  /* Una columna por defecto para móviles */
  gap: 3rem;
}

.footer-logo-img {
  max-width: 180px;
  margin-bottom: 2rem;
}

.footer-headline {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin: 0 0 1rem 0;
}

.footer-subheadline {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  /* Apilado en móviles */
  gap: 1rem;
  font-weight: 500;
}

.footer-contact-info a {
  color: var(--gris-oscuro);
  text-decoration: none;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-contact-info a:hover {
  color: var(--azul-georiego);
}

.footer-section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 1rem 0;
  color: var(--gris-oscuro);
}

/* El "lugar llamativo" para las redes sociales */
.footer-socials-block {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.footer-social-icons {
  display: flex;
  gap: 1rem;
}

.footer-social-icons a {
  color: var(--gris-oscuro);
  font-size: 1.75rem;
  transition: all 0.3s ease;
}

.footer-social-icons a[aria-label="Facebook"]:hover {
  color: #1877F2;
  transform: scale(1.1);
}

.footer-social-icons a[aria-label="TikTok"]:hover {
  color: #000000;
  transform: scale(1.1);
}

.footer-social-icons a[aria-label="WhatsApp"]:hover {
  color: #25D366;
  transform: scale(1.1);
}


.location-cards-container {
  display: grid;
  grid-template-columns: 1fr;
  /* Una columna en móvil */
  gap: 1.5rem;
}

.location-card {
  background-color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.location-card h6 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-container {
  border-radius: 0.25rem;
  overflow: hidden;
  border: 1px solid #ddd;
}

.location-button {
  display: block;
  margin-top: 1rem;
  width: 100%;
  text-align: center;
  background-color: var(--verde-cultivo);
  color: white;
  padding: 0.75rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s;
}

.location-button:hover {
  background-color: #00692d;
}

/* La barra final con copyright y créditos */
.footer-bottom-bar {
  margin-top: 4rem;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: #777;
  border-top: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  /* Apilado en móvil */
  gap: 0.5rem;
}

.developer-credit a {
  color: var(--azul-georiego);
  text-decoration: none;
  font-weight: 500;
}

.developer-credit a:hover {
  text-decoration: underline;
}

/* --- Media Queries para Escritorio --- */
@media (min-width: 992px) {
  .footer-layout {
    grid-template-columns: 1fr 1fr;
    /* Dos columnas en escritorio */
    gap: 4rem;
  }

  .footer-contact-info {
    flex-direction: row;
    /* En línea en escritorio */
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
  }

  .location-cards-container {
    grid-template-columns: 1fr 1fr;
    /* Dos columnas para mapas */
  }

  .footer-bottom-bar {
    flex-direction: row;
    /* En línea en escritorio */
    justify-content: space-between;
  }
}

/* --- AJUSTE PARA BOTÓN DE WHATSAPP EN FOOTER --- */

/* Ajustamos el contenedor para alinear bien los items */
.footer-social-icons {
  align-items: center;
  flex-wrap: wrap;
}

/* Estilo para los íconos normales (Facebook, TikTok) */
.footer-social-icons a:not(.whatsapp-button-footer) {
  font-size: 1.75rem;
}

/* Estilo específico para el nuevo botón de WhatsApp */
.whatsapp-button-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #25D366;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-button-footer:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(37, 211, 101, 0.329);
}

.whatsapp-button-footer i {
  font-size: 1.25rem;
}

/* REGLA ESPECÍFICA PARA EL TEXTO DENTRO DEL BOTÓN */
.whatsapp-button-footer span {
  font-size: 0.85rem;
  /* <-- AJUSTE CLAVE Y DEFINITIVO */
}

/* --- Estilos de la página "Ubicaciones" --- */

.location-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.location-card h5 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 1rem 0;
}

.map-container {
  border-radius: 0.25rem;
  overflow: hidden;
  border: 1px solid #ddd;
}

.location-button {
  display: block;
  margin-top: 1rem;
  width: 100%;
  text-align: center;
  background-color: var(--verde-cultivo);
  color: white;
  padding: 0.75rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s;
}

.location-button:hover {
  background-color: #00692d;
  /* Verde más oscuro */
}

/* --- Estilos para Animaciones de Scroll --- */
.animate-on-scroll {
  opacity: 0;
  /* Empieza invisible */
  transform: translateY(30px);
  /* Empieza 30px más abajo */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  /* Se vuelve visible */
  transform: translateY(0);
  /* Vuelve a su posición original */
}

/* --- Estilos de la Página de Soluciones --- */
.solutions-section {
  padding: 4rem 0;
}

/* --- Estilos para los Filtros (ahora con scroll horizontal) --- */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;

  /* --- Magia para el scroll horizontal --- */
  flex-wrap: nowrap;
  /* Evita que los botones salten a la siguiente línea */
  overflow-x: auto;
  /* Activa el scroll horizontal cuando sea necesario */
  -webkit-overflow-scrolling: touch;
  /* Scroll suave en iOS */
  padding-bottom: 1rem;
  /* Espacio para que la barra de scroll no se pegue al contenido */
}

/* Ocultar la barra de scroll (estético, el scroll sigue funcionando) */
.filters::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.filters {
  -ms-overflow-style: none;
  /* IE y Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Estilos de los botones (ya los tenías, los incluimos para que todo esté junto) */
.filter-btn {
  background-color: #e5e7eb;
  color: var(--gris-oscuro);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  /* Evita que el texto del botón se rompa */
}

.filter-btn:hover {
  background-color: #d1d5db;
}

.filter-btn.active {
  background-color: var(--azul-georiego);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 132, 214, 0.3);
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease-out;
}

.service-card,
.service-card:visited {
  text-decoration: none;
  color: inherit;
}

.service-card h3 {
  color: var(--gris-oscuro);
}

.service-card p {
  color: #666;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-content {
  padding: 1.5rem;
}

.service-card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
}

.service-card-content p {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}

/* --- Estilos de la Plantilla de Servicio --- */
.service-hero-section {
  position: relative;
  height: 40vh;
  min-height: 300px;
  /* La imagen de fondo se cambiará para cada servicio */
  background-image: url('../images/riego-por-goteo.jpeg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.service-hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

.service-hero-section h1 {
  position: relative;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* --- CORRECCIÓN DE OVERFLOW EN TÍTULOS DE SERVICIO (MÓVIL) --- */

.service-hero-section h1 {
  overflow-wrap: break-word;
}

@media (max-width: 480px) {
  .service-hero-section h1 {
    font-size: 2.8rem;
    line-height: 1.2;
  }
}

.service-content-section {
  padding: 4rem 0;
}

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

.service-main-content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-top: 0;
  border-bottom: 3px solid var(--azul-georiego);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.service-main-content h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-top: 2rem;
}

.benefits-list {
  list-style: none;
  padding-left: 0;
}

.benefits-list li {
  padding-left: 2rem;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%230084D6"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" /></svg>');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-sidebar .cta-box {
  background-color: var(--gris-claro);
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
}

.cta-box h4 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-top: 0;
}

.service-gallery-section {
  padding: 4rem 0;
  background-color: var(--gris-claro);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  height: 250px;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

.gallery-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  transition: opacity 0.4s ease-out;
}

.gallery-card-title {
  color: white;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.gallery-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

@media (min-width: 992px) {
  .service-layout {
    grid-template-columns: 3fr 1fr;
    /* Columna principal más ancha */
  }
}

/* Estilos para el Lightbox con CTA */

.gallery-card {
  display: block;
  text-decoration: none;
}

.zoom-icon {
  position: absolute;
  top: 0.8rem;
  right: 2.5rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease-out;
}

.gallery-card:hover .zoom-icon {
  opacity: 1;
  transform: scale(1);
}

.zoom-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* --- Estilos para el Lightbox con CTA --- */
.basicLightbox:after {
  content: '';
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12' /%3E%3C/svg%3E") no-repeat;
  background-size: contain;
  cursor: pointer;
}

.lightbox-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
}

.lightbox-container img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  border-radius: 4px;
}

.lightbox-caption {
  text-align: center;
}

.whatsapp-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: white;
  color: var(--verde-cultivo);
  font-family: var(--font-sans);
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 2px solid var(--verde-cultivo);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.whatsapp-cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background-color: var(--verde-cultivo);
  color: white;
}

.whatsapp-cta-button:hover .whatsapp-icon {
  color: white;
}

.whatsapp-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--verde-cultivo);
  transition: color 0.3s ease;
}

/* --- Estilos del Modal de Contacto Inteligente --- */
.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background-color: white;
  padding: 2.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 700px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.contact-modal.is-visible .modal-content {
  transform: scale(1);
}

/* --- Ajuste para Modal en Móviles --- */
@media (max-width: 768px) {
  .contact-modal {
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .modal-content {
    max-height: calc(100vh - 4rem);
  }
}

.modal-content h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-top: 0;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  padding: 0.5rem;
}

.modal-close-btn:hover {
  color: #333;
}

.modal-close-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.modal-options {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.modal-option {
  display: block;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--gris-oscuro);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.modal-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--azul-georiego);
}

.option-icon {
  font-size: 2.5rem;
  color: var(--azul-georiego);
  margin-bottom: 1rem;
}

.modal-option h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
}

@media (min-width: 768px) {
  .modal-options {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Estilos para Páginas Genéricas (Nosotros, Contacto, etc.) --- */
.page-hero-section {
  position: relative;
  height: 40vh;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  color: white;
  display: flex;
  align-items: center;
  text-align: center;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 50, 80, 0.6);
}

.page-hero-section h1 {
  position: relative;
  font-family: var(--font-heading);
  font-size: 3rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.page-hero-section p {
  position: relative;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 1rem auto 0;
}

/* --- Estilos de la página "Nosotros" --- */
.about-us-content {
  padding: 5rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.mission-vision-values {
  margin-top: 5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.mvv-card {
  background-color: var(--gris-claro);
  padding: 2rem;
  border-radius: 0.5rem;
}

.mvv-card h3 {
  font-family: var(--font-heading);
  border-bottom: 2px solid var(--azul-georiego);
  display: inline-block;
  padding-bottom: 0.5rem;
  margin-top: 0;
}

.mvv-card ul {
  padding-left: 1.2rem;
}

.team-section {
  padding: 5rem 0;
  background-color: var(--gris-claro);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
}

.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.team-member h4 {
  font-size: 1.25rem;
  margin: 0.5rem 0;
}

.team-member p {
  color: #666;
  margin: 0;
}

/* --- Estilos de la página de Contacto --- */
.contact-page-section {
  padding: 5rem 0;
}

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

.contact-form-container form {
  margin-top: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.contact-info-container {
  background-color: var(--gris-claro);
  padding: 2rem;
  border-radius: 0.5rem;
}

.contact-info-item {
  margin-bottom: 2rem;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-item h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
}

.contact-info-item a,
.contact-info-item p {
  text-decoration: none;
  color: #555;
  line-height: 1.8;
}

/* --- Media Queries --- */
@media (min-width: 992px) {
  .about-grid {
    grid-template-columns: 2fr 1fr;
  }

  .mission-vision-values {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-layout {
    grid-template-columns: 2fr 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Estilos para Animación Stagger --- */
.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Estilos de Contenido del Menú Lateral --- */
.mobile-menu-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--gris-oscuro);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.mobile-menu-nav {
  margin-top: 4rem;
  /* Espacio para el botón de cierre */
  display: flex;
  flex-direction: column;
  border-top: 1px solid #eee;
}

.mobile-menu-nav a {
  text-decoration: none;
  color: var(--gris-oscuro);
  font-size: 1.25rem;
  font-weight: 500;
  padding: 1.25rem 0;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s;
}

.mobile-menu-nav a:hover {
  background-color: var(--gris-claro);
}

/* El botón de contacto dentro del menú */
.mobile-menu .mobile-cta {
  margin-top: 2.5rem;
  /* <-- AJUSTE CLAVE: Un espacio fijo y visible */
  padding: 1rem;
  background-color: var(--azul-georiego);
  color: white !important;
  text-align: center;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s;
}

.mobile-menu .mobile-cta:hover {
  background-color: #0073b6 !important;
}

/* --- ESTILOS DE LA PÁGINA DE CATÁLOGO --- */

.catalog-section {
  padding: 4rem 0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.product-card-catalog {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card-catalog:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  /* Hace que el contenido ocupe el espacio disponible */
}

.product-card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
}

.product-card-content p {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
  flex-grow: 1;
  /* Empuja el botón hacia abajo */
  margin-bottom: 1.5rem;
}

.product-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: var(--verde-cultivo);
  color: white;
  padding: 0.75rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s;
}

.product-cta-button:hover {
  background-color: #00692d;
}

.catalog-no-results {
  grid-column: 1 / -1;
  /* Ocupa todo el ancho de la rejilla */
  text-align: center;
  font-size: 1.2rem;
  color: #888;
  padding: 4rem 0;
}


/* --- ESTILOS DEL BUSCADOR FLOTANTE --- */

.floating-search-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--azul-georiego);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 900;
  transition: transform 0.3s ease;
}

.floating-search-btn:hover {
  transform: scale(1.1);
}

.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  /* Alinea arriba */
  justify-content: center;
  padding-top: 15vh;
  /* Espacio desde arriba */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

.search-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.search-box {
  position: relative;
  width: 90%;
  max-width: 600px;
  z-index: 2001;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.search-modal.is-visible .search-box {
  transform: scale(1);
}

#search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.5rem;
  /* Espacio para el botón de cierre */
  font-size: 1.25rem;
  border-radius: 50px;
  border: 2px solid transparent;
  outline: none;
}

#search-input:focus {
  border-color: var(--azul-georiego);
}

.search-close-btn {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #888;
  cursor: pointer;
  padding: 0.5rem;
}

/* --- ESTILOS DEL BUSCADOR FIJO EN PÁGINA --- */

.static-search-container {
  position: relative;
  margin: 0 auto 2.5rem auto;
  /* Centrado y con margen inferior */
  max-width: 700px;
}

.static-search-container i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

#static-search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.5rem;
  /* Espacio a la izquierda para el ícono */
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 50px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#static-search-input:focus {
  border-color: var(--azul-georiego);
  box-shadow: 0 0 0 3px rgba(0, 132, 214, 0.15);
}

/* --- Estilos para el Mensaje de Confirmación del Formulario --- */

.confirmation-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.confirmation-message.is-visible {
    opacity: 1;
    visibility: visible;
}

.confirmation-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirmation-message.is-visible .confirmation-content {
    transform: scale(1);
}

.confirmation-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.confirmation-close-btn:hover {
    color: #333;
}

.confirmation-icon {
    font-size: 4rem;
    color: var(--verde-cultivo);
    margin-bottom: 1rem;
}

.confirmation-content h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
}

.confirmation-content p {
    color: #666;
    margin-bottom: 2rem;
}