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

@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; }

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

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(28px, 4vw, 44px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 19px; }
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: 14px; 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);
}

/* ---------- صفحه جزئیات رویداد ---------- */
.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(28px, 4vw, 44px); }
@media (min-width: 901px) {
  .event-title { font-size: calc(clamp(28px, 4vw, 44px) / 2); }
}
.event-detail-grid {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 34px; align-items: start;
  margin-top: 28px;
  grid-template-areas: var(--areas-desktop);
}
@media (max-width: 900px) {
  .event-detail-grid { grid-template-columns: 1fr; grid-template-areas: var(--areas-mobile); }
}

.info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.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: 12.5px; color: var(--text-muted); margin-bottom: 2px; }
.info-row .value { font-size: 14.5px; 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); }

/* ---------- فرم‌ها ---------- */
.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; } }

.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); }

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

.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: 18px; 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;
}

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

/* ---------- تب سوییچ موبایل رویدادها (مورد ۲۶) ---------- */
.mobile-event-tabs { display: none; gap: 8px; margin-bottom: 22px; }
@media (max-width: 640px) {
  .mobile-event-tabs { display: flex; }
}
.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; }

/* ---------- مقالات (APA) ---------- */
.article-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.article-item:last-child { border-bottom: none; }
.article-item .apa-text { font-size: 13.5px; 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; }

