/* ==================== ESTILOS EQUIPO DE TRABAJO ==================== */

/* Hero Section */
.hero-equipo {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-equipo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-equipo h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInDown 0.8s ease;
}

.hero-equipo p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* Team Filters */
.team-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
  max-width: 900px;
  margin: 0 auto;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.938rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.filter-btn.active {
  background: white;
  color: var(--primary);
  border-color: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* Equipo Section */
.equipo-section {
  padding: 4rem 0;
  background: linear-gradient(to bottom, #f8f9fa 0%, white 50%);
}

.intro-section {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 3rem;
  border-left: 4px solid var(--primary);
  animation: fadeIn 0.8s ease;
}

.intro-section p {
  font-size: 1.125rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin: 0;
}

/* Equipo Grid */
.equipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

/* Miembro Card */
.miembro-card {
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.miembro-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

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

.miembro-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Miembro Imagen */
.miembro-imagen {
  width: 100%;
  height: 260px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.imagen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.miembro-avatar {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.miembro-card:hover .miembro-avatar {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.miembro-avatar svg {
  width: 80px;
  height: 80px;
  color: white;
  opacity: 0.9;
}

/* Area Badge */
.area-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.813rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.area-badge.directivo {
  background: rgba(220, 38, 38, 0.9);
  color: white;
}

.area-badge.academico {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

.area-badge.administrativo {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.area-badge.tecnologia {
  background: rgba(139, 92, 246, 0.9);
  color: white;
}

/* Miembro Content */
.miembro-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.miembro-card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.miembro-card .cargo {
  font-size: 1.063rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.miembro-card .descripcion {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* Miembro Specialties */
.miembro-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.specialty-tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
  color: var(--primary);
  border-radius: 1rem;
  font-size: 0.813rem;
  font-weight: 600;
  border: 1px solid #c7e0ff;
  transition: all 0.3s ease;
}

.miembro-card:hover .specialty-tag {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Miembro Footer */
.miembro-footer {
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4f8 100%);
  border-top: 1px solid #e5e7eb;
}

.miembro-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.938rem;
  color: var(--gray-700);
  font-weight: 600;
}

.stat svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Valores Equipo Section */
.valores-equipo {
  margin-top: 5rem;
  padding: 4rem 0;
  background: linear-gradient(135deg, #f8f9ff 0%, white 100%);
  border-radius: 1.5rem;
}

.valores-equipo h2 {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 3rem;
}

/* Compromiso Grid */
.compromiso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  padding: 0 2rem;
}

.compromiso-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 1.25rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

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

.compromiso-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.compromiso-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
  transition: all 0.4s ease;
}

.compromiso-card:hover .compromiso-icon {
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 15px 35px rgba(67, 97, 238, 0.4);
}

.compromiso-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.compromiso-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.compromiso-card p {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0;
}

/* Card Filtering Animation */
.miembro-card.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.9);
}

.miembro-card.visible {
  display: flex;
  opacity: 1;
  transform: scale(1);
  animation: cardFadeIn 0.5s ease forwards;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
  .equipo-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }

  .compromiso-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-equipo {
    padding: 4rem 0 3rem;
  }

  .hero-equipo h1 {
    font-size: 2.25rem;
  }

  .hero-equipo p {
    font-size: 1.125rem;
  }

  .team-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filter-btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
  }

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

  .miembro-imagen {
    height: 220px;
  }

  .miembro-avatar {
    width: 120px;
    height: 120px;
  }

  .miembro-avatar svg {
    width: 70px;
    height: 70px;
  }

  .miembro-content {
    padding: 1.75rem;
  }

  .miembro-card h3 {
    font-size: 1.25rem;
  }

  .miembro-footer {
    padding: 1rem 1.75rem;
  }

  .valores-equipo {
    margin-top: 4rem;
    padding: 3rem 0;
  }

  .valores-equipo h2 {
    font-size: 1.875rem;
    margin-bottom: 2rem;
  }

  .compromiso-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .compromiso-card {
    padding: 2rem 1.5rem;
  }

  .compromiso-icon {
    width: 70px;
    height: 70px;
  }

  .compromiso-icon svg {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .hero-equipo h1 {
    font-size: 1.875rem;
  }

  .hero-equipo p {
    font-size: 1rem;
  }

  .filter-btn {
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
  }

  .filter-btn svg {
    width: 18px;
    height: 18px;
  }

  .intro-section {
    padding: 1.5rem;
  }

  .intro-section p {
    font-size: 1rem;
  }
}
