/* Public site — ported from design/public-site/home.html. Shared tokens/buttons/chips/tables live in tokens.css and app.css. */

.public { background: var(--white); min-height: 100vh; display: flex; flex-direction: column; }
.public main { flex: 1; }
.container { max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 48px; }
.section--alt { background: var(--gray-100); }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section__title { font-size: 1.5rem; position: relative; padding-inline-start: 16px; margin: 0; }
.section__title::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 3px; background: var(--brand-orange); }
.section__title .subtitle { font-size: 1rem; margin-inline-start: 10px; }
.link { color: var(--heading); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; font-size: .95rem; }
.link:hover { text-decoration: none; color: var(--brand-orange-dark); }
.link svg { width: 18px; height: 18px; }
.public svg { display: block; }
.public h1, .public h2, .public h3, .public h4 { margin: 0; font-weight: 800; }
.public p { margin: 0; }
.public ul { margin: 0; padding: 0; list-style: none; }
.public a:hover { text-decoration: none; }

/* ===== Top bar ===== */
.topbar { background: var(--brand-navy); color: #fff; font-size: .9rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.topbar .em { color: var(--brand-amber); font-weight: 700; }
/* compact CTA inside the bar; more specific than the touch rule (.btn { height: 44px } on coarse pointers) so it never fills the bar */
.topbar__inner { padding-block: 6px; }
.topbar .btn { height: 32px; padding-inline: 14px; font-size: .82rem; }

/* ===== Header (v0.2 / E1): floating glass pill, sticky ===== */
.site-header { position: sticky; top: 12px; z-index: 50; margin-top: 12px; padding-inline: 16px; background: transparent; }
.header__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; position: relative; padding-inline: 18px 10px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgb(255 255 255 / .7); border-radius: var(--r-pill); box-shadow: var(--shadow-glass); }
.logo { display: flex; align-items: center; gap: 10px; color: inherit; }
.logo__mark { width: auto; height: 42px; flex: none; }
.logo__text { font-weight: 900; color: var(--ink); font-size: 1rem; line-height: 1.25; white-space: nowrap; }
.logo__text small { display: block; font-size: .66rem; font-weight: 500; color: var(--gray-600); }
.nav { display: flex; gap: 2px; margin-inline: auto; }
.nav a { padding: 7px 12px; border-radius: var(--r-pill); color: var(--heading); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.nav a:hover, .nav a.active { background: var(--tint-blue); }
.header__actions { display: flex; gap: 6px; align-items: center; }
.nav-toggle-input { display: none; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--gray-300); border-radius: 50%; background: var(--surface); place-items: center; cursor: pointer; color: var(--heading); margin: 0; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ===== Hero (v0.2 / E1): full-bleed exam-hall photo under the floating header, navy overlay, glass next-exam card ===== */
.hero-photo { position: relative; isolation: isolate; overflow: hidden; color: #fff; margin-top: -78px; padding-block: 140px 120px; /* -78px = header margin 12 + pill 66, so the photo slides under the header but never over the top bar */ background: var(--hero-overlay), url("../img/gallery-01.jpg") center 40% / cover no-repeat var(--brand-navy); }
.hero-photo__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: center; }
.hero-photo .display { font-size: 3rem; font-weight: 900; color: #fff; line-height: 1.25; }
.hero-photo .display em { font-style: normal; color: var(--brand-amber); }
.tracks { display: flex; gap: 18px; margin: 14px 0 0; font-weight: 700; color: #DCE2F2; flex-wrap: wrap; }
.tracks span { display: inline-flex; align-items: center; gap: 6px; }
.tracks i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgb(255 255 255 / .6); }
.hero__lead { color: var(--tint-periwinkle); max-width: 52ch; margin-top: 14px; font-size: 1.05rem; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero__cta .btn { height: 46px; padding-inline: 22px; }
.next-exam { position: relative; overflow: hidden; padding: 24px; border-radius: var(--r-lg); background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 60px rgb(0 0 0 / .25); }
.next-exam::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: var(--brand-orange); filter: blur(60px); opacity: .5; inset-inline-end: -80px; top: -90px; }
.next-exam > * { position: relative; }
.next-exam__label { font-size: .8rem; color: var(--tint-periwinkle); font-weight: 600; }
.public .next-exam__title { font-size: 1.3rem; color: #fff; margin-top: 4px; line-height: 1.45; }
.next-exam__title small { display: block; font-size: .82rem; font-weight: 500; color: var(--tint-periwinkle); margin-top: 2px; }
.public .next-exam__date { margin-top: 16px; font-size: 1.6rem; font-weight: 900; color: var(--brand-amber); line-height: 1.3; }
.public .next-exam__meta { margin-top: 4px; color: #fff; font-size: .9rem; }
.next-exam__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / .18); }
.next-exam__foot .link { color: #fff; }

/* exam families (test, descriptive, first cycle: a row under the stats) */
.families { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-block: 36px 0; }
.side-card { position: relative; overflow: hidden; padding: 24px; border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 188px; color: inherit; }
.side-card .icon { position: absolute; inset-inline-end: 20px; top: 20px; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--tint-blue); color: var(--link); }
.side-card .icon svg { width: 32px; height: 32px; }
.side-card--orange .icon { background: var(--tint-peach); color: var(--brand-orange-dark); }
.side-card::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; inset-inline-start: -70px; bottom: -90px; background: var(--tint-blue); opacity: .7; }
.side-card--orange::after { background: var(--tint-peach); }
.side-card h3 { font-size: 1.25rem; margin-bottom: 2px; position: relative; color: var(--heading); }
.side-card p { color: var(--gray-600); font-size: .9rem; position: relative; max-width: 78%; }
.side-card .chips { display: flex; gap: 6px; margin-top: 10px; position: relative; }
.side-card .link { margin-top: auto; padding-top: 12px; position: relative; }

/* ===== Stats (v0.2 / E1): one white strip overlapping the hero bottom ===== */
.stats { position: relative; z-index: 2; margin-top: -60px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 24px 50px rgb(28 46 99 / .16); overflow: hidden; }
.stat { text-align: center; padding: 24px 18px; border-inline-start: 1px solid var(--border); }
.stat:first-child { border-inline-start: 0; }
.stat strong { display: block; font-size: 1.9rem; color: var(--heading); font-weight: 900; line-height: 1.3; }
.stat span { color: var(--gray-600); font-size: .9rem; }

/* ===== Exam cards ===== */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 > *, .grid-3 > *, .families > *, .band__grid > * { min-width: 0; }
.exam-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; border-radius: var(--r-lg); transition: box-shadow .15s, transform .15s; }
.exam-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.exam-card__top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.exam-card .chips { display: flex; gap: 4px; flex-wrap: wrap; }
.exam-card h3 { font-size: 1.15rem; color: var(--heading); }
.exam-card__link { color: inherit; }
.exam-card__link:hover { color: var(--brand-blue); }
.exam-card h3 small { display: block; font-size: .8rem; color: var(--gray-600); font-weight: 500; margin-top: 2px; }
.meta { display: grid; gap: 6px; font-size: .9rem; color: var(--gray-600); }
.meta li { display: flex; align-items: center; gap: 8px; }
.meta svg { width: 18px; height: 18px; color: var(--gray-600); flex: none; }
.exam-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.price__label { display: block; font-size: .72rem; color: var(--gray-600); line-height: 1.4; }
.price strong { font-size: 1.1rem; color: var(--ink); }
.price strong small { font-size: .75rem; font-weight: 500; }

/* ===== Schedule band (CSS-only tabs) ===== */
.band { background: radial-gradient(560px 320px at 0% 110%, rgb(244 123 32 / .35), transparent 60%), radial-gradient(480px 280px at 100% -10%, rgb(47 79 160 / .6), transparent 60%), var(--brand-navy); border-radius: 28px; padding: 36px; position: relative; overflow: hidden; color: #fff; }
.band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .16) 1.5px, transparent 2px); background-size: 22px 22px; mask-image: radial-gradient(circle at 15% 20%, #000, transparent 45%); }
.band > * { position: relative; }
.band__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.band__head h2 { color: #fff; font-size: 1.4rem; }
.band__head h2 small { display: block; font-size: .9rem; font-weight: 500; opacity: .85; margin-top: 2px; }
.tabs { display: flex; gap: 4px; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .14); padding: 4px; border-radius: 999px; }
.tab { padding: 5px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: #fff; cursor: pointer; border: 0; background: transparent; font-family: inherit; margin: 0; }
.band__tab-input { position: absolute; opacity: 0; pointer-events: none; }
.band__card { padding: 22px; color: var(--ink); border: 0; border-radius: var(--r-lg); }
.band__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.band__controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.band__switch .tab { padding-inline: 20px; }
.band__panel { display: none; }
/* one panel per exam type and grade tab: both radios must be checked */
#sched-test:checked ~ #sched-lfirst:checked ~ .band__card .band__panel--test-first, #sched-test:checked ~ #sched-l10:checked ~ .band__card .band__panel--test-10, #sched-test:checked ~ #sched-l11:checked ~ .band__card .band__panel--test-11, #sched-test:checked ~ #sched-l12:checked ~ .band__card .band__panel--test-12, #sched-descriptive:checked ~ #sched-lfirst:checked ~ .band__card .band__panel--descriptive-first, #sched-descriptive:checked ~ #sched-l10:checked ~ .band__card .band__panel--descriptive-10, #sched-descriptive:checked ~ #sched-l11:checked ~ .band__card .band__panel--descriptive-11, #sched-descriptive:checked ~ #sched-l12:checked ~ .band__card .band__panel--descriptive-12 { display: block; }
#sched-test:checked ~ .band__head label[for="sched-test"], #sched-descriptive:checked ~ .band__head label[for="sched-descriptive"], #sched-lfirst:checked ~ .band__head label[for="sched-lfirst"], #sched-l10:checked ~ .band__head label[for="sched-l10"], #sched-l11:checked ~ .band__head label[for="sched-l11"], #sched-l12:checked ~ .band__head label[for="sched-l12"] { background: var(--brand-orange); color: var(--accent-contrast); }
#sched-test:focus-visible ~ .band__head label[for="sched-test"], #sched-descriptive:focus-visible ~ .band__head label[for="sched-descriptive"], #sched-lfirst:focus-visible ~ .band__head label[for="sched-lfirst"], #sched-l10:focus-visible ~ .band__head label[for="sched-l10"], #sched-l11:focus-visible ~ .band__head label[for="sched-l11"], #sched-l12:focus-visible ~ .band__head label[for="sched-l12"], .tab:focus-visible { outline: 3px solid var(--brand-blue-light); outline-offset: 2px; }
.band__panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.band__panel-head .table-caption { margin: 0; }
.band__empty { color: var(--gray-600); padding: 18px 4px; }
.band__exam a { color: var(--heading); font-weight: 700; }
.band__exam .chip { margin-inline-start: 6px; }
.band tr.is-past td { color: var(--gray-600); }
.band tr.is-past .band__exam a { color: var(--gray-600); font-weight: 600; }
.table-caption { color: var(--red); font-weight: 800; margin: 0 0 6px; font-size: .95rem; }
.mini-tables { display: grid; gap: 14px; }
.booklets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.booklets > * { min-width: 0; }
.mini-tables .table-brand { font-size: .85rem; }
.mini-tables td, .mini-tables th { height: 36px; }
.table-brand .chips { display: inline-flex; gap: 4px; justify-content: center; }
.notes { margin-top: 16px; display: grid; gap: 4px; font-size: .9rem; }
.notes li { padding-inline-start: 18px; position: relative; color: var(--text); font-weight: 600; }
.notes li::before { content: ""; position: absolute; inset-inline-start: 0; top: .75em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-orange); }
.notes li.warn { color: var(--red); }
.notes li.warn::before { background: var(--red); }
.band__notice { margin-top: 12px; font-size: .9rem; }

/* ===== News ===== */
.news-card { overflow: hidden; display: flex; flex-direction: column; color: inherit; border-radius: var(--r-lg); transition: box-shadow .15s, transform .15s; }
.news-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.news-card__cover { height: 150px; display: grid; place-items: center; overflow: hidden; }
.news-card__cover svg { width: 72px; height: 72px; color: var(--ink); opacity: .35; }
.news-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-peach { background: var(--tint-peach); } .cover-blue { background: var(--tint-blue); } .cover-peri { background: var(--tint-periwinkle); } .cover-green { background: var(--success-bg); }
.news-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.news-card__meta { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--gray-600); }
.news-card h3 { font-size: 1rem; color: var(--heading); line-height: 1.6; }
.news-card p { font-size: .85rem; color: var(--gray-600); }

/* ===== Gallery ===== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 14px; }
.gallery a { position: relative; border-radius: var(--r-lg); overflow: hidden; display: block; background: linear-gradient(135deg, var(--tint-periwinkle), var(--tint-blue)); }
.gallery a:nth-child(2) { background: linear-gradient(135deg, var(--tint-peach), var(--surface)); }
.gallery a:nth-child(4) { background: linear-gradient(135deg, var(--brand-blue-light), var(--tint-blue)); }
.gallery a:first-child { grid-column: span 2; grid-row: span 2; }
.gallery a span { position: absolute; inset-inline: 0; bottom: 0; padding: 8px 12px; background: linear-gradient(transparent, rgb(28 46 99 / .85)); color: #fff; font-size: .85rem; font-weight: 600; z-index: 1; }
.gallery svg { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; color: var(--link); opacity: .45; }
.gallery a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.05); }
.gallery a:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; }


/* ===== Footer ===== */
.footer { background: var(--brand-navy); color: #fff; margin-top: 48px; }
.footer__stripe { height: 8px; background: var(--brand-orange); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 32px; padding-block: 40px; }
.footer h4 { margin: 0 0 14px; font-size: 1rem; color: #fff; }
.footer h4::after { content: ""; display: block; width: 32px; height: 3px; background: var(--brand-orange); margin-top: 6px; border-radius: 2px; }
.footer p, .footer li, .footer a { color: var(--tint-periwinkle); font-size: .9rem; }
.footer ul { display: grid; gap: 6px; }
.footer a:hover { color: #fff; }
.footer .logo { margin-bottom: 14px; }
.footer .logo__mark { box-sizing: content-box; height: 36px; padding: 5px 7px; background: #fff; border-radius: 10px; }
.footer .logo__text { color: #fff; }
.footer .logo__text small { color: var(--tint-periwinkle); }
.contact li { display: flex; align-items: center; gap: 8px; }
.contact svg { width: 18px; height: 18px; color: var(--brand-amber); flex: none; }
.footer__bottom { border-top: 1px solid rgb(255 255 255 / .12); padding-block: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
.social { display: flex; gap: 8px; }
.social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .1); }
.social svg { width: 18px; height: 18px; color: #fff; }

/* ===== Auth & simple pages inside the public layout ===== */
.login-card { padding: 32px; max-width: 440px; margin: 48px auto; border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.login-card h1 { font-size: 1.5rem; margin-bottom: 8px; }
/* Login CAPTCHA («کد امنیتی»), shown after repeated failed sign-ins (Account/Pages/Login.razor) */
.captcha__row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.captcha__image { width: 160px; height: 56px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--gray-100); user-select: none; }
.captcha__refresh { width: 40px; height: 40px; padding: 0; }
.captcha__answer { max-width: 160px; letter-spacing: .2em; text-align: center; }
.simple-page { padding: 48px 24px; text-align: center; max-width: 720px; margin: 48px auto; }
.simple-page p { margin: 12px 0 24px; color: var(--gray-600); }

/* ===== Inner pages (2026-10-12): short photo hero, filters, detail, article, gallery, legal ===== */
/* page hero: the home hero's photo + overlay, pulled under the floating header (same -78px), but short */
.page-hero { position: relative; isolation: isolate; color: #fff; margin-top: -78px; padding-block: 124px 52px; background: var(--hero-overlay), url("../img/gallery-06.jpg") center 45% / cover no-repeat var(--brand-navy); }
.public .page-hero h1 { color: #fff; font-size: 2.25rem; font-weight: 900; line-height: 1.35; max-width: 32ch; }
.public .page-hero__lead { color: var(--tint-periwinkle); max-width: 62ch; margin-top: 10px; font-size: 1.05rem; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; font-size: .85rem; color: var(--tint-periwinkle); }
.crumbs a { color: #fff; font-weight: 600; }
.crumbs a:hover { color: var(--brand-amber); }
.crumbs svg { width: 14px; height: 14px; opacity: .6; }
.page-hero__chips { margin-top: 14px; }
.page-hero__meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .9rem; color: var(--tint-periwinkle); }
.page-hero .hero__cta .btn svg { width: 18px; height: 18px; }

/* filter bar: segmented pill links (query-string filters, works without JS) */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 24px; }
.filter-bar__group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-bar__label { font-weight: 700; color: var(--gray-600); font-size: .9rem; }
.filter-bar__count { margin-inline-start: auto; color: var(--gray-600); font-size: .9rem; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--gray-100); border: 1px solid var(--border); border-radius: var(--r-pill); }
.seg a { padding: 6px 16px; border-radius: var(--r-pill); color: var(--heading); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.seg a:hover { background: var(--surface); }
.seg a.active { background: var(--brand-navy); color: #fff; }

.empty-state { padding: 48px 24px; text-align: center; border-radius: var(--r-lg); }
.empty-state .icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--tint-blue); color: var(--link); }
.empty-state .icon svg { width: 32px; height: 32px; }
.empty-state h2 { font-size: 1.2rem; }
.public .empty-state p { color: var(--gray-600); margin: 6px 0 18px; }

/* three numbered steps in one card (exams page) */
.steps-inline { padding: 24px; border-radius: var(--r-lg); display: grid; gap: 16px; }
.steps-inline ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps-inline li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; }
.steps-inline li::before { content: counter(s, persian); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-orange); color: var(--accent-contrast); font-weight: 900; }
.steps-inline strong { color: var(--heading); }
.steps-inline span { color: var(--gray-600); font-size: .9rem; }
.steps-inline__links { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }

/* closing call to action (navy band with orange glow, like the schedule band) */
.cta-section { padding-block: 48px 0; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; padding: 32px 36px; border-radius: 28px; color: #fff; background: radial-gradient(520px 300px at 0% 120%, rgb(244 123 32 / .4), transparent 60%), radial-gradient(420px 260px at 100% -20%, rgb(47 79 160 / .6), transparent 60%), var(--brand-navy); }
.public .cta-band h2 { color: #fff; font-size: 1.35rem; }
.public .cta-band p { color: var(--tint-periwinkle); margin-top: 6px; max-width: 60ch; }
.cta-band__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-band .btn { height: 46px; padding-inline: 22px; }

/* calendar and ranking tables */
.calendar-table td { white-space: nowrap; }
.calendar-table a { color: var(--heading); }
.section--alt .notes { margin-top: 24px; }

/* exam detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.detail__main { display: grid; gap: 20px; }
.detail__main > .card { border-radius: var(--r-lg); }
.public .detail__title { font-size: 1.15rem; margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0; }
.facts dt { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--gray-600); }
.facts dt svg { width: 16px; height: 16px; }
.facts dd { margin: 2px 0 0; font-weight: 800; color: var(--text); }
.steps-list { margin: 0; padding-inline-start: 22px; list-style: persian; display: grid; gap: 6px; }
.steps-list li::marker { color: var(--brand-orange-dark); font-weight: 900; }
.detail__aside { position: sticky; top: 100px; display: grid; gap: 14px; }
.price-card { padding: 24px; border-radius: var(--r-lg); display: grid; gap: 10px; box-shadow: var(--shadow-2); }
.price-card__amount { font-size: 1.8rem; font-weight: 900; color: var(--heading); line-height: 1.3; }
.price-card__amount small { font-size: .9rem; font-weight: 600; }
.price-card__amount--tba { font-size: 1.2rem; }
.price-card__vat { font-size: .8rem; color: var(--gray-600); }
.price-card .btn { width: 100%; justify-content: center; }

/* news article */
.news-article { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.news-article__body { border-radius: var(--r-lg); overflow: hidden; }
.news-article__cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 8; object-fit: cover; }
.news-article__body .prose { padding: 28px; }
.prose { max-width: 72ch; }
.public .prose p { margin: 0 0 14px; }
.public .prose h2 { font-size: 1.2rem; margin: 24px 0 10px; }
.public .prose h2:first-child { margin-top: 0; }
.prose__lead { font-size: 1.1rem; font-weight: 700; color: var(--heading); }
.public .aside-title { font-size: 1rem; margin-bottom: 12px; }
.related { display: grid; gap: 10px; margin-bottom: 16px !important; }
.related a { display: grid; gap: 4px; justify-items: start; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: inherit; transition: box-shadow .15s; }
.related a:hover { box-shadow: var(--shadow-2); }
.related strong { color: var(--heading); font-size: .92rem; line-height: 1.6; }
.related small { color: var(--gray-600); font-size: .78rem; }

/* gallery page with a CSS-only lightbox (:target) */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-grid__item { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: var(--tint-blue); }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.photo-grid__item:hover img, .photo-grid__item:focus-visible img { transform: scale(1.05); }
.photo-grid__item span { position: absolute; inset-inline: 0; bottom: 0; padding: 10px 14px; background: linear-gradient(transparent, rgb(28 46 99 / .85)); color: #fff; font-size: .88rem; font-weight: 600; }
.photo-grid__item:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; }
.lightbox { display: none; position: fixed; inset: 0; z-index: 100; place-items: center; padding: 24px 72px; }
.lightbox:target { display: grid; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgb(14 23 50 / .9); }
.lightbox figure { position: relative; margin: 0; max-width: min(1100px, 100%); }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; border-radius: var(--r-md); box-shadow: 0 30px 60px rgb(0 0 0 / .4); }
.lightbox figcaption { color: #fff; font-weight: 600; margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; }
.lightbox figcaption small { color: var(--tint-periwinkle); font-weight: 500; }
.lightbox__btn { position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .35); color: #fff; backdrop-filter: blur(8px); }
.lightbox__btn:hover { background: var(--brand-orange); color: var(--accent-contrast); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: 20px; inset-inline-end: 20px; }
.lightbox__prev { top: 50%; inset-inline-start: 14px; transform: translateY(-50%); }
.lightbox__next { top: 50%; inset-inline-end: 14px; transform: translateY(-50%); }
#gallery-closed { display: none; }

/* about, contact, register */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.split--top { align-items: start; grid-template-columns: 1fr 1fr; gap: 20px; }
.split--top > .card { border-radius: var(--r-lg); }
.split__photo { width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.stats--inline { margin-top: 0; box-shadow: var(--shadow-2); border: 1px solid var(--border); }
.feature-card { padding: 24px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 8px; color: inherit; }
.feature-card .icon, .contact-card .icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--tint-blue); color: var(--link); margin-bottom: 6px; }
.feature-card .icon svg, .contact-card .icon svg { width: 28px; height: 28px; }
.feature-card .icon--peach { background: var(--tint-peach); color: var(--brand-orange-dark); }
.public .feature-card h3 { font-size: 1.1rem; color: var(--heading); }
.public .feature-card p { color: var(--gray-600); font-size: .9rem; }
.feature-card--link { transition: box-shadow .15s, transform .15s; }
.feature-card--link:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.feature-card--link .link { margin-top: auto; padding-top: 6px; }
.contact-card { padding: 24px; border-radius: var(--r-lg); color: inherit; transition: box-shadow .15s, transform .15s; }
a.contact-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.public .contact-card h2 { font-size: 1rem; color: var(--gray-600); font-weight: 700; }
.public .contact-card p { font-weight: 800; color: var(--heading); margin-top: 4px; }
.reg-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.reg-step { position: relative; padding: 24px; border-radius: var(--r-lg); }
.reg-step__num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-navy); color: #fff; font-weight: 900; font-size: 1.1rem; margin-bottom: 12px; }
.reg-step:first-child .reg-step__num { background: var(--brand-orange); color: var(--accent-contrast); }
.public .reg-step h3 { font-size: 1.1rem; color: var(--heading); margin-bottom: 4px; }
.public .reg-step p { color: var(--gray-600); font-size: .9rem; }
.checklist { display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.checklist svg { width: 20px; height: 20px; flex: none; margin-top: 4px; color: var(--green-text); }

/* FAQ and legal pages: sticky table of contents beside the content */
.with-toc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.toc { position: sticky; top: 100px; display: grid; gap: 2px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.toc a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--heading); font-weight: 600; font-size: .9rem; }
.toc a:hover { background: var(--tint-blue); }
.faq-group { scroll-margin-top: 100px; }
.faq-group + .faq-group { margin-top: 36px; }
.faq-group .section__title { margin-bottom: 16px; }
.faq { display: grid; gap: 10px; }
.faq__item { border-radius: var(--r-md); }
.faq__item summary { list-style: none; cursor: pointer; padding: 16px 20px; padding-inline-end: 52px; position: relative; font-weight: 800; color: var(--heading); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; inset-inline-end: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-100); color: var(--heading); font-size: 1.1rem; line-height: 1; }
.faq__item[open] summary::after { content: "−"; background: var(--brand-orange); color: var(--accent-contrast); }
.faq__item summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--r-md); }
.public .faq__item p { padding: 0 20px 18px; color: var(--text); }
.public .faq__more { margin-top: 28px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--gray-600); }
.legal { border-radius: var(--r-lg); max-width: none; }
.legal section { scroll-margin-top: 100px; }
.public .legal__updated { color: var(--gray-600); font-size: .85rem; margin-bottom: 18px; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .detail, .news-article { grid-template-columns: 1fr; }
  .detail__aside { position: static; }
  .reg-steps { grid-template-columns: 1fr 1fr; }
  .with-toc { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .hero-photo__grid { grid-template-columns: 1fr; }
  .next-exam { max-width: 420px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .families, .booklets { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav-toggle-input:checked ~ .nav { display: flex; position: absolute; top: calc(100% + 8px); inset-inline: 0; background: var(--surface); flex-direction: column; padding: 12px; box-shadow: var(--shadow-2); border-radius: var(--r-lg); }
  .nav-toggle { display: grid; }
  .header__actions .btn-secondary { display: none; }
  .band__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-photo { padding-block: 130px 100px; }
  .hero-photo .display { font-size: 2.1rem; }
  .families, .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .logo__text small { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }
  .footer__grid { grid-template-columns: 1fr; }
  .topbar__inner { flex-direction: column; align-items: flex-start; padding-block: 8px; gap: 8px; }
  .band { padding: 20px; }
  .section { padding-block: 36px; }
  .page-hero { padding-block: 112px 40px; }
  .public .page-hero h1 { font-size: 1.7rem; }
  .reg-steps, .steps-inline ol, .split, .split--top, .facts { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .filter-bar__count { margin-inline-start: 0; }
  .cta-band { padding: 24px; }
  .lightbox { padding: 16px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
}
.about-more { margin-top: 32px; }
