/* =========================================================
   TRAUMACENTRO — css/animations.css
   FASE 2: WOW Factor Visual + FASE 1: WhatsApp & Legal
   Loader · Hero Inmersivo · Scroll-Reveal · Stats
   Hover 3D · Validación de Formulario · WhatsApp Float
   ========================================================= */

/* ─────────────────────────────────────────
   0. SMART HEADER — Scroll Dynamics
───────────────────────────────────────── */
:root {
  --header-height: 85px;
  --topbar-height: 48px;
}

.topbar {
  position: relative;
  z-index: 1001; /* Siempre sobre el header en estado inicial */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
}

.body--scrolled .topbar {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header {
  position: absolute;
  top: var(--topbar-height);
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: #ffffff;
  display: flex;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header.header--fixed {
  position: fixed;
  top: 0;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  height: 70px; /* Más compacto al scroll */
}

.header__content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 100%;
  width: 100%;
}

.btn--header {
  margin: 0 !important; /* Eliminar márgenes extraños */
  align-self: center;
}
.body--loading {
  overflow: hidden;
}

.tc-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #0a2140 0%, #0F3460 50%, #1a1a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.tc-loader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tc-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: loaderFadeIn 0.5s ease forwards;
}

@keyframes loaderFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tc-loader__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.tc-loader__heartbeat {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(196, 30, 58, 0.6));
  animation: heartbeatDraw 2s ease-in-out infinite;
}

@keyframes heartbeatDraw {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(196, 30, 58, 0.4)); }
  50%       { filter: drop-shadow(0 0 20px rgba(196, 30, 58, 0.9)); }
}

.tc-loader__heartbeat polyline {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawLine 1.8s ease forwards;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

.tc-loader__brand {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.tc-loader__text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: pulse 1.4s ease infinite;
  transition: opacity 0.2s ease;
  min-height: 1.2em; /* evita salto de layout al cambiar texto */
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

.tc-loader__bar {
  width: 240px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.tc-loader__bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #C41E3A, #E54D65, #C41E3A);
  background-size: 200% 100%;
  border-radius: 99px;
  transition: width 0.15s ease;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}


/* ─────────────────────────────────────────
   2. HERO INMERSIVO — Layout y estilos base
───────────────────────────────────────── */

/* Override completo de la base .hero de styles.css */
.hero--immersive {
  position: relative;
  min-height: 820px;
  max-height: 960px;
  padding: calc(var(--header-total) + 1.5rem) 0 3.5rem 0 !important;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, #ffffff 0%, #edf7fd 100%);
}

/* Fondo con parallax */
.hero--immersive .hero__bg--image {
  position: absolute;
  inset: -8%;          /* margen extra para el parallax */
  background-image: radial-gradient(circle at 85% 30%, rgba(0, 163, 224, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  background-size: cover;
  background-position: center 30%;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.12s linear;
  z-index: 0;
}

/* Overlay con gradiente dinámico */
.hero__overlay--gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(237, 247, 253, 0.5) 45%,
    rgba(0, 119, 200, 0.05) 80%,
    rgba(255, 255, 255, 0.3) 100%
  );
  z-index: 1;
  animation: overlayBreath 8s ease-in-out infinite;
}

@keyframes overlayBreath {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.88; }
}

/* Canvas de partículas — capa transparente por encima del fondo */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Elementos decorativos */
.hero__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.hero__deco-ring {
  position: absolute;
  border-radius: 50%;
  animation: ringFloat 12s ease-in-out infinite;
}

.hero__deco-ring--1 {
  width: 520px;
  height: 520px;
  top: -140px;
  right: -100px;
  border: 1px solid rgba(196, 30, 58, 0.12);
  animation-delay: 0s;
}

.hero__deco-ring--2 {
  width: 350px;
  height: 350px;
  bottom: 60px;
  left: -80px;
  border: 1px solid rgba(255,255,255,0.06);
  animation-delay: -4s;
}

@keyframes ringFloat {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
  50%       { transform: scale(1.06) rotate(8deg); opacity: 1; }
}

.hero__deco-cross {
  position: absolute;
  animation: crossFloat 7s ease-in-out infinite;
  user-select: none;
}

.hero__deco-cross--1 { top: 18%; right: 12%; font-size: 2rem; color: rgba(196,30,58,0.18); animation-delay: -1s; }
.hero__deco-cross--2 { bottom: 22%; left: 8%; font-size: 1.5rem; color: rgba(255,255,255,0.08); animation-delay: -3s; }

@keyframes crossFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-12px) rotate(15deg); }
}

/* ── Contenedor principal del hero ── */
.hero__container {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 130px 24px 180px 24px !important;
}

/* ── Grid Principal de Dos Columnas con Vida y Fuerza Visual ── */
.hero-split-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
  width: 100%;
}

/* Columna Izquierda */
.hero__left-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero__trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero__trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1.5px solid #dbeafe;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #003b71;
  box-shadow: 0 4px 14px rgba(0, 59, 113, 0.06);
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
}

.hero__trust-item:hover {
  border-color: #0077c8;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 119, 200, 0.15);
}

.hero__trust-item svg {
  width: 16px;
  height: 16px;
  color: #0077c8;
}

.hero__dot-live {
  width: 9px;
  height: 9px;
  background: #16a34a;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
}

.hero__main-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.14;
  color: #003b71;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero__title-highlight {
  color: #0077c8;
  background: linear-gradient(135deg, #0077c8 0%, #00a3e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero__lead-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #475569;
  max-width: 580px;
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero__cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.btn--cta-primary {
  background: linear-gradient(135deg, #0077c8 0%, #003b71 100%) !important;
  color: #ffffff !important;
  padding: 0.95rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 9999px;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 59, 113, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn--cta-primary:hover {
  background: linear-gradient(135deg, #008be3 0%, #004b99 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 59, 113, 0.35);
}

.btn--cta-secondary {
  background: #ffffff !important;
  color: #003b71 !important;
  padding: 0.95rem 1.8rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(0, 59, 113, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn--cta-secondary:hover {
  border-color: #0077c8 !important;
  color: #0077c8 !important;
  background: #f0f7fd !important;
  transform: translateY(-2px);
}

/* Doctores y Prueba Social Rápida */
.hero__doctor-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 59, 113, 0.04);
}

.doctor-avatars {
  display: flex;
  align-items: center;
}

.doctor-avatars img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  object-fit: cover;
  margin-left: -10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.doctor-avatars img:first-child {
  margin-left: 0;
}

.doctor-preview-text strong {
  display: block;
  font-size: 0.88rem;
  color: #003b71;
  font-weight: 700;
}

.doctor-preview-text span {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
}

/* Columna Derecha: Fotografía y Urgencias */
.hero__right-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.hero__image-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 48px -8px rgba(0, 59, 113, 0.22);
  border: 4px solid #ffffff;
  aspect-ratio: 16 / 10;
  max-width: 540px;
}

.hero__team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.hero__image-card:hover .hero__team-img {
  transform: scale(1.03);
}

.hero__floating-experience {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 8px 20px rgba(0, 59, 113, 0.15);
}

.exp-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0f4fc;
  color: #0077c8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-icon svg {
  width: 16px;
  height: 16px;
}

.exp-num {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #003b71;
  line-height: 1.1;
}

.exp-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tarjeta de Urgencias Sanitas */
.hero__urgency-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 16px 36px -4px rgba(0, 59, 113, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 119, 200, 0.15);
  max-width: 540px;
  position: relative;
  transition: all 0.3s ease;
}

.hero__urgency-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px -4px rgba(0, 59, 113, 0.18);
  border-color: #0077c8;
}

.urgency-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.urgency-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0077c8 0%, #003b71 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 119, 200, 0.3);
}

.urgency-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.urgency-badge {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0077c8;
}

.urgency-phone {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #003b71;
  text-decoration: none;
  line-height: 1.2;
}

.urgency-phone:hover {
  color: #0077c8;
}

.urgency-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 0.85rem 0;
}

.btn-urgency-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0077c8;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-urgency-action:hover {
  color: #003b71;
  transform: translateX(4px);
}

@media (max-width: 992px) {
  .hero-split-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero__main-title {
    font-size: 2.5rem;
  }
}

/* Indicador de scroll */
.hero__scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 4;
  animation: scrollBounce 2.2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

.hero__scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.65), transparent);
}

.hero__scroll-text {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Animaciones de entrada JS */
.hero__tag--animate,
.hero__title--animate,
.hero__subtitle--animate,
.hero__cta--animate,
.hero__trust--animate,
.hero__side-card--animate {
  will-change: opacity, transform;
}

.hero__side-card--animate {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.85s ease 0.75s, transform 0.85s ease 0.75s;
}

body:not(.body--loading) .hero__side-card--animate {
  opacity: 1;
  transform: translateX(0);
}


/* ─────────────────────────────────────────
   RESPONSIVE — Hero
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero__container {
    gap: 2.5rem;
    padding-bottom: 5rem;
  }
  .hero__side-card {
    width: 200px;
  }
}

@media (max-width: 860px) {
  .hero__container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: calc(var(--header-total, 90px) + 2rem);
    padding-bottom: 4rem;
    gap: 2rem;
  }

  .hero__content--immersive {
    align-items: center;
    max-width: 580px;
  }

  .hero--immersive .hero__tag,
  .hero--immersive .hero__subtitle {
    max-width: 100%;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__trust {
    justify-content: center;
  }

  .hero__side-card {
    width: 100%;
    max-width: 340px;
  }

  .hero__side-card-inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
  }

  .hero__side-card-icon { margin-bottom: 0; }
  .hero__scroll-hint { display: none; }
}

@media (max-width: 580px) {
  .hero--immersive .hero__title {
    font-size: clamp(1.9rem, 7vw, 2.6rem);
  }
  .hero__cta {
    flex-direction: column;
    align-items: center;
  }
  .btn--accent-solid,
  .btn--ghost {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }
  .hero__side-card-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ─────────────────────────────────────────
   3. SCROLL-REVEAL
───────────────────────────────────────── */
.sr-hidden {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s ease var(--sr-delay, 0s),
    transform 0.65s ease var(--sr-delay, 0s);
  will-change: opacity, transform;
}

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

/* Variantes de dirección para elementos específicos */
.specialists__header.sr-hidden,
.blog__header.sr-hidden,
.services__header.sr-hidden {
  transform: translateY(16px);
}

.specialist-card.sr-hidden {
  transform: translateY(36px) scale(0.97);
}
.specialist-card.sr-visible {
  transform: translateY(0) scale(1);
}

.contact-section__form-wrapper.sr-hidden {
  transform: translateX(30px);
  opacity: 0;
}
.contact-section__form-wrapper.sr-visible {
  transform: translateX(0);
  opacity: 1;
}


/* ─────────────────────────────────────────
   4. STATS — Contadores animados
───────────────────────────────────────── */
.stat-item {
  /* Preservamos la transición de transformación del hover 3D y scroll reveal */
  will-change: transform, opacity;
}

.stat-item__icon {
  font-size: 2.2rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* Aseguramos que el valor sea grande y bold */
.stat-item__value {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  font-family: 'Outfit', sans-serif;
  /* Se sobrescribe el color desde styles.css si ya está definido */
}


/* ─────────────────────────────────────────
   5. HOVER 3D — Tarjetas de servicios
───────────────────────────────────────── */
.service-item--card {
  transform-style: preserve-3d;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  cursor: default;
  will-change: transform;
}

/* El fondo interno percibe el efecto 3D */
.service-item--card .service-item__icon,
.service-item--card .service-item__content {
  transform: translateZ(4px); /* leve elevación "Z" */
}

/* Sombra dinámica cuando se aplica el hover 3D (JS la restaura) */
.service-item--card:hover {
  box-shadow: 0 20px 60px rgba(15, 52, 96, 0.20), 0 4px 16px rgba(196, 30, 58, 0.12);
}


/* ─────────────────────────────────────────
   6. FORMULARIOS — Validación visual
───────────────────────────────────────── */

/* Labels visibles encima del input */
.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a5568;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Check mark de validación */
.form-group__check {
  position: absolute;
  right: 0.8rem;
  bottom: 0.75rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

/* Campo válido */
.form-group--valid .form-group__input {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12) !important;
}

.form-group--valid .form-group__check {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Campo inválido (solo después de interacción) */
.form-group--invalid .form-group__input,
.form-group--touched .form-group__input:invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10) !important;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}

/* Barra de progreso del formulario */
.form-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.form-progress__bar {
  flex: 1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.form-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #0F3460, #00BCD4);
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-progress__fill.full {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.form-progress__label {
  font-size: 0.72rem;
  color: #6b7b94;
  white-space: nowrap;
  font-weight: 600;
  min-width: 90px;
  text-align: right;
}

/* Botón de éxito al enviar */
.btn--success {
  background: linear-gradient(135deg, #10b981, #34d399) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
  transform: scale(1.02);
}

.btn--success span {
  font-size: 1.1em;
}


/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 960px) {
  .hero__container {
    flex-direction: column;
    text-align: center;
    padding-top: 1rem;
  }

  .hero__content--immersive {
    align-items: center;
    max-width: 100%;
  }

  .hero__subtitle--animate {
    max-width: 500px;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__trust {
    justify-content: center;
  }

  .hero__side-card {
    width: 100%;
    max-width: 320px;
  }

  .hero__side-card-inner {
    flex-direction: row;
    gap: 1rem;
    text-align: left;
    align-items: center;
    padding: 1.25rem 1.5rem;
  }

  .hero__scroll-hint { display: none; }
}

@media (max-width: 600px) {
  .hero--immersive .hero__title {
    font-size: clamp(1.9rem, 7vw, 2.8rem);
  }

  .tc-loader__brand { font-size: 1.6rem; }
  .tc-loader__heartbeat { width: 120px; }
  .tc-loader__bar { width: 180px; }

  .btn--accent-solid,
  .btn--ghost {
    padding: 0.85rem 1.4rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .hero__side-card-inner { flex-direction: column; text-align: center; }

  .form-progress { flex-wrap: wrap; }
  .form-progress__label { min-width: unset; }
}

@media (prefers-reduced-motion: reduce) {
  .sr-hidden {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .tc-loader__heartbeat,
  .hero__deco-ring,
  .hero__deco-cross,
  .hero__scroll-hint,
  .stat-item__icon,
  .hero__side-card-inner {
    animation: none !important;
  }
}


/* ─────────────────────────────────────────
   7. BOTÓN FLOTANTE WHATSAPP
───────────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  animation: waSlidein 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2s both;
}

@keyframes waSlidein {
  from { opacity: 0; transform: translateY(30px) scale(0.7); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wa-float__btn {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.50);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.wa-float__btn:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 36px rgba(37, 211, 102, 0.65);
}

.wa-float__btn:hover + .wa-float__tooltip {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.wa-float__icon {
  width: 32px;
  height: 32px;
  color: #fff;
  flex-shrink: 0;
}

/* Anillo de pulso */
.wa-float__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid #25D366;
  opacity: 0;
  animation: waPulse 2.5s ease-out infinite;
}

@keyframes waPulse {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Tooltip */
.wa-float__tooltip {
  position: absolute;
  right: calc(100% + 0.75rem);
  bottom: 50%;
  transform: translateY(50%) translateX(8px);
  background: #1a1a2e;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.20);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.wa-float__tooltip::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-left-color: #1a1a2e;
}

/* Mostrar tooltip también en hover del contenedor */
.wa-float:hover .wa-float__tooltip {
  opacity: 1;
  transform: translateY(50%) translateX(0);
}


/* ─────────────────────────────────────────
   8. FOOTER — Legal / Ley 1581 & SEO
───────────────────────────────────────── */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer__legal-link {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__legal-link:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__legal-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
}

@media (max-width: 600px) {
  .wa-float {
    bottom: 4rem;
    right: 1rem;
  }
  .wa-float__btn {
    width: 54px;
    height: 54px;
  }
  .wa-float__tooltip {
    display: none;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer__legal {
    justify-content: center;
  }
}

/* -- SECCI�N ESTAD�STICAS � ICONOS PREMIUM -- */
.stat-item { text-align: center; }
.stat-item__icon {
  width: 64px;
  height: 64px;
  background: rgba(196, 30, 58, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: #C41E3A;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(196, 30, 58, 0.1);
}
.stat-item__icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
}
.stat-item:hover .stat-item__icon {
  background: #C41E3A;
  color: #ffffff;
  transform: translateY(-8px) rotate(8deg);
  box-shadow: 0 15px 30px rgba(196, 30, 58, 0.3);
}
