/* Reset y estilos globales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1e3a5f;
  --secondary-color: #4a9eff;
  --accent-color: #7cb8ff;
  --dark-blue: #1a2f4d;
  --text-light: #b8d4f1;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #1e3a5f 0%, #2d5986 100%);
  --gradient-accent: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #ebf4ff;
  padding-top: 105px; /* Ajustado para el header de 15px top + altura */
}

/* Contenedor principal */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Tipografía */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.2;
}
h1 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
}
h2 {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
}
h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
p {
  margin-bottom: 1rem;
  color: #ff0000;
}

/* Enlaces */
a {
  transition: all 0.3s ease;
}

p.mt-2 {
  color: #000000;
}

/* Botones (Estilo de tu imagen) */
.btn {
  background: linear-gradient(90deg, #00bcd4 0%, #8bc34a 100%);
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn:hover {
  box-shadow: 0 8px 25px rgba(0, 188, 212, 0.6),
    0 0 15px rgba(139, 195, 74, 0.4);
  filter: brightness(1.15) saturate(1.2);
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 188, 212, 0.3);
  filter: brightness(0.95);
}

.btn-secondary {
  background: var(--gradient-primary);
}

.btn-outline {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}
.btn-outline:hover {
  background: var(--secondary-color);
  color: var(--white);
}

/* Tarjetas */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Secciones */
/* ================================================= */
/* --- KEYFRAMES (Para las animaciones) --- */
/* ================================================= */

/* 1. Animación de "dibujado" para la línea (Entrada) */
@keyframes drawIn {
  from {
    /* Se mantiene centrado (X -50%) pero se escala desde 0 */
    transform: translateX(-50%) scaleX(0);
    opacity: 0;
  }
  to {
    /* Termina al 100% de su tamaño */
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
  }
}

/* 2. Animación de "flujo" para el gradiente (Continua) */
@keyframes flowGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 3. Animación de "aparición" para el texto (Opcional pero recomendado) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================= */
/* --- CÓDIGO DEL TÍTULO DE SECCIÓN --- */
/* ================================================= */

section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative; /* Esencial para la línea ::after */
  top: 30px;
  padding-bottom: 1rem;

  /* MEJORA: Animación de entrada para el texto (fade in) */
  opacity: 0; /* Oculto por defecto */
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.1s; /* Aparece justo antes que la línea */
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  /* 'transform' ahora es manejado por la animación 'drawIn' */

  width: 80px;
  height: 4px;
  border-radius: 2px;

  /* MEJORA: Tu gradiente (Azul, Celeste, Verde Limón)
     Repetí los colores en los extremos para un bucle perfecto.
  */
  background: linear-gradient(
    90deg,
    #0d6efd,
    #00bcd4,
    #8bc34a,
    #00bcd4,
    #0d6efd
  );

  /* MEJORA: Fondo más grande para la animación de flujo */
  background-size: 200% auto;

  /* MEJORA: Animaciones combinadas y secuenciadas */
  opacity: 0; /* Oculta por defecto */
  animation:
    /* 1. Animación de entrada: "dibujado" (dura 0.8s, inicia a los 0.3s) */ drawIn
      0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards 0.3s,
    /* 2. Animación continua: "flujo" (inicia a los 1.1s y se repite) */
      flowGradient 4s ease-in-out infinite 1.1s;
}

/* Utilidades */
.text-center {
  text-align: center;
}
.mt-1 {
  margin-top: 1rem;
}
.mt-2 {
  margin-top: 2rem;
}
.mt-3 {
  margin-top: 3rem;
}
.mb-1 {
  margin-bottom: 1rem;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mb-3 {
  margin-bottom: 3rem;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.8s ease-out;
}

/* Responsive Global */
@media (max-width: 768px) {
  body {
    padding-top: 90px; /* Ajustado para el header fijo en móvil */
  }
  .container {
    padding: 0 1rem;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.3rem;
  }
  section {
    padding: 2.5rem 0;
  }
}
