/* =========================================================
   SANEAMIENTO GÜEMES — Stylesheet Moderno
   Paleta: verde oscuro / verde / blanco / gris neutro
   ========================================================= */

/* --- Variables --- */
:root {
  --green-dark:  #0f3d2e;
  --green:       #1a7a4e;
  --green-mid:   #228b5a;
  --green-light: #e8f5ee;
  --green-hover: #155e3a;
  --accent:      #2dc47a;
  --white:       #ffffff;
  --off-white:   #f8fafb;
  --gray-100:    #f1f5f4;
  --gray-200:    #e2e8e5;
  --gray-400:    #9ab0a6;
  --gray-600:    #5a7069;
  --gray-800:    #1e3028;
  --text:        #1c2e26;
  --text-light:  #4d6b5e;
  --shadow-sm:   0 2px 8px rgba(15,61,46,.08);
  --shadow-md:   0 8px 24px rgba(15,61,46,.12);
  --shadow-lg:   0 20px 60px rgba(15,61,46,.18);
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   24px;
  --transition:  .3s cubic-bezier(.4,0,.2,1);
  --font-body:   'Inter', system-ui, sans-serif;
  --font-head:   'Poppins', var(--font-body);
  --nav-height:  72px;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   ALERT TOAST MODAL
   ========================================================= */

/* Fondo semitransparente */
.alert-toast-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.alert-toast-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}
.alert-toast-backdrop.hiding {
  opacity: 0;
  pointer-events: none;
}

/* Tarjeta central */
.alert-toast {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 28px 28px 20px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  overflow: hidden;
  transform: translateY(20px) scale(.97);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.alert-toast-backdrop.visible .alert-toast {
  transform: translateY(0) scale(1);
}

/* Ícono de alerta */
.alert-toast-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
}

/* Cuerpo */
.alert-toast-body { flex: 1; }
.alert-toast-title {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  color: #a32020;
  letter-spacing: .04em;
  margin-bottom: .5rem;
}
.alert-toast-body p {
  font-size: .875rem;
  color: var(--text-light);
  line-height: 1.6;
}
.alert-toast-body strong { color: var(--text); }

/* Botones de acción */
.alert-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.alert-toast-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}
.alert-toast-btn--wa  { background: #25d366; color: #fff; }
.alert-toast-btn--wa:hover  { background: #1ebe5d; }
.alert-toast-btn--mail { background: var(--green-light); color: var(--green-dark); }
.alert-toast-btn--mail:hover { background: var(--green); color: #fff; }

/* Botón cerrar */
.alert-toast-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.alert-toast-close:hover { background: #fee; color: #c0392b; }

/* Barra de progreso en la parte inferior */
.alert-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #a32020, #e05252);
  transform-origin: left;
  border-radius: 0 0 18px 18px;
}

@media (max-width: 520px) {
  .alert-toast { padding: 20px 18px 16px; gap: 12px; }
  .alert-toast-icon { font-size: 1.5rem; }
}


/* =========================================================
   HEADER / NAV
   ========================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}
.header.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.header .nav-link,
.header.scrolled .nav-link { color: var(--text); }
.header .logo-main,
.header .logo-sub,
.header.scrolled .logo-main,
.header.scrolled .logo-sub { color: var(--green-dark); }
.header .logo-icon,
.header.scrolled .logo-icon { color: var(--green); }
.header .nav-toggle span,
.header.scrolled .nav-toggle span { background: var(--text); }

.nav {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}
.logo-img-footer {
  height: 54px;
}
/* Fallback — ocultar restos de texto si aún existieran */
.logo-icon { font-size: 1.6rem; color: var(--accent); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: #fff; }
.logo-sub { font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover, .nav-link.active,
.header.scrolled .nav-link:hover, .header.scrolled .nav-link.active {
  background: var(--green-light);
  color: var(--green-dark);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(45,196,122,.35);
}
.nav-cta:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15,61,46,.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  background: var(--green-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Compensa el header fijo */
.hero { padding-top: var(--nav-height); }

/* Wrap de imágenes: altura determinada por la proporción real de los banners */
.hero-slider-wrap {
  position: relative;
  width: 100%;
  /* Proporción real de los banners: 1729×553 ≈ 3.13:1 */
  aspect-ratio: 1729 / 553;
  min-height: 220px;
  max-height: 560px;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  /* cover dentro de un contenedor con la misma proporción = imagen completa */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }

/* Degradado inferior que fusiona con el fondo oscuro del texto */
.hero-slider-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--green-dark));
  pointer-events: none;
  z-index: 1;
}

/* Bloque de texto debajo de las imágenes */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 0 3.5rem;
  max-width: 760px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.95);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 1rem;
  animation: fadeInUp .7s both;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: .9rem;
  animation: fadeInUp .7s .12s both;
}
.hero-desc {
  font-size: clamp(.9rem, 1.6vw, 1.05rem);
  color: rgba(255,255,255,.82);
  max-width: 620px;
  margin-bottom: 1.5rem;
  animation: fadeInUp .7s .24s both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeInUp .7s .36s both;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: .95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(45,196,122,.4);
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15,61,46,.35);
}
.btn-whatsapp {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
}
.btn-whatsapp:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.5);
}
.btn-full { width: 100%; justify-content: center; }

.hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.hero-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* =========================================================
   STATS
   ========================================================= */
.stats {
  background: var(--green-dark);
  padding: 50px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
}
.stat-number {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-suffix { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: .85rem; color: rgba(255,255,255,.7); font-weight: 500; }

/* =========================================================
   SECTION HELPERS
   ========================================================= */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}
.section-tag {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--green-dark);
  margin-bottom: .75rem;
}
.section-desc {
  color: var(--text-light);
  font-size: 1.05rem;
}

/* =========================================================
   SERVICES
   ========================================================= */
.services {
  padding: 100px 0;
  background: var(--off-white);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--green-light);
}
.service-card:hover::before { transform: scaleX(1); }

.service-card-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.service-card-body { flex: 1; }
.service-card-body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: .5rem;
}
.service-card-body p {
  color: var(--text-light);
  font-size: .925rem;
  line-height: 1.6;
  margin-bottom: .75rem;
}
.service-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.service-list li {
  font-size: .875rem;
  color: var(--text-light);
  padding-left: 1.25rem;
  position: relative;
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .52em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.service-docs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: .75rem;
}
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--green);
  font-weight: 500;
  transition: color var(--transition);
}
.doc-link:hover { color: var(--green-dark); }

.service-card-link {
  display: inline-block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--green);
  padding-top: .75rem;
  border-top: 1px solid var(--gray-200);
  margin-top: auto;
  transition: color var(--transition), letter-spacing var(--transition);
}
.service-card-link:hover {
  color: var(--green-dark);
  letter-spacing: .01em;
}

/* =========================================================
   ICONS CAROUSEL
   ========================================================= */
.icons-carousel {
  margin-top: 4rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--gray-200);
}
.icons-carousel-header {
  margin-bottom: 2.5rem;
}
.icons-carousel-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0;
}

/* Cada fila del carrusel */
.carousel-row {
  overflow: hidden;
  /* máscaras para desvanecer los bordes */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  margin-bottom: 1rem;
}
.carousel-row:last-child { margin-bottom: 0; }

/* Pista: contiene los ítems duplicados */
.carousel-track {
  width: 100%;
  overflow: hidden;
}
.carousel-inner {
  display: flex;
  gap: 16px;
  width: max-content;
  /* Animación: mueve la mitad del ancho total (= 1 set de ítems) */
  animation: carouselLeft 45s linear infinite;
}
.carousel-row--reverse .carousel-inner {
  animation-name: carouselRight;
}

/* Pausar al pasar el mouse sobre la sección */
.icons-carousel:hover .carousel-inner {
  animation-play-state: paused;
}

/* Ítem individual */
.carousel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px 12px 10px;
  width: 130px;
  flex-shrink: 0;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  cursor: default;
}
.carousel-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--green);
}
/* Fondo del icono: evita que PNGs con contenido claro sean invisibles */
.carousel-item-img {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.carousel-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}
.carousel-item span {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
}

@keyframes carouselLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes carouselRight {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Reducir movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  .carousel-inner { animation: none; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  padding: 100px 0;
  background: var(--white);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-bottom: 4rem;
}
.about-content .section-title { text-align: left; }
.about-content .section-tag { text-align: left; }
.about-content p {
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.feature {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green);
}
.feature h4 { font-size: .9rem; font-weight: 600; color: var(--green-dark); margin-bottom: 3px; }
.feature p { font-size: .8rem; color: var(--text-light); line-height: 1.4; }

.about-image-block {
  position: relative;
  height: 480px;
}
.about-img-main {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}
.about-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .95;
}
.about-badge-card {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.about-badge-card:first-of-type {
  bottom: -20px;
  left: -20px;
}
.about-badge-card--2 {
  top: 24px;
  right: -20px;
  bottom: auto;
  left: auto;
}
.badge-number { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--green); }
.badge-text { font-size: .8rem; color: var(--text-light); }
.badge-icon { font-size: 1.4rem; color: var(--accent); }

.objective-block {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: var(--green-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  border-left: 5px solid var(--green);
}
.objective-icon {
  width: 60px;
  height: 60px;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.objective-block h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--green-dark);
  margin-bottom: .6rem;
}
.objective-block p { color: var(--text-light); line-height: 1.7; }

/* =========================================================
   CERTIFICATIONS
   ========================================================= */
.certifications {
  padding: 80px 0;
  background: var(--gray-100);
}

/* Teaser de certificaciones en la home */
.cert-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.cert-teaser-text p { color: var(--text-light); line-height: 1.7; }
.cert-teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .875rem;
}
.cert-teaser-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--white);
  aspect-ratio: 1242 / 981;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.cert-teaser-thumb:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cert-teaser-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cert-teaser-thumb--more {
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-teaser-thumb--more span {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}
@media (max-width: 768px) {
  .cert-teaser { grid-template-columns: 1fr; gap: 2rem; }
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.cert-item {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.cert-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.cert-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cert-ucaba {
  background: var(--green-light);
  border: 2px dashed var(--green);
}
.cert-pdf-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1rem;
  color: var(--green);
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
  height: 100%;
  transition: color var(--transition);
}
.cert-pdf-link:hover { color: var(--green-dark); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  padding: 100px 0;
  background: var(--white);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--off-white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--gray-200);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.contact-card:hover { box-shadow: var(--shadow-sm); border-color: var(--green-light); }
.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-card h4 { font-size: .875rem; font-weight: 700; color: var(--green-dark); margin-bottom: 4px; }
.contact-card p, .contact-card a {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
.contact-card a:hover { color: var(--green); }

.contact-card--whatsapp {
  padding: 0;
  background: transparent;
  border: none;
}
.whatsapp-big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: #25d366;
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(37,211,102,.3);
}
.whatsapp-big-btn:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,.4);
}
.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

/* Form */
.contact-form-wrapper {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--green-dark);
}
.required { color: #d93025; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26,122,78,.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.field-error { font-size: .8rem; color: #d93025; min-height: 1rem; }
.form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-weight: 600;
  font-size: .9rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.75);
  padding: 80px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
  gap: 3rem;
  padding-bottom: 60px;
}
.footer-brand p {
  font-size: .875rem;
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 280px;
}
.footer-logo .logo-main { color: #fff; }
.footer-logo .logo-sub { color: rgba(255,255,255,.6); }
.footer-social {
  display: flex;
  gap: .6rem;
  margin-top: 1.25rem;
}
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.8);
  transition: background var(--transition), color var(--transition);
}
.social-link:hover { background: var(--accent); color: #fff; }

.footer-col h5 {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  margin-bottom: 1.1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul li a {
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-col address p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .875rem;
  color: rgba(255,255,255,.65);
  margin-bottom: .75rem;
}
.footer-col address p svg { flex-shrink: 0; margin-top: 3px; opacity: .7; }
.footer-col address a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
}
.footer-bottom a { color: var(--accent); }
.footer-bottom a:hover { text-decoration: underline; }

/* =========================================================
   WHATSAPP FLOAT
   ========================================================= */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99;
  width: 58px;
  height: 58px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.5);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,.65);
}
.whatsapp-float-tooltip {
  position: absolute;
  right: 68px;
  background: #fff;
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(10px);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}
.whatsapp-float-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right: 0;
  border-left-color: #fff;
}
.whatsapp-float:hover .whatsapp-float-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 99;
  width: 42px;
  height: 42px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--green); }

/* =========================================================
   SG CAPTCHA WIDGET
   ========================================================= */
.sg-captcha {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sg-captcha:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26,122,78,.1);
}
.sg-captcha--error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217,48,37,.1) !important;
}
.sg-captcha--ok {
  border-color: #34a853 !important;
  box-shadow: 0 0 0 3px rgba(52,168,83,.1) !important;
}

.sg-captcha-shield {
  width: 44px;
  height: 44px;
  background: var(--green-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}
.sg-captcha--ok .sg-captcha-shield { background: #e6f4ea; color: #34a853; }
.sg-captcha--error .sg-captcha-shield { background: #fce8e6; color: #d93025; }

.sg-captcha-body { flex: 1; min-width: 0; }
.sg-captcha-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-light);
  margin-bottom: 6px;
}
.sg-captcha-challenge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sg-captcha-question {
  font-size: .9rem;
  font-weight: 600;
  color: var(--green-dark);
  white-space: nowrap;
}
.sg-captcha-input {
  width: 80px;
  padding: 7px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  outline: none;
  transition: border-color var(--transition);
}
.sg-captcha-input:focus { border-color: var(--green); }

.sg-captcha-brand {
  position: absolute;
  bottom: 6px;
  right: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: .6rem;
  color: var(--gray-400);
  line-height: 1.2;
  pointer-events: none;
}

.sg-captcha-refresh {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.sg-captcha-refresh:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
}

.sg-captcha-error { font-size: .8rem; color: #d93025; min-height: 1rem; display: block; margin-top: 4px; }

/* Contenedor del widget en formularios */
.captcha-container { margin-bottom: 1.25rem; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* ── Tablet grande / escritorio pequeño ── */
@media (max-width: 1024px) {
  /* backdrop-filter en el header crea un containing block que rompe
     position:fixed en el nav-menu overlay. Se desactiva en móvil. */
  .header,
  .header.scrolled { backdrop-filter: none; }

  /* Hamburger: con 8 ítems de nav el menú lleno no cabe antes de 1024px */
  .nav-menu {
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    background: rgba(15,61,46,.97);
    flex-direction: column;
    justify-content: center;
    gap: .5rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    padding: 2rem;
    z-index: 50;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-link { font-size: 1.1rem; padding: 12px 20px; color: #fff !important; }
  /* Estado active/hover en el overlay oscuro */
  .nav-link:hover, .nav-link.active,
  .header.scrolled .nav-link:hover, .header.scrolled .nav-link.active {
    background: rgba(255,255,255,.18) !important;
    color: #fff !important;
  }
  .nav-cta { font-size: 1rem; padding: 13px 24px; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-image-block { height: 360px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

/* ── Tablet / móvil ── */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  /* Hero */
  .hero-slider-wrap { min-height: 0; max-height: none; }
  /* contain: muestra el banner completo sin recorte lateral */
  .hero-slide { background-size: contain; background-repeat: no-repeat; }

  .hero-content { padding: 1.5rem 0 2.5rem; max-width: 100%; }
  .hero-title { font-size: 1.6rem; }

  /* Secciones: reduce el exceso de aire vertical */
  .services   { padding: 60px 0; }
  .stats      { padding: 40px 0; }
  .about      { padding: 60px 0; }
  .certifications { padding: 50px 0; }
  .contact    { padding: 60px 0; }
  .footer     { padding: 50px 0 0; }

  .section-header { margin-bottom: 2rem; }
  .section-desc   { font-size: .95rem; }

  /* Grids */
  .services-grid  { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
  .about-badge-card { display: none; }
  .stats-grid     { grid-template-columns: repeat(2, 1fr); }
  .certs-grid     { grid-template-columns: repeat(3, 1fr); }

  .objective-block { flex-direction: column; padding: 2rem; }

  .footer-grid   { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; gap: 1rem; text-align: center; font-size: .72rem; }
}

/* ── Móvil pequeño ── */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  /* Hero */
  .hero-title { font-size: 1.4rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }

  /* Secciones */
  .services { padding: 48px 0; }
  .stats    { padding: 32px 0; }
  .about    { padding: 48px 0; }
  .contact  { padding: 48px 0; }

  /* Tarjetas */
  .service-card { padding: 1.5rem; }
  .contact-card { padding: 1rem; }
  .contact-form-wrapper { padding: 1.25rem; }

  /* Grid certs */
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Previene zoom automático en iOS al enfocar un campo */
  .form-group input,
  .form-group textarea,
  .form-group select { font-size: 1rem; }

  /* Logo más compacto */
  .logo-img { height: 36px; }

  /* Botones flotantes más pegados al borde */
  .whatsapp-float { bottom: 16px; right: 16px; width: 52px; height: 52px; }
  .back-to-top    { bottom: 80px; right: 16px; }
}
