/* IRPA News & Articles — premium typography */
.article-prose {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--theme-text);
}
.article-prose h1, .article-prose h2, .article-prose h3 {
  color: var(--theme-heading);
  font-weight: 800;
  margin: 1.6em 0 0.6em;
  line-height: 1.25;
}
.article-prose h2 { font-size: 1.65rem; border-bottom: 1px solid rgba(212,166,58,.2); padding-bottom: .4rem; }
.article-prose h3 { font-size: 1.25rem; color: var(--irpa-gold-soft); }
.article-prose p { margin: 0 0 1.1em; }
.article-prose a { color: var(--irpa-gold); text-decoration: underline; }
.article-prose blockquote {
  border-right: 4px solid var(--irpa-gold);
  margin: 1.5em 0;
  padding: 1rem 1.25rem;
  background: rgba(212,166,58,.08);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--theme-text-muted);
}
.article-prose img { max-width: 100%; border-radius: 16px; margin: 1.5em auto; display: block; }
.article-prose .article-figure { margin: 1.5em 0; }
.article-prose .article-figure img { width: 100%; height: auto; }
.article-prose .article-video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.75em 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
}
.article-prose .article-video-embed iframe,
.article-prose .article-video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 16px;
}
.article-prose ul, .article-prose ol { margin: 0 0 1.2em; padding-right: 1.4em; }
.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .95rem;
}
.article-prose th, .article-prose td {
  border: 1px solid rgba(255,255,255,.12);
  padding: .65rem .85rem;
}
.article-prose th { background: rgba(212,166,58,.15); color: var(--irpa-gold-soft); }

.news-hero {
  min-height: 48vh;
  background-size: cover;
  background-position: center;
  position: relative;
}
.news-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,5,.95) 0%, rgba(5,5,5,.72) 38%, rgba(5,5,5,.45) 62%, rgba(5,5,5,.28) 100%);
  pointer-events: none;
}

/* ─── Article page layout & readability ─── */
.article-page-body,
.article-page-comments {
  width: 100%;
  max-width: min(1080px, calc(100vw - 2rem));
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.article-page-body {
  padding-top: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.article-page-hero-inner {
  max-width: min(1080px, calc(100vw - 2rem));
}
.article-page-hero--plain {
  min-height: auto;
  background: linear-gradient(135deg, #0d0d0f 0%, #1a1510 50%, #0d0d0f 100%);
}
.article-page-hero--plain::after {
  background: linear-gradient(to top, rgba(5,5,5,.85), transparent 70%);
}
.article-page-title {
  color: #ffffff;
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  margin-top: 1rem;
  text-shadow: 0 2px 28px rgba(0,0,0,.9), 0 1px 4px rgba(0,0,0,.85);
}
.article-page-excerpt {
  color: rgba(255,255,255,.92);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.65;
  max-width: 52rem;
  margin-top: 1rem;
  text-shadow: 0 1px 16px rgba(0,0,0,.85);
}
.article-page-meta {
  border: 1px solid rgba(255,255,255,.08);
}
.article-page-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(212,166,58,.18);
  color: var(--irpa-gold-soft);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.article-prose--reading {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.92;
  letter-spacing: 0.01em;
}
.article-prose--reading p {
  margin-bottom: 1.25em;
}
.article-prose--reading h2 {
  margin-top: 2em;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}
.article-gallery-grid .article-figure img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

[data-theme="light"] .article-page-hero::after {
  background: linear-gradient(to top, rgba(15,23,42,.92) 0%, rgba(15,23,42,.65) 40%, rgba(15,23,42,.35) 100%);
}
[data-theme="light"] .article-page-hero--plain {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 55%, #0369a1 100%);
}
[data-theme="light"] .article-page-title,
[data-theme="light"] .article-page-excerpt {
  color: #ffffff !important;
  text-shadow: 0 2px 20px rgba(0,0,0,.45);
}
[data-theme="light"] .article-page-meta {
  background: #ffffff;
  border-color: rgba(14,165,233,.25);
}
[data-theme="light"] .article-page-avatar {
  background: #e0f2fe;
  color: #0369a1;
}
[data-theme="light"] .article-prose--reading {
  color: var(--theme-text);
}

/* Hide any leftover source attribution in stored HTML */
.syndication-banner,
.syndication-badge,
.syndication-source-attribution,
.syndication-read-more,
.article-prose .syndication-source-attribution,
.article-prose .syndication-read-more {
  display: none !important;
}
.news-card {
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,166,58,.45);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.news-badge {
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 6px;
  background: rgba(212,166,58,.18);
  color: var(--irpa-gold-soft);
  border: 1px solid rgba(212,166,58,.35);
}
.ql-toolbar.ql-snow, .ql-container.ql-snow {
  border-color: rgba(255,255,255,.12) !important;
  background: rgba(0,0,0,.35) !important;
  color: #f5f5f7;
}
.ql-editor { min-height: 280px; font-size: 1.05rem; }
.ql-snow .ql-stroke { stroke: #9ca3af !important; }
.ql-snow .ql-fill { fill: #9ca3af !important; }
.ql-snow .ql-picker { color: #d1d5db !important; }

.comment-bubble {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 1rem 1.1rem;
}

.syndication-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: rgba(2, 132, 199, .92);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.syndication-badge.inline {
  position: static;
  display: inline-block;
  margin-inline-start: .35rem;
}
.syndication-banner {
  border: 1px solid rgba(14, 165, 233, .35);
  background: linear-gradient(135deg, rgba(14,165,233,.12), rgba(255,255,255,.04));
}
.syndication-banner--subtle {
  border-color: rgba(14, 165, 233, .2);
  background: rgba(14, 165, 233, .06);
}
.syndication-source-attribution {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
  opacity: 0.85;
}
[data-theme="light"] .syndication-source-attribution {
  border-top-color: rgba(14, 165, 233, 0.2);
}
.article-prose .syndication-read-more {
  display: inline-block;
  margin-top: .5rem;
  font-size: 1.05rem;
}
[data-theme="light"] .syndication-banner {
  background: #f0f9ff;
  border-color: rgba(14, 165, 233, .35);
}
[data-theme="light"] .syndication-badge {
  background: #0284c7;
}

/* ─── Category pills (news filter) ─── */
.cat-pill {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #9ca3af;
  cursor: pointer;
  background: transparent;
}
.cat-pill.active,
.cat-pill:hover {
  border-color: rgba(212, 166, 58, 0.5);
  color: var(--irpa-gold-soft);
  background: rgba(212, 166, 58, 0.1);
}

/* ─── Light theme: news & articles readability ─── */
[data-theme="light"] .news-hero .text-white,
[data-theme="light"] .news-hero h1,
[data-theme="light"] .news-hero h2,
[data-theme="light"] .news-hero h3,
[data-theme="light"] .news-hero p {
  color: #ffffff !important;
}
[data-theme="light"] .news-hero .text-gray-300,
[data-theme="light"] .news-hero .text-gray-400,
[data-theme="light"] .news-hero .text-gray-500 {
  color: rgba(255, 255, 255, 0.88) !important;
}
[data-theme="light"] .news-card .text-white,
[data-theme="light"] a.news-card h2,
[data-theme="light"] a.news-card h3 {
  color: var(--theme-heading) !important;
}
[data-theme="light"] .news-card .text-gray-500,
[data-theme="light"] .news-card .text-gray-600 {
  color: var(--theme-text-muted) !important;
}
[data-theme="light"] .news-card:hover {
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.15);
  border-color: #0284c7;
}
[data-theme="light"] .news-badge {
  background: #e0f2fe;
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.35);
}
[data-theme="light"] .cat-pill {
  border-color: rgba(14, 165, 233, 0.25);
  color: #475569;
}
[data-theme="light"] .cat-pill.active,
[data-theme="light"] .cat-pill:hover {
  border-color: #0284c7;
  color: #0369a1;
  background: #f0f9ff;
}
[data-theme="light"] .article-prose blockquote {
  background: #f0f9ff;
  color: #475569;
  border-right-color: #0284c7;
}
[data-theme="light"] .article-prose th,
[data-theme="light"] .article-prose td {
  border-color: rgba(14, 165, 233, 0.2);
}
[data-theme="light"] .article-prose th {
  background: #e0f2fe;
  color: #0369a1;
}
[data-theme="light"] .article-prose a {
  color: #0284c7;
}
[data-theme="light"] .comment-bubble {
  background: #f8fafc;
  border-color: rgba(14, 165, 233, 0.15);
}
[data-theme="light"] .comment-bubble .text-gray-300,
[data-theme="light"] .comment-bubble .text-gray-400,
[data-theme="light"] .comment-bubble .text-gray-500 {
  color: var(--theme-text-muted) !important;
}
[data-theme="light"] .syndication-banner .text-amber-300 {
  color: #0369a1 !important;
}
