/* ====== FRANJA DE SECCIÓN ====== */
.section-banner {
  position: relative;
  background: url("../imagenes/frontis.jpg") no-repeat center center/cover;
  padding: 3rem 1rem;
  border-radius: 12px;
  margin: 2rem auto;
  text-align: center;
  overflow: hidden;
}

/* Degradado superpuesto */
.section-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient( rgba(128,0,0,0.8));
  border-radius: 12px;
}

.section-banner h1 {
  position: relative;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1;
}

.section-banner h1 i {
  font-size: 1.8rem;
}


/** CONTENIDO **/
/* ==== GALERÍA GENERAL ==== */
.galeria {
  height: 100vh;                /* ocupa toda la pantalla */
  overflow-y: auto;             /* scroll vertical */
  padding: 30px 20px;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  background: #fdfdfd;
}

/* Encabezados */
.galeria h2 {
  margin: 20px 0 15px;
  font-size: 2rem;
  font-weight: 700;
  color: #800000; /* guinda institucional */
  border-left: 6px solid #800000;
  padding-left: 12px;
}

.galeria h3 {
  margin: 15px 0 10px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #444;
  border-bottom: 2px solid #eee;
  padding-bottom: 6px;
}

/* ==== GRID ÁLBUM ==== */
.album {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.album img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album img:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* ==== MODAL ==== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal__content {
  position: relative;
  text-align: center;
  max-width: 90%;
}

.modal__content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s ease;
}

.modal__content p {
  margin-top: 12px;
  color: #f1f1f1;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 400;
}

/* Botón cerrar */
.modal__close {
  position: absolute;
  top: -40px;
  right: -10px;
  font-size: 2.2rem;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s ease;
}

.modal__close:hover {
  color: #ff5252;
}

/* ==== CARRUSEL ==== */
.carousel-btn {
  position: absolute;
  top: 50%;
  background: rgba(128,0,0,0.8); /* guinda semitransparente */
  border: none;
  padding: 12px;
  font-size: 1.8rem;
  cursor: pointer;
  transform: translateY(-50%);
  border-radius: 50%;
  color: #fff;
  transition: background 0.3s ease;
}

.carousel-btn:hover {
  background: #a00000;
}

#prevBtn { left: -55px; }
#nextBtn { right: -55px; }

/* ==== SCROLL PERSONALIZADO ==== */
.galeria::-webkit-scrollbar {
  width: 10px;
}

.galeria::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.galeria::-webkit-scrollbar-thumb {
  background: #800000;
  border-radius: 10px;
}

.galeria::-webkit-scrollbar-thumb:hover {
  background: #a00000;
}

/* ==== ANIMACIONES ==== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
  .album {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .album img {
    height: 130px;
  }
}

@media (max-width: 600px) {
  .album {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .album img {
    height: 120px;
  }
  #prevBtn, #nextBtn {
    top: auto;
    bottom: 15px;
    transform: none;
    position: relative;
    margin: 5px;
  }
}
