/* ============================================
   HablaNova Kids — Premium Experience Layer
   Fixes críticos + diseño nivel agencia
   ============================================ */

/* ---------- Fixes: elementos flotantes ---------- */

.ui-dock {
  position: fixed;
  right: clamp(0.85rem, 2.5vw, 1.5rem);
  bottom: clamp(0.85rem, 2.5vw, 1.5rem);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  pointer-events: none;
}

.ui-dock > * {
  pointer-events: auto;
}

.float-wa {
  position: static !important;
  z-index: auto !important;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.scroll-top {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  width: 52px;
  height: 52px;
  min-width: 52px;
  padding: 0;
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Mapa: botones siempre visibles */
.map-actions,
.map-actions.reveal,
.map-actions.reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.map-actions .btn {
  min-height: 48px;
  padding: 0.85rem 1.35rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Carrusel de servicios (corregido) ---------- */

/* Carrusel servicios — siempre visible (sin conflicto reveal/GSAP) */
.services-carousel-section {
  padding: 0.5rem 0 2rem;
  overflow: visible;
}

.services-carousel-wrap {
  position: relative;
  padding: 1.25rem 0 0.5rem;
  overflow: visible;
}

.services-carousel {
  display: flex;
  gap: 1.35rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 1rem clamp(0.5rem, 2vw, 1rem) 1.75rem;
  scrollbar-width: none;
  align-items: stretch;
}

.service-float-card {
  flex: 0 0 min(100%, 300px);
  scroll-snap-align: start;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.65rem 1.35rem 1.75rem;
  background: var(--blanco);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(47, 120, 183, 0.1);
  box-shadow:
    0 4px 6px rgba(47, 120, 183, 0.04),
    0 18px 40px rgba(47, 120, 183, 0.1);
  text-align: center;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s,
    border-color 0.35s;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

@media (min-width: 640px) {
  .service-float-card {
    flex-basis: min(85%, 320px);
  }
}

@media (min-width: 900px) {
  .service-float-card {
    flex-basis: calc(33.333% - 0.9rem);
  }
}

.service-float-card.magic-card:hover {
  transform: translateY(-10px);
  border-color: rgba(242, 193, 78, 0.55);
  box-shadow:
    0 8px 12px rgba(47, 120, 183, 0.06),
    0 28px 56px rgba(47, 120, 183, 0.14);
}

.service-float-card__icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.15rem;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fff8ef 0%, #fff 55%, #f0f7ff 100%);
  border: 2px solid rgba(242, 193, 78, 0.45);
  box-shadow:
    0 10px 24px rgba(47, 120, 183, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.service-float-card__icon img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.service-float-card h4 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--azul-cielo);
  line-height: 1.25;
}

.service-float-card p {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  color: rgba(47, 120, 183, 0.78);
  line-height: 1.6;
}

.services-carousel-controls button {
  width: 46px;
  height: 46px;
  border: 2px solid var(--azul-cielo);
  background: var(--blanco);
  color: var(--azul-cielo);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.services-carousel-controls button:hover {
  background: var(--azul-cielo);
  color: var(--blanco);
}

/* ---------- Hero premium — métricas de confianza ---------- */

.hero-slide__content.container {
  max-width: var(--max-w);
  margin-inline: auto;
}

.hero-slide__text {
  max-width: min(34rem, 100%);
}

.hero-trust-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.85rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-trust-metrics li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.95);
}

.hero-trust-metrics li::before {
  content: "✓";
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(242, 193, 78, 0.95);
  color: #153456;
  font-size: 0.62rem;
  font-weight: 800;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0;
}

.hero-cta-row .btn-lg {
  padding: 0.65rem 1.15rem;
  font-size: 0.92rem;
}

.hero-cta-row .btn-secondary {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 2px solid rgba(255, 255, 255, 0.55) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  backdrop-filter: blur(8px);
}

.hero-cta-row .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22) !important;
}

@media (min-width: 900px) {
  .hero-slide__content {
    padding-bottom: clamp(5rem, 12vh, 6.5rem);
  }

  .hero-slide__text {
    max-width: min(32rem, 52%);
  }
}

@media (max-width: 767px) {
  .hero-slider,
  .hero-slider__track {
    min-height: clamp(560px, 92vh, 680px);
    height: clamp(560px, 92vh, 680px);
  }

  .hero-slide__content {
    align-items: flex-start;
    padding-top: clamp(3rem, 8vw, 4rem);
    padding-bottom: clamp(5rem, 14vw, 6rem);
  }

  .hero-slide__text {
    max-width: calc(100% - 0.25rem);
  }
}

/* ---------- Tarjetas desarrollo integral premium ---------- */

.benefits-grid--premium {
  gap: 1.25rem;
}

.benefit-card--premium {
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: 28px;
  background: linear-gradient(165deg, #fffdf8 0%, #fff 45%, #f8fbff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 20px 50px rgba(47, 120, 183, 0.1);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s;
}

.benefit-card--premium::after {
  display: none;
}

.benefit-card--premium:hover {
  transform: translateY(-8px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 32px 64px rgba(47, 120, 183, 0.16);
}

.benefit-card__top {
  position: relative;
  padding: 1.15rem 1.15rem 0;
  min-height: 140px;
}

.benefit-card__badge {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(47, 120, 183, 0.12);
}

.benefit-card__badge svg {
  width: 28px;
  height: 28px;
}

.benefit-card__badge--sensorial {
  background: linear-gradient(145deg, #ffe8f0, #fff5f8);
  border: 2px solid rgba(255, 64, 129, 0.25);
}

.benefit-card__badge--motriz {
  background: linear-gradient(145deg, #fff3e8, #fffaf5);
  border: 2px solid rgba(247, 162, 126, 0.35);
}

.benefit-card__badge--cognitivo {
  background: linear-gradient(145deg, #e8f3ff, #f5faff);
  border: 2px solid rgba(47, 120, 183, 0.25);
}

.benefit-card__badge--emocional {
  background: linear-gradient(145deg, #ffeef5, #fff5f9);
  border: 2px solid rgba(255, 82, 82, 0.2);
}

.benefit-card__glow {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 72%;
  height: 85%;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(28px);
  pointer-events: none;
}

.benefit-card__glow--sensorial { background: radial-gradient(circle, rgba(255, 64, 129, 0.22), transparent 70%); }
.benefit-card__glow--motriz { background: radial-gradient(circle, rgba(247, 162, 126, 0.28), transparent 70%); }
.benefit-card__glow--cognitivo { background: radial-gradient(circle, rgba(47, 120, 183, 0.2), transparent 70%); }
.benefit-card__glow--emocional { background: radial-gradient(circle, rgba(255, 82, 82, 0.18), transparent 70%); }

.benefit-card__body {
  padding: 0.85rem 1.35rem 1.5rem;
  margin-top: auto;
}

.benefit-card--premium h3 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--azul-cielo);
}

.benefit-card--premium p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(47, 120, 183, 0.75);
}

.benefit-card--premium.reveal,
.benefit-card--premium.reveal-delay,
.benefit-card--premium.reveal.is-visible,
.benefit-card--premium.reveal-delay.is-visible {
  opacity: 1;
  transform: none;
}

.benefit-card--premium.benefit-card--emocional {
  background: linear-gradient(165deg, #fff5f8 0%, #fff 50%, #fff8fa 100%);
}

/* ---------- Outcome cards — iconos con fondo premium ---------- */

.outcome-card__icon {
  width: 88px;
  height: 88px;
  min-width: 88px;
  min-height: 88px;
  padding: 0.65rem;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff8ef 0%, #fff 55%, #f0f7ff 100%);
  border: 2px solid rgba(242, 193, 78, 0.4);
  box-shadow:
    0 10px 24px rgba(47, 120, 183, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.outcome-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Secciones premium — alternancia visual ---------- */

.section--results {
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(255, 64, 129, 0.05), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(242, 193, 78, 0.08), transparent 50%),
    var(--blanco);
}

.section--programs {
  background: linear-gradient(180deg, #fafcff 0%, var(--blanco) 100%);
}

.section--est {
  background:
    radial-gradient(ellipse 70% 45% at 85% 15%, rgba(247, 162, 126, 0.08), transparent 55%),
    var(--blanco);
}

.section--map {
  background: linear-gradient(180deg, var(--blanco) 0%, #f7f3e9 100%);
}

/* Glass panels sutiles */
.trust-pillar,
.outcome-card,
.testimonial-card {
  backdrop-filter: blur(8px);
}

/* WhatsApp dock pulse */
.float-wa-btn {
  animation: waPulse 3s ease-in-out infinite;
}

@keyframes waPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45); }
  50% { box-shadow: 0 10px 36px rgba(37, 211, 102, 0.65), 0 0 0 6px rgba(37, 211, 102, 0.15); }
}

@media (prefers-reduced-motion: reduce) {
  .float-wa-btn,
  .scroll-top.is-visible {
    animation: none !important;
  }
}

/* ---------- Terapia sensorial y de aprendizaje ---------- */

.section--therapies {
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(142, 115, 142, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 45% at 90% 100%, rgba(102, 187, 106, 0.1), transparent 50%),
    var(--blanco);
}

.therapies-infographic {
  margin: 0 auto 2.5rem;
  max-width: 520px;
  text-align: center;
}

.therapies-infographic img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 3px solid color-mix(in srgb, var(--amarillo-vivo) 55%, transparent);
}

.therapies-grid {
  display: grid;
  gap: 2rem;
}

.therapy-panel {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 2px solid color-mix(in srgb, var(--azul-cielo) 10%, transparent);
  box-shadow: var(--shadow-md);
}

@media (min-width: 900px) {
  .therapy-panel {
    grid-template-columns: 1fr 1.05fr;
    padding: 2rem;
    gap: 2rem;
  }

  .therapy-panel--aprendizaje {
    grid-template-columns: 1.05fr 1fr;
  }

  .therapy-panel--aprendizaje .therapy-panel__body {
    order: 1;
  }

  .therapy-panel--aprendizaje .therapy-panel__gallery {
    order: 2;
  }
}

.therapy-panel__media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
}

.therapy-panel--sensorial {
  border-top: 5px solid #8e738e;
}

.therapy-panel--aprendizaje {
  border-top: 5px solid #66bb6a;
}

.therapy-panel__tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.therapy-panel__tag--sensorial {
  background: color-mix(in srgb, #8e738e 18%, var(--blanco));
  color: #6b5570;
}

.therapy-panel__tag--aprendizaje {
  background: color-mix(in srgb, #66bb6a 18%, var(--blanco));
  color: #3d7a40;
}

.therapy-panel__body h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  line-height: 1.25;
  color: var(--azul-cielo);
}

.therapy-panel__body p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  line-height: 1.65;
}

.therapy-panel__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.therapy-panel__list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--azul-cielo) 82%, var(--crema));
  font-weight: 600;
}

.therapy-panel__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amarillo-vivo);
}

.therapy-panel--sensorial .therapy-panel__list li::before {
  background: #8e738e;
}

.therapy-panel--aprendizaje .therapy-panel__list li::before {
  background: #66bb6a;
}

.therapy-panel__gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.therapy-panel__gallery img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

.therapy-panel__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.therapy-highlight {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--azul-cielo) 8%, var(--crema)),
    color-mix(in srgb, var(--durazno) 12%, var(--crema))
  );
  border: 2px solid color-mix(in srgb, var(--durazno) 35%, transparent);
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .therapy-highlight {
    grid-template-columns: minmax(200px, 280px) 1fr;
    padding: 2rem;
    gap: 2rem;
  }
}

.therapy-highlight > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.therapy-highlight__text h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  color: var(--azul-cielo);
}

.therapy-highlight__text p {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
  line-height: 1.65;
}
