/* ============================================
   Estilos para la página "Comité Directivo"
   ============================================ */

/* Filtros: fondo opaco (necesario porque queda "sticky" al hacer scroll
   sobre las tarjetas), pero del mismo gris de la página en vez de blanco. */
.filtros {
  position: sticky;
  top: 60px;
  z-index: 100;
  background: var(--gray-100);
}

.filter-btn {
  transition: all 0.3s ease;
  border-radius: 20px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
}

.filter-btn.active {
  background-color: var(--gue-primary, #7a1a0c);
  color: white;
  border-color: var(--gue-primary, #7a1a0c);
}

.filter-btn:hover:not(.active) {
  background-color: #f8f9fa;
  border-color: var(--gue-primary, #7a1a0c);
  color: var(--gue-primary, #7a1a0c);
}

/* Grid de Directivos */
.directivos-grid {
  min-height: 400px;
}

/* Tarjeta de Directivo (sin fondo/caja: foto circular + texto centrado) */
.directivo-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem;
}

.directivo-card:hover {
  transform: translateY(-6px);
}

.directivo-card.is-pendiente {
  opacity: 0.7;
}

.directivo-card.is-pendiente:hover {
  transform: translateY(-3px);
}

/* Foto del Directivo: círculo */
.directivo-foto {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  margin-bottom: 1rem;
}

.directivo-card.is-pendiente .directivo-foto {
  border: 2px dashed #ced4da;
  box-shadow: none;
}

.directivo-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.directivo-card:hover .directivo-foto img {
  transform: scale(1.1);
}

/* Avatar genérico */
.directivo-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: #adb5bd;
  background: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
}

.directivo-avatar.avatar-pendiente {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
}

/* Información del Directivo */
.directivo-info {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.directivo-nombre {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #212529;
  line-height: 1.3;
}

.directivo-cargo {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gue-primary, #7a1a0c);
  margin-bottom: 0.5rem;
}

.directivo-grado {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.directivo-grado i {
  flex-shrink: 0;
}

.ver-bio-btn {
  margin-top: auto;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.ver-bio-btn:hover {
  background-color: var(--gue-primary, #7a1a0c);
  color: white;
  border-color: var(--gue-primary, #7a1a0c);
}

/* Modal de Biografía */
.biografia-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #495057;
}

/* Asegurar que los modales de biografía estén sobre TODO */
.bio-modal-custom {
  z-index: 1060 !important;
}

/* Backdrop muy sutil para que el modal se vea nítido */
.modal-backdrop.show {
  z-index: 1055 !important;
  opacity: 0.2 !important;  /* Reducido de 0.5 a 0.2 para mayor nitidez */
  pointer-events: none !important;
  background-color: rgba(0, 0, 0, 0.2);
}

/* Cuando hay un modal bio abierto, asegurar que el backdrop esté detrás */
body.modal-open .modal-backdrop {
  z-index: 1055 !important;
  opacity: 0.2 !important;
}

/* Asegurar que el contenido del modal sea interactivo */
.bio-modal-custom .modal-dialog {
  position: relative;
  z-index: 1061;
  pointer-events: auto;
}

.bio-modal-custom .modal-content {
  position: relative;
  z-index: 1062;
  pointer-events: auto;
  background-color: #ffffff !important;
  border: none;
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.5) !important;
  border-radius: 12px;
}

.bio-modal-custom .modal-header {
  background: linear-gradient(135deg, var(--gue-primary, #7a1a0c) 0%, #a02515 100%) !important;
  color: white;
  position: relative;
  z-index: 1063;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.bio-modal-custom .modal-body {
  position: relative;
  z-index: 1063;
  background-color: #ffffff !important;
  color: #212529;
}

.bio-modal-custom .modal-footer {
  position: relative;
  z-index: 1063;
  background-color: #ffffff !important;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.bio-modal-custom .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 1;
  z-index: 1064;
  position: relative;
}

/* Animación de filtrado */
.directivo-item {
  transition: all 0.3s ease;
}

.directivo-item[style*="display: none"] {
  opacity: 0;
  transform: scale(0.9);
}

/* Responsive */
@media (max-width: 768px) {
  .directivo-hero h1 {
    font-size: 2rem;
  }

  .directivo-foto {
    width: 130px;
    height: 130px;
  }

  .directivo-nombre {
    font-size: 1rem;
  }

  .filtros {
    position: static;
  }

  .filter-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 576px) {
  .directivo-foto {
    width: 120px;
    height: 120px;
  }

  .directivo-avatar {
    font-size: 2.75rem;
  }
}

/* Animación de entrada */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.directivo-card {
  animation: fadeInScale 0.4s ease-out;
}

/* Mejora visual para tarjetas vacías */
.alert {
  border-radius: 12px;
  padding: 1.5rem;
}
