/* Novas e páxina de cada nova. Usa as variables de styles.css. */
.news-page [hidden] { display: none !important; }

.news-board { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0 var(--section); }
.news-toolbar { display: grid; grid-template-columns: auto minmax(200px, 1fr) minmax(160px, .55fr) minmax(160px, .55fr); align-items: end; gap: 1rem; }
.news-views { display: flex; gap: 4px; padding: 4px; border: var(--border); border-radius: 999px; background: #fff; height: 52px; box-shadow: var(--pop-sm); }
.news-views button { border: 0; border-radius: 999px; background: transparent; color: var(--ink); padding: 0 1.1rem; font: 600 1rem var(--font-display); cursor: pointer; }
.news-views button[aria-pressed="true"] { background: var(--sun); }
.news-search { display: flex; align-items: center; gap: 0.5rem; height: 52px; min-width: 0; background: #fff; border: var(--border); border-radius: 999px; padding: 0 0.6rem 0 1.1rem; box-shadow: var(--pop-sm); }
.news-search:focus-within { outline: 4px solid var(--sky); outline-offset: 2px; }
.news-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 600 1rem var(--font-body); color: var(--ink); padding: 0.5rem 0; }
.news-search input:focus { outline: none; }
.news-search button { border: 2px solid var(--ink); background: var(--pink-soft); width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; line-height: 1; color: var(--ink); cursor: pointer; }
.news-filter { display: grid; gap: 0.3rem; font: 600 0.95rem var(--font-display); }
.news-filter select { width: 100%; height: 52px; border: var(--border); border-radius: 999px; background: #fff; font: 600 1rem var(--font-body); color: var(--ink); padding: 0 1rem; box-shadow: var(--pop-sm); }
.news-results { color: var(--ink-soft); font-weight: 700; margin: 1.5rem 0 1rem; }
.news-archive-note { padding: 1rem 1.25rem; background: var(--sun-soft); border: var(--border); border-radius: var(--radius-sm); margin: 1.5rem 0 0; }

.news-list { display: grid; gap: 1.5rem; scroll-margin-top: calc(var(--navbar-height) + 24px); }
.news-card { display: grid; grid-template-columns: 290px minmax(0, 1fr); background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--pop); overflow: hidden; transition: transform .3s var(--bounce); }
.news-card:hover { transform: translateY(-4px) rotate(-.4deg); }
.news-card.is-pinned { background: var(--sun-soft); }
.news-cover { display: block; position: relative; background: var(--sun); min-height: 230px; overflow: hidden; border-right: var(--border); }
.news-list > .news-card:nth-child(3n+2) .news-cover { background: var(--pink-soft); }
.news-list > .news-card:nth-child(3n+3) .news-cover { background: var(--sky-soft); }
.news-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-cover-symbol { display: none; height: 100%; min-height: inherit; padding: 1.5rem; flex-direction: column; gap: 0.5rem; align-items: center; justify-content: center; text-align: center; font: 600 1rem var(--font-display); color: var(--ink); }
.news-cover-symbol .icon { width: 52px; height: 52px; padding: 8px; border-radius: 16px; border: 3px solid var(--ink); background: #fff; }
.news-cover-missing .news-cover-symbol { display: flex; }
.news-reel-label { position: absolute; left: 0.75rem; bottom: 0.75rem; background: var(--pink); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 0.15rem 0.7rem; font: 600 0.85rem var(--font-display); }
.news-card-body { min-width: 0; padding: 1.4rem 1.6rem; }
.news-pinned { font: 600 0.95rem var(--font-display); margin: 0 0 0.6rem; }
.news-pinned::before { content: "★ "; color: var(--orange); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; color: var(--ink-soft); font-size: 0.92rem; font-weight: 700; margin-bottom: 0.7rem; }
.news-category { background: var(--lime); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 0.05rem 0.65rem; font-family: var(--font-display); font-weight: 600; }
.news-card h2 { margin: 0 0 0.5rem; font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem); }
.news-card h2 a { color: var(--ink); text-decoration: none; }
.news-card h2 a:hover { text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 4px; }
.news-excerpt { margin: 0 0 1rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.news-event { font-weight: 700; margin: 0 0 1rem; }
.news-card-bottom { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; }
.news-read { display: inline-flex; align-items: center; gap: 0.5rem; border: var(--border); border-radius: 999px; padding: 0.5rem 1.1rem; font: 600 1rem var(--font-display); text-decoration: none; background: var(--sun); color: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.news-read:hover { color: var(--ink); transform: translate(-1px, -1px); }
.news-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.news-share a, .news-share button { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 700 0.88rem var(--font-body); color: var(--ink); cursor: pointer; text-decoration: none; }
.news-share a:hover, .news-share button:hover { background: var(--mint); color: var(--ink); }

.news-empty { background: #fff; border: 3px dashed var(--ink); border-radius: var(--radius); text-align: center; padding: 3rem 1.5rem; }
.news-empty h2 { font-size: 1.5rem; }
.news-empty p { margin: 0.6rem 0; color: var(--ink-soft); }
.news-pagination { display: flex; gap: 0.6rem; justify-content: center; margin-top: 2rem; }
.news-pagination button { background: #fff; color: var(--ink); border: var(--border); border-radius: 50%; width: 48px; height: 48px; font: 600 1.05rem var(--font-display); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.news-pagination button[aria-current="page"] { background: var(--sun); }

/* Lectura individual */
.news-detail-main { background: var(--pink-soft); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0 var(--section); }
.news-detail-container { max-width: 900px; }
.news-back { display: inline-flex; gap: 0.5rem; margin-bottom: 1.25rem; padding: 0.4rem 1rem; text-decoration: none; font: 600 1rem var(--font-display); color: var(--ink); background: #fff; border: var(--border); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); }
.news-full { background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--pop); padding: clamp(1.4rem, 1rem + 3vw, 3.25rem); }
.news-full h1 { font-size: var(--step-4); margin: 0.8rem 0 1rem; overflow-wrap: anywhere; }
.news-full .news-lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.55; margin-bottom: 1.5rem; }
.news-full .news-share { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 2px dashed rgba(31,45,61,.25); }
.news-full-cover { margin: 1.5rem 0; }
.news-full-cover img { width: 100%; max-height: 560px; object-fit: contain; border-radius: 12px; border: var(--border); background: var(--sun-soft); }
.news-prose { max-width: 66ch; font-size: 1.1rem; line-height: 1.75; overflow-wrap: anywhere; }
.news-prose p { margin: 0 0 1.2em; }
.news-photos { display: grid; gap: 1.25rem; margin: 1.75rem 0; }
.news-photos img { width: 100%; max-height: 660px; object-fit: contain; border-radius: 12px; border: var(--border); }
.news-photos figcaption { font-size: 0.95rem; text-align: center; color: var(--ink-soft); margin-top: 0.5rem; }
.news-full .news-event, .news-expired { background: var(--sun-soft); padding: 1rem 1.25rem; border-radius: var(--radius-sm); border: 2.5px solid var(--ink); }
.news-expired { background: var(--sky-soft); margin-bottom: 1.25rem; }
.news-action { display: inline-flex; gap: 0.6rem; align-items: center; background: var(--lime); color: var(--ink); border: var(--border); box-shadow: var(--pop-sm); padding: 0.85rem 1.4rem; border-radius: 999px; font: 600 1.05rem var(--font-display); text-decoration: none; margin: 0.5rem 0 1.25rem; }
.news-action:hover { color: var(--ink); transform: translate(-2px, -2px); }
.news-documents { padding: 1.25rem 1.4rem; border: var(--border); background: var(--mint); border-radius: var(--radius-sm); margin: 1.25rem 0 0; }
.news-documents h2 { font-size: 1.35rem; margin-bottom: 0.8rem; }
.news-documents ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.news-documents a { display: flex; gap: 0.75rem; align-items: center; overflow-wrap: anywhere; }
.news-documents .pdf-type { color: var(--ink-soft); font-size: 0.85rem; margin-left: auto; }
.news-instagram { margin: 2rem auto; width: 100%; max-width: 540px; }
.news-instagram .instagram-consent-slot { min-height: 220px; }
.news-instagram .instagram-consent-slot iframe, .news-instagram .instagram-media { min-width: 0 !important; width: 100% !important; max-width: 540px !important; }
.news-loading { text-align: center; color: var(--ink-soft); padding: 4rem 0; font-weight: 700; }

@media (max-width: 1000px) {
    .news-toolbar { grid-template-columns: 1fr 1fr; }
    .news-views { justify-self: start; }
    .news-card { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .news-views, .news-search { grid-column: 1 / -1; }
    .news-views { justify-self: stretch; }
    .news-views button { flex: 1; }
    .news-card { grid-template-columns: minmax(0, 1fr); }
    .news-cover { min-height: 180px; height: 180px; border-right: 0; border-bottom: var(--border); }
    .news-card-body { padding: 1.2rem; }
}
