/* ======================================
   ROOT VIEWS
====================================== */

.main-layout {
  min-height: calc(100vh - var(--header-height));
  overflow: visible !important;
  padding-top: calc(var(--header-height) + var(--spacing-4));
  padding-bottom: calc(var(--footer-height) + var(--spacing-6) + 60px);
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards !important;
}

/* Mobile padding fix */
@media (max-width: 768px) {
  .main-layout {
    padding-bottom: calc(
      var(--footer-height) + var(--spacing-6) + 80px
    ) !important;
  }
}

/* Layout base */
.root-content {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--spacing-4);
  padding-right: var(--spacing-4);
  width: 100%;
}

.badges-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  justify-content: center !important;
  max-width: 100% !important;
}

/* ======================================
   SECCIONES ESTILO DASHBOARD
====================================== */
.section {
  margin-bottom: var(--spacing-6);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards !important;
}

/* Delays escalonados para secciones principales */
.section:nth-child(1) {
  animation-delay: 0.1s !important;
}
.section:nth-child(2) {
  animation-delay: 0.2s !important;
}
.section:nth-child(3) {
  animation-delay: 0.3s !important;
}
.section:nth-child(4) {
  animation-delay: 0.4s !important;
}
.section:nth-child(5) {
  animation-delay: 0.5s !important;
}

.section.gradient {
  background: linear-gradient(135deg, #f8fafc 0%, #e8f4fd 100%);
  padding: var(--spacing-5) 0;
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-6);
}

[data-theme="dark"] .section.gradient {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.5) 0%,
    rgba(51, 65, 85, 0.3) 100%
  );
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
}

/* Efecto sutil al hacer hover en enlaces de navegación */
a[href^="#"].card:hover {
  transform: translateY(-2px) scale(1.02) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Asegurar que los enlaces internos tengan cursor pointer */
a[href^="#"] {
  cursor: pointer !important;
}

/* ======================================
   HERO SECTION - ANIMACIONES LIMPIAS
====================================== */
.hero-section {
  margin-bottom: var(--spacing-6);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.1s forwards !important;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-4);
  background: var(--gradient-card-primary);
  padding: var(--spacing-5);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: default;
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

.hero-container:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

/* Elementos dentro del hero con animación suave */
.hero-text {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out 0.3s forwards !important;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-2) 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: var(--font-size-lg);
  margin: 0 0 var(--spacing-4) 0;
  line-height: 1.6;
}

/* Badges con animación escalonada suave */
.hero-text .badge {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards !important;
}

.hero-text .badge:nth-child(1) {
  animation-delay: 0.4s !important;
}
.hero-text .badge:nth-child(2) {
  animation-delay: 0.45s !important;
}
.hero-text .badge:nth-child(3) {
  animation-delay: 0.5s !important;
}
.hero-text .badge:nth-child(4) {
  animation-delay: 0.55s !important;
}

/* Hero image con fade-in suave */
.hero-image {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-transform);
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.6s forwards !important;
}

.hero-image:hover {
  transform: scale(1.05);
}

/* ======================================
   TÍTULOS SECCIÓN - SIN DOBLE ANIMACIÓN
====================================== */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-4);
}

.section-icon {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: var(--spacing-3);
}

.lead-text {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--spacing-4);
  text-align: center;
  line-height: 1.6;
}

/* ======================================
     CARDS - ANIMACIÓN POR GRUPO
  ====================================== */
.card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-5);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: default;
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

.card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

/* Animación escalonada solo para cards en grid */
.grid > .card:nth-child(1) {
  animation-delay: 0.1s !important;
}
.grid > .card:nth-child(2) {
  animation-delay: 0.15s !important;
}
.grid > .card:nth-child(3) {
  animation-delay: 0.2s !important;
}
.grid > .card:nth-child(4) {
  animation-delay: 0.25s !important;
}
.grid > .card:nth-child(5) {
  animation-delay: 0.3s !important;
}
.grid > .card:nth-child(6) {
  animation-delay: 0.35s !important;
}

/* Cards individuales fuera de grid */
.card:not(.grid > .card) {
  animation-delay: 0.2s !important;
}

/* ======================================
   TARJETAS ESPECIALES JARDINES INFANTILES
====================================== */

/* Tarjetas de jardines con efectos más dinámicos */
.card.relative {
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid transparent;
  position: relative;
}

.card.relative::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  border-radius: inherit; /* respeta bordes redondeados */
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
  z-index: 1;
}

.card.relative:hover::before {
  left: 100%;
}

/* Iconos con efecto suave y elegante */
.card.relative .feature-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  z-index: 2;
}

.card.relative:hover .feature-icon {
  transform: translateY(-50%) scale(1.1) !important;
  filter: brightness(1.1) saturate(1.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
}

/* Títulos con efecto gradiente dinámico */
.card.relative h3 {
  transition: all 0.3s ease !important;
  position: relative;
  z-index: 2;
}

.card.relative:hover h3 {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: scale(1.05);
}

/* Colores especiales para jardines */
.card.blue.relative {
  background: linear-gradient(135deg, #e0f7ff 0%, #b3e5fc 50%, #ffffff 100%);
  border-image: linear-gradient(135deg, #0891b2, #3b82f6) 1;
  border-radius: 22px !important;
  overflow: hidden; /* asegura esquinas redondeadas visibles */
}

.card.green.relative {
  background: linear-gradient(135deg, #d1f2eb 0%, #a8e6cf 50%, #ffffff 100%);
  border-image: linear-gradient(135deg, #059669, #10b981) 1;
  border-radius: 22px !important;
  overflow: hidden;
}

.card.yellow.relative {
  background: linear-gradient(135deg, #fff9e6 0%, #ffecb3 50%, #ffffff 100%);
  border-image: linear-gradient(135deg, #f59e0b, #fbbf24) 1;
  border-radius: 22px !important;
  overflow: hidden;
}

.card.purple.relative {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 50%, #ffffff 100%);
  border-image: linear-gradient(135deg, #9333ea, #8b5cf6) 1;
  border-radius: 22px !important;
  overflow: hidden;
}

/* ======================================
   MICRO-ANIMACIONES PARA JARDINES
====================================== */

/* Efecto parpadeo sutil en iconos importantes */
@keyframes gentle-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

.feature-icon.blue,
.feature-icon.green,
.feature-icon.yellow,
.feature-icon.purple {
  animation: gentle-pulse 3s ease-in-out infinite;
}

/* Retrasar la animación para crear efecto cascada */
.feature-icon.blue {
  animation-delay: 0s;
}

.feature-icon.green {
  animation-delay: 0.5s;
}

.feature-icon.yellow {
  animation-delay: 1s;
}

.feature-icon.purple {
  animation-delay: 1.5s;
}

/* Efecto ondas en hover para tarjetas principales */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.card.relative::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, black 60%, transparent 61%);
  mask-image: radial-gradient(circle, black 60%, transparent 61%);
  border-radius: inherit; /* respeta bordes redondeados */
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.card.relative:hover::after {
  animation: ripple 0.6s ease-out;
  width: 300px;
  height: 300px;
}

/* ======================================
   TARJETAS ESPECÍFICAS DE JARDINES INFANTILES
====================================== */

/* Tarjetas de jardines con bordes muy redondeados y mejor estética */
.grid.cols-2 > .card.relative {
  border-radius: 22px !important; /* bordes más redondeados */
  padding: 0.75rem 1rem !important;
  min-height: 90px;
  display: flex;
  align-items: center; /* centrar verticalmente */
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.grid.cols-2 > .card.relative:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.grid.cols-2 > .card.relative .pl-16 {
  width: 100%;
  display: flex;
  align-items: center; /* icono y texto centrados verticalmente */
  justify-content: flex-start;
  gap: 0; /* el espacio lo da el padding izquierdo para icono fijo */
  padding-left: 5rem !important; /* más espacio para evitar solapes */
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.grid.cols-2 > .card.relative h3 {
  font-size: 1.05rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  font-weight: 600 !important;
  color: #0f172a; /* mejor contraste */
  transition: color 0.2s ease, transform 0.2s ease;
}

.grid.cols-2 > .card.relative:hover h3 {
  color: #0b3aa7; /* sutil énfasis */
  transform: translateX(1px);
}

/* Anula el efecto general de gradiente en títulos para este bloque */
.grid.cols-2 > .card.relative:hover h3 {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
}

/* Iconos perfectamente centrados y con animaciones suaves */
.grid.cols-2 > .card.relative .feature-icon {
  width: 44px !important;
  height: 44px !important;
  position: absolute !important; /* asegurar posicionamiento absoluto */
  top: 50% !important;
  left: 1rem !important;
  transform: translateY(-50%);
  border-radius: 12px !important; /* ícono dentro de píldora */
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.grid.cols-2 > .card.relative:hover .feature-icon {
  transform: translateY(-52%) scale(1.06) !important; /* sutil, sin exagerar */
  filter: brightness(1.05) saturate(1.05);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14) !important;
}

.grid.cols-2 > .card.relative .feature-icon svg {
  width: 22px !important;
  height: 22px !important;
  transition: transform 0.2s ease;
}

.grid.cols-2 > .card.relative:hover .feature-icon svg {
  transform: scale(1.08);
}

/* Fix: mantener centrado absoluto durante la animación en cards de 2 columnas (Android/Chrome) */
@keyframes gentle-pulse-centered {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
  }
  50% {
    transform: translateY(-50%) scale(1.02);
  }
}

.grid.cols-2 > .card.relative .feature-icon.blue,
.grid.cols-2 > .card.relative .feature-icon.green,
.grid.cols-2 > .card.relative .feature-icon.yellow,
.grid.cols-2 > .card.relative .feature-icon.purple {
  /* Evita que la animación sobreescriba el translateY(-50%) */
  animation: gentle-pulse-centered 3s ease-in-out infinite;
}

/* Mejoras de accesibilidad y movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .card.relative::before,
  .card.relative::after {
    display: none;
  }

  .feature-icon.blue,
  .feature-icon.green,
  .feature-icon.yellow,
  .feature-icon.purple {
    animation: none;
  }

  .card.relative:hover .feature-icon {
    transform: translateY(-50%) scale(1.05) !important;
  }
}

/* Modificadores de Card */
.card.compact {
  padding: var(--spacing-4);
}

.card.clickable {
  cursor: pointer;
}

/* Colores pasteles como dashboard */
.card.green {
  background: linear-gradient(135deg, #d1f2eb 0%, #a8e6cf 100%);
  border-color: #a8e6cf;
}

.card.green:hover {
  border-color: #059669;
  box-shadow: 0 20px 40px rgba(5, 150, 105, 0.15) !important;
}

.card.blue {
  background: linear-gradient(135deg, #e0f7ff 0%, #b3e5fc 100%);
  border-color: #b3e5fc;
}

.card.blue:hover {
  border-color: #0891b2;
  box-shadow: 0 20px 40px rgba(8, 145, 178, 0.15) !important;
}

.card.yellow {
  background: linear-gradient(135deg, #fff9e6 0%, #ffecb3 100%);
  border-color: #ffecb3;
}

.card.yellow:hover {
  border-color: #f59e0b;
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15) !important;
}

.card.purple {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  border-color: #e9d5ff;
}

.card.purple:hover {
  border-color: #9333ea;
  box-shadow: 0 20px 40px rgba(147, 51, 234, 0.15) !important;
}

.card.red {
  background: linear-gradient(135deg, #ffe6e6 0%, #ffb3b3 100%);
  border-color: #ffb3b3;
}
.card.red:hover {
  border-color: #ef4444;
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.15) !important;
}

.card.teal {
  background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
  border-color: #b2ebf2;
}
.card.teal:hover {
  border-color: #0891b2;
  box-shadow: 0 20px 40px rgba(8, 145, 178, 0.15) !important;
}

/* ======================================
   GRIDS ESTILO DASHBOARD
====================================== */
.grid {
  display: grid;
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-4);
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.grid.cols-auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ======================================
   ICONOS Y BADGES ESTILO DASHBOARD
====================================== */
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-transform);
  margin: 0 auto var(--spacing-3);
}

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

/* Evitar que los íconos se desplacen cuando la carta hace hover */
.card.relative:hover .feature-icon.absolute {
  transform: translateY(-50%) scale(1.05);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

/* Colores de iconos como en dashboard */
.feature-icon.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.feature-icon.green {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.feature-icon.yellow {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.feature-icon.purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

/* Badges */
.badge {
  display: inline-block;
  padding: var(--spacing-1) var(--spacing-3);
  border-radius: 20px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: default;
}

.badge:hover {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Colores de badges como cards */
.badge.blue {
  background: linear-gradient(135deg, #e0f7ff 0%, #b3e5fc 100%);
  color: #0891b2;
}

/* ======================================
   CTA Pulse (solo botón principal)
====================================== */
@keyframes cta-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 10px rgba(30, 107, 214, 0.28);
  }
  50% {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 10px 22px rgba(30, 107, 214, 0.38);
  }
}

.btn-cta-pulse {
  animation: cta-pulse 1.8s ease-in-out infinite;
  will-change: transform, box-shadow;
}

/* En hover, respetar comportamiento del botón y pausar el pulso */
.btn-cta-pulse:hover {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn-cta-pulse {
    animation: none;
  }
}

.badge.green {
  background: linear-gradient(135deg, #d1f2eb 0%, #a8e6cf 100%);
  color: #059669;
}

.badge.yellow {
  background: linear-gradient(135deg, #fff9e6 0%, #ffecb3 100%);
  color: #f59e0b;
}

.badge.purple {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  color: #9333ea;
}

.badge.red {
  background: linear-gradient(135deg, #ffe6e6 0%, #ffb3b3 100%);
  color: #ef4444;
}

/* ======================================
   BOTONES ESTILO DASHBOARD
====================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3) var(--spacing-5);
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

.btn:active {
  transform: translateY(0) scale(0.98) !important;
  transition-duration: 0.1s !important;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 8px rgba(30, 107, 214, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af) !important;
  box-shadow: 0 8px 16px rgba(30, 107, 214, 0.4) !important;
  color: white !important;
}

.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

/* ======================================
   LISTAS ESTILO DASHBOARD
====================================== */
.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--spacing-2);
}

.list-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2);
  border-radius: var(--border-radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards !important;
}

/* Animación escalonada para lista items */
.list-item:nth-child(1) {
  animation-delay: 0.1s !important;
}
.list-item:nth-child(2) {
  animation-delay: 0.15s !important;
}
.list-item:nth-child(3) {
  animation-delay: 0.2s !important;
}
.list-item:nth-child(4) {
  animation-delay: 0.25s !important;
}
.list-item:nth-child(5) {
  animation-delay: 0.3s !important;
}

.list-item:hover {
  background: rgba(30, 107, 214, 0.05);
  transform: translateX(8px) !important;
}

.list-item svg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.list-item:hover svg {
  transform: scale(1.2) !important;
  color: var(--color-primary);
}

/* ======================================
   TIMELINE ESTILO DASHBOARD
====================================== */
.timeline {
  display: grid;
  gap: var(--spacing-3);
}

.timeline-item {
  display: flex;
  gap: var(--spacing-4);
  align-items: flex-start;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  padding: var(--spacing-2) 0;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards !important;
}

.timeline-item:nth-child(1) {
  animation-delay: 0.2s !important;
}
.timeline-item:nth-child(2) {
  animation-delay: 0.3s !important;
}
.timeline-item:nth-child(3) {
  animation-delay: 0.4s !important;
}
.timeline-item:nth-child(4) {
  animation-delay: 0.5s !important;
}
.timeline-item:nth-child(5) {
  animation-delay: 0.6s !important;
}

.timeline-item:hover {
  transform: translateX(8px) !important;
}

.timeline-number {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 12px rgba(30, 107, 214, 0.3);
}

.timeline-item:hover .timeline-number {
  transform: scale(1.1) !important;
  box-shadow: 0 8px 16px rgba(30, 107, 214, 0.4) !important;
}

/* ======================================
   DEMO AUDIO PLAYER - ESTILO LISTEN
====================================== */
.demo-audio-player {
  width: 280px;
  flex-shrink: 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.4s forwards !important;
}

.demo-audio-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-4);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

.demo-audio-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

.demo-audio-image {
  width: 100%;
  height: 120px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: var(--spacing-3);
  background: linear-gradient(135deg, #e0f7ff 0%, #b3e5fc 100%);
}

.demo-audio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.demo-audio-content {
  text-align: center;
}

.demo-audio-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 var(--spacing-1) 0;
}

.demo-audio-description {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0 0 var(--spacing-3) 0;
  line-height: 1.4;
}

.demo-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  width: 100%;
  padding: var(--spacing-2) var(--spacing-3);
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 8px rgba(30, 107, 214, 0.3);
}

.demo-play-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 16px rgba(30, 107, 214, 0.4) !important;
}

.demo-play-btn:active {
  transform: translateY(0) scale(0.98) !important;
  transition-duration: 0.1s !important;
}

.demo-play-btn svg {
  transition: transform 0.2s ease !important;
}

.demo-play-btn:hover svg {
  transform: scale(1.1) !important;
}

/* Estados del botón */
.demo-play-btn.playing {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.demo-play-btn.playing:hover {
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.4) !important;
}

/* ======================================
   MICRO-INTERACCIONES
====================================== */
svg,
i,
[class*="icon"] {
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.card:hover svg,
.card:hover i {
  transform: scale(1.1) !important;
}

/* ======================================
   FALLBACKS PARA COMPATIBILIDAD PRODUCCIÓN
====================================== */

/* Fallback para variables CSS no soportadas */
.main-layout {
  padding-top: 100px; /* Fallback */
  padding-top: calc(var(--header-height, 80px) + 1rem);
  padding-bottom: 80px; /* Fallback */
  padding-bottom: calc(var(--footer-height, 60px) + 1rem);
}

.hero-text h1 {
  font-size: 2rem; /* Fallback */
  font-size: 2.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1rem; /* Fallback */
  font-size: 1.125rem;
}

/* Flexbox fallbacks */
.hero-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.hero-text .flex {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Grid fallbacks */
.grid {
  display: -ms-grid;
  display: grid;
  gap: 1rem;
}

/* Asegurar que el texto no se desborde */
.hero-text h1,
.hero-subtitle {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
}

/* Box-sizing universal */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevenir overflow horizontal */
body,
html {
  overflow-x: hidden;
  max-width: 100%;
}

.root-content,
.container,
.hero-container {
  max-width: 100%;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ======================================
   RESPONSIVE - VERSIÓN MEJORADA PARA PRODUCCIÓN
====================================== */
@media screen and (max-width: 768px) {
  .main-layout {
    padding-top: calc(var(--header-height, 80px) + 1rem) !important;
    padding-bottom: calc(var(--footer-height, 60px) + 1rem) !important;
  }

  .root-content {
    padding: 1rem !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .container {
    padding: 0 0.5rem !important;
    max-width: 100% !important;
  }

  .hero-container {
    flex-direction: column !important;
    text-align: center !important;
    padding: 1rem !important;
    gap: 1rem !important;
    align-items: center !important;
  }

  .hero-text {
    width: 100% !important;
    max-width: none !important;
    order: 2 !important;
  }

  .hero-text h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.5 !important;
  }

  /* Fix crítico para badges en producción */
  .hero-text .flex {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  .hero-text .badge {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    max-width: fit-content !important;
  }

  .hero-image {
    width: 100% !important;
    max-width: 180px !important;
    height: auto !important;
    order: 1 !important;
    flex-shrink: 0 !important;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .grid.cols-5 {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .card {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
  }

  .timeline-item {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
  }

  .timeline-number {
    margin: 0 auto 1rem auto !important;
  }

  /* Fix específico para la card del logo de Netfunctron */
  .card.flex {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1rem !important;
  }

  /* Fix específico SOLO para la imagen del logo de Netfunctron */
  .card.flex img[src*="lc_icon.png"] {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
  }

  /* Orden de elementos en móvil */
  .demo-audio-player {
    order: 3 !important;
    width: 100% !important;
    margin-top: 1rem !important;
  }

  .card.flex .flex-1 {
    order: 2 !important;
    flex: none !important;
    width: 100% !important;
  }

  /* Estilos responsive para el video demo */
  #demoVideo {
    width: 100% !important;
    height: auto !important;
    max-height: 250px !important;
    object-fit: contain !important;
  }

  video {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }
}

@media screen and (max-width: 480px) {
  .root-content {
    padding: 0.75rem 0.5rem !important;
  }

  .container {
    padding: 0 0.25rem !important;
  }

  .hero-container {
    padding: 0.75rem !important;
    gap: 0.75rem !important;
  }

  .hero-text h1 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .hero-subtitle {
    font-size: 0.875rem !important;
  }

  /* Estilos responsive para el video demo en pantallas muy pequeñas */
  #demoVideo {
    width: 100% !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain !important;
  }

  /* Badges más pequeños en móvil pequeño */
  .hero-text .badge {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
  }

  .hero-image {
    width: 100% !important;
    max-width: 140px !important;
    height: auto !important;
  }

  .feature-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .feature-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  .section-title {
    font-size: 1.5rem !important;
  }
}

/* ======================================
   DARK THEME
====================================== */
[data-theme="dark"] .hero-container {
  background: var(--gradient-card-primary);
  border-color: var(--color-border);
}

[data-theme="dark"] .card {
  background: var(--gradient-card-primary);
  border-color: var(--color-border);
}

[data-theme="dark"] .card.green {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.2) 0%,
    rgba(16, 185, 129, 0.3) 100%
  );
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .card.blue {
  background: linear-gradient(
    135deg,
    rgba(8, 145, 178, 0.2) 0%,
    rgba(8, 145, 178, 0.3) 100%
  );
  border-color: rgba(8, 145, 178, 0.4);
}

[data-theme="dark"] .card.yellow {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.2) 0%,
    rgba(245, 158, 11, 0.3) 100%
  );
  border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .card.purple {
  background: linear-gradient(
    135deg,
    rgba(147, 51, 234, 0.2) 0%,
    rgba(147, 51, 234, 0.3) 100%
  );
  border-color: rgba(147, 51, 234, 0.4);
}

[data-theme="dark"] .btn-secondary {
  background: var(--color-white);
  color: var(--text-dark);
  border-color: var(--color-border);
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

[data-theme="dark"] .demo-audio-card {
  background: var(--gradient-card-primary);
  border-color: var(--color-border);
}

[data-theme="dark"] .demo-audio-image {
  background: linear-gradient(
    135deg,
    rgba(8, 145, 178, 0.2) 0%,
    rgba(8, 145, 178, 0.3) 100%
  );
}

/* ======================================
   BURBUJAS ANIMADAS - JARDINES INFANTILES
====================================== */
.bubbles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

.section {
  position: relative;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  bottom: -50px;
  pointer-events: none;
  will-change: transform, opacity;
  animation: float-up linear infinite;
  opacity: 0;
  z-index: 10;
}

.bubble::before {
  content: "";
  position: absolute;
  top: 25%;
  left: 25%;
  width: 25%;
  height: 25%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.9),
    transparent
  );
  border-radius: 50%;
}

.bubble::after {
  content: "";
  position: absolute;
  bottom: 15%;
  right: 15%;
  width: 8%;
  height: 8%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  border-radius: 50%;
}

@keyframes float-up {
  0% {
    transform: translateY(100vh) translateX(0) scale(0.8);
    opacity: 0;
  }
  5% {
    opacity: 0.7;
    transform: translateY(90vh) translateX(3px) scale(0.9);
  }
  15% {
    transform: translateY(70vh) translateX(-5px) scale(1.02);
    opacity: 0.8;
  }
  30% {
    transform: translateY(50vh) translateX(8px) scale(0.98);
    opacity: 0.9;
  }
  45% {
    transform: translateY(30vh) translateX(-6px) scale(1.01);
    opacity: 0.8;
  }
  60% {
    transform: translateY(10vh) translateX(4px) scale(0.99);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-10vh) translateX(-3px) scale(1);
    opacity: 0.6;
  }
  85% {
    opacity: 0.4;
    transform: translateY(-30vh) translateX(2px) scale(0.95);
  }
  95% {
    opacity: 0.2;
    transform: translateY(-50vh) translateX(0) scale(0.9);
  }
  100% {
    opacity: 0;
    transform: translateY(-60vh) translateX(0) scale(0.8);
  }
}

@keyframes sway {
  0%,
  100% {
    transform: translateX(0);
  }
  33% {
    transform: translateX(15px);
  }
  66% {
    transform: translateX(-15px);
  }
}

/* Colores de burbujas para jardines infantiles */
.bubble-turquoise {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(64, 224, 208, 0.25),
    rgba(64, 224, 208, 0.1)
  );
  border: 1px solid rgba(64, 224, 208, 0.35);
  box-shadow: 0 0 10px rgba(64, 224, 208, 0.2);
}

.bubble-pink {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 182, 193, 0.25),
    rgba(255, 182, 193, 0.1)
  );
  border: 1px solid rgba(255, 182, 193, 0.35);
  box-shadow: 0 0 10px rgba(255, 182, 193, 0.2);
}

.bubble-yellow {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 223, 0, 0.25),
    rgba(255, 223, 0, 0.1)
  );
  border: 1px solid rgba(255, 223, 0, 0.35);
  box-shadow: 0 0 10px rgba(255, 223, 0, 0.2);
}

.bubble-lavender {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(147, 112, 219, 0.25),
    rgba(147, 112, 219, 0.1)
  );
  border: 1px solid rgba(147, 112, 219, 0.35);
  box-shadow: 0 0 10px rgba(147, 112, 219, 0.2);
}

.bubble-coral {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 127, 80, 0.25),
    rgba(255, 127, 80, 0.1)
  );
  border: 1px solid rgba(255, 127, 80, 0.35);
  box-shadow: 0 0 10px rgba(255, 127, 80, 0.2);
}

/* Optimización de rendimiento para móviles */
@media (max-width: 768px) {
  .bubbles-container {
    display: none; /* Desactivar en móviles para mejor rendimiento */
  }
}

/* Reducir movimiento para usuarios con preferencia */
@media (prefers-reduced-motion: reduce) {
  .bubble {
    animation: none !important;
    opacity: 0.3;
    transform: translateY(-50vh);
  }
}

/* Modo oscuro - burbujas más sutiles */
[data-theme="dark"] .bubble-turquoise {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(64, 224, 208, 0.15),
    rgba(64, 224, 208, 0.05)
  );
  border: 1px solid rgba(64, 224, 208, 0.2);
}

[data-theme="dark"] .bubble-pink {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 182, 193, 0.15),
    rgba(255, 182, 193, 0.05)
  );
  border: 1px solid rgba(255, 182, 193, 0.2);
}

[data-theme="dark"] .bubble-yellow {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 223, 0, 0.15),
    rgba(255, 223, 0, 0.05)
  );
  border: 1px solid rgba(255, 223, 0, 0.2);
}

[data-theme="dark"] .bubble-lavender {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(147, 112, 219, 0.15),
    rgba(147, 112, 219, 0.05)
  );
  border: 1px solid rgba(147, 112, 219, 0.2);
}

[data-theme="dark"] .bubble-coral {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 127, 80, 0.15),
    rgba(255, 127, 80, 0.05)
  );
  border: 1px solid rgba(255, 127, 80, 0.2);
}

/* ======================================
   HIGH CONTRAST
====================================== */
[data-theme="contrast"] .card,
[data-theme="contrast"] .btn {
  border: 2px solid black !important;
}

[data-theme="contrast"] .card:focus,
[data-theme="contrast"] .btn:focus {
  outline: 3px solid yellow !important;
  outline-offset: 2px;
}

/* FIX: Prevenir que transforms rompan fixed en móvil */
@media (max-width: 768px) {
  /* Desactivar transforms que rompen fixed positioning */
  .hero-container,
  .card,
  .demo-audio-card,
  .demo-audio-player,
  .timeline-item,
  .badge,
  .btn,
  .list-item {
    transform: none !important;
    will-change: auto !important;
  }

  /* Mantener hover effects sin transform */
  .hero-container:hover,
  .card:hover,
  .demo-audio-card:hover {
    transform: none !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12) !important;
  }

  /* Asegurar que header y footer mantengan fixed */
  .app-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    transform: none !important;
  }

  .app-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
    transform: none !important;
  }
}

/* Para iOS específicamente */
@supports (-webkit-touch-callout: none) {
  .hero-container,
  .card,
  .demo-audio-card {
    transform: none !important;
    -webkit-transform: none !important;
  }
}

/* ======================================
   TEAM CARDS - ALINEACIÓN CONSISTENTE
====================================== */
.grid.cols-3 > .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.grid.cols-3 > .card .flex.items-center {
  align-items: flex-start !important;
  min-height: 80px;
}

.grid.cols-3 > .card .feature-icon {
  margin: 0 !important;
  flex-shrink: 0 !important;
  align-self: flex-start !important;
}

.grid.cols-3 > .card .feature-icon + div {
  flex: 1;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.grid.cols-3 > .card h3 {
  margin: 0 0 0.25rem 0 !important;
  line-height: 1.2 !important;
}

.grid.cols-3 > .card .text-sm.text-gray-600:not(.mb-1) {
  margin: 0 !important;
  line-height: 1.3 !important;
}

/* Asegurar que todas las listas tengan la misma altura mínima */
.grid.cols-3 > .card .list-clean {
  flex: 1;
  margin-top: 1rem;
}

/* Mobile fix para equipo */
@media (max-width: 768px) {
  .grid.cols-3 > .card .flex.items-center {
    align-items: center !important;
    min-height: auto;
    text-align: center;
    flex-direction: column;
    gap: 0.75rem !important;
  }

  .grid.cols-3 > .card .feature-icon {
    align-self: center !important;
    margin: 0 auto !important;
  }

  .grid.cols-3 > .card .feature-icon + div {
    text-align: center;
    align-items: center;
  }
}

/* ======================================
   FIX PARA TARJETAS DE EQUIPO
====================================== */

/* Alineación para listas en tarjetas de equipo */
.card ul.list-clean li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.5rem !important;
  text-align: left !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.4 !important;
}

/* ======================================
   FIX CENTRADO DE ICONOS EN CARACTERÍSTICAS NETFUNCTRON
====================================== */

/* Centrado perfecto de iconos en características de Netfunctron */
.list-clean .list-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  text-align: left !important;
}

.list-clean .list-item svg {
  flex-shrink: 0 !important;
  align-self: center !important;
  margin: 0 !important;
}

.list-clean .list-item span {
  text-align: left !important;
  flex: 1 !important;
}

/* ======================================
   FIX PARA SECCIÓN CTA FINAL - VIÑETAS MÓVIL
====================================== */

/* Sección CTA final - mantener orden en móvil */
.grid.cols-auto .list-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.75rem !important;
  text-align: left !important;
  margin-bottom: 1rem !important;
}

.grid.cols-auto .list-item svg {
  flex-shrink: 0 !important;
  align-self: center !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
}

.grid.cols-auto .list-item span {
  flex: 1 !important;
  text-align: left !important;
  line-height: 1.4 !important;
}

/* Mobile específico para CTA */
@media (max-width: 768px) {
  .grid.cols-auto {
    display: block !important;
    text-align: left !important;
  }

  .grid.cols-auto .list-item {
    justify-content: flex-start !important;
    text-align: left !important;
    margin-bottom: 1.25rem !important;
    padding: 0 1rem !important;
  }

  .grid.cols-auto .list-item svg {
    margin-right: 0.75rem !important;
    width: 1.125rem !important;
    height: 1.125rem !important;
  }

  .grid.cols-auto .list-item span {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
  }
}
