/* ================================================= */
/* --- KEYFRAMES (Para animaciones) --- */
/* ================================================= */

/* 1. Animación de "Destello" (Rápido e Infrecuente) */
@keyframes premiumSheen {
  0% {
    transform: skewX(-20deg) translateX(-150%);
  }
  10% {
    transform: skewX(-20deg) translateX(150%);
  }
  100% {
    transform: skewX(-20deg) translateX(150%);
  }
}

/* 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 Suave" (Fade Up) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================= */
/* --- SECCIÓN NOSOTROS (Misión/Visión) --- */
/* ================================================= */

.about {
  position: relative;
  padding-bottom: 12rem;
  /* Fondo blanco para esta sección */
  background: var(--white);
}

.about-columns {
  display: flex;
  gap: clamp(1rem, 2.5vw, 3rem);
  max-width: 1100px;
  margin: 1rem auto 0;
  align-items: stretch;
  flex-wrap: wrap;
}

.about-col {
  flex: 1 1 480px;
  min-width: 320px;
  display: flex;
}

/* --- TARJETA "Misión/Visión" (Mejorada) --- */
.about-card {
  background: var(--white, #fff);
  border-radius: 16px;
  padding: 1.7rem 1.7rem 1.4rem;
  border: 1px solid #eef2f7;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  top: 54px;
  overflow: hidden;
  width: 100%;
}
.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: #eef2f7;
  border-radius: 0 0 3px 3px;
  transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1),
    transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
    left 0.4s cubic-bezier(0.19, 1, 0.22, 1), background 0.4s ease;
  z-index: 2;
}
.about-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: premiumSheen 12s ease-in-out infinite 1.5s;
  pointer-events: none;
  z-index: 1;
}

/* Títulos e íconos */
.about-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.35rem;
  color: var(--primary-color, #1e3a5f);
  line-height: 1.2;
}
.about-title i {
  font-size: 1.2rem;
  color: #00bcd4; /* Celeste */
  transition: transform 0.4s ease-out, color 0.3s ease;
}

/* Lista con check visual */
.about-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.about-list li {
  position: relative;
  padding-left: 1.75rem;
  line-height: 1.7;
  color: #555;
  transition: transform 0.3s ease-out;
}
.about-list li::before {
  content: '✔';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  font-size: 0.8rem;
  color: #8bc34a; /* Verde Limón */
  transition: transform 0.3s ease;
}

/* --- ESTADO HOVER (Misión/Visión) --- */
.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0, 188, 212, 0.2); /* Resplandor Celeste */
}
.about-card:hover::before {
  width: 100%;
  left: 0;
  transform: translateX(0);
  background: linear-gradient(90deg, #00bcd4, #8bc34a, #00bcd4);
  background-size: 200% auto;
  animation: flowGradient 4s ease-in-out infinite;
}
.about-card:hover .about-title i {
  transform: scale(1.1) rotate(-5deg);
}
.about-card:hover .about-list li::before {
  transform: scale(1.2);
}
.about-card:hover .about-list li {
  transform: translateX(3px);
}
.about-card:hover .about-list li:nth-child(1) {
  transition-delay: 0.05s;
}
.about-card:hover .about-list li:nth-child(2) {
  transition-delay: 0.1s;
}
.about-card:hover .about-list li:nth-child(3) {
  transition-delay: 0.15s;
}

/* CTA final de la sección 'about' */
.about-cta {
  padding: 2rem 0;
}
.cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ================================================= */
/* --- SECCIÓN "CONOCE A NUESTRO EQUIPO" (NUEVA) --- */
/* ================================================= */

.team-section {
  background-color: #f5f8fc; /* Fondo suave */
  padding: 4rem 0 6rem;
  border-top: 1px solid #eef2f7;
}

.team-grid {
  display: grid;
  /* Columnas responsivas: 3 en escritorio, 2 en tablet, 1 en móvil */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 3rem auto 0;
}

/* --- TARJETA DE MIEMBRO (Estilo "Digital Card") --- */
.team-card {
  background: var(--white);
  border-radius: 20px; /* Más redondeado */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #eef2f7;
  height: 100%;
}

/* --- VARIEDADES DE COLOR AUTOMÁTICAS --- */
/* Tarjeta 1, 4, 7... (AZUL) */
.team-card:nth-child(3n + 1) .team-card-header {
  background: linear-gradient(135deg, #0d6efd, #007bff);
}
.team-card:nth-child(3n + 1):hover {
  box-shadow: 0 16px 45px -10px rgba(13, 110, 253, 0.3); /* Resplandor Azul */
}

/* Tarjeta 2, 5, 8... (CELESTE) */
.team-card:nth-child(3n + 2) .team-card-header {
  background: linear-gradient(135deg, #00bcd4, #00c9e0);
}
.team-card:nth-child(3n + 2):hover {
  box-shadow: 0 16px 45px -10px rgba(0, 188, 212, 0.3); /* Resplandor Celeste */
}

/* Tarjeta 3, 6, 9... (VERDE) */
.team-card:nth-child(3n + 3) .team-card-header {
  background: linear-gradient(135deg, #8bc34a, #9cda55);
}
.team-card:nth-child(3n + 3):hover {
  box-shadow: 0 16px 45px -10px rgba(139, 195, 74, 0.3); /* Resplandor Verde */
}

.team-card:hover {
  transform: translateY(-8px);
}

/* --- CONTENIDO DE LA TARJETA --- */
.team-card-header {
  height: 120px; /* Altura del banner de color */
  position: relative;
  border-radius: 20px 20px 0 0;
}

.team-photo-frame {
  width: 100px; /* Tamaño de la foto */
  height: 100px;
  border-radius: 50%;
  border: 5px solid var(--white);
  background-color: var(--white);
  /* Posicionamiento superpuesto */
  position: absolute;
  bottom: -50px; /* (100px / 2) */
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.member-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.team-card-body {
  padding: 65px 1.5rem 1.5rem; /* 50px de foto + 15px de espacio */
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Ocupa el espacio restante */
}

.team-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color, #1e3a5f);
  margin: 0;
  line-height: 1.3;
}

.team-role {
  font-size: 0.9rem;
  color: var(--secondary-color, #4a9eff); /* Azul secundario */
  font-weight: 600;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.team-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start; /* Alineado a la izquierda como "Marta Torres" */
  width: 100%;
  margin-top: auto;
  padding: 1rem 0;
}

.team-links a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.3s ease, color 0.3s ease;
}
.team-links a i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: var(--primary-color, #1e3a5f);
}
.team-links a:hover {
  color: #00bcd4; /* Celeste */
  transform: translateX(5px);
}
.team-links a:hover i {
  color: #00bcd4;
}

.team-card-footer {
  padding: 0 1.5rem 1.5rem; /* Ajustado */
  border-top: 1px solid #eef2f7;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  text-align: center;
}

.btn-profile {
  display: inline-block;
  background: #f0f4f8; /* Botón sutil */
  color: var(--primary-color);
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-profile i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.btn-profile:hover {
  background: var(--gradient-primary); /* Se vuelve oscuro */
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(30, 58, 95, 0.2);
}
.btn-profile:hover i {
  transform: translateX(3px);
}

/* --- Animaciones de entrada (Stagger) --- */
.fade-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}
.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}
.delay-4 {
  animation-delay: 0.4s;
}
.delay-5 {
  animation-delay: 0.5s;
}
.delay-6 {
  animation-delay: 0.6s;
}
.delay-7 {
  animation-delay: 0.7s;
}
.delay-8 {
  animation-delay: 0.8s;
}
.delay-9 {
  animation-delay: 0.9s;
}
.delay-10 {
  animation-delay: 1s;
}
.delay-11 {
  animation-delay: 1.1s;
}

/* --- Responsivo --- */
@media (max-width: 720px) {
  .about-columns {
    gap: 1.5rem;
  }
  .about-title {
    font-size: 1.25rem;
  }
  .team-grid {
    gap: 1.5rem;
  }
}
