/* =====================================================================
   دبیرستان نمونه دولتی یادگار امام - سیستم طراحی (الهام از Duolingo)
   ===================================================================== */
@font-face {
  font-family: "IRANYekan";
  src: url("../fonts/iranyekan.woff2") format("woff2"),
       url("https://rozup.ir/view/4258445/iranyekan.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: rgb(202, 255, 77);
  --primary-shadow: #8fcc1f;
  --primary-ink: #253b00;
  --primary-soft: rgba(202, 255, 77, .22);

  --blue: #1cb0f6;   --blue-shadow: #1899d6;
  --orange: #ff9600; --orange-shadow: #e08600;
  --red: #ff4b4b;    --red-shadow: #ea2b2b;
  --purple: #ce82ff; --purple-shadow: #a568cc;
  --yellow: #ffc800; --yellow-shadow: #e0a800;
  --green: #58cc02;  --green-shadow: #46a302;

  --bg: #f7f9f2;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --border: #e5e5e5;
  --border-strong: #d7d7d7;
  --text: #3c3c3c;
  --heading: #2b2b2b;
  --muted: #777777;
  --overlay: rgba(246, 250, 238, .86);
  --nav-bg: rgba(255, 255, 255, .88);

  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --nav-h: 66px;
  --nav-gap: 12px;
  --tab-h: 70px;
  --container: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

[data-theme="dark"] {
  --primary-shadow: #7aad12;
  --primary-soft: rgba(202, 255, 77, .12);
  --bg: #131f24;
  --surface: #1a2a31;
  --surface-2: #202f36;
  --border: #37464f;
  --border-strong: #46565f;
  --text: #dce6eb;
  --heading: #f1f7fb;
  --muted: #8fa3ad;
  --overlay: rgba(19, 31, 36, .9);
  --nav-bg: rgba(26, 42, 49, .88);
  color-scheme: dark;
}

/* ---------------------------- پایه ---------------------------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 30px); }
body {
  margin: 0;
  font-family: "IRANYekan", Tahoma, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.45; margin: 0 0 .5em; font-weight: 900; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--primary); color: var(--primary-ink); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.ltr { direction: ltr; text-align: left; }
.mt { margin-top: 20px; } .mt-sm { margin-top: 10px; } .mb { margin-bottom: 18px; }
.skip-link { position: absolute; right: -999px; top: 8px; z-index: 999; background: var(--primary); color: var(--primary-ink); padding: 8px 16px; border-radius: 12px; font-weight: 800; }
.skip-link:focus { right: 8px; }

/* پس‌زمینه تصویری با افکت بلور */
.site-bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.site-bg::before {
  content: ""; position: absolute; inset: -30px;
  background: var(--bg-image) center / cover no-repeat;
  filter: blur(8px) saturate(1.1);
  transform: translateZ(0);
}
.site-bg::after { content: ""; position: absolute; inset: 0; background: var(--overlay); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
.container.narrow { max-width: 880px; }
.main { padding-top: calc(var(--nav-h) + var(--nav-gap) + 16px); min-height: 60vh; }

/* ---------------------------- دکمه‌های سه‌بعدی ---------------------------- */
.btn {
  --b: var(--surface); --s: var(--border-strong); --c: var(--text);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: 0; border-radius: 16px;
  background: var(--b); color: var(--c);
  font-weight: 800; font-size: 15px; line-height: 1.3; letter-spacing: 0;
  box-shadow: 0 4px 0 var(--s);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
  user-select: none; white-space: nowrap; text-align: center;
  margin-bottom: 4px;
}
.btn:hover { filter: brightness(1.04); }
.btn:active, .btn.is-pressed { transform: translateY(4px); box-shadow: 0 0 0 var(--s); }
.btn[disabled], .btn[aria-disabled="true"] { --b: var(--surface-2); --c: var(--muted); --s: var(--border); cursor: not-allowed; filter: none; }
.btn-primary { --b: var(--primary); --s: var(--primary-shadow); --c: var(--primary-ink); }
.btn-blue    { --b: var(--blue);    --s: var(--blue-shadow);    --c: #fff; }
.btn-danger  { --b: var(--red);     --s: var(--red-shadow);     --c: #fff; }
.btn-orange  { --b: var(--orange);  --s: var(--orange-shadow);  --c: #fff; }
.btn-white   { --b: #fff; --s: rgba(0,0,0,.18); --c: var(--primary-ink); }
.btn-ghost   { --b: var(--surface); --s: var(--border); --c: var(--blue); border: 2px solid var(--border); box-shadow: 0 4px 0 var(--border); }
.btn-ghost:active { box-shadow: 0 0 0 var(--border); }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 14px; border-radius: 13px; }
.btn-lg { min-height: 56px; padding: 12px 26px; font-size: 17px; border-radius: 18px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.icon-btn {
  --b: var(--surface); --s: var(--border); --c: var(--muted);
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 14px; border: 2px solid var(--border); background: var(--b); color: var(--c);
  box-shadow: 0 3px 0 var(--s); transition: transform .08s, box-shadow .08s; font-size: 17px; padding: 0;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--s); }
.icon-btn.c-blue { --c: var(--blue); } .icon-btn.c-red { --c: var(--red); } .icon-btn.c-green { --c: var(--green-shadow); }
.icon-btn.c-orange { --c: var(--orange); } .icon-btn.c-purple { --c: var(--purple-shadow); }

/* رنگ‌های آیکون */
.c-green  { --ic: var(--primary); --ic-s: var(--primary-shadow); --ic-t: var(--primary-ink); }
.c-blue   { --ic: var(--blue);    --ic-s: var(--blue-shadow);    --ic-t: #fff; }
.c-orange { --ic: var(--orange);  --ic-s: var(--orange-shadow);  --ic-t: #fff; }
.c-red    { --ic: var(--red);     --ic-s: var(--red-shadow);     --ic-t: #fff; }
.c-purple { --ic: var(--purple);  --ic-s: var(--purple-shadow);  --ic-t: #fff; }
.c-yellow { --ic: var(--yellow);  --ic-s: var(--yellow-shadow);  --ic-t: #4a3500; }
.big-icon, .stat-icon, .feature-icon, .fc-icon {
  display: inline-grid; place-items: center; flex: none;
  background: var(--ic, var(--primary)); color: var(--ic-t, var(--primary-ink));
  box-shadow: 0 4px 0 var(--ic-s, var(--primary-shadow));
}
.big-icon { width: 64px; height: 64px; border-radius: 20px; font-size: 28px; margin-bottom: 12px; }
.stat-icon { width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }
.feature-icon { width: 58px; height: 58px; border-radius: 18px; font-size: 24px; }

/* ---------------------------- کارت ---------------------------- */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--border);
}
.card.pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; display: flex; align-items: center; gap: 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; min-height: 36px;
  border-radius: 999px; border: 2px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.chip small { background: var(--surface-2); border-radius: 99px; padding: 0 8px; font-size: 12px; }
.chip-sm { min-height: 28px; padding: 2px 10px; font-size: 13px; }
.chip.is-active, .chip-green { background: var(--primary); border-color: var(--primary-shadow); color: var(--primary-ink); }
.chip-blue { background: rgba(28,176,246,.12); border-color: rgba(28,176,246,.35); color: var(--blue-shadow); }
.chip-orange { background: rgba(255,150,0,.12); border-color: rgba(255,150,0,.35); color: #c86f00; }
.chip-red { background: rgba(255,75,75,.12); border-color: rgba(255,75,75,.35); color: var(--red-shadow); }
[data-theme="dark"] .chip-blue { color: var(--blue); } [data-theme="dark"] .chip-orange { color: var(--orange); } [data-theme="dark"] .chip-red { color: var(--red); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.eyebrow { display: inline-block; font-size: 14px; font-weight: 800; color: #4a7400; background: var(--primary-soft); padding: 2px 12px; border-radius: 99px; margin-bottom: 8px; }
[data-theme="dark"] .eyebrow { color: var(--primary); }

/* ---------------------------- نوار ناوبری شناور ---------------------------- */
.nav-shell { position: fixed; top: 0; inset-inline: 0; z-index: 60; padding: var(--nav-gap) var(--nav-gap) 0; pointer-events: none; transition: transform .35s var(--ease); }
.nav-shell.is-hidden { transform: translateY(calc(-100% - 20px)); }
.navbar, .drawer { pointer-events: auto; max-width: var(--container); margin-inline: auto; }
.navbar {
  height: var(--nav-h); display: flex; align-items: center; gap: 14px; padding: 0 12px 0 10px;
  background: var(--nav-bg); border: 2px solid var(--border); border-radius: 22px;
  box-shadow: 0 4px 0 var(--border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: box-shadow .25s, height .25s var(--ease);
}
.nav-shell.is-scrolled .navbar { box-shadow: 0 4px 0 var(--border), 0 12px 30px rgba(0,0,0,.08); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 42px; height: 42px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 17px; font-weight: 900; color: var(--heading); }
.brand-text small { font-size: 12px; color: var(--muted); font-weight: 700; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a { display: block; padding: 8px 16px; border-radius: 14px; font-weight: 800; color: var(--muted); transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--surface-2); color: var(--heading); }
.nav-links a.is-active { background: var(--primary-soft); color: var(--heading); box-shadow: inset 0 -3px 0 var(--primary); }
.nav-actions { display: flex; gap: 8px; align-items: center; margin-inline-start: auto; }
.nav-links + .nav-actions { margin-inline-start: 0; }
.nav-user { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 12px; border-radius: 14px; border: 2px solid var(--border); font-weight: 800; box-shadow: 0 3px 0 var(--border); }
.nav-user span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; color: var(--yellow); }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
.burger { display: grid; gap: 4px; width: 20px; }
.burger i { display: block; height: 3px; border-radius: 3px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
.menu-open .burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .burger i:nth-child(2) { opacity: 0; }
.menu-open .burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-open .menu-toggle { --c: var(--heading); border-color: var(--primary-shadow); background: var(--primary); color: var(--primary-ink); }

/* منوی کشویی از بالا به پایین - هم‌عرض نوار ناوبری */
.drawer {
  margin-top: 10px; padding: 16px;
  background: var(--surface); border: 2px solid var(--border); border-radius: 22px; box-shadow: 0 4px 0 var(--border), 0 20px 40px rgba(0,0,0,.12);
  transform-origin: top center; transform: translateY(-14px) scaleY(.96); opacity: 0; visibility: hidden;
  clip-path: inset(0 0 100% 0 round 22px);
  transition: transform .32s var(--ease), opacity .22s ease, clip-path .36s var(--ease), visibility 0s linear .36s;
  max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto; overscroll-behavior: contain;
}
.menu-open .drawer { transform: none; opacity: 1; visibility: visible; clip-path: inset(0 0 0 0 round 22px); transition-delay: 0s; }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 55; background: rgba(10, 20, 10, .28);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .3s ease;
}
.menu-open .drawer-backdrop { opacity: 1; }
.menu-open { overflow: hidden; }

/* کارت پروفایل داخل منو - عرض محدود تا در دسکتاپ کشیده نشود */
.drawer-user {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border-radius: 16px; background: var(--surface-2); margin-bottom: 12px;
  width: 100%; max-width: 420px; min-width: 0; overflow: hidden;
}
.drawer-user span { display: flex; flex-direction: column; line-height: 1.5; flex: 1 1 auto; min-width: 0; }
.drawer-user b, .drawer-user small {
  display: block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drawer-user small { color: var(--muted); }
.drawer-user > i { flex: none; color: var(--muted); font-size: 14px; }
.drawer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drawer-link {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px;
  border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); font-weight: 800; font-size: 14px; text-align: center;
  transition: transform .08s, box-shadow .08s;
}
.drawer-link i { font-size: 22px; color: var(--blue); }
.drawer-link:active { transform: translateY(3px); box-shadow: none; }
.drawer-link.is-active { background: var(--primary-soft); border-color: var(--primary-shadow); box-shadow: 0 3px 0 var(--primary-shadow); }
.drawer-link.is-active i { color: var(--primary-shadow); }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.drawer .drawer-link, .drawer .drawer-user, .drawer .drawer-actions { opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .3s var(--ease); }
.menu-open .drawer .drawer-link, .menu-open .drawer .drawer-user, .menu-open .drawer .drawer-actions { opacity: 1; transform: none; transition-delay: .08s; }

/* ---------------------------- نوار تب پایین ---------------------------- */
.tabbar {
  position: fixed; z-index: 50; bottom: calc(10px + var(--safe-b)); inset-inline: 10px; height: var(--tab-h);
  display: none; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 6px;
  background: var(--nav-bg); border: 2px solid var(--border); border-radius: 24px; box-shadow: 0 4px 0 var(--border), 0 10px 30px rgba(0,0,0,.1);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .35s var(--ease);
}
.tabbar.is-hidden { transform: translateY(calc(100% + 30px)); }
.tab { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; color: var(--muted); font-size: 12px; font-weight: 800; border-radius: 18px; transition: color .25s; }
.tab i { font-size: 20px; transition: transform .3s var(--ease); }
.tab.is-active { color: var(--primary-ink); }
.tab.is-active i { transform: translateY(-2px) scale(1.1); }
.tab:active i { transform: scale(.85); }
.tabbar-indicator {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; right: 6px; width: calc((100% - 12px) / 5);
  background: var(--primary); border-radius: 18px; box-shadow: inset 0 -4px 0 var(--primary-shadow);
  transform: translateX(var(--tab-x, 0)); transition: transform .4s var(--ease), opacity .2s; opacity: 0;
}
.tabbar.has-active .tabbar-indicator { opacity: 1; }

/* ---------------------------- HERO ---------------------------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 30px; padding-bottom: 30px; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 99px; background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); font-weight: 800; font-size: 14px; }
.badge-pill i { color: var(--orange); }
.hero-title { font-size: clamp(32px, 5vw, 58px); line-height: 1.3; margin: 18px 0 14px; letter-spacing: -.5px; }
.hero-school { display: block; margin-top: 10px; font-size: .5em; color: var(--primary-ink); background: var(--primary); width: fit-content; padding: 2px 18px 6px; border-radius: 16px; box-shadow: 0 5px 0 var(--primary-shadow); transform: rotate(-1.5deg); }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.grade-row { display: flex; gap: 10px; flex-wrap: wrap; }
.grade-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 16px; background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); font-weight: 800; }
.grade-chip b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; font-size: 15px; }
.g10 b { background: var(--blue); box-shadow: 0 3px 0 var(--blue-shadow); }
.g11 b { background: var(--orange); box-shadow: 0 3px 0 var(--orange-shadow); }
.g12 b { background: var(--purple); box-shadow: 0 3px 0 var(--purple-shadow); }
.hero-visual { position: relative; }
.hero-photo { border-radius: 32px; overflow: hidden; border: 3px solid var(--surface); box-shadow: 0 8px 0 var(--border), 0 30px 60px rgba(0,0,0,.14); transform: rotate(1.5deg); aspect-ratio: 4 / 3.2; background: var(--surface-2); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 16px; background: var(--surface); border: 2px solid var(--border); border-radius: 18px; box-shadow: 0 4px 0 var(--border); font-size: 14px; line-height: 1.45; animation: bob 5s ease-in-out infinite; }
.float-card span:last-child { display: flex; flex-direction: column; }
.float-card small { color: var(--muted); font-size: 12px; }
.fc-icon { width: 40px; height: 40px; border-radius: 13px; font-size: 18px; }
.fc-1 { bottom: -18px; right: -12px; }
.fc-2 { top: 18px; left: -16px; animation-delay: -2.5s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.stat div { display: flex; flex-direction: column; line-height: 1.5; }
.stat b { font-size: 18px; color: var(--heading); }
.stat small { color: var(--muted); font-size: 14px; }

/* ---------------------------- بخش‌ها ---------------------------- */
.section { padding-top: 60px; padding-bottom: 10px; }
.section-sm { padding-top: 36px; }
.section-head { text-align: center; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 36px); margin: 0; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; text-align: right; gap: 12px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; padding: 22px; align-items: center; }
.about-media { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-sticker { position: absolute; bottom: 14px; left: 14px; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: var(--primary); color: var(--primary-ink); font-size: 26px; box-shadow: 0 4px 0 var(--primary-shadow); }
.about-text h2 { font-size: clamp(24px, 3vw, 34px); }
.about-text p { color: var(--muted); font-size: 17px; }

.why-card { padding: 24px 20px; text-align: center; transition: transform .2s var(--ease); }
.why-card:hover { transform: translateY(-4px); }
.why-card h3 { font-size: 19px; margin-top: 4px; }
.why-card p { color: var(--muted); margin: 0; font-size: 15px; }

.manager { display: grid; grid-template-columns: 260px 1fr; gap: 30px; padding: 26px; align-items: center; background: linear-gradient(135deg, var(--surface) 55%, var(--primary-soft)); }
.manager-photo { aspect-ratio: 1; border-radius: 30px; overflow: hidden; background: var(--primary); border: 3px solid var(--primary-shadow); box-shadow: 0 6px 0 var(--primary-shadow); display: grid; place-items: center; }
.manager-photo img { width: 100%; height: 100%; object-fit: cover; }
.manager-initial { font-size: 90px; color: var(--primary-ink); }
.manager-info h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 8px; }
.manager-bio { color: var(--muted); margin-top: 14px; }
.speech { position: relative; margin: 16px 0 0; padding: 18px 22px; background: var(--surface); border: 2px solid var(--border); border-radius: 20px; box-shadow: 0 4px 0 var(--border); font-size: 17px; font-weight: 700; color: var(--heading); }
.speech i { color: var(--primary-shadow); font-size: 22px; margin-left: 10px; }
.speech::before { content: ""; position: absolute; top: -12px; right: 34px; width: 20px; height: 20px; background: var(--surface); border-top: 2px solid var(--border); border-right: 2px solid var(--border); transform: rotate(-45deg); }

.feature-card { display: flex; gap: 16px; padding: 20px; align-items: flex-start; }
.feature-card h3 { font-size: 18px; margin-bottom: 4px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 15px; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; }
.gallery-item { position: relative; padding: 0; border: 3px solid var(--surface); border-radius: 22px; overflow: hidden; background: var(--surface-2); box-shadow: 0 5px 0 var(--border); cursor: zoom-in; }
.gallery-item.wide { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-cap { position: absolute; bottom: 10px; right: 10px; padding: 2px 12px; border-radius: 99px; background: rgba(255,255,255,.92); color: #333; font-size: 13px; font-weight: 800; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.86); display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
.lightbox figure { margin: 0; max-width: 1100px; }
.lightbox img { max-height: 80vh; border-radius: 18px; margin: auto; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: 10px; font-weight: 800; }
.lightbox-close { position: absolute; top: 16px; left: 16px; }

.faq-list { display: grid; gap: 12px; }
.faq { padding: 0; overflow: hidden; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; font-weight: 800; font-size: 17px; cursor: pointer; color: var(--heading); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--blue); transition: transform .25s var(--ease); flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(28,176,246,.12); }
.faq[open] summary i { transform: rotate(180deg); }
.faq[open] { border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-shadow); }
.faq-body { padding: 0 20px 18px; color: var(--muted); }

.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 34px; border-radius: var(--radius-lg); background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 0 var(--primary-shadow); flex-wrap: wrap; }
.cta-band h2 { color: var(--primary-ink); margin-bottom: 4px; font-size: clamp(22px, 3vw, 30px); }
.cta-band p { margin: 0; font-weight: 700; opacity: .8; }

/* ---------------------------- کارت مطالب ---------------------------- */
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 0 var(--border); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 0 var(--border); }
.post-card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; align-items: flex-start; }
.post-card-title { font-size: 18px; margin: 0; line-height: 1.6; }
.post-card-title a:hover { color: var(--blue); }
.post-card-summary { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.post-card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; width: 100%; padding-top: 10px; border-top: 2px dashed var(--border); }
.post-card-meta i { margin-left: 3px; }

.h-scroller { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.h-scroller > * { scroll-snap-align: start; flex: 0 0 280px; }
.post-card.mini .post-card-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.see-more-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); padding: 20px; font-weight: 800; }
.see-more-card small { color: var(--muted); }
.see-more-card:hover { border-color: var(--primary-shadow); background: var(--primary-soft); }
.scroller-nav { display: flex; gap: 8px; }

/* ---------------------------- صفحات داخلی ---------------------------- */
.page-top { padding-top: 16px; }
.page-hero { padding: 26px; text-align: center; margin-bottom: 20px; display: flex; flex-direction: column; align-items: center; }
.page-hero h1 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 4px; }
.page-hero p { color: var(--muted); margin: 0 0 10px; }
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.crumbs i { font-size: 10px; }
.crumbs a:hover { color: var(--blue); }
.search-box { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 560px; margin-top: 10px; padding: 6px 8px 6px 6px; padding-right: 16px; background: var(--surface); border: 2px solid var(--border); border-radius: 18px; box-shadow: 0 4px 0 var(--border); }
.search-box i { color: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 16px; padding: 8px 4px; }
.search-box .btn { margin: 0; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-shadow); }
.search-box.sm { margin: 0; max-width: 340px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 12px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; }
.empty > i { font-size: 48px; color: var(--border-strong); margin-bottom: 10px; }
.big-num { font-size: 90px; font-weight: 900; color: var(--primary-shadow); line-height: 1; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 26px; }
.pager > :first-child { justify-self: start; } .pager > :last-child { justify-self: end; }
.pager-info { font-weight: 800; color: var(--muted); }

/* پست */
.post-head { margin: 10px 0 20px; }
.post-head h1 { font-size: clamp(26px, 4.4vw, 42px); margin: 14px 0 10px; }
.post-lead { font-size: 18px; color: var(--muted); }
.post-meta { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.author-chip { display: flex; align-items: center; gap: 10px; }
.author-chip span { display: flex; flex-direction: column; line-height: 1.5; }
.tag-teacher { display: inline-block; width: fit-content; font-size: 12px; font-weight: 800; background: var(--primary); color: var(--primary-ink); padding: 0 10px; border-radius: 99px; box-shadow: 0 2px 0 var(--primary-shadow); }
.meta-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-pills span { font-size: 13px; color: var(--muted); background: var(--surface); border: 2px solid var(--border); padding: 2px 12px; border-radius: 99px; font-weight: 700; }
.post-cover { margin: 0 0 20px; border-radius: 26px; overflow: hidden; border: 3px solid var(--surface); box-shadow: 0 6px 0 var(--border); aspect-ratio: 16 / 9; background: var(--surface-2); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.share-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-top: 16px; flex-wrap: wrap; font-weight: 800; }
.share-edit { margin-inline-start: auto; }

/* محتوای غنی پست */
.post-content { padding: 26px; font-size: 17px; line-height: 2.05; overflow-wrap: anywhere; }
.post-content > :first-child { margin-top: 0; }
.post-content > :last-child { margin-bottom: 0; }
.post-content h2 { font-size: 26px; margin: 1.4em 0 .5em; }
.post-content h3 { font-size: 22px; margin: 1.3em 0 .5em; }
.post-content h4 { font-size: 19px; margin: 1.2em 0 .4em; }
.post-content a:not(.pb):not(.file-card) { color: var(--blue); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: rgba(28,176,246,.4); }
.post-content img { border-radius: 18px; margin: 1em auto; height: auto; }
.post-content figure { margin: 1.4em 0; text-align: center; }
.post-content figure img { margin: 0 auto; }
.post-content figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.post-content video, .post-content audio { width: 100%; border-radius: 18px; margin: 1em 0; background: #000; }
.post-content audio { background: transparent; }
.post-content .embed, .post-content iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; margin: 1em 0; }
.post-content .embed iframe { margin: 0; height: 100%; }
.post-content blockquote { margin: 1.4em 0; padding: 14px 20px; border-right: 6px solid var(--primary); background: var(--primary-soft); border-radius: 16px; font-weight: 700; color: var(--heading); }
.post-content pre { direction: ltr; text-align: left; background: #1e2a30; color: #d8f5a2; padding: 16px; border-radius: 16px; overflow-x: auto; font-size: 14px; line-height: 1.7; }
.post-content code { font-family: Consolas, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.post-content pre code { background: none; padding: 0; }
.post-content ul, .post-content ol { padding-right: 26px; }
.post-content li { margin-bottom: 6px; }
.post-content ul li::marker { color: var(--primary-shadow); }
.post-content hr { border: 0; height: 4px; background: var(--border); border-radius: 4px; margin: 2em 0; }
.post-content table { width: 100%; border-collapse: separate; border-spacing: 0; border: 2px solid var(--border); border-radius: 14px; overflow: hidden; margin: 1.2em 0; display: block; overflow-x: auto; }
.post-content th, .post-content td { padding: 10px 14px; border-bottom: 2px solid var(--border); border-left: 2px solid var(--border); text-align: right; }
.post-content th { background: var(--surface-2); font-weight: 800; }
.post-content mark { background: var(--yellow); color: #3a2a00; padding: 0 4px; border-radius: 4px; }
.pb { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 16px; font-weight: 800; margin: 6px 0 10px; background: var(--primary); color: var(--primary-ink) !important; box-shadow: 0 4px 0 var(--primary-shadow); text-decoration: none !important; transition: transform .08s, box-shadow .08s; }
.pb:active { transform: translateY(4px); box-shadow: none; }
.pb-blue { background: var(--blue); color: #fff !important; box-shadow: 0 4px 0 var(--blue-shadow); }
.pb-orange { background: var(--orange); color: #fff !important; box-shadow: 0 4px 0 var(--orange-shadow); }
.pb-red { background: var(--red); color: #fff !important; box-shadow: 0 4px 0 var(--red-shadow); }
.pb-purple { background: var(--purple); color: #fff !important; box-shadow: 0 4px 0 var(--purple-shadow); }
.file-card { display: flex !important; align-items: center; gap: 12px; padding: 12px 16px; margin: 12px 0; border: 2px solid var(--border); border-radius: 16px; box-shadow: 0 4px 0 var(--border); background: var(--surface); text-decoration: none !important; color: var(--heading) !important; font-weight: 800; }
.file-card i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-shadow); flex: none; font-size: 18px; }
.file-card:hover { border-color: var(--blue); }
.post-note { padding: 14px 18px; border-radius: 16px; margin: 1.2em 0; border: 2px solid; }
.post-note > :last-child { margin-bottom: 0; }
.note-blue { background: rgba(28,176,246,.1); border-color: rgba(28,176,246,.4); }
.note-green { background: var(--primary-soft); border-color: var(--primary-shadow); }
.note-orange { background: rgba(255,150,0,.1); border-color: rgba(255,150,0,.4); }
.note-red { background: rgba(255,75,75,.1); border-color: rgba(255,75,75,.4); }

/* نظرات */
.comment-form { padding: 18px; margin-bottom: 18px; }
.comment-me { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.login-hint { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.login-hint .big-icon { margin: 0; width: 52px; height: 52px; font-size: 22px; }
.login-hint div { flex: 1; min-width: 180px; }
.login-hint p { margin: 0; color: var(--muted); font-size: 14px; }
.comment-list { display: grid; gap: 12px; }
.comment { display: flex; gap: 12px; padding: 16px; align-items: flex-start; }
.comment.is-pending { border-style: dashed; opacity: .85; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.comment-head time { font-size: 13px; margin-inline-start: auto; }
.comment p { margin: 0; overflow-wrap: anywhere; }

/* آواتار */
.avatar { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar-sm { width: 34px; height: 34px; border-radius: 11px; font-size: 15px; }
.avatar-md { width: 46px; height: 46px; border-radius: 15px; font-size: 19px; }
.avatar-xl { width: 110px; height: 110px; border-radius: 32px; font-size: 44px; }
.avatar-letter { display: inline-grid; place-items: center; font-weight: 900; background: var(--ic); color: var(--ic-t); box-shadow: inset 0 -3px 0 var(--ic-s); }

/* ---------------------------- فرم‌ها ---------------------------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 800; margin-bottom: 6px; color: var(--heading); font-size: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface-2); border: 2px solid var(--border); outline: 0; font-size: 16px;
  transition: border-color .15s, background .15s;
}
textarea.input { resize: vertical; line-height: 1.9; }
.input:focus { border-color: var(--blue); background: var(--surface); }
.input.sm { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.input-lg { font-size: 20px; font-weight: 800; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 22px, 12px 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-left: 34px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-right: 44px; }
.input-icon .input.ltr { padding-right: 44px; padding-left: 44px; }
.pass-toggle { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 10px; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row .input { flex: 1; min-width: 0; font-size: 20px; letter-spacing: 6px; text-align: center; font-weight: 800; }
.captcha-img { width: 150px; height: 50px; border-radius: 14px; border: 2px solid var(--border); object-fit: cover; flex: none; background: #fff; }
.seg { display: flex; gap: 8px; }
.seg-item { flex: 1; position: relative; }
.seg-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-item span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 8px; border: 2px solid var(--border); border-radius: 16px; box-shadow: 0 4px 0 var(--border); font-weight: 800; color: var(--muted); transition: all .12s; text-align: center; }
.seg-item span b { font-size: 20px; color: var(--heading); line-height: 1.2; }
.seg-item input:checked + span { border-color: var(--blue); background: rgba(28,176,246,.1); color: var(--blue-shadow); box-shadow: 0 4px 0 var(--blue); }
.seg-item input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; cursor: pointer; font-weight: 700; }
.check input { width: 22px; height: 22px; accent-color: var(--primary-shadow); flex: none; }
.check a { color: var(--blue); }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; font-weight: 700; border: 2px solid; }
.alert-error { background: rgba(255,75,75,.1); border-color: rgba(255,75,75,.4); color: var(--red-shadow); }
.alert-info { background: rgba(28,176,246,.1); border-color: rgba(28,176,246,.4); color: var(--blue-shadow); }
[data-theme="dark"] .alert-error { color: #ff8a8a; } [data-theme="dark"] .alert-info { color: var(--blue); }
.upload-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; border: 2px dashed var(--border-strong); border-radius: 18px; cursor: pointer; text-align: center; position: relative; transition: border-color .15s, background .15s; }
.upload-drop:hover { border-color: var(--blue); background: rgba(28,176,246,.05); }
.upload-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-preview { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 30px; overflow: hidden; background: var(--surface-2); font-size: 40px; color: var(--muted); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .avatar-xl { width: 100%; height: 100%; }
.upload-preview.wide { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; }

/* احراز هویت */
.auth-wrap { display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 480px; padding: 26px 22px; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head h1 { font-size: 26px; margin-bottom: 0; }
.auth-switch { text-align: center; margin: 14px 0 0; font-weight: 700; color: var(--muted); }
.auth-switch a { color: var(--blue); font-weight: 800; }

/* پروفایل */
.profile-hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px; align-items: center; margin-bottom: 16px; }
.profile-id h1 { font-size: 26px; margin-bottom: 8px; }
.profile-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profile-stats div { display: flex; flex-direction: column; align-items: center; padding: 10px; border: 2px solid var(--border); border-radius: 16px; text-align: center; }
.profile-stats b { font-size: 17px; color: var(--heading); }
.profile-stats small { color: var(--muted); }
.admin-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 16px; }
.admin-banner .big-icon { margin: 0; width: 50px; height: 50px; font-size: 20px; }
.admin-banner div { flex: 1; display: flex; flex-direction: column; }
.admin-banner small { color: var(--muted); }
.tabs-card { padding: 18px; margin-bottom: 16px; }
.seg-tabs { margin-bottom: 18px; background: var(--surface-2); padding: 5px; border-radius: 16px; }
.seg-tab { flex: 1; border: 0; background: transparent; min-height: 44px; border-radius: 12px; font-weight: 800; color: var(--muted); transition: background .2s, color .2s; }
.seg-tab.is-active { background: var(--surface); color: var(--heading); box-shadow: 0 3px 0 var(--border); }
.tab-pane { display: none; animation: fade .25s ease; }
.tab-pane.is-active { display: block; }
.logout-form { margin-bottom: 20px; }

/* تماس */
.contact-grid { margin-bottom: 20px; }
.contact-card { display: flex; align-items: center; gap: 14px; padding: 18px; transition: transform .2s var(--ease); }
a.contact-card:hover { transform: translateY(-3px); }
.contact-card .big-icon { margin: 0; width: 54px; height: 54px; font-size: 22px; }
.contact-card div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.contact-card small { color: var(--muted); font-weight: 700; }
.contact-card b { font-size: 17px; color: var(--heading); overflow-wrap: anywhere; }
.contact-card .go { color: var(--muted); }
.map-card { padding: 18px; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.map-head h2 { font-size: 20px; margin: 0; }
.map-head p { margin: 0; }
.map-frame { border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 8; border: 2px solid var(--border); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------------------------- فوتر ---------------------------- */
.site-footer { margin-top: 70px; padding-bottom: 20px; }
.footer-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 5px 0 var(--border); padding: 30px 28px 18px; position: relative; overflow: hidden; }
.footer-card::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--primary) 0 60px, var(--blue) 60px 120px, var(--orange) 120px 180px, var(--purple) 180px 240px); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 26px; }
.footer-brand p { color: var(--muted); margin: 14px 0; }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { font-size: 17px; margin-bottom: 6px; }
.footer-col a { color: var(--muted); font-weight: 700; width: fit-content; transition: color .15s; }
.footer-col a:hover { color: var(--blue); }
.footer-contact p { display: flex; gap: 10px; margin: 0; color: var(--muted); font-size: 15px; }
.footer-contact i { color: var(--primary-shadow); margin-top: 6px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 26px; padding-top: 16px; border-top: 2px dashed var(--border); color: var(--muted); font-size: 14px; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a:hover { color: var(--blue); }

/* ---------------------------- پیام‌ها و مودال ---------------------------- */
.toasts { position: fixed; z-index: 130; top: calc(var(--nav-h) + var(--nav-gap) + 12px); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 2px solid var(--border); box-shadow: 0 4px 0 var(--border), 0 14px 30px rgba(0,0,0,.12); font-weight: 800; pointer-events: auto; animation: toastIn .4s var(--ease); }
.toast i { font-size: 20px; }
.toast-success { border-color: var(--primary-shadow); box-shadow: 0 4px 0 var(--primary-shadow); } .toast-success i { color: var(--primary-shadow); }
.toast-error { border-color: var(--red); box-shadow: 0 4px 0 var(--red-shadow); } .toast-error i { color: var(--red); }
.toast-info { border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-shadow); } .toast-info i { color: var(--blue); }
.toast.is-leaving { opacity: 0; transform: translateY(-10px); transition: all .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes fade { from { opacity: 0; } }

.modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; background: rgba(10, 20, 10, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .25s ease; }
.modal-card { width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; background: var(--surface); border: 2px solid var(--border); border-radius: 26px; box-shadow: 0 6px 0 var(--border); padding: 26px 22px 20px; text-align: center; animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(20px); } }
.ann-icon { width: 76px; height: 76px; margin: -2px auto 14px; display: grid; place-items: center; border-radius: 24px; font-size: 34px; background: var(--ic, var(--primary)); color: var(--ic-t, var(--primary-ink)); box-shadow: 0 5px 0 var(--ic-s, var(--primary-shadow)); animation: wiggle 1.4s ease .3s; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-10deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
.modal-card h3 { font-size: 22px; }
.ann-body { padding: 0; text-align: right; font-size: 16px; color: var(--text); margin-bottom: 16px; }
.ann-actions.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ann-close .countdown { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 99px; background: rgba(0,0,0,.1); font-size: 14px; }

/* انیمیشن سبک ظاهر شدن */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------------------------- واکنش‌گرا ---------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero { gap: 26px; }
}
@media (max-width: 900px) {
  :root { --nav-h: 60px; --nav-gap: 10px; }
  .nav-links, .nav-login, .nav-user { display: none; }
  /* دکمه‌های تغییر تم و منو به سمت چپ نوار ناوبری منتقل می‌شوند */
  .navbar .nav-actions { margin-inline-start: auto; margin-inline-end: 0; }
  .tabbar { display: grid; }
  body { padding-bottom: calc(var(--tab-h) + 24px + var(--safe-b)); }
  .hero { grid-template-columns: 1fr; padding-top: 10px; text-align: center; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .hero-school { margin-inline: auto; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .grade-row { justify-content: center; }
  .hero-visual { max-width: 560px; margin: 10px auto 20px; width: 100%; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about, .manager { grid-template-columns: 1fr; }
  .manager { text-align: center; }
  .manager-photo { width: 200px; margin: auto; }
  .speech { text-align: right; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .site-footer { margin-top: 50px; }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .container { padding-inline: 12px; }
  .brand-text small { display: none; }
  .brand img { width: 38px; height: 38px; }
  .hero-title { margin-top: 14px; }
  .hero-sub { font-size: 16px; }
  .hero-cta .btn { flex: 1; min-width: 140px; }
  .fc-2 { left: -4px; top: 10px; } .fc-1 { right: -4px; }
  .stats { grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
  .section { padding-top: 44px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-4.why-grid { grid-template-columns: 1fr 1fr; }
  .section-head { margin-bottom: 18px; }
  .about { padding: 14px; gap: 16px; }
  .manager { padding: 18px; }
  .gallery-item.wide { grid-column: span 2; grid-row: span 1; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .post-content { padding: 18px; font-size: 16.5px; }
  .post-meta { flex-direction: column; align-items: flex-start; }
  .h-scroller > * { flex-basis: 78%; }
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .footer-card { padding: 26px 18px 14px; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
  .cta-band { padding: 22px; text-align: center; justify-content: center; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-info { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .pager .btn { width: 100%; }
  .profile-hero { grid-template-columns: 1fr; text-align: center; }
  .profile-hero .chips { justify-content: center; }
  .profile-avatar { margin: auto; }
  .captcha-img { width: 120px; }
  .drawer-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .drawer-link { padding: 12px 4px; font-size: 13px; }
  .map-frame { aspect-ratio: 4 / 3.4; }
  .page-hero { padding: 20px 16px; }
}
@media (hover: none) {
  .post-card:hover, .why-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}