/*
  قالب ایستای سایت موسسه — تنها CSS (نگهبان دیزاین‌سیستم، ۱۱-۰۵). موبایل اول، بی JS، بی منبع بیرونی، فونت محلی.
  هویت = همان سربرگ رسمی: کاغذ گرم، جوهر #231f20، لهجه‌ی زرشکی لوگو #5e1717، خط نازک با نوار لهجه (پژواک سربرگ).
  زیتونی سایت قبلی کنار رفت: با زرشکی لوگو نمی‌خواند.
*/
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("/fonts/Vazirmatn-Regular.ttf") format("truetype"); }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url("/fonts/Vazirmatn-Bold.ttf") format("truetype"); }

:root {
  --paper: #ffffff;
  --surface: #f7f4f0;
  --ink: #231f20;
  --muted: #58595b;
  --line: #e4ded7;
  --rule: #bcbec0;
  --accent: #5e1717;
  --accent-ink: #ffffff;
  --accent-soft: #f5ecea;
  --radius: .75rem;
  --wrap: 72rem;
  --measure: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 1rem; line-height: 1.85;
  min-height: 100vh; display: flex; flex-direction: column; } /* پانویس در صفحه‌ی کوتاه به پایین می‌چسبد */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: .25rem; }
h1, h2, h3 { line-height: 1.45; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1rem; }
.skip { position: absolute; inset-inline-start: 1rem; top: -3rem; background: var(--accent); color: var(--accent-ink); padding: .5rem .9rem; border-radius: .5rem; z-index: 10; }
.skip:focus { top: .75rem; }

/* سربرگ: لوگو و نام دوسطری مثل سربرگ نامه؛ زیرش خط نازک با نوار لهجه در سمت آغاز */
.site-head { background: var(--paper); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem .7rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; min-width: 0; flex: 1 1 auto; }
.brand-logo { width: 48px; height: 48px; flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.brand-type { font-size: .78rem; color: var(--muted); }
/* 🩸 نسخه‌ی اول nowrap داشت: نام بلند بی نوع موسسه روی دکمه‌ی منو افتاد (سایت زنده، ۳۹۰). نام می‌شکند، کوچک نمی‌شود. */
.brand-proper { font-size: 1.05rem; font-weight: 700; color: var(--accent); text-wrap: balance; }
.head-rule { height: 1px; background: var(--rule); position: relative; }
.head-rule::after { content: ""; position: absolute; inset-inline-start: 0; top: -1px; width: 7rem; height: 3px; background: var(--accent); }

/* منو: دسکتاپ ردیفی؛ موبایل `<details>` بومی (بی JS) */
.site-nav { display: none; }
.site-nav a, .menu-nav a, .foot-nav a { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"], .menu-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.menu { position: relative; flex-shrink: 0; }
.menu > summary { list-style: none; cursor: pointer; min-height: 44px; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: .6rem; display: flex; align-items: center; font-weight: 700; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--surface); }
.menu-nav { position: absolute; inset-inline-end: 0; top: calc(100% + .4rem); z-index: 5; display: flex; flex-direction: column; min-width: 12rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgb(0 0 0 / .08); padding: .4rem; }
.menu-nav a { padding: .7rem .8rem; border-radius: .5rem; }
.menu-nav a:hover { background: var(--surface); }

main { padding-block: 1.75rem 3rem; flex: 1 0 auto; }

/* دکمه‌ها: کف لمس ۴۴px */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.2rem; border-radius: .6rem; font-weight: 700; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #4a1212; }
.btn-outline { border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.25rem; }

/* خانه */
.intro { max-width: var(--measure); padding-block: .5rem 1.5rem; }
/* آکادمی: عنوان و بند معرفی کنار دکمه‌ها، نه پس از کل بدنه (🩸 ساخت اول: یک بند دیگر میان معرفی و دکمه‌ها افتاد) */
.academy { max-width: var(--measure); padding-block: 0 1.5rem; }
.academy .actions { margin-block: .75rem 0; }
.lead { font-size: 1.1rem; color: var(--muted); }
.list { margin-top: 1rem; }
.list > h2 { padding-bottom: .4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.list-intro { max-width: var(--measure); color: var(--muted); margin-top: -.5rem; }
.more-all { margin-top: 1.5rem; }

/* کارت: کل کارت یک پیوند؛ نام پیوند = عنوان. موبایل = ردیف فشرده (پوستر کوچک کنار متن) تا فهرست پیمایش‌پذیر بماند؛
   پوستر تمام‌عرض در ۳۹۰ هر کارت را یک صفحه می‌کرد. از ۴۰rem ستونی. پوستر همیشه ۳:۴ و کامل: 🩸 نسخه‌ی قبلی در موبایل
   پوستر را تا ارتفاع متن کش می‌داد و با cover نیمی از آن بریده می‌شد (سایت زنده). */
.cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-link { display: flex; height: 100%; color: inherit; text-decoration: none; }
.card-link:hover .card-title { color: var(--accent); }
.card-media { width: 7rem; flex-shrink: 0; align-self: flex-start; aspect-ratio: 3 / 4; background: var(--surface); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: .8rem .9rem .9rem; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.card-title { margin-bottom: .3rem; }
.card-meta { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.card-summary { font-size: .92rem; color: var(--muted); margin-bottom: .8rem; }
.card-more { margin-top: auto; color: var(--accent); font-weight: 700; font-size: .9rem; }

/* کارگاه / رویداد */
.item { display: grid; gap: 1.5rem; }
.item-media img { border-radius: var(--radius); border: 1px solid var(--line); }
.facts { margin: 1rem 0; padding: .75rem 1rem; background: var(--surface); border-radius: var(--radius); display: grid; gap: .35rem; }
.facts div { display: flex; gap: .75rem; }
.facts dt { color: var(--muted); min-width: 3.5rem; }
.facts dd { margin: 0; font-weight: 700; }
.note { color: var(--muted); }

/* متن بلند: ستون خوانا */
.page, .post, .list-page > .lead { max-width: var(--measure); }
.post-meta { color: var(--muted); font-size: .9rem; }
.post-media img { border-radius: var(--radius); margin-block: 1rem; }
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-inline-start: 1.25rem; }
.prose img { border-radius: var(--radius); }
.prose blockquote { margin: 1em 0; padding: .2em 1em; border-inline-start: 3px solid var(--accent); color: var(--muted); }

/* پانویس: پژواک پانویس سربرگ (خط نازک و نوار لهجه در سمت پایان) */
.site-foot { background: var(--surface); padding-block: 0 1.5rem; margin-top: 2rem; }
.foot-rule { height: 1px; background: var(--rule); position: relative; }
.foot-rule::after { content: ""; position: absolute; inset-inline-end: 0; top: -1px; width: 7rem; height: 3px; background: var(--accent); }
.foot-row { display: grid; gap: 1rem; padding-block: 1.5rem 1rem; }
.foot-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--accent); }
.foot-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.foot-nav a { display: inline-flex; min-height: 44px; align-items: center; }
.foot-contact { font-style: normal; color: var(--muted); font-size: .92rem; display: grid; gap: .25rem; }
.copy { color: var(--muted); font-size: .82rem; margin: 0; }

@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .card-link { flex-direction: column; }
  .card-media { width: auto; align-self: stretch; }
  .card-body { padding: .9rem 1rem 1rem; }
  h1 { font-size: 1.85rem; }
  .brand-proper { font-size: 1.15rem; }
  .item.has-media { grid-template-columns: minmax(0, 18rem) 1fr; align-items: start; }
}
@media (min-width: 64rem) {
  .brand-logo { width: 60px; height: 60px; }
  .site-nav { flex-shrink: 0; }
  .brand-proper { font-size: 1.35rem; }
  .brand-type { font-size: .85rem; }
  .menu { display: none; }
  .site-nav { display: flex; gap: 1.75rem; }
  .site-nav a { padding-block: .4rem; font-weight: 700; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .prose { font-size: 1.1rem; }
  .foot-row { grid-template-columns: auto 1fr auto; align-items: center; }
  .foot-nav { justify-content: center; }
}
@media print {
  .site-nav, .menu, .skip, .actions { display: none; }
}
