/* 06-noticias.css — tarjetas, listado, detalle de noticia, galería y visor ampliado. */
.news-card { min-width: 0; }
.news-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.news-link .media { margin-bottom: 18px; }
.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--sec-muted, var(--muted));
  font-size: var(--fs-xs);
  font-weight: 600;
}
.news-content h3 { font-size: 1.3rem; margin-bottom: 8px; }
.news-summary {
  margin-bottom: 12px;
  color: var(--sec-muted, var(--muted));
  font-size: var(--fs-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (hover: hover) and (pointer: fine) {
  .news-link .media-img { transition: transform 500ms var(--ease-out); }
  .news-link:hover .media-img { transform: scale(1.03); }
  .news-link:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
  .news-link:hover .text-link span[aria-hidden] { transform: translateX(3px); }
}

.page-heading { margin-bottom: 28px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 48px; color: var(--muted); font-size: var(--fs-sm); }

/* Detalle de noticia o página. */
.article-header { margin-bottom: clamp(28px, 4vw, 44px); }
.article-header h1 { font-size: clamp(2.125rem, 1.4rem + 2.8vw, 3.5rem); margin-bottom: 18px; }
.back-link { margin-bottom: 26px; }
.article-lead { margin-bottom: 0; color: var(--muted); font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3rem); line-height: 1.55; }
.article-cover { margin-bottom: clamp(32px, 5vw, 56px); border-radius: var(--radius); }
.article-body { font-size: 1.125rem; line-height: 1.8; }
.article-body h2 { font-size: 1.75rem; margin-top: 1.6em; }
.article-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.article-share a { color: var(--brown); font-weight: 600; text-underline-offset: 3px; }

/* Galería: la cuadrícula se adapta a la cantidad de fotos. */
.gallery-section { margin-top: clamp(40px, 6vw, 72px); }
.gallery-title { font-size: 1.5rem; display: flex; align-items: baseline; gap: 12px; }
.gallery-title span { color: var(--muted); font: 500 var(--fs-sm) var(--font-sans); }
.gallery { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-1 { grid-template-columns: minmax(0, 1fr); }
.gallery-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-thumb {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--cream);
  cursor: zoom-in;
  transition: transform var(--dur-press) var(--ease-out);
}
.gallery-1 .gallery-thumb { aspect-ratio: 16 / 9; }
.gallery-thumb .media-img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .gallery-thumb .media-img { transition: transform 450ms var(--ease-out), filter var(--dur-ui) ease; }
  .gallery-thumb:hover .media-img { transform: scale(1.03); }
}

/* Visor ampliado. */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(18 10 5 / 0.94);
  color: #fff;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { animation: lightbox-in 220ms var(--ease-out); }
.lightbox[open] .lightbox-img { animation: lightbox-img-in 260ms var(--ease-out); }
@keyframes lightbox-in { from { opacity: 0; } }
@keyframes lightbox-img-in { from { opacity: 0; transform: scale(0.97); } }
.lightbox-inner { position: relative; display: grid; grid-template-rows: 1fr auto; height: 100%; padding: 56px 16px 20px; }
.lightbox-img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; border-radius: 4px; }
.lightbox-caption { max-width: 70ch; margin: 14px auto 0; text-align: center; color: rgb(255 255 255 / 0.85); font-size: var(--fs-sm); }
.lightbox-count { position: absolute; top: 18px; left: 20px; margin: 0; font-size: var(--fs-xs); color: rgb(255 255 255 / 0.7); }
.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  transition: background-color var(--dur-ui) ease, transform var(--dur-press) var(--ease-out);
}
.lightbox-btn:active { transform: scale(0.94); }
.lightbox-close { top: 10px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 12px; top: 50%; translate: 0 -50%; }
@media (hover: hover) and (pointer: fine) { .lightbox-btn:hover { background: rgb(255 255 255 / 0.24); } }

.related .news-grid { margin-top: 0; }
.document-list { margin-top: 48px; }
.document-list h2 { font-size: 1.5rem; }
.document-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--brown-dark);
  text-decoration: none;
  font-weight: 600;
}
.document-link > span:first-of-type { flex: 1; }
.document-link small { display: block; color: var(--muted); font-weight: 400; }
.document-thumbnail { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); }
.map-section { margin-top: 48px; }
.map-section h2 { font-size: 1.5rem; }
