﻿/* =================================== */
/* 🪟 MODAL PARA NOTICIAS DESTACADAS   */
/* =================================== */
.modal-noticia {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  cursor: pointer;
}

.modal-noticia.active {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 800px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  cursor: default;
  animation: modalSlideIn 0.3s ease-out;
}

.modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 15px;
}

.modal-content p {
  font-size: 16px;
  color: #08306b;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.3s ease;
  background: none;
  border: none;
  padding: 5px;
}

.modal-close:hover,
.modal-close:focus {
  color: #08306b;
  outline: 2px solid #08306b;
  outline-offset: 2px;
  border-radius: 4px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =================================== */
/* 🖼️ LIGHTBOX GALERÍA DE FOTOS        */
/* =================================== */
.lightbox-galeria {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
}

.lightbox-galeria.show {
  display: flex;
}

.lightbox-galeria-img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
  object-fit: contain;
  cursor: default;
}

.close-galeria {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.close-galeria:hover,
.close-galeria:focus {
  background: rgba(255, 215, 0, 0.8);
  color: #08306b;
  outline: 2px solid #FFD700;
  outline-offset: 2px;
}

.arrow {
  position: absolute;
  top: 50%;
  font-size: 40px;
  color: white;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.arrow:hover,
.arrow:focus {
  background: rgba(255, 215, 0, 0.8);
  color: #08306b;
  outline: 2px solid #FFD700;
  outline-offset: 2px;
}

.arrow.left {
  left: 30px;
}

.arrow.right {
  right: 30px;
}

/* =================================== */
/* 📱 DISEÑO RESPONSIVO                */
/* =================================== */

/* Prevención de scroll cuando modales están abiertos */
html.no-scroll,
body.no-scroll {
  overflow: hidden !important;
  height: 100%;
  position: relative;
}

/* Capa de fade del carrusel (para mejor transición) */
.hero-fade-layer {
  pointer-events: none;
}

/* Mejorar clicks en overlay de modales */
.modal-noticia,
.lightbox-galeria {
  cursor: pointer;
}

.modal-content,
.lightbox-galeria-img {
  cursor: default;
}

/* Estados de focus mejorados */
.noticia:focus {
  outline: 3px solid #FFD700;
  outline-offset: 4px;
}

.galeria-grid img:focus {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

/* Animación de entrada del modal */
.modal-noticia.active .modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


