/* ── News page shared ──────────────────────────────────────────────────────── */
.news-page-hero {
  background: #fff;
  border-bottom: 1px solid #e8e7e2;
  padding: 3rem 0 0;
}
.news-page-hero .container-xxl { position: relative; }
.news-watermark {
  position: absolute; top: -1rem; right: 0;
  font-size: 7rem; font-weight: 900; color: rgba(0,0,0,.04);
  letter-spacing: -.04em; pointer-events: none; user-select: none;
  line-height: 1;
}

/* ── Filter pill bar ───────────────────────────────────────────────────────── */
.news-filter-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: 1.25rem 0;
  flex-wrap: wrap;
}
.news-filter-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .38rem .9rem; border-radius: 99px;
  border: 1.5px solid #e8e7e2; background: #fff;
  font-family: inherit; font-size: .82rem; font-weight: 600;
  color: #4a4a44; cursor: pointer; text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.news-filter-btn:hover { border-color: #10b981; color: #10b981; text-decoration: none; }
.news-filter-btn.active {
  background: #10b981; border-color: #10b981; color: #fff;
}

/* ── News grid ─────────────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 2rem 0 3rem;
}
@media (max-width: 1199px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px)  { .news-grid { grid-template-columns: 1fr; } }

/* ── News card ─────────────────────────────────────────────────────────────── */
.news-card-pub {
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 1px solid #e8e7e2;
  box-shadow: 0 1px 4px rgba(26,26,22,.05);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.news-card-pub:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(26,26,22,.1);
  text-decoration: none; color: inherit;
}
.news-card-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
  background: linear-gradient(135deg, #1a3d2b 0%, #10b981 100%);
  flex-shrink: 0;
}
.news-card-body {
  padding: 1rem 1.15rem 1.15rem;
  display: flex; flex-direction: column; flex: 1;
}
.news-card-tag {
  display: inline-block; padding: .2rem .65rem; border-radius: 99px;
  font-size: .7rem; font-weight: 700;
  background: #d1fae5; color: #065f46;
  margin-bottom: .55rem; width: fit-content;
}
.news-card-title {
  font-size: .95rem; font-weight: 700; line-height: 1.35;
  color: #1a1a16; margin-bottom: .4rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-excerpt {
  font-size: .8rem; color: #7a7a72; line-height: 1.55;
  margin-bottom: .6rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: .7rem;
  border-top: 1px solid #f0efe9;
}
.news-card-date { font-size: .74rem; color: #a8a8a0; }

/* ── SDG badges (shared list + detail + homepage) ──────────────────────────── */
.news-sdg-badges { display: flex; gap: .25rem; flex-wrap: wrap; align-items: center; }
.news-sdg-badge {
  width: 50px; height: 50px; border-radius: 4px;
  display: block; flex-shrink: 0;
}

/* ── Empty state ───────────────────────────────────────────────────────────── */
.news-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 2rem; text-align: center; color: #a8a8a0;
}
.news-empty i { font-size: 2.5rem; margin-bottom: 1rem; color: #d1d5db; }
.news-empty h6 { font-size: 1rem; font-weight: 600; color: #6b7280; margin-bottom: .4rem; }
.news-empty p { font-size: .875rem; margin: 0; }

/* ── Public pagination ─────────────────────────────────────────────────────── */
.news-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: .35rem; padding: 0 0 3rem; flex-wrap: wrap;
}
.news-pagination a, .news-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 .6rem;
  border: 1.5px solid #e8e7e2; border-radius: 8px;
  font-size: .83rem; font-weight: 500; color: #4a4a44;
  text-decoration: none;
  transition: background .14s, border-color .14s;
}
.news-pagination a:hover { background: #f4f4f0; border-color: #d4d3ce; text-decoration: none; }
.news-pagination .active { background: #10b981; color: #fff; border-color: #10b981; font-weight: 700; }
.news-pagination .disabled { color: #d1d5db; pointer-events: none; }

/* ── Article detail ────────────────────────────────────────────────────────── */
/* ── Article Hero ────────────────────────────────────────────────────────────── */
.article-hero {
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a3d2b;
  position: relative;
}
.article-hero-img { display: none; }
.article-hero-empty {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1a3d2b 0%, #2d6a4f 50%, #10b981 100%);
}

/* header block below the hero */
.article-header-block {
  max-width: 860px; margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
  text-align: center;
}
.article-hero-meta-bar {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: .9rem;
}
.article-hero-metaitem {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; color: #555; font-weight: 500;
}
.article-hero-metaitem i { color: #10b981; }
.article-header-block .article-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  text-align: center; margin-bottom: .9rem;
}
.article-header-block .news-sdg-badges { gap: .4rem; justify-content: center; }

.article-wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.article-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 991px) {
  .article-grid { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
}

/* breadcrumb (public) */
.article-breadcrumb-bar {
  background: #fff; border-bottom: 1px solid #eeede8; padding: .6rem 0;
}
.article-breadcrumb {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: .4rem;
  font-size: .8rem; color: #9a9a90;
}
.article-breadcrumb a { color: #9a9a90; text-decoration: none; }
.article-breadcrumb a:hover { color: #10b981; }
.article-breadcrumb .sep { color: #ccc; }
.article-breadcrumb .current {
  color: #3d3d38; font-weight: 500;
  max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.article-back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .85rem; font-weight: 600; color: #10b981;
  text-decoration: none; margin-bottom: 1.25rem;
}
.article-back:hover { text-decoration: underline; color: #059669; }

/* cover */
.article-cover {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px;
  display: block; margin-bottom: 1.75rem;
  background: linear-gradient(135deg, #1a3d2b 0%, #2d6a4f 50%, #10b981 100%);
}

/* meta */
.article-meta {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.article-cat-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .75rem; border-radius: 99px;
  font-size: .75rem; font-weight: 700;
  background: #d1fae5; color: #065f46;
}
.article-cat-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.article-meta-date, .article-meta-author { font-size: .8rem; color: #9a9a90; }
.article-meta-author span { color: #3d3d38; font-weight: 500; }

/* title / excerpt / body */
.article-title {
  font-size: 2rem; font-weight: 800; line-height: 1.2;
  letter-spacing: -.03em; color: #1a1a16; margin-bottom: 1rem;
}
@media (max-width: 767px) { .article-title { font-size: 1.5rem; } }

.article-excerpt {
  font-size: 1.05rem; color: #4a4a44; line-height: 1.65;
  border-left: 3px solid #10b981; padding-left: 1rem; margin-bottom: 1.75rem;
}
.article-divider { border: none; border-top: 1px solid #e8e7e2; margin: 1.5rem 0; }
.article-body { color: #3d3d38; line-height: 1.8; font-size: .97rem; }
.article-body p  { margin-bottom: 1.1rem; }
.article-body h2 { font-size: 1.35rem; font-weight: 700; margin: 2rem 0 .75rem; color: #1a1a16; }
.article-body h3 { font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 .6rem; color: #1a1a16; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: .35rem; }
.article-body img { max-width: 100%; border-radius: 8px; margin: .75rem 0; }
.article-body blockquote {
  border-left: 3px solid #10b981; padding-left: 1rem; margin: 1.25rem 0;
  color: #6b7280; font-style: italic;
}

/* gallery */
.article-gallery { margin-top: 2rem; }
.article-gallery-heading {
  display: flex; align-items: center; gap: .6rem;
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #7a7a72; margin-bottom: .85rem;
}
.article-gallery-heading::before {
  content: ''; display: inline-block;
  width: 3px; height: 16px; background: #10b981; border-radius: 2px;
}
.article-gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem;
}
@media (max-width: 767px) { .article-gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.gallery-thumb-item {
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 1; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  display: block;
}
.gallery-thumb-item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.gallery-thumb-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.gallery-thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.32);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
  color: #fff; font-size: 1.25rem;
}
.gallery-thumb-item:hover .gallery-thumb-overlay { opacity: 1; }
.gallery-thumb-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff; font-size: .65rem; padding: .8rem .45rem .35rem;
  font-weight: 500;
}

/* lightbox */
.news-lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.88);
  align-items: center; justify-content: center;
  padding: 1.5rem;
}
.news-lightbox.open { display: flex; }
.news-lightbox-img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.news-lightbox-close {
  position: fixed; top: 1.25rem; right: 1.5rem;
  background: rgba(255,255,255,.15); border: none;
  color: #fff; font-size: 1.5rem; width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .15s;
}
.news-lightbox-close:hover { background: rgba(255,255,255,.25); }

/* prev/next */
.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-top: 2rem; border-top: 1px solid #e8e7e2; padding-top: 1.5rem;
}
.article-nav-btn {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1rem; border-radius: 10px;
  border: 1.5px solid #e8e7e2; background: #fff;
  text-decoration: none; color: #1a1a16;
  transition: border-color .15s, box-shadow .15s;
  font-size: .875rem; min-width: 0;
}
.article-nav-btn:hover {
  border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.1);
  text-decoration: none; color: #1a1a16;
}
.article-nav-btn.next { flex-direction: row-reverse; text-align: right; }
.article-nav-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: #9a9a90; font-weight: 700; display: block; margin-bottom: .15rem;
}
.article-nav-title {
  font-weight: 600; font-size: .875rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-nav-arrow { font-size: 1.2rem; color: #10b981; flex-shrink: 0; }

/* sidebar */
.article-sidebar { position: sticky; top: 80px; }
.sidebar-news-card {
  background: #fff; border: 1px solid #e8e7e2; border-radius: 12px;
  overflow: hidden; box-shadow: 0 1px 4px rgba(26,26,22,.05);
}
.sidebar-news-header {
  padding: .85rem 1.1rem; border-bottom: 1px solid #e8e7e2; background: #fafaf8;
}
.sidebar-news-header h6 {
  margin: 0; font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #7a7a72;
  display: flex; align-items: center; gap: .5rem;
}
.sidebar-news-header h6::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: #10b981;
}
.sidebar-related-list { display: flex; flex-direction: column; }
.sidebar-related-item {
  display: flex; gap: .75rem; padding: .85rem 1.1rem;
  border-bottom: 1px solid #f0efe9; align-items: flex-start;
  text-decoration: none; color: inherit; transition: background .12s;
}
.sidebar-related-item:last-child { border-bottom: none; }
.sidebar-related-item:hover { background: #fafaf8; text-decoration: none; color: inherit; }
.sidebar-related-img {
  width: 56px; height: 42px; border-radius: 6px; flex-shrink: 0;
  object-fit: cover;
  background: linear-gradient(135deg, #1a3d2b, #10b981);
}
.sidebar-related-title {
  font-size: .82rem; font-weight: 600; line-height: 1.35;
  color: #1a1a16; margin-bottom: .2rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sidebar-related-date { font-size: .72rem; color: #9a9a90; }

/* ── News + SDG sidebar layout ─────────────────────────────────────────────── */
.news-with-sidebar {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.news-main { flex: 1; min-width: 0; }

/* ── SDG sidebar ────────────────────────────────────────────────────────────── */
.sdg-sidebar {
  width: 30px;
  position: fixed;
  right: 0;
  top: 50%;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  scrollbar-width: none;
  z-index: 1050;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,.08);
}
.sdg-sidebar::-webkit-scrollbar { display: none; }
.sdg-sidebar::-webkit-scrollbar { width: 3px; }
.sdg-sidebar::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 0; }

.sdg-sb-label-top {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .07em;
  color: #9ca3af;
  text-align: center;
  margin-bottom: .35rem;
  text-transform: uppercase;
}

.sdg-sb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 0;
  transition: transform .15s;
  position: relative;
}
.sdg-sb-btn:hover  { transform: scale(1.06); }
.sdg-sb-btn:hover .sdg-sb-img  { filter: grayscale(0%); opacity: 1; }
.sdg-sb-btn.active .sdg-sb-img { filter: grayscale(0%); opacity: 1; }
.sdg-sb-btn.active { outline: 2px solid #374151; outline-offset: 0; border-radius: 0; }

.sdg-sb-img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  filter: grayscale(100%);
  opacity: .55;
  transition: filter .2s, opacity .2s;
}

.sdg-sb-num {
  font-size: .58rem;
  font-weight: 700;
  color: #6b7280;
  margin-top: 2px;
  display: none;
  white-space: nowrap;
}
.sdg-sb-btn.active .sdg-sb-num { display: none; }

.sdg-sb-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  width: 100%;
  margin-top: .5rem;
  padding: .35rem 0;
  font-size: .62rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sdg-sb-clear:hover { background: #e5e7eb; color: #111; }

/* ── Adjust grid columns when sidebar is present ───────────────────────────── */
.news-main .news-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1199px) { .news-main .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px)  { .news-main .news-grid { grid-template-columns: 1fr; } }

/* Hide sidebar on very small screens */
@media (max-width: 575px) {
  .news-with-sidebar { display: block; }
  .sdg-sidebar { display: none; }
}
