/* ==========================================================
   Noticias del grupo (franja de portada + página de listado)
   Usa las variables de styles.css (--ink, --signal, --font).
   ========================================================== */
.news, .npage {
  --teal: #00989a;
  --green: #00564e;
  --teal-soft: #d9eeec;
  font-family: var(--font, "Manrope", system-ui, sans-serif);
  color: var(--ink, #0c1c26);
}

/* ---------- Franja de la portada ---------- */
.news {
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1rem, 5vw, 4rem);
  background:
    radial-gradient(55% 60% at 0% 0%, rgba(0, 152, 154, 0.10), transparent 70%),
    #fff;
}
.news[hidden] { display: none; }
.news__in { max-width: 1280px; margin: 0 auto; }
.news__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.5rem, 4vh, 2.5rem); }
.news__label { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: 999px; background: var(--teal-soft); color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.news__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.news__title { margin: .75rem 0 0; font-family: "Playfair Display", Georgia, serif; font-weight: 400; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; }
.news__all { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.15rem; border-radius: 999px; background: var(--green); color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none; transition: background .25s, transform .25s; }
.news__all svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.news__all:hover { background: var(--teal); }
.news__all:focus-visible, .ncard__a:focus-visible, .chip:focus-visible, .news__more button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* ---------- Tarjetas ---------- */
.news__list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: 1fr; }
@media (min-width: 640px) { .news__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .news__list { grid-template-columns: repeat(3, 1fr); } }

.ncard { animation: nIn .6s cubic-bezier(.2, .7, .2, 1) both; }
.ncard:nth-child(3n+2) { animation-delay: .08s; }
.ncard:nth-child(3n+3) { animation-delay: .16s; }
@keyframes nIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.ncard__a { display: flex; flex-direction: column; height: 100%; border-radius: 20px; overflow: hidden; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 1px 0 rgba(12, 28, 38, .06), 0 18px 40px -26px rgba(12, 28, 38, .45); transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.ncard__fig { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--teal-soft); }
.ncard__fig img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.ncard__ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--teal-soft), #f3fbfa); }
.ncard__b { display: flex; flex-direction: column; gap: .6rem; flex: 1; padding: 1.15rem 1.25rem 1.3rem; }
.ncard__m { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .8rem; color: #5a6b73; }
.ncard__tag { padding: .25rem .65rem; border-radius: 999px; background: var(--teal-soft); color: var(--green); font-weight: 700; font-size: .75rem; }
.ncard h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; font-weight: 800; text-wrap: balance; }
.ncard p { margin: 0; font-size: .95rem; line-height: 1.55; color: #3f5560; }
.ncard__more { display: inline-flex; align-items: center; gap: .45rem; margin-top: auto; padding-top: .4rem; font-weight: 700; font-size: .9rem; color: var(--green); }
.ncard__more svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s; }
@media (hover: hover) {
  .ncard__a:hover { transform: translateY(-5px); box-shadow: 0 1px 0 rgba(12, 28, 38, .06), 0 28px 50px -26px rgba(12, 28, 38, .55); }
  .ncard__a:hover .ncard__fig img { transform: scale(1.05); }
  .ncard__a:hover .ncard__more svg { transform: translateX(4px); }
}

/* ---------- Página de listado ---------- */
.npage { min-height: 100vh; background: radial-gradient(60% 45% at 100% 0%, rgba(0, 152, 154, .16), transparent 70%), #edf3f1; }
.nbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 5vw, 4rem); }
.nbar img { display: block; height: 44px; width: auto; }
.nbar__back { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .92rem; color: var(--green); text-decoration: none; padding: .55rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .7); }
.nbar__back:hover { background: #fff; }
.nbar__back svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nmain { max-width: 1280px; margin: 0 auto; padding: clamp(1.5rem, 5vh, 3rem) clamp(1rem, 5vw, 4rem) clamp(3rem, 8vh, 5rem); }
.nmain h1 { margin: .75rem 0 .5rem; font-family: "Playfair Display", Georgia, serif; font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; }
.nmain .lead { margin: 0 0 1.75rem; max-width: 36em; font-size: 1.05rem; color: #3f5560; }

.news__filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.75rem; }
.news__filters[hidden], .news__status[hidden], .news__more[hidden] { display: none; }
.chip { padding: .55rem 1rem; border: 1px solid rgba(0, 86, 78, .25); border-radius: 999px; background: rgba(255, 255, 255, .7); color: var(--green); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.chip:hover { background: #fff; }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.news__status { margin: 1rem 0; padding: 1.1rem 1.25rem; border-radius: 16px; background: rgba(255, 255, 255, .8); color: #3f5560; }
.news__status a { color: var(--green); font-weight: 700; }
.news__more { display: flex; justify-content: center; margin-top: 2rem; }
.news__more button { padding: .85rem 1.6rem; border: 0; border-radius: 999px; background: var(--green); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: background .25s; }
.news__more button:hover { background: var(--teal); }
[aria-busy="true"] .news__list { opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  .ncard { animation: none; }
  .ncard__a, .ncard__fig img, .ncard__more svg { transition: none; }
}
