/* =====================
   BASE
===================== */
body {
  font-family: 'Poppins', sans-serif;
  color: #0a2540;
  margin: 0;
  background: #ffffff;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =====================
   HERO
===================== */
.aime-hero {
  position: relative;
  height: 420px;
  background: linear-gradient(
      rgba(5, 20, 35, 0.75),
      rgba(5, 20, 35, 0.75)
    ),
    url('/assets/productos-servicios/banner-ps.webp') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.aime-hero h1 {
  color: #ffffff;
  font-size: 42px;
  font-weight: 700;
  max-width: 900px;
  line-height: 1.3;

  opacity: 0;
  animation: heroFade 1s ease forwards;
  animation-timeline: view();
  animation-range: entry 0% cover 40%;
}

/* =====================
   SECCIÓN INTRO
===================== */
.aime-intro {
  background: #eaf4fb;
  padding: 80px 20px;
}

.aime-intro-content {
  max-width: 1100px;
  margin: auto;
}

.aime-intro h2,
.aime-intro p {
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
  animation-timeline: view();
  animation-range: entry 10% cover 40%;
}

.aime-intro p {
  animation-delay: 0.1s;
}

.aime-intro h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.aime-intro p {
  font-size: 18px;
  line-height: 1.8;
  color: #3e556b;
}

/* =====================
   APLICACIONES
===================== */
.aime-apps {
  padding: 100px 20px;
}

.aime-apps-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;
  text-align: center;
}

.aime-app {
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
  animation-timeline: view();
  animation-range: entry 15% cover 35%;
}

/* escalonado */
.aime-app:nth-child(1) { animation-delay: 0.05s; }
.aime-app:nth-child(2) { animation-delay: 0.15s; }
.aime-app:nth-child(3) { animation-delay: 0.25s; }

.aime-app-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f78b4;

  opacity: 0;
  transform: scale(0.85);
  animation: iconPop 0.7s ease forwards;
  animation-timeline: view();
  animation-range: entry 15% cover 30%;
}

.aime-app:nth-child(2) .aime-app-icon {
  background: #0a1a2a;
}

.aime-app:nth-child(3) .aime-app-icon {
  background: #7fb3d5;
}

.aime-app h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.aime-app p {
  font-size: 15px;
  line-height: 1.7;
  color: #4a5d73;
}

/* Ícono AIME en blanco */
.aime-app-icon img {
  width: 56px;
  filter: brightness(0) invert(1);
}

/* =====================
   BLOQUE EDUCACIÓN
===================== */
.aime-edu {
  background: #cfe9fb;
  padding: 110px 20px;
}

.aime-edu-content {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 80px;
}

.aime-edu-text {
  flex: 1;
  text-align: center;

  opacity: 0;
  transform: translateX(-40px);
  animation: slideInLeft 0.9s ease forwards;
  animation-timeline: view();
  animation-range: entry 15% cover 40%;
}

.aime-edu-text span {
  display: inline-block;
  margin-bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aime-edu-text h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.aime-edu-text p {
  font-size: 18px;
  line-height: 1.8;
  color: #243b53;
  max-width: 500px;
  margin: 0 auto 30px;
}

.aime-btn {
  display: inline-block;
  padding: 14px 32px;
  background: #1f78b4;
  color: #ffffff;
  border-radius: 30px;
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aime-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 30px rgba(0,0,0,0.3);
}

/* =====================
   VIDEO BLOQUE
===================== */
.aime-edu-video {
  flex: 1;
  display: flex;
  justify-content: center;

  opacity: 0;
  transform: translateX(40px);
  animation: slideInRight 0.9s ease forwards;
  animation-timeline: view();
  animation-range: entry 15% cover 40%;
}

.aime-edu-video iframe {
  width: 100%;
  max-width: 520px;
  height: 300px;
  border-radius: 14px;
  box-shadow: 0 25px 45px rgba(0,0,0,0.25);
}

/* =====================
   ANIMACIONES
===================== */
@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes iconPop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 1000px) {
  .aime-apps-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .aime-edu-content {
    flex-direction: column;
    text-align: center;
  }

  .aime-edu-video iframe {
    height: 260px;
  }
}

@media (max-width: 600px) {
  .aime-hero h1 {
    font-size: 30px;
  }

  .aime-intro h2 {
    font-size: 26px;
  }
}
