/* Blog / news styles — extends assets/css/style.css */

.blog-hero {
  padding: clamp(128px, 15vw, 180px) 0 clamp(48px, 6vw, 76px);
  color: #fff;
  background:
    radial-gradient(120% 150% at 88% 0%, rgba(46, 163, 91, 0.42) 0%, rgba(6, 42, 21, 0) 62%),
    linear-gradient(140deg, var(--green-950), var(--green-800) 75%);
}
.blog-hero .eyebrow { margin-bottom: 12px; color: #F6D77C; }
.blog-hero .eyebrow::before { background: var(--gold-400); }
.blog-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  margin-bottom: 14px;
  max-width: 20ch;
  color: #fff;
}
.blog-hero p { color: rgba(255, 255, 255, 0.82); max-width: 60ch; font-size: 1.05rem; }
.blog-hero a.btn { margin-top: 8px; }

.blog-body { padding-bottom: clamp(64px, 8vw, 110px); background: var(--paper); }

.post-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px;
}
.post-grid > .post-card {
  flex: 1 1 300px;
  max-width: 372px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.post-card-media {
  display: block;
  background: linear-gradient(135deg, var(--green-50), var(--paper-2));
  overflow: hidden;
}
.post-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.post-card:hover .post-card-media img { transform: scale(1.05); }

.post-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.post-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-100);
  color: var(--green-800);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
html[data-lang="ku"] .post-chip { text-transform: none; letter-spacing: 0.02em; }
.post-chip.is-statement { background: var(--gold-100); color: #7A5E0F; }
.post-chip.is-news { background: #E4EEF9; color: #1E4E7A; }
.post-chip.is-event { background: #FBE6E7; color: var(--red-700); }

.post-card h2 {
  font-size: 1.22rem;
  line-height: 1.28;
  margin-bottom: 10px;
}
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--green-700); }
.post-card-body p { color: var(--muted); font-size: 0.93rem; flex: 1; }
.post-card .program-link { margin-top: 16px; }

.post-lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
}

.post-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}
.post-featured .post-featured-media { height: 100%; background: var(--paper-2); }
.post-featured .post-featured-media img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.post-featured-body { padding: clamp(24px, 3.4vw, 40px); }
.post-featured-body h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 10px 0 12px; }
.post-featured-body h2 a { color: var(--ink); }
.post-featured-body p { color: var(--muted); }

/* ---------- single post ---------- */
.post-page { background: var(--paper); }

.post-head {
  padding: clamp(120px, 14vw, 170px) 0 clamp(56px, 8vw, 96px);
  color: #fff;
  background:
    radial-gradient(110% 140% at 90% 0%, rgba(46, 163, 91, 0.38) 0%, rgba(6, 42, 21, 0) 60%),
    linear-gradient(140deg, var(--green-950), var(--green-800) 78%);
}
.post-head-inner { max-width: 820px; margin-inline: auto; }
.post-head h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.14;
  margin: 16px 0 0;
  color: #fff;
}
.post-head .post-meta { margin-bottom: 0; font-size: 0.86rem; color: rgba(255, 255, 255, 0.72); }
.post-head .post-meta time { color: rgba(255, 255, 255, 0.82); }
.post-head .post-chip { background: rgba(255, 255, 255, 0.14); color: #fff; }
.post-head .post-chip.is-statement { background: rgba(242, 183, 5, 0.22); color: #FFE9A3; }
.post-head .post-chip.is-event { background: rgba(237, 38, 44, 0.2); color: #FFC9CB; }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-700);
  margin-bottom: 18px;
}
.post-head .post-back { color: rgba(255, 255, 255, 0.82); margin-bottom: 20px; }
.post-head .post-back:hover { color: #fff; }
.post-back svg { width: 16px; height: 16px; }
html[dir="rtl"] .post-back svg { transform: scaleX(-1); }

.post-cover {
  max-width: 980px;
  margin: calc(clamp(32px, 5vw, 56px) * -1) auto clamp(28px, 4vw, 44px);
  position: relative;
  z-index: 2;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--shadow-md);
}
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; }

.post-page .container > .post-content { padding-top: clamp(16px, 3vw, 28px); }
.post-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-2);
}
.post-content h2 { font-size: 1.6rem; margin: 2em 0 0.6em; }
.post-content h3 { font-size: 1.3rem; margin: 1.8em 0 0.5em; }
.post-content h4 { font-size: 1.1rem; margin: 1.6em 0 0.4em; }
.post-content p { margin-bottom: 1.15em; }
.post-content ul, .post-content ol { margin: 0 0 1.2em; padding-inline-start: 1.4em; }
.post-content li { margin-bottom: 0.45em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-inline-start: 3px solid var(--gold-400);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.5;
}
html[dir="rtl"] .post-content blockquote { font-family: var(--font-display); }
.post-content a { color: var(--green-700); text-decoration: underline; text-underline-offset: 3px; }
.post-content code {
  background: var(--paper-2);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 0.9em;
}
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.post-content img { border-radius: 12px; margin: 1.4em 0; max-width: 100%; height: auto; }
.post-content > p:first-child { font-size: 1.12rem; color: var(--ink); }

/* ---------- attachments ---------- */
.post-attachments {
  max-width: 720px;
  margin: clamp(32px, 4.5vw, 48px) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.post-attachments h2 { font-size: 1.1rem; margin-bottom: 14px; }
.post-attachments ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.attachment {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--white);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.attachment:hover { border-color: var(--green-500); background: var(--green-50); }
.attachment-ext {
  flex: 0 0 auto;
  min-width: 46px;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--green-700);
  border-radius: 7px;
  padding: 7px 8px;
}
.attachment-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.attachment-name { font-weight: 600; color: var(--ink); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-size { font-size: 0.78rem; color: var(--muted); }
.attachment-icon { width: 20px; height: 20px; color: var(--green-700); flex: 0 0 auto; }

.post-footer {
  max-width: 720px;
  margin: clamp(36px, 5vw, 56px) auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.post-lang-note {
  max-width: 720px;
  margin: 0 auto 26px;
  background: var(--gold-100);
  border: 1px solid #EBD69A;
  border-radius: 12px;
  padding: 14px 18px;
  color: #6B5515;
  font-size: 0.92rem;
}

/* ---------- empty state ---------- */
.blog-empty {
  text-align: center;
  padding: clamp(40px, 6vw, 72px);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--white);
}

/* ---------- home "latest news" ---------- */
.news-preview { background: var(--paper); }
.news-preview-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}
.news-preview-grid > .post-card { flex: 1 1 300px; max-width: 360px; }
.news-preview[hidden] { display: none; }
.news-preview-more { text-align: center; margin-top: clamp(28px, 4vw, 44px); }
.news-preview .section-head { margin-bottom: clamp(28px, 4vw, 44px); }

@media (max-width: 1100px) {
  .news-preview-grid > .post-card { flex-basis: 320px; }
}

@media (max-width: 860px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured .post-featured-media img { min-height: 220px; max-height: 320px; }
}

@media (max-width: 640px) {
  .post-grid > .post-card { flex-basis: 100%; max-width: 100%; }
  .news-preview-grid > .post-card { flex-basis: 100%; max-width: 100%; }
  .blog-hero { padding-top: 108px; }
  .post-head { padding-top: 104px; }
}
