/* GeoCARE News */
.news-page { max-width: 1160px; margin: 0.6rem auto 3rem; font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif; font-size: 1rem; line-height: 1.6; color: #322427; }
.news-page, .news-page * { box-sizing: border-box; }
:where(.news-page) :where(h2, h3, p) { margin: 0; padding: 0; }
.news-page .pub-admin-bar { margin-bottom: 1.4rem; }

.news-head { text-align: center; margin-bottom: 1.6rem; }
.news-title { color: #6b1239; font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif; font-size: 2rem; font-weight: 800; line-height: 1.2; letter-spacing: .02em; }
.news-title::after { content: ""; display: block; width: 64px; height: 4px; margin: 0.9rem auto 0; background: #6b1239; border-radius: 2px; }
.news-intro { margin-top: 0.9rem; color: #7f4862; font-size: 1.02rem; }
.news-empty { padding: 1.2rem; border: 1px dashed #d9bcd5; border-radius: 12px; color: #7f4862; text-align: center; }

/* Filters (CSS only) */
.newsfilter { position: absolute; opacity: 0; pointer-events: none; }
.news-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 1.8rem; }
.news-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.42rem 0.95rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #d9bcd5; background: #fff; color: #6b1239; font-size: 0.88rem; font-weight: 700; line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.news-chip:hover { border-color: #6b1239; transform: translateY(-1px); }
.news-chip__n { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 999px; background: #f6eef2; color: #7f4862; }
#nf-all:checked ~ .news-filters [for="nf-all"],
#nf-award:checked ~ .news-filters [for="nf-award"],
#nf-people:checked ~ .news-filters [for="nf-people"],
#nf-outreach:checked ~ .news-filters [for="nf-outreach"],
#nf-teaching:checked ~ .news-filters [for="nf-teaching"],
#nf-lab:checked ~ .news-filters [for="nf-lab"],
#nf-research:checked ~ .news-filters [for="nf-research"] { background: #6b1239; border-color: #6b1239; color: #fff; }
#nf-all:checked ~ .news-filters [for="nf-all"] .news-chip__n,
#nf-award:checked ~ .news-filters [for="nf-award"] .news-chip__n,
#nf-people:checked ~ .news-filters [for="nf-people"] .news-chip__n,
#nf-outreach:checked ~ .news-filters [for="nf-outreach"] .news-chip__n,
#nf-teaching:checked ~ .news-filters [for="nf-teaching"] .news-chip__n,
#nf-lab:checked ~ .news-filters [for="nf-lab"] .news-chip__n,
#nf-research:checked ~ .news-filters [for="nf-research"] .news-chip__n { background: rgba(255,255,255,0.2); color: #fff; }
#nf-award:checked ~ .news-feed .story:not([data-cat="award"]),
#nf-people:checked ~ .news-feed .story:not([data-cat="people"]),
#nf-outreach:checked ~ .news-feed .story:not([data-cat="outreach"]),
#nf-teaching:checked ~ .news-feed .story:not([data-cat="teaching"]),
#nf-lab:checked ~ .news-feed .story:not([data-cat="lab"]),
#nf-research:checked ~ .news-feed .story:not([data-cat="research"]) { display: none; }

/* Feed — compact summary cards; Read more expands in place */
.news-feed { display: grid; gap: 1rem; }
.story {
  position: relative; overflow: hidden;
  background: #fff; border: 1.8px solid #e2cdd9; border-radius: 16px; box-shadow: 0 4px 12px rgba(107, 18, 57, 0.07);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.story:hover { box-shadow: 0 10px 24px rgba(107, 18, 57, 0.13); border-color: #d9bcd5; }
.story--pinned { border-color: #f0c14b; }
.story--hl { animation: story-hl 2.4s ease-out; }
@keyframes story-hl { 0% { box-shadow: 0 0 0 4px #f0c14b; } 100% { box-shadow: 0 4px 12px rgba(107, 18, 57, 0.07); } }
.story-toggle { position: absolute; opacity: 0; pointer-events: none; }
.story-row { display: grid; grid-template-columns: 240px 1fr; gap: 1.2rem; padding: 1.1rem 1.3rem 1.1rem 1.1rem; align-items: start; }
.story--noimg .story-row { grid-template-columns: 1fr; }
.story-media { position: relative; }
.story-img-link { display: flex; align-items: center; justify-content: center; width: 240px; height: 170px; border-radius: 12px; overflow: hidden; background: #f6eef2; border: 1px solid #f0e3ea; }
.story-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform 0.35s ease; }
.story-img-link:hover .story-img { transform: scale(1.03); }
.story-count { position: absolute; left: 8px; bottom: 8px; padding: 0.2rem 0.55rem; border-radius: 999px; background: rgba(58, 10, 32, 0.78); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: .03em; }
/* expanded: text takes the full width, photos move to a row below */
.story-toggle:checked ~ .story-row { grid-template-columns: 1fr; }
.story-toggle:checked ~ .story-row .story-media { display: none; }
.story-body { position: relative; display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: #7f4862; padding-right: 4.5rem; }
.story-tag { display: inline-block; line-height: 1.4; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: #f6eef2; color: #6b1239; }
.story-tag--award { background: #fdf3d5; color: #7a5a00; }
.story-tag--people { background: #e6eef9; color: #1f4a8a; }
.story-tag--outreach { background: #e4f3ea; color: #1d6b3a; }
.story-tag--teaching { background: #f0e4f4; color: #5b2a7a; }
.story-tag--lab { background: #fbe6e6; color: #8a2a2a; }
.story-tag--research { background: #e3f0f5; color: #175a6d; }
.story-pin { color: #a07a10; font-weight: 700; font-size: 0.76rem; }
.story-date { color: #7f4862; font-weight: 600; }
.story-title { color: #3a0a20; font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif; font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.story-text p { margin: 0 0 0.7rem; font-size: 0.95rem; line-height: 1.6; color: #3d2f34; }
.story-text p:last-child { margin-bottom: 0; }
.story-text a { color: #6b1239; text-decoration: underline; text-decoration-color: #d9bcd5; text-underline-offset: 2px; }
.story-text a:hover { text-decoration-color: #6b1239; }
/* collapsed: three-line summary with an ellipsis */
.story-lead { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-lead p { display: inline; margin: 0; }
.story-rest { display: none; margin-top: 0.7rem; }
.story-toggle:checked ~ .story-row .story-lead { display: block; -webkit-line-clamp: none; line-clamp: none; overflow: visible; }
.story-toggle:checked ~ .story-row .story-lead p { display: block; }
.story-toggle:checked ~ .story-row .story-rest { display: block; }
.story-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.8rem; margin-top: 0.3rem; }
.story-btn, .story-link, .story-share {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.38rem 0.9rem; border-radius: 999px; cursor: pointer;
  font-size: 0.82rem; font-weight: 700; line-height: 1; text-decoration: none !important; border: 1.5px solid #6b1239; background: #6b1239; color: #fff !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.story-btn:hover { background: #4e0c29; border-color: #4e0c29; }
.story-btn__less { display: none; }
.story-toggle:checked ~ .story-row .story-btn__more { display: none; }
.story-toggle:checked ~ .story-row .story-btn__less { display: inline; }
.story-link { background: transparent; color: #6b1239 !important; }
.story-link:hover { background: #f6eef2; }
.story-share { background: transparent; border-color: #d9bcd5; color: #7f4862 !important; font-family: inherit; }
.story-share:hover { border-color: #6b1239; color: #6b1239 !important; }
.story-share.is-copied { background: #e4f3ea; border-color: #1d6b3a; color: #1d6b3a !important; }
.story-edit { position: absolute; top: 0; right: 0; }
/* photo gallery — only when expanded; photos never cropped */
.story-gallery { display: none; flex-wrap: wrap; gap: 8px; padding: 0 1.3rem 1.2rem 1.1rem; }
.story-toggle:checked ~ .story-gallery { display: flex; }
.story-gallery a { display: flex; align-items: center; justify-content: center; flex: 0 1 auto; max-width: 100%; height: 260px; border-radius: 10px; overflow: hidden; background: #f6eef2; border: 1px solid #f0e3ea; }
.story-gallery img { height: 100%; width: auto; max-width: 100%; }
.story-gallery img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; transition: transform 0.3s; }
.story-gallery a:hover img { transform: scale(1.03); }

/* Latest-news strip (homepage) */
.gcn-latest { max-width: 1160px; margin: 0.4rem auto 0.6rem; font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif; font-size: 1rem; line-height: 1.5; color: #322427; }
.gcn-latest .story-meta { padding-right: 0; line-height: 1.4; }
.gcn-latest .story-tag, .gcn-latest .story-date { line-height: 1.4; }
.gcn-latest__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.gcn-latest .gch-h2 { margin: 0; padding: 0; color: #6b1239; font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif; font-size: 1.7rem; font-weight: 800; line-height: 1.2; }
.gcn-latest__links { display: flex; align-items: center; gap: 0.8rem; white-space: nowrap; }
.gcn-latest, .gcn-latest * { box-sizing: border-box; }
.gcn-latest__all { color: #6b1239; font-weight: 700; font-size: 0.92rem; text-decoration: none; white-space: nowrap; }
.gcn-latest__all:hover { text-decoration: underline; }
.gcn-latest__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gcn-mini { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1.5px solid #e2cdd9; border-radius: 14px; text-decoration: none !important; color: inherit; transition: box-shadow 0.25s, transform 0.25s; }
.gcn-mini:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(107, 18, 57, 0.14); }
.gcn-mini__img { width: 100%; height: 190px; object-fit: contain; display: block; background: #f6eef2; padding: 6px; border-bottom: 1px solid #f0e3ea; }
.gcn-mini__body { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.9rem 1rem 1rem; }
.gcn-mini .story-meta { font-size: 0.78rem; }
.gcn-mini__title { color: #3a0a20; font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif; font-size: 1rem; font-weight: 700; line-height: 1.35; }

@media (max-width: 900px) {
  .story-row { grid-template-columns: 1fr; }
  .story-gallery a { height: 200px; }
  .story-img-link { width: 100%; height: 200px; }
  .story-gallery a { max-width: 100%; }
  .gcn-latest__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .news-title { font-size: 1.6rem; }
  .story-row { padding: 0.9rem; }
  .story-title { font-size: 1.12rem; }
  .story-edit { position: static; align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .story, .story-img, .story-thumbs img, .news-chip, .gcn-mini { transition: none; } .story--hl { animation: none; } }
@media print { .news-filters, .story-actions, .story-edit, .pub-admin-bar { display: none !important; } .story-rest { display: block !important; } .story { break-inside: avoid; } }
