/* ==== Paleta de EDUCATION - NUEVA ==== */
:root {
  --bg: #fefefe;
  --text: #1a1a1a;
  --primary: #d85d3a;
  --secondary: #ffcc00;
  --navy: #2c4b64;
  --rose: #d85d3a;
  --sun: #ffcc00;
  --orange: #d85d3a;

  /* Degradados sutiles */
  --gradient-primary: linear-gradient(135deg, #d85d3a 0%, #ff8566 100%);
  --gradient-secondary: linear-gradient(135deg, #ffcc00 0%, #ffe066 100%);
  --gradient-navy: linear-gradient(135deg, #2c4b64 0%, #3d5f7d 100%);
  --gradient-card: linear-gradient(135deg, rgba(216, 93, 58, 0.03) 0%, rgba(255, 204, 0, 0.03) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(216, 93, 58, 0.08) 0%, rgba(255, 204, 0, 0.05) 100%);

  --muted: #2c4b6410;
  --ring-w: 6px;
  --angle: 0deg;
}

/* registra la propiedad para animación del ángulo */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ==== Reset base ==== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

/* Justificar todos los párrafos y textos */
p {
  text-align: justify;
  text-justify: inter-word;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(44, 75, 100, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(216, 93, 58, 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 204, 0, 0.02) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--rose);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  line-height: 1.2;
}

p {
  line-height: 1.7;
}

/* ==== HERO - MEJORADO ==== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.6;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: floatGlow 20s ease-in-out infinite;
}

.hero-glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #f42959 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.hero-glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #d85d3a 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: 5s;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.4;
}

@keyframes floatGlow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  text-align: left;
}

.hero-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.hero-logo img {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 8px 24px rgba(244, 41, 89, 0.25));
}

.logo-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, #f42959 0%, transparent 70%);
  filter: blur(30px);
  opacity: 0.3;
  z-index: -1;
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, rgba(244, 41, 89, 0.15), rgba(245, 229, 96, 0.18));
  border: 2px solid rgba(244, 41, 89, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f42959, #d85d3a);
  animation: pulseGlow 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.1;
  font-weight: 900;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #2c4b64 0%, #365a7a 30%, #3d5f7d 60%, #d85d3a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

.title-highlight {
  background: linear-gradient(135deg, #f42959, #d85d3a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.08rem;
  line-height: 1.75;
  color: #365665;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.2rem 2.5rem;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 900;
  background: linear-gradient(135deg, #f42959, #ff1744);
  color: white;
  box-shadow: 0 12px 32px rgba(244, 41, 89, 0.35);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-hero-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff1744, #d85d3a);
  opacity: 0;
  transition: opacity 0.4s;
}

.btn-hero-primary:hover::before {
  opacity: 1;
}

.btn-hero-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 48px rgba(244, 41, 89, 0.45);
}

.btn-hero-primary span {
  position: relative;
  z-index: 1;
}

.btn-hero-primary svg {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
}

.hero-media {
  position: relative;
}

.video-container {
  position: relative;
  width: 100%;
}

.video-frame {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: 24px;
  overflow: hidden;
  border: 4px solid transparent;
  background: linear-gradient(#0000, #0000) padding-box,
    linear-gradient(135deg, #f42959, #d85d3a, #f5e560) border-box;
  box-shadow: 0 32px 80px rgba(244, 41, 89, 0.25);
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.audio-toggle {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
}

.audio-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.audio-toggle svg {
  color: white;
  transition: opacity 0.3s;
}

.audio-toggle .ico-on {
  display: none;
}

.audio-toggle[data-state="unmuted"] .ico-off {
  display: none;
}

.audio-toggle[data-state="unmuted"] .ico-on {
  display: block;
}

.video-decoration {
  position: absolute;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(244, 41, 89, 0.3), rgba(216, 93, 58, 0.3));
  filter: blur(40px);
  z-index: -1;
}

.video-decoration-1 {
  width: 80%;
  height: 80%;
  top: -10%;
  left: -10%;
}

.video-decoration-2 {
  width: 60%;
  height: 60%;
  bottom: -15%;
  right: -15%;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
}

.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid currentColor;
  border-radius: 12px;
  position: relative;
}

.scroll-indicator span {
  width: 4px;
  height: 8px;
  background: currentColor;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0%, 100% {
    transform: translate(-50%, 0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, 12px);
    opacity: 1;
  }
}

/* Estilos legacy para compatibilidad */
@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-content {
    text-align: center;
  }
}

/* Código legacy eliminado - ahora se usan las clases modernas del hero */

.audio-hint {
  position: absolute;
  bottom: 76px;
  right: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(244, 41, 89, 0.3);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--navy);
  z-index: 4;
  box-shadow: 0 8px 24px rgba(244, 41, 89, 0.2);
  animation: hintBounce 2s ease-in-out infinite;
}

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

/* ==== Secciones - MEJORADAS ==== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  position: relative;
}

.section-alt {
  background: linear-gradient(
    180deg,
    rgba(44, 75, 100, 0.03) 0%,
    rgba(44, 75, 100, 0.05) 50%,
    rgba(44, 75, 100, 0.03) 100%
  );
  position: relative;
}

.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(44, 75, 100, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
}

.section-alt .inner {
  position: relative;
  z-index: 1;
}

.section.colored {
  background: radial-gradient(
      1400px 700px at 75% -15%,
      rgba(44, 75, 100, 0.06),
      transparent 60%
    ),
    radial-gradient(
      1000px 800px at 25% 100%,
      rgba(216, 93, 58, 0.05),
      transparent 60%
    );
  position: relative;
}

.section.colored::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 50px,
    rgba(244, 41, 89, 0.02) 50px,
    rgba(244, 41, 89, 0.02) 51px
  );
  pointer-events: none;
}

.inner {
  position: relative;
  z-index: 1;
}

.title-with-bg {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--rose), var(--orange), var(--sun));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 1rem;
}

.title-with-bg::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  border-radius: 999px;
}

/* Grid 2 - MEJORADO */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Cards - MEJORADAS */
.card {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(244, 41, 89, 0.08),
    inset 0 0 0 1px rgba(244, 41, 89, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rose), var(--orange), var(--sun));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(244, 41, 89, 0.15),
    inset 0 0 0 1px rgba(244, 41, 89, 0.12);
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--rose);
}

.card p {
  color: #4a5568;
  line-height: 1.75;
  margin: 0.75rem 0;
}

.card strong {
  color: var(--text);
  font-weight: 700;
}

/* Imagen apilada - MEJORADA */
.img-stack {
  position: relative;
  height: 400px;
  perspective: 1000px;
}

.img-stack img {
  position: absolute;
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 4px solid white;
}

.img-stack .one {
  top: 0;
  left: 0;
  z-index: 3;
  transform: rotate(-5deg);
  animation: stackFloat1 6s ease-in-out infinite;
}

.img-stack .two {
  top: 40px;
  right: 0;
  z-index: 2;
  transform: rotate(5deg);
  animation: stackFloat2 7s ease-in-out infinite;
}

.img-stack .three {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  z-index: 1;
  animation: stackFloat3 8s ease-in-out infinite;
}

.img-stack img:hover {
  transform: scale(1.05) rotate(0deg) !important;
  z-index: 10;
  box-shadow: 0 24px 64px rgba(244, 41, 89, 0.3);
}

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

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

@keyframes stackFloat3 {
  0%,
  100% {
    transform: translateX(-50%) rotate(-3deg) translateY(0);
  }
  50% {
    transform: translateX(-50%) rotate(-3deg) translateY(-10px);
  }
}

/* ==== STATS (estadísticas) - NUEVO ==== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(244, 41, 89, 0.1);
  transition: all 0.3s;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(244, 41, 89, 0.2);
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==== PILARES - MEJORADOS ==== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.pillar-card {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(244, 41, 89, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.pillar-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--rose), var(--orange), var(--sun));
  border-radius: 24px;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}

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

.pillar-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 24px 64px rgba(244, 41, 89, 0.2);
  border-color: transparent;
}

.pillar-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(244, 41, 89, 0.25);
  transition: all 0.4s;
}

.pillar-card:hover .pillar-icon {
  transform: rotate(10deg) scale(1.1);
}

.pillar-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
}

.pillar-card p {
  color: #4a5568;
  line-height: 1.7;
  margin: 0;
}

/* ==== PROYECTOS - MEJORADOS ==== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
  margin: 3rem 0;
}

.project-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(244, 41, 89, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(244, 41, 89, 0.1),
    rgba(245, 229, 96, 0.1)
  );
  opacity: 0;
  transition: opacity 0.4s;
}

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

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 24px 64px rgba(244, 41, 89, 0.2);
}

.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-content {
  padding: 2rem;
  position: relative;
}

.project-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--rose);
}

.project-content p {
  color: #4a5568;
  line-height: 1.7;
  margin: 0;
}

.project-content .btn {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(244, 41, 89, 0.25);
}

.project-content .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 41, 89, 0.35);
}

/* ==== TESTIMONIOS - MEJORADOS ==== */
.ts-wrap {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
  position: relative;
}

.ts-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1rem 0;
}

.ts-track::-webkit-scrollbar {
  display: none;
}

.ts-card {
  flex: 0 0 360px;
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(244, 41, 89, 0.1);
  scroll-snap-align: start;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ts-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 6rem;
  font-weight: 900;
  color: rgba(244, 41, 89, 0.08);
  line-height: 1;
  font-family: Georgia, serif;
}

.ts-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(244, 41, 89, 0.2);
}

.ts-quote {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #4a5568;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  font-style: italic;
}

.ts-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.ts-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: white;
  box-shadow: 0 4px 16px rgba(244, 41, 89, 0.3);
}

.ts-author strong {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.ts-author small {
  color: #718096;
  font-size: 0.9rem;
}

/* Flechas de navegación */
.ts-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: 2px solid rgba(244, 41, 89, 0.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rose);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  z-index: 10;
}

.ts-arrow:hover {
  background: var(--rose);
  color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 32px rgba(244, 41, 89, 0.3);
}

.ts-arrow.left {
  left: -24px;
}

.ts-arrow.right {
  right: -24px;
}

@media (max-width: 768px) {
  .ts-arrow {
    display: none;
  }

  .ts-card {
    flex: 0 0 300px;
  }
}

/* ==== GALERÍA - MEJORADA ==== */
.gallery-section {
  padding: 4rem 0;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(244, 41, 89, 0.05),
      transparent 60%
    ),
    radial-gradient(
      circle at 80% 50%,
      rgba(245, 229, 96, 0.05),
      transparent 60%
    );
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-link {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
  cursor: pointer;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-link:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(244, 41, 89, 0.2);
}

.gallery-image {
  margin: 0;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.9) saturate(1.1);
}

.gallery-link:hover .gallery-image img {
  transform: scale(1.15);
  filter: brightness(1) saturate(1.2);
}

.gallery-image figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: white;
  padding: 2.5rem 1.5rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-link:hover .gallery-image figcaption {
  transform: translateY(0);
}

/* Animación de entrada para galería */
.gallery-link {
  opacity: 0;
  transform: scale(0.9);
  animation: galleryFadeIn 0.6s ease forwards;
}

.gallery-link:nth-child(1) {
  animation-delay: 0.1s;
}
.gallery-link:nth-child(2) {
  animation-delay: 0.15s;
}
.gallery-link:nth-child(3) {
  animation-delay: 0.2s;
}
.gallery-link:nth-child(4) {
  animation-delay: 0.25s;
}
.gallery-link:nth-child(5) {
  animation-delay: 0.3s;
}
.gallery-link:nth-child(6) {
  animation-delay: 0.35s;
}
.gallery-link:nth-child(7) {
  animation-delay: 0.4s;
}
.gallery-link:nth-child(8) {
  animation-delay: 0.45s;
}
.gallery-link:nth-child(9) {
  animation-delay: 0.5s;
}

@keyframes galleryFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* MODAL LIGHTBOX - MEJORADO */
.lo-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(10px);
}

.lo-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

.lo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

.lo-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lo-modal__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.6);
}

.lo-modal__btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(244, 41, 89, 0.3);
  color: var(--navy);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  backdrop-filter: blur(10px);
}

.lo-modal__btn:hover {
  background: linear-gradient(135deg, var(--rose), var(--pink));
  color: white;
  border-color: transparent;
  transform: scale(1.15);
  box-shadow: 0 8px 24px rgba(244, 41, 89, 0.4);
}

.lo-modal__close {
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.lo-modal__arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  top: 50%;
  transform: translateY(-50%);
}

.lo-modal__arrow:hover {
  transform: translateY(-50%) scale(1.15);
}

.lo-modal__arrow--prev {
  left: 24px;
}

.lo-modal__arrow--next {
  right: 24px;
}

.lo-modal__caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.98);
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--navy);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .lo-modal__arrow {
    width: 44px;
    height: 44px;
  }

  .lo-modal__arrow--prev {
    left: 12px;
  }

  .lo-modal__arrow--next {
    right: 12px;
  }

  .lo-modal__caption {
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
  }
}

/* ==== FOOTER - MEJORADO ==== */
.footer {
  background: linear-gradient(
    135deg,
    var(--navy) 0%,
    #365a7a 40%,
    #3d5f7d 70%,
    var(--primary) 100%
  );
  color: white;
  padding: 4rem 1.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255, 255, 255, 0.03) 20px,
    rgba(255, 255, 255, 0.03) 40px
  );
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.footer-brand img {
  height: 48px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  opacity: 0.9;
  line-height: 1.6;
}

.footer h4 {
  font-weight: 800;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links ul,
.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 0.75rem;
}

.footer-links a,
.footer-contact a {
  color: white;
  opacity: 0.9;
  transition: all 0.3s;
  display: inline-block;
}

.footer-links a:hover,
.footer-contact a:hover {
  opacity: 1;
  transform: translateX(5px);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-weight: 700;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.social a:hover {
  background: white;
  color: var(--rose);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* ==== ANIMACIONES ON-SCROLL ==== */
[data-animate] {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].in {
  opacity: 1;
}

[data-anim="fade-up"] {
  transform: translateY(40px);
}

[data-anim="fade-up"].in {
  transform: translateY(0);
}

[data-anim="zoom-in"] {
  transform: scale(0.8);
}

[data-anim="zoom-in"].in {
  transform: scale(1);
}

[data-anim="slide-right"] {
  transform: translateX(60px);
}

[data-anim="slide-right"].in {
  transform: translateX(0);
}

/* Tilt en tarjetas */
[data-tilt] {
  transition: transform 0.3s ease-out;
}

[data-tilt].tilting {
  transform: perspective(1000px) rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
}

/* ==== RESPONSIVE FINAL ==== */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 6rem 1.5rem 3rem;
  }

  .hero-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  /* Logo arriba del todo sin interferir con navbar */
  .hero-logo {
    order: -2;
    margin-bottom: 1rem;
  }

  .hero-logo img {
    height: 60px;
  }

  /* Video después del logo */
  .hero-media {
    order: -1;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 1.5rem;
  }

  .video-container {
    width: 100%;
  }

  .video-frame {
    width: 100%;
    aspect-ratio: 9/16;
    max-height: 640px;
  }

  .video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Contenido después del video */
  .hero-content {
    order: 1;
    text-align: center;
  }

  .hero-badge {
    justify-content: center;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-hero-primary {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 3rem 1rem;
  }

  .title-with-bg {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .pillars-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .img-stack {
    height: 300px;
  }

  .img-stack img {
    width: 200px;
    height: 200px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 6rem 1rem 2rem;
  }

  .hero-logo img {
    height: 50px;
  }

  .hero-media {
    max-width: 320px;
  }

  .btn-hero {
    width: 100%;
    justify-content: center;
  }

  .card {
    padding: 1.5rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
/* ========================================
   EDUCATION - MENÚ (basado en index.html)
   Color: #f42959 (Rosa Education)
   ======================================== */

:root {
  --education-primary: #f42959;
  --education-secondary: #ff1744;
  --education-dark: #c41c47;
}

/* ========================================
   HEADER / NAVBAR - Education Colors
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: linear-gradient(
    90deg,
    rgba(44, 75, 100, 0.92) 0%,
    rgba(54, 90, 122, 0.90) 40%,
    rgba(61, 95, 125, 0.88) 70%,
    rgba(216, 93, 58, 0.85) 100%
  );
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(44, 75, 100, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.scrolled {
  padding: 1rem 2rem;
  background: linear-gradient(
    90deg,
    rgba(44, 75, 100, 0.97) 0%,
    rgba(54, 90, 122, 0.95) 40%,
    rgba(61, 95, 125, 0.93) 70%,
    rgba(216, 93, 58, 0.90) 100%
  );
  box-shadow: 0 6px 28px rgba(44, 75, 100, 0.2);
}

.brand img {
  height: 42px;
  width: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand:hover img {
  transform: scale(1.05);
}

.desktop-nav {
  display: none;
  gap: 2.5rem;
  align-items: center;
}

.desktop-nav button {
  margin-left: 0.5rem;
}

.desktop-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  color: rgba(249, 250, 251, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #f9fafb;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #f9fafb;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle .bar {
  width: 28px;
  height: 2px;
  background: #f9fafb;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(196, 28, 71, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.menu-overlay__list {
  list-style: none;
  text-align: center;
}

.menu-overlay__list li {
  margin: 2rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-overlay[aria-hidden="false"] .menu-overlay__list li {
  opacity: 1;
  transform: translateY(0);
}

.menu-overlay__list li:nth-child(1) {
  transition-delay: 0.1s;
}
.menu-overlay__list li:nth-child(2) {
  transition-delay: 0.2s;
}
.menu-overlay__list li:nth-child(3) {
  transition-delay: 0.3s;
}
.menu-overlay__list li:nth-child(4) {
  transition-delay: 0.4s;
}

.menu-overlay__list a {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(249, 250, 251, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-overlay__list a:hover,
.menu-overlay__list a.active {
  color: #f9fafb;
}

/* Responsive */
@media (max-width: 767px) {
  .nav {
    padding: 1rem 1.5rem;
    max-width: 100vw;
    box-sizing: border-box;
  }
}

@media (min-width: 768px) {
  .nav {
    padding: 1.25rem 3rem;
  }

  .brand img {
    height: 48px;
  }
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .menu-overlay {
    display: none;
  }
}

/* Education menu - Updated 2025-01-12 14:35 - Menu working */
