/* ==========================================================================
   Kids Zone Theme - Design System & Main Styles
   ========================================================================== */

:root {
  /* Paleta Principal del Branding */
  --color-brand-dark: #0f172a;        /* Azul Marino Oscuro Elegante (Header) */
  --color-brand-dark-alt: #0b1329;    /* Superficie Drawer Móvil */
  --color-primary-blue: #0066ff;      /* Azul Eléctrico */
  --color-primary-blue-hover: #0052cc;
  --color-primary-orange: #ff5722;    /* Naranja Energético */
  --color-primary-orange-hover: #e64a19;

  /* Color Adicional Específico para Botones CTA / Conversión */
  --color-cta-red: #e63946;           /* Rojo Vibrante para Botones de Acción */
  --color-cta-red-hover: #d62828;

  /* Neutral Surface & Background Colors */
  --color-bg-page: #f8fafc;
  --color-bg-card: #ffffff;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-text-light: #ffffff;
  --color-border-subtle: #e2e8f0;

  /* Typography */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Outfit', 'Inter', -apple-system, sans-serif;

  /* Spacing System */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Layout & Containers */
  --container-max-width: 1240px;
  --header-height: 80px;

  /* Elevation / Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text-main);
  background-color: var(--color-bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-cta-red);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 1000000;
  font-weight: 700;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px; /* Pill shape */
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  line-height: 1.2;
  white-space: nowrap;
}

/* Botón CTA Principal (Rojo para conversión) */
.btn-header-cta {
  background-color: var(--color-cta-red);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.btn-header-cta:hover,
.btn-header-cta:focus-visible {
  background-color: var(--color-cta-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.55);
}

/* Focus outline for keyboard accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-primary-blue);
  outline-offset: 3px;
}

.site-main {
  display: block;
  margin: 0;
  padding: 0;
}

/* Temporary Footer */
.site-footer {
  background-color: var(--color-brand-dark);
  color: var(--color-text-muted);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================
   Global Scroll Reveal Animations System
   ========================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 650ms cubic-bezier(0.16, 1, 0.3, 1), transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-fade-in {
  transform: none !important;
}

.reveal-scale-up {
  transform: scale(0.94);
}

.reveal-on-scroll.is-revealed {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* Cascading Stagger Delays */
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }
.reveal-delay-6 { transition-delay: 600ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================
   Floating WhatsApp Button Styles
   ========================================== */
.btn-whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  z-index: 99990;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 250ms ease;
  animation: waFloatEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s backwards;
}

.btn-whatsapp-float:hover,
.btn-whatsapp-float:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

/* Pulsing Outer Ring */
.wa-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(37, 211, 102, 0.4);
  z-index: -1;
  animation: waPulseRing 2.4s infinite ease-out;
}

@keyframes waPulseRing {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

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

/* Tooltip Banner */
.wa-float-tooltip {
  position: absolute;
  right: 68px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-family-heading);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  pointer-events: none;
}

.btn-whatsapp-float:hover .wa-float-tooltip,
.btn-whatsapp-float:focus-visible .wa-float-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

@media (max-width: 600px) {
  .btn-whatsapp-float {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
  }
  .wa-float-tooltip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-whatsapp-float {
    animation: none !important;
    transition: none !important;
  }
  .wa-pulse-ring {
    animation: none !important;
    display: none;
  }
}
