body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f2f2f2;
  }
  
  /* HEADER FIJO */
  header {
    position: fixed;   /* ← ESTO hace que no se vaya */
    top: 0;
    width: 100%;
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  
  .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
  }
  
  .container {
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

.logo img {
  height: 130px;
  width: auto;
}
  
  nav a {
    margin-left: 30px;
    text-decoration: none;
    color: #333;
  }
  
  nav a:hover {
    color: #1e8449;
  }
  
  /* HERO */
  .hero {
    margin-top: 160px;   /* espacio suficiente debajo del header fijo */
    display: flex;
    padding: 60px 5%;
    align-items: center;
    justify-content: space-between;
  }
  
  .hero-text {
    width: 50%;
  }
  
.hero-text h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  color: #1e4fa1;
  margin-top: 0px;
  margin-bottom: 30px;
}

  .hero-text p {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
    text-justify: inter-word;
    margin-bottom: 25px;
  }

  .hero-text p strong {
    color: #1e4fa1;
    font-weight: 700;
  }

  .hero-text button {
    background: #1e4fa1;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
  }

  .hero-text button:hover {
    background: #163c7a;
  }
  
  .hero-image img {
    width: 500px;
    border-radius: 10px;
  }
  
  /* SECCION AZUL */
.stats {
  background: #1e4fa1;
  color: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 25px 0;          /* más estrecho */
  font-size: 18px;          /* texto un poco más pequeño */
  text-align: center;
}

.stats span {
  font-size: 26px;        /* números más pequeños */
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}
  
  /* SOBRE */
  .about {
    padding: 80px 5%;
  }

/* ========================= */
/*        RESPONSIVE         */
/* ========================= */

@media (max-width: 1024px) {
  .hero {
    margin-top: 140px; /* Espacio correcto en móvil */
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    width: 100%;
  }

  .hero-image img {
    width: 100%;
    max-width: 500px;
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 10px 0;
  }

  .container {
    flex-direction: row;
    justify-content: center;   /* centra el logo */
    align-items: center;
    position: relative;
  }

  nav {
    margin-top: 10px;
  }

  nav a {
    display: inline-block;
    margin: 10px;
  }

  .hero-text h1 {
    font-size: 40px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .stats {
    flex-direction: row;        /* números en horizontal */
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;         /* menos alto */
    font-size: 16px;
    gap: 10px;
  }

  .stats span {
    font-size: 24px;            /* números más pequeños en móvil */
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 20px;   /* botón a la derecha */
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: white;
    position: absolute;
    top: 80px;
    left: 0;
    padding: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }

  nav.active {
    display: flex;
  }

  nav a {
    margin: 15px 0;
    text-align: center;
    width: 100%;
  }
}

/* ========================= */
/*        FEATURES GRID      */
/* ========================= */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 100px 5%;
  background: #f9f9f9;
}

.feature-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  transition: all 0.4s ease;
  text-align: center;
  padding-bottom: 40px;
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

.feature-image img {
  width: 100%;
  height: 150px;          /* más pequeña */
  object-fit: contain;    /* muestra la imagen completa */
  background: #f5f7fb;    /* fondo si sobra espacio */
  transition: transform 0.6s ease;
}

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

.feature-card h3 {
  margin-top: 25px;
  font-size: 24px;
  color: #1e4fa1;
}

.feature-card p {
  font-size: 16px;
  padding: 0 20px;
  line-height: 1.6;
  color: #555;
}

/* Responsive */

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}
/* Fix duplicate title showing above images */
.feature-image {
  font-size: 0;          /* hides alt text if image not found */
  overflow: hidden;
}

.feature-image img {
  display: block;
}

.product-image {
  width: 30%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.product-image img {
  width: 280px;          /* aún más pequeña */
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  transition: 0.5s ease;
}
.about-section img {
  max-width: 450px;   /* Reduce image size */
  width: 100%;
}

/* ========================= */
/*      CERTIFICACIONES      */
/* ========================= */

.certifications-section {
  text-align: center;          /* Centra todo el texto */
  padding: 80px 5%;
}

.certifications-section h2 {
  font-size: 48px;
  color: #1e4fa1;
  margin-bottom: 20px;
}

.certifications-section p {
  max-width: 900px;
  margin: 0 auto 40px auto;    /* Centrado horizontal */
  font-size: 18px;
  line-height: 1.6;
  color: #555;
}

.certifications-section img {
  max-width: 600px;            /* Imagen más pequeña */
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* ========================= */
/*          CONTACT          */
/* ========================= */

.contact-section {
  padding: 120px 5%;
  background: #f7f9fc;
}

.contact-container {
  display: flex;
  gap: 80px;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1400px;
  margin: auto;
}

.contact-form {
  flex: 1;
}

.contact-form h2 {
  font-size: 48px;
  color: #1e4fa1;
  margin-bottom: 40px;
}

.input-group {
  margin-bottom: 25px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 18px;
  border-radius: 14px;
  border: 2px solid #e0e6ef;
  font-size: 16px;
  transition: 0.3s ease;
  background: white;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: #1e4fa1;
  box-shadow: 0 0 0 4px rgba(30,79,161,0.1);
  outline: none;
}

.input-group textarea {
  min-height: 140px;
  resize: none;
}

.contact-btn {
  background: #1e4fa1;
  color: white;
  padding: 16px 40px;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s ease;
}

.contact-btn:hover {
  background: #163c7a;
  transform: translateY(-3px);
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #1e4fa1;
}

.contact-info p {
  margin-bottom: 15px;
  font-size: 18px;
  color: #555;
}

.contact-map iframe {
  width: 100%;
  height: 300px;
  border-radius: 20px;
  margin-top: 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

/* Responsive */

@media (max-width: 1024px) {
  .contact-container {
    flex-direction: column;
    gap: 60px;
  }
}

/* ========================= */
/*   CERTIFICACIONES CENTER  */
/* ========================= */

.certificaciones {
  text-align: center;
}

.certificaciones p {
  margin-left: auto;
  margin-right: auto;
}

/* ========================= */
/*   ABOUT IMAGE ANIMATION   */
/* ========================= */

.about-animate {
  transform: scale(0.85);
  opacity: 0.6;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.about-animate.active {
  transform: scale(1);
  opacity: 1;
}

/* ========================= */
/*        PRODUCTOS          */
/* ========================= */

.product-section {
  height: 500vh; /* 5 productos */
  position: relative;
  background: #f7f9fc;
}

/* Center the "Nuestros Productos" heading + intro text */
.product-section > h2,
.product-section > h1 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* If you wrapped the title/intro in a container, this also centers it */
.product-section .product-header,
.product-section .section-header {
  text-align: center;
}

.product-section .product-header p,
.product-section .section-header p {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Layout tipo “texto izquierda / imagen derecha” */
.product-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

/* Ajustes del card para que no centre el contenido */
.product-section .product-card {
  text-align: left;
  padding: 38px;
}

.product-text {
  flex: 1;
  max-width: 720px;
}

.product-text h2 {
  margin: 0 0 14px 0;
  font-size: 40px;
  color: #1e4fa1;
  letter-spacing: -0.2px;
}

.product-lead {
  margin: 0 0 18px 0;
  font-size: 17px;
  line-height: 1.8;
  color: #333;
  text-align: justify;
  text-justify: inter-word;
}

.product-points {
  margin: 0;
  padding-left: 18px;
  color: #333;
}

.product-points li {
  margin: 10px 0;
  line-height: 1.55;
}

.product-image {
  flex: 0 0 520px;
  margin-left: auto; /* empuja la imagen al extremo derecho */
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.product-image img {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 22px;
}

/* Variante: Descalcificador (usa otra imagen de fondo) */
.product-card--descalcificador::before {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(30,79,161,0.18), transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.82) 55%, rgba(255,255,255,0.55) 100%),
    url('Descalcificador.png');
}

/* Variante: Inhibidores (usa otra imagen de fondo) */
.product-card--inhibidores::before {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(30,79,161,0.18), transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.82) 55%, rgba(255,255,255,0.55) 100%),
    url('inhibidor.png');
}

.product-card {
  position: relative;
  overflow: hidden;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  transition: all 0.4s ease;
  text-align: center;
  padding-bottom: 40px;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(30,79,161,0.18), transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.82) 55%, rgba(255,255,255,0.55) 100%),
    url('Detox.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(10px);
  transform: scale(1.08);
  opacity: 0.45;
  pointer-events: none;
}

/* Variante: Descalcificador (usa otra imagen de fondo) */
.product-card--descalcificador::before {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(30,79,161,0.18), transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.82) 55%, rgba(255,255,255,0.55) 100%),
    url('Descalcificador.png');
}

.product-card > * {
  position: relative;
  z-index: 1;
}

.product-text {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(30,79,161,0.10);
  border-radius: 18px;
  padding: 22px 22px;
  backdrop-filter: blur(6px);
}

/* Cross-fade del texto (step 1 -> step 2) */
.product-copy {
  position: relative;
}

.copy-step {
  position: relative;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.copy-step.step-1 {
  opacity: 1;
  transform: translateY(0);
}

.copy-step.step-2 {
  opacity: 0;
  transform: translateY(20px);
  height: 0;
  overflow: hidden;
}

.product-card.show-step-2 .copy-step.step-1 {
  opacity: 0;
  transform: translateY(-20px);
  height: 0;
  overflow: hidden;
}

.product-card.show-step-2 .copy-step.step-2 {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  overflow: visible;
}

@media (max-width: 768px) {
  .product-copy {
    min-height: 320px;
  }
  .copy-step {
    position: relative;
    inset: auto;
  }
  .copy-step.step-2 {
    margin-top: 14px;
  }
  /* En móvil no hacemos cross-fade absoluto para evitar problemas */
  .product-card.show-step-2 .copy-step.step-1 {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .product-card.show-step-2 .copy-step.step-2 {
    opacity: 1;
    transform: none;
    filter: none;
  }

}

/* ========================= */
/*      PRODUCT BUTTON       */
/* ========================= */

.product-btn {
  display: inline-block;
  margin-top: 18px;
  background: #1e4fa1;
  color: #fff;
  text-decoration: none;
  padding: 14px 26px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  transition: 0.25s ease;
  box-shadow: 0 12px 28px rgba(30,79,161,0.22);
}

.product-btn:hover {
  background: #163c7a;
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .product-btn {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ========================= */
/*     REVEAL ON SCROLL      */
/* ========================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Un pelín de suavidad extra cuando aparecen los productos */
.product-section .product-card.reveal {
  transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.4s ease;
}

/* Sticky product experience */
.product-sticky-wrapper {
  position: sticky;
  top: 140px; /* height of header area */
  height: 80vh;
  display: flex;
  align-items: center;
}

.product-slider {
  width: 100%;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-slider.fade-out {
  opacity: 0;
  transform: translateY(30px);
}


.product-slider.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ========================= */
/*   MOBILE FIX FOR IPHONE   */
/* ========================= */

@media (max-width: 768px) {

  /* Remove huge scroll height on phones */
  .product-section {
    height: auto;
    padding: 90px 18px 60px 18px;
  }

  /* Disable sticky behaviour that breaks layout on mobile */
  .product-sticky-wrapper {
    position: relative;
    height: auto;
    top: auto;
    display: block;
  }

  /* Stack layout vertically */
  .product-container {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    gap: 26px;
  }

  /* Image centered and responsive */
  .product-image {
    order: 2;
    flex: none !important;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin: 10px 0 0 0;
  }

  .product-image img {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto;
    transform: translateX(10px); /* move image slightly right on mobile */
  }

  /* Text block fits phone width */
  .product-text {
    order: 1;
    width: 100%;
    max-width: 100%;
    padding: 18px;
    margin-top: 40px; /* push text down so header doesn't cover it */
  }

  .product-text h2 {
    font-size: 26px;
    text-align: center;
  }

  .product-lead {
    font-size: 15px;
  }

  .product-points {
    font-size: 14px;
  }

  .product-btn {
    display: block;
    margin: 20px auto 0 auto;
  }

}

/* ========================= */
/*        COOKIES BANNER     */
/* ========================= */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1e4fa1;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 9999;
  font-size: 15px;
  flex-wrap: wrap;
}

#cookie-banner a {
  color: white;
  text-decoration: underline;
}

#cookie-banner button {
  background: white;
  color: #1e4fa1;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

#cookie-banner button:hover {
  background: #f0f0f0;
}