.fotos-videos {
  padding: 4rem 1rem;
  background-color: #ffffff;
  color: #2a2a2a;
  font-family: 'Segoe UI', sans-serif;
}

h2 {
  font-size: 3rem;
  color: #003b6f;
  text-align: center;
  margin: 0px 0 50px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 1.5px;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 70px;
  height: 4px;
  background-color: #0077b6;
  margin: 10px auto 0;
  border-radius: 2px;
}

.fotos-videos .intro {
    max-width: 900px;
    margin: 0 auto 40px auto;
    padding-left: 15px;
    color: #444;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: center; /* centrado */
    background: none;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.fotos-videos .galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.fotos-videos .item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fotos-videos img,
.fotos-videos video {
  width: 100%;
  height: 265px; /* altura uniforme */
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.fotos-videos img:hover,
.fotos-videos video:hover {
  transform: scale(1.03);
}

.fotos-videos .descripcion {
  font-size: 0.9rem;
  color: #333;
  text-align: center;
  margin-top: 0.5rem;
  max-width: 95%;
}

.modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}


.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}

.cerrar {
  position: absolute;
  top: -10px;
  right: -10px;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  box-shadow: 0 0 8px rgba(255,255,255,0.7);
  transition: background-color 0.3s ease;
}

.cerrar:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #000;
}

/* Estilos para imagen y video en modal */
.modal-content img,
.modal-content video {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

/* Descripción en modal */
#modal-desc {
  color: #fff;
  margin-top: 10px;
  font-size: 1rem;
  user-select: none;
}


/* Responsive - ajustes para móviles */
@media (max-width: 600px) {
  .fotos-videos .galeria {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
  }
  .fotos-videos img,
  .fotos-videos video {
    height: 180px;
  }
}
