/* ===========================================================
   ژورنال کلاب روانشناسی — سیستم طراحی
   تم تیره + رنگ تاکیدی لیمویی، راست‌چین، ریسپانسیو کامل
   =========================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* متغیرهای رنگی از فایل تم فعال (theme-*.css) که پیش از این فایل لود می‌شود می‌آیند */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 100%; }

/* اندازه فونت قابل‌تغییر توسط کاربر (فقط موبایل، نکته ۲۴ در PROJECT-NOTES) —
   فقط روی محتوایی اثر می‌گذارد که با rem نوشته شده (تیترها، پاراگراف‌ها، توضیحات،
   رفرنس APA)؛ دکمه‌ها/ناوبری/بج‌ها عمداً با px ثابت مانده‌اند تا چیدمان صفحه با
   بزرگ‌شدن فونت به‌هم نریزد. */
@media (max-width: 640px) {
  html.text-scale-2 { font-size: 112%; }
  html.text-scale-3 { font-size: 124%; }
  html.text-scale-4 { font-size: 136%; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  direction: rtl;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* جلوگیری از اسکرول افقی وقتی متن طولانیِ بدون فاصله (مثل لینک‌ها) داخل کارت‌ها قرار می‌گیرد */
.plain-card, .info-card, .event-card, .article-item, .copy-field, .apa-text,
.desc, p, .value, .label {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.event-detail-grid > * { min-width: 0; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* پس‌زمینه اتمسفریک ملایم */
.glow-bg {
  position: relative;
  overflow: hidden;
}
.glow-bg::before {
  content: '';
  position: fixed;
  top: 60px;
  right: -160px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- تایپوگرافی ---------- */
h1, h2, h3, h4 { font-weight: 700; margin: 0 0 .6em; line-height: 1.35; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); }
h3 { font-size: 1.1875rem; }
p { margin: 0 0 1em; color: var(--text-secondary); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

/* ---------- هدر ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
}
.logo .mark {
  min-width: 36px; height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-on);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .03em;
  direction: ltr;
}
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: .15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text-primary); background: var(--bg-elevated); }
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 26px; cursor: pointer; }
.search-toggle {
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: .15s; flex-shrink: 0;
}
.search-toggle:hover { color: var(--accent); border-color: var(--accent); }
.search-bar {
  max-height: 0; overflow: hidden; border-bottom: 0 solid var(--border);
  transition: max-height .25s ease;
  background: var(--bg-soft);
}
.search-bar.open { max-height: 90px; border-bottom-width: 1px; }
.search-bar input { flex: 1; }

@media (max-width: 860px) {
  .main-nav {
    position: fixed; inset: 74px 0 0 0; height: calc(100vh - 74px);
    background: var(--bg); flex-direction: column; align-items: stretch;
    padding: 20px; gap: 4px; transform: translateY(-8px);
    opacity: 0; pointer-events: none; transition: .2s;
  }
  .main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .main-nav a { padding: 14px 18px; font-size: 16px; }
  .nav-toggle { display: block; }
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-family: var(--font); font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- بج‌ها و تگ‌ها ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 5px 12px;
  border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent);
}
.badge-muted { background: var(--bg-elevated-2); color: var(--text-secondary); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary); }

/* ---------- کارت رویداد ---------- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.event-card {
  background: var(--bg-elevated);
  border: 1px solid var(--accent-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: .2s;
}
.event-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.event-card.is-past { border-color: var(--border-strong); }
.event-card.is-past:hover { border-color: var(--text-muted); }
.event-card .thumb {
  aspect-ratio: 16/10; width: 100%; object-fit: cover;
  background: var(--bg-elevated-2);
}
.event-card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.event-card .date-badge { align-self: flex-start; }
.event-card h3 { margin: 0; }
.event-card .desc { font-size: 0.875rem; margin: 0; flex: 1; }
.event-card .meta-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
}
.event-card .footer-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- آیتم مقاله به‌شکل لیست عمودی (بدون تصویر) — الگوی franciscojruiz.com ---------- */
.article-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 640px) { .article-list { grid-template-columns: 1fr; } }
.article-list-item {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 24px; transition: .15s;
}
.article-list-item:hover { border-color: var(--accent); }
.article-tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
/* بخش ABSTRACT مجزا در صفحه‌ی اختصاصی مقاله — فقط دسکتاپ/تبلت (نکته ۴۲)؛ کارفرما صریحاً
   گفته روی موبایل لازم نیست، پس با همان breakpoint اصلی سایت (۶۴۰px) مخفی می‌شود */
.article-abstract-block { margin-top: 22px; }
@media (max-width: 640px) { .article-abstract-block { display: none; } }
.article-tag-pill {
  background: var(--accent-soft); color: var(--accent-strong);
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill);
}
.article-tag-pill.article-tag-year { background: var(--bg-elevated-2); color: var(--text-secondary); }

/* رنگ‌بندی چرخشی تگ‌ها (بر پایه‌ی هش نام مجموعه، در article_tag_pill_variant()) —
   دقیقاً مثل نمونه‌ی franciscojruiz.com که هر دسته رنگ متفاوتی دارد */
.article-tag-pill-0 { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
.article-tag-pill-1 { background: rgba(45, 212, 191, .16); color: #5eead4; }
.article-tag-pill-2 { background: rgba(251, 146, 60, .16); color: #fdba74; }
.article-tag-pill-3 { background: rgba(96, 165, 250, .16); color: #93c5fd; }
.article-tag-pill-4 { background: rgba(244, 114, 182, .16); color: #f9a8d4; }

.article-list-title { margin: 0 0 8px; font-size: 1.15rem; }
.article-list-title a { color: var(--text-primary); }
.article-list-title a:visited { color: var(--text-primary); }
.article-list-title a:hover { color: var(--accent); }
.article-list-authors { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 2px; }
.article-list-journal { font-size: 13px; color: var(--text-muted); font-style: italic; margin: 0 0 12px; }
.article-list-desc { font-size: 0.9rem; color: var(--text-secondary); margin: 0 0 16px; line-height: 1.85; }
.article-list-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  border-top: 1px solid var(--border); padding-top: 14px;
}

/* لینک DOI/منبع: مثل نمونه، یک متن ساده (نه دکمه) که همیشه انتهای ردیف اکشن می‌رود */
.article-doi-link {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-weight: 600; font-size: 13.5px; white-space: nowrap;
}
.article-doi-link:hover { color: var(--accent-strong); text-decoration: underline; }

/* دراپ‌داون Share (واتساپ/تلگرام/ایکس/لینکدین) */
.share-dropdown { position: relative; display: inline-flex; }
.share-menu {
  display: none; position: absolute; bottom: calc(100% + 8px); inset-inline-start: 0;
  z-index: 40; min-width: 170px; padding: 6px; flex-direction: column; gap: 2px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.share-dropdown.open .share-menu { display: flex; }
.share-menu a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-secondary);
}
.share-menu a:hover { background: var(--bg-elevated-2); color: var(--text-primary); }
.share-menu a i {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px; font-size: 15px;
}
.share-menu-whatsapp i { background: rgba(37, 211, 102, .16); color: #25d366; }
.share-menu-telegram i { background: rgba(41, 169, 235, .16); color: #29a9eb; }
.share-menu-twitter i { background: rgba(255, 255, 255, .1); color: var(--text-primary); }
.share-menu-linkedin i { background: rgba(10, 102, 194, .18); color: #0a66c2; }

/* آیتم مقاله وقتی داخل یک event-grid کوچک (پیش‌نمایش صفحه اصلی/جستجو/مرتبط) قرار می‌گیرد
   هم باید بدون تصویر و منسجم بماند — فاصله‌ی داخلی کمی جمع‌تر برای فضای کمتر */
.event-grid .article-list-item { height: 100%; }

/* ---------- نسخه موبایل قالب مقالات (فهرست + فیلترها) ---------- */
@media (max-width: 640px) {
  .article-list-item { padding: 16px 16px; border-radius: var(--radius-md); }
  .article-tag-pill { font-size: 11px; padding: 3px 8px; }
  .article-list-title { font-size: 1rem; }
  .article-list-desc { font-size: 0.85rem; line-height: 1.75; }
  .article-list-actions { gap: 6px; }
  .article-list-actions .btn, .article-list-actions .copy-btn { padding: 6px 10px; font-size: 12.5px; }
  .share-menu { min-width: 150px; }
  .article-doi-link { font-size: 12.5px; }

  .article-filters { padding: 14px; border-radius: var(--radius-md); }
}

/* ---------- صفحه جزئیات رویداد ---------- */
.event-hero-img {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
}
.event-banner-img {
  width: 100%; height: 200px; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
}
.event-title { font-size: clamp(1.75rem, 4vw, 2.75rem); }
@media (min-width: 901px) {
  .event-title { font-size: calc(clamp(1.75rem, 4vw, 2.75rem) / 2); }
}
.event-detail-grid {
  display: grid; grid-template-columns: 1fr; gap: 34px; align-items: start;
  margin-top: 28px;
}
.gd-desc { order: 1; }
.gd-join { order: 2; }
.gd-info { order: 3; }
.gd-certificate { order: 4; }
.gd-support { order: 5; }
.gd-sponsor { order: 6; }
.gd-video { order: 7; }
.gd-podcast { order: 8; }
.gd-spotlight-side { order: 9; }

/* دو ستون گروه‌بندی‌شده که هرکدام مستقل از دیگری ارتفاع می‌گیرند (بدون فضای خالی اضافه) */
.gd-col-main, .gd-col-side { display: flex; flex-direction: column; gap: 34px; min-width: 0; }

@media (min-width: 901px) {
  .event-detail-grid { grid-template-columns: 1.6fr 1fr; }
  .gd-col-main { grid-column: 1; }
  .gd-col-side { grid-column: 2; }
  .gd-video, .gd-podcast { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  /* زیر ۹۰۰px، خود ستون‌بندی از بین می‌رود و کارت‌ها طبق ترتیب order بالا زیر هم می‌آیند */
  .gd-col-main, .gd-col-side { display: contents; }
}

.info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

/* آواتار دایره‌ای ارائه‌دهندگان (کراپ خودکار با CSS، بدون افت کیفیت تصویر اصلی) */
.presenter-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; background: var(--bg-elevated-2);
  display: flex; align-items: center; justify-content: center;
}
.presenter-avatar img {
  width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block;
}
.info-card + .info-card { margin-top: 18px; }
.info-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-row i { color: var(--accent); font-size: 19px; margin-top: 2px; }
.info-row .label { font-size: 0.78125rem; color: var(--text-muted); margin-bottom: 2px; }
.info-row .value { font-size: 0.90625rem; color: var(--text-primary); font-weight: 500; }

/* ---------- کپی‌کردن لینک/شناسه/رمز ---------- */
.copy-field {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elevated-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 4px;
}
.copy-field input {
  flex: 1; background: none; border: none; color: var(--text-primary);
  font-family: var(--font); font-size: 13.5px; outline: none; direction: ltr; text-align: right;
}
.copy-btn {
  background: none; border: 1px solid var(--border-strong); color: var(--text-secondary);
  border-radius: var(--radius-sm); padding: 7px 10px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; gap: 5px; flex-shrink: 0; transition: .15s;
  font-family: var(--font);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { color: var(--success); border-color: var(--success); }
.article-share-btn.copied { color: var(--success); border-color: var(--success); }

/* ---------- فرم‌ها ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 7px; color: var(--text-primary); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="date"], input[type="time"], input[type="url"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-elevated-2);
  color: var(--text-primary); font-family: var(--font); font-size: 14.5px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
/* استثنا: فیلتر «از سال/تا سال» در فهرست مقالات، برخلاف بقیه‌ی field-rowها، حتی روی
   موبایل هم باید کنار هم (۲ ستونه) بماند — دقیقاً مطابق نمونه‌ی franciscojruiz.com که
   در اسکرین‌شات واقعی موبایل‌اش این‌طور دیده شد (نه یکی‌زیر‌دیگری) */
@media (max-width: 640px) { .field-row.article-year-row { grid-template-columns: 1fr 1fr; gap: 10px; } }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid var(--success-border); }
.alert-error { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); }
.alert-info { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent); }

/* ---------- بخش‌ها ---------- */
.section { padding: 4px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; text-align: right; }
.section-head p { font-size: 1rem; }

.hero {
  padding: 70px 0 50px;
  position: relative; z-index: 1;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero p.lead { font-size: 1.125rem; color: var(--text-secondary); max-width: 480px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- خبرنامه ---------- */
.newsletter-box {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px; display: flex; flex-wrap: wrap;
  gap: 20px; align-items: center; justify-content: space-between;
}
.newsletter-box form { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 280px; }
.newsletter-box input { flex: 1; min-width: 160px; }

/* ---------- فوتر ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 44px 0 26px; margin-top: 60px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); text-align: center; }

/* ---------- کارت‌های صفحه درباره/حمایت ---------- */
.plain-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px;
}
.icon-tile {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 14px;
}
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .value-grid { grid-template-columns: 1fr; } }

/* ---------- خالی/عدم وجود رویداد ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 40px; color: var(--border-strong); margin-bottom: 14px; }

/* دسترسی‌پذیری فوکوس */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- خلاصه بلند مقاله + فهرست مطالب خودکار ---------- */
.article-toc {
  background: var(--bg-elevated-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px;
}
.article-toc-title { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.article-toc-list { display: flex; flex-direction: column; gap: 6px; }
.article-toc-list a { font-size: 13.5px; color: var(--text-secondary); }
.article-toc-list a:hover { color: var(--accent); }
.article-toc-list a.article-toc-sub { padding-right: 16px; font-size: 13px; color: var(--text-muted); }
.detailed-summary h2 { font-size: 1.25rem; margin-top: 26px; margin-bottom: 10px; scroll-margin-top: 90px; }
.detailed-summary h3 { font-size: 1.05rem; margin-top: 20px; margin-bottom: 8px; scroll-margin-top: 90px; }
.detailed-summary p { margin-bottom: 12px; }
.detailed-summary ul, .detailed-summary ol { margin-bottom: 12px; padding-inline-start: 22px; }

/* ---------- مخفی‌کردن هیرو در موبایل (مورد ۱۱) ---------- */
@media (max-width: 640px) {
  .hero-grid { display: none; }
  .hero { padding: 5px 0; }
}

/* ---------- مخفی‌کردن ستون متنی هیرو (عنوان/بج/توضیح/دکمه‌ها) فقط در دسکتاپ —
   به‌درخواست کاربر، فعلاً موقت؛ موبایل از قبل کل هیرو را مخفی می‌کند (بالا)،
   تبلت (۶۴۱ تا ۹۰۰px) دست‌نخورده باقی مانده و همچنان نمایش داده می‌شود ---------- */
@media (min-width: 901px) {
  .hero-text-col { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- کادر ویژه (نمایش ویژه صفحه اول) در بالای صفحه، مستقل از هیرو ---------- */
.mobile-spotlight-wrap { display: none; }
@media (max-width: 640px) {
  .mobile-spotlight-wrap { display: block; padding: 5px 0 20px; }
}
.hero-spotlight-box img.event-banner-img { width: 100%; border-radius: var(--radius-sm); margin-bottom: 14px; display: block; }
.hero-spotlight-box { margin-bottom: 28px; }

/* ---------- «نمایش در» کادر ویژه: نمایش انتخابی بر اساس دستگاه (موبایل/تبلت/دسکتاپ) ---------- */
@media (max-width: 640px) {
  .hero-spotlight-visibility.spotlight-hide-mobile { display: none; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .hero-spotlight-visibility.spotlight-hide-tablet { display: none; }
}
@media (min-width: 1025px) {
  .hero-spotlight-visibility.spotlight-hide-desktop { display: none; }
}

/* ---------- تب سوییچ موبایل رویدادها (مورد ۲۶) ---------- */
.mobile-event-tabs { display: none; gap: 8px; margin-bottom: 22px; }
@media (max-width: 640px) {
  .mobile-event-tabs { display: flex; }
}
/* تب‌های مجموعه‌ی مقالات (/articles.php) — برخلاف .mobile-event-tabs بالا، روی همه‌ی
   سایزهای صفحه نمایش داده می‌شود، نه فقط موبایل. دکمه‌های داخلش همان .mobile-tab-btn
   موجود را برای هم‌ظاهر بودن با تب‌های صفحه اول به اشتراک می‌گذارند. */
.collection-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.article-filters {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px;
}
.article-collection-checks { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.collection-check-item {
  display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13.5px;
}
/* بعد از برگشتن فیلتر دسته‌بندی به چک‌باکس، طبق درخواست کارفرما: در دسکتاپ/تبلت
   دسته‌بندی و بازه‌ی سال کنار هم (۲ ستون) باشند، در موبایل هرکدام تمام‌عرض/زیر هم بمانند
   (نکته ۴۲) */
.article-filters-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
@media (max-width: 640px) { .article-filters-row { grid-template-columns: 1fr; } }
.mobile-tab-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-elevated); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer;
  font-family: var(--font);
}
.mobile-tab-btn.active { color: var(--accent-on); background: var(--accent); border-color: var(--accent); }

/* ---------- صفحه‌بندی ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.pagination-pages { display: flex; gap: 4px; flex-wrap: wrap; }
.page-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-secondary);
}
.page-num:hover { background: var(--bg-elevated); }
.page-num.active { background: var(--accent); color: var(--accent-on); font-weight: 700; }
.btn-disabled { opacity: .35; pointer-events: none; }

/* ---------- باکس گواهی ---------- */
.certificate-image {
  width: 100%;
  max-height: 220px;   /* برای تغییر اندازه تصویر گواهی، همین عدد را کم/زیاد کنید */
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  margin-bottom: 14px;
}

.article-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.article-item:last-child { border-bottom: none; }
.article-item .apa-text { font-size: 0.84375rem; color: var(--text-secondary); line-height: 1.9; margin-bottom: 8px; }
.article-item a.article-link { font-size: 13px; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }

/* ---------- تگ مخاطب ---------- */
.audience-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- دکمه شناور «تغییر اندازه فونت» (فقط موبایل) ---------- */
.font-size-widget { display: none; }
@media (max-width: 640px) {
  .font-size-widget { display: block; position: fixed; left: 14px; bottom: 14px; z-index: 60; }
}
.font-size-toggle {
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: var(--accent-on);
  font-family: var(--font); font-weight: 800; font-size: 15px; /* عمداً px — اندازه خودِ دکمه نباید با اسکیل کاربر عوض شود */
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.font-size-panel {
  position: absolute; bottom: 56px; left: 0; white-space: nowrap;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 8px; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
  opacity: 0; pointer-events: none; transform: translateY(6px); transition: .15s;
}
.font-size-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.font-size-panel button {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--bg-elevated-2); color: var(--text-primary);
  font-family: var(--font); font-weight: 700; font-size: 16px; /* px — همان دلیل بالا */
  display: flex; align-items: center; justify-content: center;
}
.font-size-panel button:disabled { opacity: .35; cursor: not-allowed; }
.font-size-panel .font-size-label { font-size: 12px; color: var(--text-muted); min-width: 56px; text-align: center; }

