/* ==========================================================================
   SECCIÓN DE NOTICIAS LOCALES & VISOR MODAL (DESPLEGADO)
   ========================================================================== */

.noticias-section {
  margin-top: 40px;
  margin-bottom: 40px;
}

.noticias-header {
  text-align: center;
  margin-bottom: 24px;
}

.noticias-header h2 {
  font-size: 2.2rem;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 6px;
}

.noticias-sub {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
}

/* Carrusel y Track */
.noticias-carousel-wrapper {
  position: relative;
  width: 100%;
}

.noticias-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 10px 4px;
  transition: all 0.3s ease;
}

/* Estilos cuando la cantidad de noticias > 3 (Carrusel con scroll manual) */
.noticias-carousel-wrapper.is-carousel .noticias-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 15px;
}

.noticias-carousel-wrapper.is-carousel .noticias-track::-webkit-scrollbar {
  height: 6px;
}

.noticias-carousel-wrapper.is-carousel .noticias-track::-webkit-scrollbar-thumb {
  background: var(--accent, #ff7700);
  border-radius: 4px;
}

.noticias-carousel-wrapper.is-carousel .noticia-card {
  min-width: 310px;
  max-width: 320px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Tarjeta de Noticia */
.noticia-card {
  background: rgba(25, 25, 35, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.noticia-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(255, 119, 0, 0.25);
  border-color: rgba(255, 119, 0, 0.5);
}

.noticia-img-wrap {
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: #111;
  position: relative;
}

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

.noticia-card:hover .noticia-img {
  transform: scale(1.06);
}

.noticia-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.noticia-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.35;
}

.noticia-excerpt {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  margin-bottom: 18px;
  flex-grow: 1;
}

.btn-ver-mas {
  align-self: flex-start;
  background: linear-gradient(135deg, #ff7700, #ff5500);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(255, 85, 0, 0.35);
  transition: all 0.2s ease;
}

.btn-ver-mas:hover {
  background: linear-gradient(135deg, #ff8811, #ff6611);
  transform: translateX(3px);
  box-shadow: 0 6px 20px rgba(255, 85, 0, 0.5);
}

/* Botones de navegación del carrusel */
.noticias-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
}

.noticias-nav-btn:hover {
  background: #ff7700;
  border-color: #ff7700;
  transform: translateY(-50%) scale(1.1);
}

.noticias-nav-btn.prev {
  left: -15px;
}

.noticias-nav-btn.next {
  right: -15px;
}

/* ==========================================================================
   MODAL / VISOR DE NOTICIA EN DETALLE ("VER MÁS")
   ========================================================================== */

.news-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.news-modal-container {
  background: rgba(22, 22, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 36px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.news-modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.news-modal-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

/* Título ARRIBA de la noticia en el visor desplegado */
.news-modal-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 24px;
  padding-right: 50px;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  border-bottom: 2px solid rgba(255, 119, 0, 0.6);
  padding-bottom: 14px;
}

/* Cuerpo desplegado: 2 Columna (Imagen Izquierda, Texto Derecha) */
.news-modal-body {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.news-modal-left {
  flex: 0 0 45%;
  max-width: 45%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.news-modal-left img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  display: block;
}

.news-modal-right {
  flex: 1;
}

.news-modal-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.news-modal-text p {
  margin-bottom: 16px;
}

/* Responsive Modal para Celulares */
@media (max-width: 768px) {
  .news-modal-container {
    padding: 24px 18px;
    max-height: 95vh;
  }
  
  .news-modal-title {
    font-size: 1.45rem;
  }

  .news-modal-body {
    flex-direction: column;
    gap: 20px;
  }

  .news-modal-left {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .noticias-nav-btn {
    display: none !important;
  }
}
