/* --- Keyframes para este estilo --- */
@keyframes moveLines {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100px 100px;
  }
}

/* --- HERO (Fondo Azul y Celeste) --- */
.hero {
  background: linear-gradient(135deg, #0d6efd 0%, #00bcd4 100%);
  color: #fff;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* --- ANIMACIÓN (Líneas de Verde y Blanco) --- */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0; /* Detrás del contenido */
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(255, 255, 255, 0.05) 20px,
    rgba(255, 255, 255, 0.05) 21px,
    transparent 21px,
    transparent 40px,
    rgba(139, 195, 74, 0.1) 40px,
    rgba(139, 195, 74, 0.1) 41px
  );
  animation: moveLines 4s linear infinite;
  opacity: 0.7;
}

.hero-content {
  position: relative;
  z-index: 1; /* Encima de la animación ::before */
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  animation: fadeIn 1s ease-out;
}

.hero h1 {
  color: #fff;
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: #e8f2fd;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Estadísticas */
.stats-section {
  background: #fff;
  padding: 4rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.stat-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, #f8fbff 0%, #e8f4ff 100%);
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}
.stat-card:hover {
  border-color: #4a9eff;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(74, 158, 255, 0.2);
}
.stat-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #00bcd4 0%, #8bc34a 100%);
  border-radius: 50%;
  color: #fff;
  font-size: 2.5rem;
  box-shadow: 0 8px 25px rgba(74, 158, 255, 0.3);
}
.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.stat-label {
  font-size: 1.1rem;
  color: #2d5986;
  font-weight: 600;
}

/* Servicios destacados */
/* ================================================= */
/* --- KEYFRAMES (Para el destello de las tarjetas) --- */
/* ================================================= */

/* Animación de "Destello" (Rápido e Infrecuente) */
@keyframes premiumSheen {
  /* El destello ocurre en el primer 10% del tiempo (1s) */
  0% {
    transform: skewX(-20deg) translateX(-150%);
  }
  10% {
    transform: skewX(-20deg) translateX(150%); /* Cruza rápido */
  }
  /* El 90% restante, está "fuera de pantalla" */
  100% {
    transform: skewX(-20deg) translateX(150%);
  }
}

/* ================================================= */
/* --- CÓDIGO DE LA SECCIÓN DE SERVICIOS --- */
/* ================================================= */

/* Servicios destacados */
.services-section {
  padding: 5rem 0;
  /* MEJORA: Fondo limpio y profesional. No compite con el contenido. */
  background: linear-gradient(180deg, #fff 0%, #f5f8fc 100%);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

/* --- La Tarjeta de Servicio (Mejorada) --- */
.service-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden; /* Clave para las animaciones */
}

/* MEJORA: Acento superior con tu gradiente */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  /* Usamos tu gradiente vibrante */
  background: linear-gradient(90deg, #00bcd4, #8bc34a);
  transform: scaleX(0);
  transform-origin: left; /* Asegura que crezca desde la izquierda */
  transition: transform 0.4s ease;
}

/* MEJORA: El destello sutil (se aplica sobre la tarjeta) */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  /* Destello blanco ultra-sutil */
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  /* Animación infrecuente (cada 10s) */
  animation: premiumSheen 10s ease-in-out infinite;
  pointer-events: none;
}

/* MEJORA: El hover usa tus colores de acento */
.service-card:hover {
  transform: translateY(-8px);
  /* La sombra de hover usa el color Celeste */
  box-shadow: 0 12px 40px rgba(0, 188, 212, 0.2);
  /* El borde de hover usa el color Celeste */
  border-color: #00bcd4;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* MEJORA: El ícono usa tu gradiente */
.service-icon {
  width: 70px;
  height: 70px;
  /* El ícono usa tu gradiente */
  background: linear-gradient(135deg, #00bcd4, #8bc34a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  /* La sombra del ícono usa el color Celeste */
  box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

.service-card h3 {
  color: #1e3a5f;
  margin-bottom: 1rem;
}

.service-card p {
  color: #666;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Sección de productos */
/* ================================================= */
/* --- KEYFRAMES (Para el destello de la tarjeta) --- */
/* ================================================= */

/* Animación de "Destello" (Rápido e Infrecuente)
   La usaremos en la imagen para darle un toque "premium"
*/
@keyframes premiumSheen {
  /* El destello ocurre en el primer 10% del tiempo (1s) */
  0% {
    transform: skewX(-20deg) translateX(-150%);
  }
  10% {
    transform: skewX(-20deg) translateX(150%); /* Cruza rápido */
  }
  /* El 90% restante, está "fuera de pantalla" */
  100% {
    transform: skewX(-20deg) translateX(150%);
  }
}

/* ================================================= */
/* --- CÓDIGO DE LA SECCIÓN DE PRODUCTOS --- */
/* ================================================= */

/* Sección de productos */
.products-preview {
  padding: 5rem 0;
  /* MEJORA: Fondo limpio y coherente con otras secciones */
  background: linear-gradient(180deg, #fff 0%, #f5f8fc 100%);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem; /* Un poco más de espacio */
  margin-top: 3rem;
}

/* --- La Tarjeta de Producto (Mejorada) --- */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  /* MEJORA: Un borde nítido da una sensación más definida */
  border: 1px solid #e0e6ef;
  /* MEJORA: Sombra más suave y difusa */
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1); /* Transición más suave */
}

/* MEJORA: El hover es más pronunciado y usa tu color Celeste */
.product-card:hover {
  transform: translateY(-8px); /* Levanta un poco más */
  /* Sombra de acento (Celeste) */
  box-shadow: 0 12px 40px rgba(0, 188, 212, 0.2);
}

/* --- La Imagen (Mejorada) --- */
.product-image {
  width: 100%;
  height: 200px;
  /* MEJORA: Fondo neutro para que el producto (o el ícono) resalte */
  background: #f4f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
  /* MEJORA: Ícono de acento (Celeste) y más pequeño */
  font-size: 3rem;
  color: #00bcd4;

  position: relative; /* Para el destello */
  overflow: hidden; /* Para el destello y el zoom */
  transition: transform 0.4s ease; /* Para el zoom */
}

/* MEJORA: El destello sutil (se aplica sobre la imagen) */
.product-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  /* Destello blanco ultra-sutil */
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  /* Animación infrecuente (cada 10s) */
  animation: premiumSheen 10s ease-in-out infinite;
  pointer-events: none;
}

/* MEJORA: Zoom sutil a la imagen al pasar el ratón */
.product-card:hover .product-image {
  transform: scale(1.03);
}

/* --- La Información (Mejorada) --- */
.product-info {
  padding: 1.5rem;
  /* Añadimos un borde superior para separar visualmente */
  border-top: 1px solid #f0f3f7;
}

/* MEJORA: Categoría con tu acento Verde Limón */
.product-category {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8bc34a; /* Verde Limón */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.product-info h3 {
  margin-bottom: 0.8rem;
  font-size: 1.25rem; /* Un poco más pequeño y profesional */
  color: #1e3a5f; /* Color primario oscuro */
  line-height: 1.4;
}

.product-info p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1.2rem;
}

/* MEJORA: Botón/Enlace "Ver más" sutil */
.product-info .product-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0d6efd; /* Tu color Azul */
  text-decoration: none;
  transition: color 0.3s ease;
}

.product-info .product-link:hover {
  color: #00bcd4; /* Tu color Celeste */
  text-decoration: underline;
}

/* CTA Section */
/* ================================================= */
/* --- KEYFRAMES (Solo para el destello) --- */
/* ================================================= */

/* Animación de "Destello" (Rápido e Infrecuente) */
@keyframes premiumSheen {
  /* El destello ocurre en el primer 10% del tiempo (1.2s) */
  0% {
    transform: skewX(-20deg) translateX(-150%);
  }
  10% {
    transform: skewX(-20deg) translateX(150%); /* Cruza rápido */
  }
  /* El 90% restante, está "fuera de pantalla" */
  100% {
    transform: skewX(-20deg) translateX(150%);
  }
}

/* ================================================= */
/* --- CÓDIGO DEL .cta-section (Mejorado) --- */
/* ================================================= */

.cta-section {
  /* Tu nuevo fondo estático: Azul a Celeste */
  background: linear-gradient(135deg, #0d6efd 0%, #00bcd4 100%);

  color: #fff;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* (Se eliminan 'background-size' y 'animation' del fondo) */
}

/* El "Destello" (Glint) se mantiene sobre el fondo */
.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  /* Un destello blanco ultra-sutil */
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  /* Animación rápida e infrecuente (12s de espera) */
  animation: premiumSheen 12s ease-in-out infinite;
  pointer-events: none;
}

/* Asegura que el contenido (H2, p, botones) esté por encima */
.cta-section > * {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Sombra para legibilidad */
}

.cta-section > * {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Sombra para legibilidad */
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(74, 158, 255, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
}
.cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}
.cta-section h2 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}
.cta-section p {
  color: #f3f1f1;
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-number {
    font-size: 2.5rem;
  }
  .services-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }
  .cta-section h2 {
    font-size: 1.8rem;
  }
}
