/* Custom styles to complement Tailwind */
/* Nota: el scroll de anclas lo maneja JS (smoothScrollTo) para controlar la velocidad */
html {
  overflow-x: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   TIPOGRAFÍA MARCA — Hanken Grotesk
   ============================================================ */

.heading-hero {
  font-size: clamp(2rem, 4.2vw + 0.65rem, 3.65rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.heading-section {
  font-size: clamp(1.625rem, 2.2vw + 0.85rem, 2.35rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.heading-section-lg {
  font-size: clamp(1.75rem, 2.8vw + 0.65rem, 2.65rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.heading-card {
  font-size: clamp(1.2rem, 1.1vw + 0.85rem, 1.65rem);
  font-weight: 700;
  line-height: 1.22;
  text-wrap: balance;
}

.heading-eyebrow {
  letter-spacing: 0.12em;
}

/* ============================================================
   SMOOTH MOTION SYSTEM
   Curva "luxury": arranque suave y frenado largo, sin brusquedad
   ============================================================ */

/* Easing global para todas las transiciones utilitarias de Tailwind */
.transition-all,
.transition-transform,
.transition-colors,
.transition-opacity,
.transition-shadow,
.transition {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Duraciones mas largas: hover lento y elegante */
.duration-300 { transition-duration: 550ms !important; }
.duration-500 { transition-duration: 850ms !important; }
.duration-700 { transition-duration: 1200ms !important; }
.duration-1000 { transition-duration: 1500ms !important; }

/* AOS: recorridos cortos + easing suave = entrada flotante, no salto */
[data-aos] {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}
[data-aos="fade-up"] { transform: translate3d(0, 80px, 0); }
[data-aos="fade-down"] { transform: translate3d(0, -80px, 0); }
[data-aos="fade-left"] { transform: translate3d(80px, 0, 0); }
[data-aos="fade-right"] { transform: translate3d(-80px, 0, 0); }
[data-aos="zoom-in"] { transform: scale(0.85); }
[data-aos="zoom-in-left"] { transform: translate3d(100px, 0, 0) scale(0.90); }
[data-aos="zoom-in-right"] { transform: translate3d(-100px, 0, 0) scale(0.90); }

/* Image Placeholder Style */
.image-placeholder {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 500;
  text-align: center;
  padding: 1rem;
  border-radius: 1rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.image-placeholder::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.6), transparent);
  transform: skewX(-25deg);
  transition: all 0.7s ease;
}

.image-placeholder:hover::after {
  left: 150%;
}

.image-placeholder:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #94a3b8;
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
}

.hero-pattern {
  background-color: #fafafa;
  background-image: radial-gradient(rgba(18, 19, 58, 0.04) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px -10px rgba(18, 19, 58, 0.08);
}

.glass-dark {
  background: rgba(18, 19, 58, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

@keyframes float-rotate {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* Ken Burns effect for hero background */
@keyframes zoomOut {
  0% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 8s ease-in-out 4s infinite;
}

.animate-float-rotate {
  animation: float-rotate 10s ease-in-out infinite;
}

/* Orbes de luz flotantes en el hero (profundidad premium) */
.hero-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
  animation: orb-drift 16s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes orb-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(40px, -40px, 0) scale(1.2); }
}

/* Premium grain/noise texture overlay (hero) */
.grain-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Gradiente de marca Masterclass: teal → púrpura (piezas redes sociales) */
.text-gold-gradient {
  background: linear-gradient(90deg, #49C5B6 0%, #8E7CC3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Shine sweep on CTA buttons */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-25deg);
  transition: left 1s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
  pointer-events: none;
}

.btn-shine:hover::before {
  left: 130%;
}

/* Brillo automatico periodico en CTAs dorados (visible sin hover) */
.btn-shine.btn-shine-auto::before {
  animation: auto-shine 5s ease-in-out infinite;
}

@keyframes auto-shine {
  0%, 60% { left: -80%; }
  85%, 100% { left: 130%; }
}

/* Scroll-down indicator */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(12px); opacity: 0.35; }
}

.scroll-indicator {
  animation: scroll-bounce 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* Floating WhatsApp button */
@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #25d366 0%, #1ebe5d 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  animation: wa-pulse 3s infinite;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s ease;
}

.wa-float:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.55);
}

@media (min-width: 1024px) {
  .wa-float {
    width: 4rem;
    height: 4rem;
    right: 2rem;
    bottom: 2rem;
    font-size: 2rem;
  }
}

/* Countdown */
.countdown-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0.9rem;
  min-width: 3.6rem;
  padding: 0.5rem 0.4rem;
  text-align: center;
  transition: border-color 0.8s ease, background 0.8s ease;
}

.countdown-box:hover {
  border-color: rgba(73, 197, 182, 0.45);
  background: rgba(73, 197, 182, 0.08);
}

.countdown-box .cd-num {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.countdown-box .cd-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #49C5B6;
  font-weight: 700;
  margin-top: 0.15rem;
  display: block;
}

@media (min-width: 1024px) {
  .countdown-box { min-width: 4.5rem; padding: 0.65rem 0.5rem; }
  .countdown-box .cd-num { font-size: 1.8rem; }
  .countdown-box .cd-label { font-size: 0.62rem; }
}

/* Teacher card photo overlay */
.teacher-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 19, 58, 0.4) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.group:hover .teacher-photo::after {
  opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f8fafc; 
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1; 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; 
}

/* Hide scrollbar for mobile carousels */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile Menu: despliegue suave (no salto brusco) */
@media (max-width: 1023px) {
  #mobile-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition:
      max-height 0.7s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.5s ease,
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  #mobile-menu.open {
    max-height: 480px;
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   SUBTLE LIFE ANIMATIONS (Micro-interactions)
   ============================================================ */

/* 1. Respiro / Brillo sutil para Botones Principales (CTA) */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(73, 197, 182, 0.4); transform: scale(1); }
  70% { box-shadow: 0 0 0 15px rgba(73, 197, 182, 0); transform: scale(1.02); }
  100% { box-shadow: 0 0 0 0 rgba(73, 197, 182, 0); transform: scale(1); }
}

.animate-pulse-glow {
  animation: pulse-glow 3s infinite;
}

/* 2. Flotación súper suave para imágenes y decoraciones */
@keyframes float-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.animate-float-subtle {
  animation: float-subtle 6s ease-in-out infinite;
}

@keyframes float-subtle-reverse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

.animate-float-subtle-reverse {
  animation: float-subtle-reverse 7s ease-in-out infinite;
}

/* 3. Paneos Lentos (Zoom muy sutil) para darle vida a fondos o imágenes grandes */
@keyframes slow-pan {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.animate-slow-pan {
  animation: slow-pan 20s ease-in-out infinite alternate;
}

/* 4. Brillo que viaja continuamente en botones premium */
@keyframes shine-continuous {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.btn-continuous-shine {
  background-image: linear-gradient(
    110deg,
    #12133A 0%,
    #12133A 40%,
    #49C5B6 50%,
    #8E7CC3 55%,
    #12133A 65%,
    #12133A 100%
  );
  background-size: 200% auto;
  animation: shine-continuous 4s linear infinite;
  color: white;
  border: none;
}

/* ============================================================
   MODERN UI/UX: BLUR REVEAL & SPOTLIGHT HOVER & MARQUEE
   ============================================================ */

/* BLUR REVEAL (Integrado con AOS) */
[data-aos] {
    filter: blur(12px);
    transition-property: transform, opacity, filter !important;
}
[data-aos].aos-animate {
    filter: blur(0);
}

/* SPOTLIGHT HOVER */
.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        800px circle at var(--mouse-x, 0) var(--mouse-y, 0), 
        rgba(73, 197, 182, 0.08),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 10;
    pointer-events: none;
}

.spotlight-card:hover::before {
    opacity: 1;
}

/* INFINITE MARQUEE */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    display: flex;
    width: max-content;
    animation: marquee 25s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}
