/* ══════════════════════════════════════════════════════════════
   noticias.css — Listado y detalle de noticias.
   Reutiliza las variables globales (variables.css).
   ══════════════════════════════════════════════════════════════ */

.noticias { padding-top: clamp(6rem, 12vh, 9rem); padding-bottom: 5rem; }
.noticias__loading,
.noticias__empty { color: var(--color-text-muted); padding: 2rem 0; }
.noticias__empty a { color: var(--color-gold); }

/* ── Filtros por categoría ── */
.noticias__filtros {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin: var(--space-6) 0 var(--space-8);
}
.noticias__chip {
  display: inline-flex; align-items: center; gap: .5ch;
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-muted);
  background: var(--glass-surface); border: 1px solid var(--color-border);
  padding: .5rem 1rem; border-radius: 999px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.noticias__chip span {
  font-size: var(--text-xs); color: var(--color-text-dim);
  background: rgba(255,255,255,.05); padding: .05rem .5rem; border-radius: 999px;
}
.noticias__chip:hover { color: var(--color-text); border-color: var(--color-border-strong); }
.noticias__chip.is-active {
  color: #10131c; background: var(--color-gold);
  border-color: var(--color-gold); font-weight: 600;
}
.noticias__chip.is-active span { color: #10131c; background: rgba(0,0,0,.14); }

/* ── Agrupación por año ── */
.noticias__grupo { margin-bottom: var(--space-10, 3rem); }
.noticias__anio {
  font-family: var(--font-display); font-size: var(--text-2xl);
  letter-spacing: .04em; color: var(--color-text);
  margin-bottom: var(--space-5); padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.noticias__grid {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── Tarjeta ── */
.noticia-card {
  display: flex; flex-direction: column;
  background: var(--glass-surface); border: 1px solid var(--color-border);
  border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.noticia-card:hover {
  transform: translateY(-4px); border-color: var(--color-border-strong);
  box-shadow: 0 14px 40px rgba(0,0,0,.4);
}
.noticia-card__media {
  position: relative; aspect-ratio: 16 / 9; background: var(--color-surface-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.noticia-card__media img { width: 100%; height: 100%; object-fit: cover; }
.noticia-card__ph {
  font-family: var(--font-display); font-size: var(--text-xl);
  letter-spacing: .05em; color: var(--color-text-dim);
}
.noticia-card__body { padding: var(--space-4) var(--space-5) var(--space-5); }
.noticia-card__fecha {
  display: block; font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: .06em; color: var(--color-gold); margin-bottom: var(--space-2);
}
.noticia-card__titulo {
  font-size: var(--text-lg); line-height: 1.3; color: var(--color-text);
  margin-bottom: var(--space-2);
}
.noticia-card__resumen {
  font-size: var(--text-sm); line-height: 1.55; color: var(--color-text-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Badge de categoría (colores de acento) ── */
.noticia-badge {
  display: inline-block; font-size: var(--text-xs); font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 6px;
  background: rgba(255,255,255,.1); color: var(--color-text);
}
.noticia-card__media .noticia-badge {
  position: absolute; top: .7rem; left: .7rem; backdrop-filter: blur(6px);
}
.noticia-badge--noticias     { background: rgba(59,108,255,.9);  color: #fff; }
.noticia-badge--apoderados   { background: rgba(216,182,90,.92); color: #10131c; }
.noticia-badge--circulares   { background: rgba(213,43,30,.9);   color: #fff; }
.noticia-badge--corporacion  { background: rgba(0,57,166,.92);   color: #fff; }
.noticia-badge--direccion    { background: rgba(124,133,151,.9); color: #10131c; }
.noticia-badge--world-skills { background: rgba(46,160,67,.9);   color: #fff; }
.noticia-badge--comunidad    { background: rgba(216,182,90,.92); color: #10131c; }

/* ══ Detalle: diseño editorial "periódico digital" ══════════════════ */
.np { max-width: 760px; margin: 0 auto; }

.np__back {
  display: inline-block; margin-bottom: var(--space-6);
  font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none;
  transition: color .2s;
}
.np__back:hover { color: var(--color-gold); }

/* Encabezado editorial (sobre el fondo oscuro del sitio) */
.np__head { margin-bottom: var(--space-6); }
.np__kicker {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.np__kicker time {
  font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-text-muted);
}
.np__title {
  font-family: Georgia, 'Times New Roman', 'Noto Serif', serif;
  font-weight: 700; font-size: clamp(2rem, 4.6vw, 3.15rem);
  line-height: 1.1; letter-spacing: -.015em; color: var(--color-text);
  margin: 0;
}

/* Imagen destacada */
.np__hero { margin: 0 0 var(--space-2); }
.np__hero img {
  width: 100%; display: block; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}

/* Cuerpo: "hoja" clara con tipografía de lectura (el HTML viene del CMS
   antiguo, pensado para fondo blanco y texto oscuro). */
.np__body {
  background: #fff; color: #1c1e24;
  margin-top: var(--space-6);
  padding: clamp(1.5rem, 4.5vw, 3.25rem);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  font-family: Georgia, 'Times New Roman', 'Noto Serif', serif;
  font-size: 1.15rem; line-height: 1.8;
  overflow-wrap: break-word;
}
.np__body > p:first-of-type { font-size: 1.24rem; color: #2a2d34; }
.np__body p { margin: 0 0 1.35rem; }
.np__body a { color: #0039a6; text-decoration: underline; text-underline-offset: 2px; }
.np__body h1, .np__body h2, .np__body h3, .np__body h4 {
  font-family: Georgia, 'Times New Roman', serif; color: #14161a;
  line-height: 1.25; margin: 2.2rem 0 .9rem;
}
.np__body h2 { font-size: 1.6rem; }
.np__body h3 { font-size: 1.32rem; }
.np__body img, .np__body iframe {
  max-width: 100%; height: auto; border-radius: 12px; margin: 1.6rem 0;
}
.np__body figure { margin: 1.6rem 0; }
.np__body figcaption { font-size: .9rem; color: #6b7280; text-align: center; margin-top: .5rem; }
.np__body ul, .np__body ol { margin: 0 0 1.35rem 1.4rem; }
.np__body li { margin-bottom: .5rem; }
.np__body blockquote {
  margin: 1.6rem 0; padding: .6rem 0 .6rem 1.4rem;
  border-left: 4px solid var(--color-gold); color: #33363d; font-style: italic;
}
.np__body table { max-width: 100%; border-collapse: collapse; margin: 1.4rem 0; }
.np__body td, .np__body th { border: 1px solid #e2e5ea; padding: .5rem .7rem; }
.np__body hr { border: none; border-top: 1px solid #e6e8ec; margin: 2rem 0; }

.np__foot {
  margin-top: var(--space-8, 2.5rem); padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

@media (max-width: 600px) {
  .noticias__grid { grid-template-columns: 1fr; }
}
