/* ===============================
   MUCILA - Estilos Completos (Miembros + Index Fusionado)
   Paleta: Azul, Magenta, Rosa pastel y Negro
   =============================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* 🎨 Paleta de colores */
:root {
  --azul-profundo: #1a2b6d;
  --magenta: #b013a6;
  --rosa-pastel: #f8b4d9;
  --negro: #111;
  --gris-claro: #f6f6f6;
  --blanco: #fff;

  /* Alias del primer CSS para compatibilidad */
  --rosa-atom: var(--magenta);
  --azul-gris: var(--azul-profundo);
}

/* ===============================
   🌙 Modo Oscuro (Traído del CSS 1)
   =============================== */
body.dark-mode {
  background-color: #111;
  color: #f0f0f0;
}
body.dark-mode .topbar {
  background: linear-gradient(90deg, #2a2a2a, #1a1a1a);
}
body.dark-mode .card, 
body.dark-mode .semblanza-box,
body.dark-mode .galeria-box {
  background: #222; /* Fondo oscuro para cajas */
  color: #fff;
  border-color: #b013a6;
}
body.dark-mode .tag {
  background-color: #b013a6;
  color: white;
}
body.dark-mode .search input {
  background: #222;
  color: #fff;
  border-color: #b013a6;
}
body.dark-mode .main-banner {
  background: linear-gradient(135deg, #000, #2a2a2a);
}

/* ===============================
   Base
   =============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  background-color: var(--gris-claro);
  color: var(--negro);
  line-height: 1.6;
}

/* ===============================
   Header
   =============================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: linear-gradient(90deg, var(--azul-profundo), var(--magenta));
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  position: relative;
  z-index: 100;
}

/* Logo */
.logo-link {
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  padding: 4px;
  background: linear-gradient(135deg, #ff4b2b, #ff416c);
  box-shadow: 0 0 15px rgba(255, 65, 108, 0.5);
  transition: all 0.4s ease;
  animation: glowPulse 3s infinite ease-in-out;
}

.logo-link:hover {
  box-shadow: 0 0 25px rgba(255, 65, 108, 0.8), 0 0 40px rgba(255, 65, 108, 0.5);
  transform: scale(1.05);
}

.logo-img {
  height: 70px;
  width: auto;
  display: block;
  border-radius: 8px;
  transition: all 0.4s ease;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 65, 108, 0.4), 0 0 20px rgba(255, 65, 108, 0.3); }
  50% { box-shadow: 0 0 22px rgba(255, 65, 108, 0.7), 0 0 35px rgba(255, 65, 108, 0.5); }
}

/* Menú principal */
.mainnav a {
  position: relative;
  color: white;
  text-decoration: none;
  margin: 0 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0;
  transition: color 0.3s ease, transform 0.3s ease;
}

.mainnav a::before {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 50%;
  background: linear-gradient(90deg, var(--magenta), var(--rosa-pastel));
  border-radius: 2px;
  transition: width 0.4s ease, left 0.4s ease;
}

.mainnav a:hover {
  color: var(--rosa-pastel);
  transform: translateY(-4px);
}

.mainnav a:hover::before {
  width: 100%;
  left: 0;
}

/* Botón Únete */
.join-btn {
  background: linear-gradient(135deg, #b52bff, #a139f6);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8em 1.8em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.join-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
  transform: skewX(-25deg);
  transition: left 0.5s ease;
  z-index: 2;
}

.join-btn:hover::before {
  left: 125%;
}

.join-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(216, 44, 225, 0.6);
}

.join-btn:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px rgba(216, 44, 225, 0.6);
}

/* ===============================
   Banner principal (Específico de Nosotras/Miembros)
   =============================== */
.main-banner {
  background: linear-gradient(135deg, var(--azul-profundo), var(--magenta));
  color: white;
  text-align: center;
  padding: 60px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

/* Pequeño detalle visual del banner */
.main-banner::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--gris-claro);
  border-radius: 50% 50% 0 0;
}

.main-banner h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.main-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

/* ===============================
   Estilos de Tarjetas Avanzadas (Traído del CSS 1)
   Útiles para las Semblanzas
   =============================== */
.card {
  background: linear-gradient(135deg, #1a2b6d, #b013a6, #f8b4d9, #b013a6, #1a2b6d);
  background-size: 400% 400%;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  color: white; 
  transition: transform 0.4s, box-shadow 0.4s;
  animation: gradientAnimation 15s ease infinite;
}

.card:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Avatar (Foto redonda) */
.avatar {
  width: 150px;
  height: 150px;
  margin: 0 auto 1rem auto;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  background: var(--rosa-pastel);
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(176, 19, 166, 0.3);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.avatar:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 25px rgba(176, 19, 166, 0.5);
}
.avatar:hover img {
  transform: scale(1.1);
}

/* Redes Sociales */
.socials {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1.0rem;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2); /* Fondo semi-transparente para combinar con tarjeta */
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(5px);
}

.socials a:hover {
  background: white;
  color: var(--magenta);
  transform: scale(1.2) rotate(10deg);
}

/* ===============================
   Contenido Específico de Miembros
   =============================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.arrow {
  display: inline-block;
  text-decoration: none;
  color: var(--magenta);
  font-weight: bold;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.arrow:hover {
  color: var(--azul-profundo);
  transform: translateX(-4px);
}

.section-title {
  font-size: 1.8rem;
  text-align: center;
  color: var(--azul-profundo);
  margin-bottom: 1.5rem;
}

/* Secciones tipo galería */
.semblanzas, .galeria {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  margin-top: 20px;
  padding-bottom: 20px; /* Espacio para scrollbar y sombras */
  
  /* Scrollbar personalizado suave */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Estilo de la barra de scroll */
.semblanzas::-webkit-scrollbar, 
.galeria::-webkit-scrollbar {
  height: 8px;
}
.semblanzas::-webkit-scrollbar-track, 
.galeria::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 4px;
}
.semblanzas::-webkit-scrollbar-thumb, 
.galeria::-webkit-scrollbar-thumb {
  background: var(--rosa-pastel);
  border-radius: 4px;
}
.semblanzas::-webkit-scrollbar-thumb:hover, 
.galeria::-webkit-scrollbar-thumb:hover {
  background: var(--magenta);
}

/* Cajas de Semblanzas / Galería */
.semblanza-box, .galeria-box {
  flex: 0 0 280px; /* Ancho fijo */
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(176, 19, 166, 0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  color: var(--negro);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 200px;
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.semblanza-box:hover, .galeria-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(176, 19, 166, 0.2);
  border-color: var(--rosa-pastel);
}

.galeria-box {
  height: 260px; /* Galería un poco más alta */
}

/* Nota al pie */
.note {
  text-align: center;
  color: #555;
  margin-top: 40px;
  font-size: 0.9rem;
  font-style: italic;
}

/* ===============================
   Elementos Extra (Buscador/Tags del Index)
   =============================== */
.search-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
  gap: 1.0rem;
}

.search {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 30px;
  padding: 0.4rem 1rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.search input {
  border: none;
  outline: none;
  padding: 0.5rem;
  font-size: 1rem;
  width: 200px;
}

.tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tag {
  background-color: var(--azul-profundo);
  color: white;
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.tag:hover {
  background-color: var(--magenta);
  transform: scale(1.1);
}
/* ===============================
   AJUSTE GALERÍA (Texto debajo)
   =============================== */

/* El contenedor de cada miembro (Agrupa caja + texto) */
.miembro-item {
  display: flex;
  flex-direction: column; /* Pone los elementos uno debajo del otro */
  align-items: center;    /* Centra todo horizontalmente */
  flex: 0 0 220px;        /* Ancho fijo de cada columna */
  margin-right: 15px;     /* Espacio entre miembros */
}

/* La caja de la foto (ajustamos para que llene el ancho del item) */
.galeria .galeria-box {
  width: 100%;           /* Ocupa todo el ancho del item */
  height: 240px;         /* Altura fija para la foto */
  margin-bottom: 12px;   /* Espacio entre la caja y el texto de abajo */
  
  /* Mantenemos tus estilos visuales previos */
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(176, 19, 166, 0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
  /* Quitamos flexbox interno porque ya no tiene texto adentro */
  display: block; 
}

/* Efecto hover sobre la caja */
.miembro-item:hover .galeria-box {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(176, 19, 166, 0.2);
  border-color: var(--rosa-pastel);
}

/* Estilo del texto (cargo) */
.cargo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--azul-profundo);
  text-align: center;
  margin: 0;
}
/* ===============================
   ESTILOS DE LAS FOTOS EN GALERÍA
   =============================== */

/* Ajustes a la caja contenedora para que la imagen llegue al borde */
.galeria .galeria-box {
  padding: 0;          /* Quitamos el relleno interno para que la foto toque los bordes */
  overflow: hidden;    /* Esto recorta la imagen para respetar las esquinas redondeadas */
  background: #eee;    /* Color de fondo por si la imagen tarda en cargar */
  
  /* Mantenemos tus estilos anteriores */
  width: 100%;
  height: 240px; 
  border-radius: 12px;
  border: 1px solid rgba(176, 19, 166, 0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Estilo de la IMAGEN */
.galeria-box img {
  width: 100%;        /* Ancho total de la caja */
  height: 100%;       /* Alto total de la caja */
  object-fit: cover;  /* CRUCIAL: Recorta la imagen para llenar sin deformar */
  object-position: center top; /* Alinea la foto desde arriba (ideal para retratos) */
  display: block;     /* Elimina espacios extra debajo de la imagen */
  transition: transform 0.5s ease; /* Suaviza el zoom al pasar el mouse */
}

/* Efecto Zoom suave al pasar el mouse sobre la foto */
.miembro-item:hover .galeria-box img {
  transform: scale(1.1); /* La imagen crece un poquito */
}
/* ===============================
   ESTILOS PARA SEMBLANZAS INTERACTIVAS
   =============================== */

/* 1. Ajustes a la caja de semblanza */
.semblanza-box {
  /* Aseguramos que la caja pueda contener la imagen */
  padding: 5px; /* Un pequeño borde interno */
  cursor: pointer; /* Cambia el cursor a manita para indicar clic */
  position: relative;
  overflow: hidden;
  /* Mantenemos tus estilos previos, asegurando que sea flexible */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 2. Estilo de la miniatura (thumbnail) */
.semblanza-thumb {
  width: 100%;
  height: 100%;
  /* 'cover' hace que se vea bonita en el cuadro, aunque recorte un poco.
     Si prefieres que se vea entera aunque sobre espacio, usa 'contain'. */
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Efecto hover en la miniatura */
.semblanza-box:hover .semblanza-thumb {
  transform: scale(1.05); /* Zoom suave */
  opacity: 0.9;
}
.semblanzas, .galeria {
  display: grid; /* Cambiamos de flex a grid */
  /* Esto crea columnas automáticas que saltan a la siguiente fila solas */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
  gap: 30px; /* Espacio entre las tarjetas */
  margin-top: 20px;
  padding-bottom: 20px;
  overflow-x: visible; /* Quitamos el desplazamiento horizontal */
}

/* =========================================
   ESTILOS PARA ZOOM DE SEMBLANZAS (Lightbox)
   ========================================= */

/* 1. Estilo para la imagen pequeña (Thumbnail) */
.zoom-img {
  cursor: pointer;          /* Manita para indicar clic */
  transition: transform 0.3s ease;
  display: block;
}

.zoom-img:hover {
  transform: scale(1.03);   /* Efecto sutil al pasar el mouse */
  opacity: 0.9;
}

/* 2. El Fondo Oscuro (Modal) - Oculto por defecto */
.modal-overlay {
  display: none;            /* Importante: Oculto al inicio */
  position: fixed;          /* Fijo en la pantalla */
  z-index: 9999;            /* Encima de todo */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* Negro casi total */
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;   /* Aparece suavemente */
}

/* 3. La Imagen Grande */
.modal-content {
  max-width: 90%;           /* No más ancha que la pantalla */
  max-height: 90vh;         /* No más alta que la pantalla */
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  object-fit: contain;      /* Asegura que se vea completa */
}

/* 4. Botón de Cerrar (X) */
.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  z-index: 10000;
}

.close-btn:hover {
  color: #b013a6; /* Color magenta al pasar mouse */
}

/* Animación de entrada */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

