/* ============================================================
   NOTICIA MODAL — Vista detallada estilo periódico
   ============================================================ */

/* ── Overlay ────────────────────────────────────── */
.news-modal-overlay {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(8px);
  display: flex; align-items: stretch; justify-content: stretch;
  padding: 0;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.news-modal-overlay.open { opacity: 1; pointer-events: auto; }

.news-modal {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  max-height: 100vh;
  display: flex; flex-direction: column;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  transform: translateY(20px);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
  overflow: hidden;
}

/* newsModalContent es el contenedor del hero+scroll: debe ser flex column
   para que .news-modal-scroll pueda absorber el espacio y scrollear */
#newsModalContent {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.news-modal-overlay.open .news-modal { transform: translateY(0); }

.news-modal-close {
  position: absolute; top: .8rem; right: .8rem;
  width: 42px; height: 42px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  color: #fff;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 30;
  transition: all .2s;
}
.news-modal-close:hover { background: rgba(0, 0, 0, .9); transform: rotate(90deg); }

/* ── Hero (imagen full-width) ───────────────────── */
.news-modal-hero {
  position: relative;
  background: linear-gradient(135deg, #003F5C, #00B14F);
  flex-shrink: 0;
  max-height: 45vh;
  overflow: hidden;
}
.news-modal-hero-img {
  width: 100%;
  height: 45vh;
  max-height: 380px;
  object-fit: cover;
  display: block;
}
.news-modal-hero-noimg {
  width: 100%; height: 240px;
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem;
  color: #fff;
  background: linear-gradient(135deg, #003F5C, #00B14F);
}
.news-modal-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 30, 15, .9) 0%, rgba(0, 30, 15, .3) 60%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem 1.8rem 1.4rem;
}
.news-modal-cat {
  display: inline-block;
  background: #FFD700;
  color: #003F5C;
  padding: .25rem .75rem;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: .8rem;
  align-self: flex-start;
}
.news-modal-title {
  font-family: 'Playfair Display', 'Montserrat', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .6rem;
  line-height: 1.15;
  letter-spacing: -.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}
.news-modal-meta {
  display: flex; align-items: center; gap: .8rem;
  font-size: .82rem;
  color: rgba(255, 255, 255, .88);
  flex-wrap: wrap;
}
.news-modal-meta .dot { opacity: .5; }
.news-modal-meta .destacada-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: #FFD700;
  color: #003F5C;
  padding: .2rem .55rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .3px;
  text-transform: uppercase;
}

/* ── Body (scroll interno) ──────────────────────── */
.news-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

/* ── Contenido (estilo periódico) ───────────────── */
.news-modal-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.2rem 1.8rem 1.5rem;
  font-family: Georgia, 'Times New Roman', serif;
}
.news-modal-lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #1a2d35;
  font-weight: 600;
  margin: 0 0 1.8rem;
  padding: 0 0 1.2rem;
  border-bottom: 2px solid #003F5C;
  font-style: italic;
}
.news-modal-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2a3d35;
  margin: 0 0 1.1rem;
}
.news-modal-body strong { color: #003F5C; font-weight: 700; }
.news-modal-body em { color: #006B2F; }

/* ── Galería de imágenes adicionales ────────────── */
.news-modal-gallery {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.8rem 1.5rem;
}
.news-modal-gallery-title {
  font-family: 'Montserrat', sans-serif;
  font-size: .85rem;
  font-weight: 800;
  color: #003F5C;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin: 0 0 .8rem;
  display: flex; align-items: center; gap: .5rem;
}
.news-modal-gallery-title::before {
  content: '';
  flex: 1; height: 2px;
  background: linear-gradient(90deg, #00B14F, transparent);
}
.news-modal-gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}
.news-modal-gallery-grid figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f4f1;
  aspect-ratio: 4/3;
}
.news-modal-gallery-grid figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.news-modal-gallery-grid figure:hover img { transform: scale(1.04); }
.news-modal-gallery-grid figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent);
  color: #fff;
  font-size: .72rem;
  padding: 1.5rem .6rem .5rem;
  font-family: 'Montserrat', sans-serif;
}

/* ── Footer (autor + share) ─────────────────────── */
.news-modal-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.2rem 1.8rem 2rem;
  border-top: 1px solid #e8efe9;
}
.news-modal-share {
  display: flex; align-items: center; gap: .6rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .8rem;
  color: #4a6b5d;
  flex-wrap: wrap;
}
.news-modal-share-label {
  font-weight: 700;
  color: #003F5C;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.news-modal-share-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #f0f4f1;
  color: #003F5C;
  border: none;
  border-radius: 999px;
  padding: .45rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  font-family: 'Montserrat', sans-serif;
}
.news-modal-share-btn:hover { background: #00B14F; color: #fff; }
.news-modal-share-btn svg { width: 14px; height: 14px; }

/* ── Mobile ─────────────────────────────────────── */
@media (max-width: 600px) {
  .news-modal { max-width: 100%; }
  .news-modal-title { font-size: 1.5rem; }
  .news-modal-hero-img { height: 240px; }
  .news-modal-hero-overlay { padding: 1rem 1.2rem; }
  .news-modal-body { padding: 1.5rem 1.2rem 1.2rem; }
  .news-modal-lead { font-size: 1.05rem; }
  .news-modal-body p { font-size: .95rem; }
  .news-modal-gallery { padding: 0 1.2rem 1.2rem; }
  .news-modal-gallery-grid { grid-template-columns: 1fr; }
  .news-modal-footer { padding: 1rem 1.2rem 1.5rem; }
}
