body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f8f9fa;
  color: #222;
}

.galeria-container {
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

.titulo {
  font-size: 28px;
  color: #0a1739;
  margin-bottom: 10px;
}

.subtitulo {
  font-size: 20px;
  color: #444;
  margin-bottom: 25px;
}

.grid-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.galeria-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  cursor: pointer;
}

.galeria-card:hover {
  transform: translateY(-5px);
}

.galeria-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.galeria-card p {
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  text-align: center;
}

/* --- LIGHTBOX (única versión, limpia y sin parpadeo) --- */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden; /* 🔑 evita el parpadeo inicial */
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

#lightbox.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

#lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
}

.close-btn:hover {
  color: red;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .titulo {
    font-size: 22px;
  }

  .subtitulo {
    font-size: 18px;
  }

  .galeria-card p {
    font-size: 14px;
  }
}

/* Estilos para la página de Festividad del Maestro */
.festividad-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: white;
  min-height: 100vh;
}

.festividad-titulo {
  text-align: center;
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 30px;
  font-weight: bold;
}

.festividad-descripcion {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Estilos para el enlace de la tarjeta */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.card-link:hover {
  transform: translateY(-5px);
}
