/* ============================================================
   فنی البرز — استایل هدر
   ============================================================ */

:root {
    --brand:            #1257a5;
    --brand-dark:       #0e4483;
    --brand-soft:       #eaf2fb;
    --accent:           #f59e0b;

    --text:             #17222e;
    --text-muted:       #5b6b7c;
    --border:           #e4e9ef;
    --surface:          #ffffff;
    --backdrop:         rgba(15, 28, 43, .45);

    --header-height:    76px;
    --radius:           12px;
    --radius-sm:        9px;
    --shadow-sm:        0 1px 2px rgba(16, 32, 52, .06);
    --shadow-md:        0 10px 30px rgba(16, 32, 52, .12);
    --transition:       .22s ease;
}

/* ---------- پایه ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-height) + 16px); }

body {
    margin: 0;
    font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: #f7f9fc;
}

a { color: inherit; text-decoration: none; }

[hidden] { display: none !important; }

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.container {
    width: min(1200px, 100% - 32px);
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- هدر ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.site-header.is-stuck { box-shadow: var(--shadow-sm); }

.header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: var(--header-height);
}

/* ---------- لوگو ---------- */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.logo__title {
    font-size: 18px;
    font-weight: 700;
}

.logo__sub {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* ---------- منو ---------- */
.nav { margin-inline-start: 8px; }

.nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__item { position: relative; }

.nav__link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}

.nav__link:hover,
.nav__item.is-open > .nav__link {
    color: var(--brand);
    background: var(--brand-soft);
}

.nav__caret { transition: transform var(--transition); }

.nav__item.is-open .nav__caret { transform: rotate(180deg); }

/* ---------- دراپ‌دان ---------- */
.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-start: 0;
    min-width: 220px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav__item.is-open > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition);
}

.dropdown a:hover {
    color: var(--brand);
    background: var(--brand-soft);
}

/* ---------- اکشن‌ها ---------- */
.header__actions {
    display: flex;
    margin-inline-start: auto;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    color: var(--text);
    border: 1px solid var(--border);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.icon-btn:hover {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--brand-soft);
}

.icon-btn .icon { grid-area: 1 / 1; }

.icon-btn .icon--close,
.icon-btn[aria-expanded="true"] .icon--search { display: none; }

.icon-btn[aria-expanded="true"] .icon--close { display: block; }

/* دکمه تماس */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn--primary {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 4px 12px rgba(18, 87, 165, .25);
}

.btn--primary:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.btn--primary:active { transform: none; }

/* دکمه همبرگری */
.icon-btn--menu { display: none; }

.hamburger {
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--transition), background var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
}

.hamburger::before { top: -6px; }
.hamburger::after  { top: 6px; }

.icon-btn--menu[aria-expanded="true"] .hamburger { background: transparent; }
.icon-btn--menu[aria-expanded="true"] .hamburger::before { transform: translateY(6px) rotate(45deg); }
.icon-btn--menu[aria-expanded="true"] .hamburger::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- باکس جستجو ---------- */
.search-panel {
    border-top: 1px solid var(--border);
    background: var(--surface);
    animation: panel-in var(--transition);
}

@keyframes panel-in {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.search-form {
    display: flex;
    gap: 10px;
    padding: 16px 0;
}

.search-form__input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font: inherit;
    font-size: 14.5px;
    color: var(--text);
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), background var(--transition);
}

.search-form__input::placeholder { color: #9aa8b6; }

.search-form__input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
}

/* ---------- لایه تیره (موبایل) ---------- */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--backdrop);
}

/* ============================================================
   واکنش‌گرا
   ============================================================ */
@media (max-width: 1279px) {
    :root { --header-height: 68px; }

    .icon-btn--menu { display: grid; }

    .nav {
        position: absolute;
        top: 100%;
        inset-inline: 0;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        padding: 12px 16px 20px;
        background: var(--surface);
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-md);

        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    }

    .nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .nav__link {
        width: 100%;
        justify-content: space-between;
        padding: 13px 12px;
    }

    /* روی موبایل دراپ‌دان به شکل آکاردئون باز می‌شود */
    .dropdown {
        position: static;
        display: none;
        min-width: 0;
        margin-block: 2px 6px;
        margin-inline-start: 12px;
        padding: 4px;
        border: 0;
        border-inline-start: 2px solid var(--border);
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav__item.is-open > .dropdown {
        display: block;
        transform: none;
    }

    .logo__sub { display: none; }
}

@media (max-width: 575px) {
    /* دکمه تماس هدر در موبایل فقط آیکن */
    .header__actions .btn--primary {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
    }

    .header__actions .btn--primary span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}


/* ============================================================
   هیرو
   ============================================================ */
.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 104px;
    background:
        radial-gradient(700px 420px at 85% 0%, rgba(18, 87, 165, .07), transparent 70%),
        linear-gradient(180deg, var(--surface) 0%, #f7f9fc 100%);
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 64px;
}

/* ---------- متن ---------- */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 6px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.hero__badge-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
}

.hero__badge-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: pulse 2s ease-out infinite;
}

.hero__title {
    margin: 22px 0 18px;
    font-size: clamp(30px, 4.2vw, 50px);
    font-weight: 800;
    line-height: 1.45;
    color: var(--text);
}

.hero__kicker {
    display: block;
    margin-bottom: 6px;
    font-size: clamp(16px, 1.7vw, 20px);
    font-weight: 700;
    color: var(--brand);
}

.hero__title em {
    font-style: normal;
    padding-inline: 4px;
    background: linear-gradient(transparent 62%, rgba(245, 158, 11, .38) 0);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.hero__lead {
    max-width: 52ch;
    margin: 0 0 34px;
    font-size: 17px;
    line-height: 2.05;
    color: var(--text-muted);
}

.hero__lead strong {
    font-weight: 700;
    color: var(--text);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn--lg {
    padding: 14px 26px;
    font-size: 15.5px;
}

.btn--ghost {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    color: var(--brand);
    border-color: var(--brand);
    transform: translateY(-1px);
}

.hero__stats {
    display: flex;
    gap: 40px;
    margin: 44px 0 0;
    padding-top: 28px;
    border-top: 1px dashed #d5dde6;
}

.hero__stats div {
    display: flex;
    flex-direction: column-reverse;
}

.hero__stats dd {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
}

.hero__stats dt {
    font-size: 13.5px;
    color: var(--text-muted);
}

/* ---------- بخش تصویری ---------- */
.hero__visual {
    position: relative;
    padding: 28px 12px 64px;
}

/* شبکه نقشه‌کشی (بلوپرینت) پشت کارت‌ها */
.hero__visual::before {
    content: "";
    position: absolute;
    inset: -60px -40px;
    background-image:
        linear-gradient(rgba(18, 87, 165, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 87, 165, .09) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent);
            mask-image: radial-gradient(closest-side, #000 45%, transparent);
    pointer-events: none;
}

.skills {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ستون دوم کمی پایین‌تر برای ریتم نامتقارن */
.skills li:nth-child(even) { transform: translateY(40px); }

.skill {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-height: 176px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.skill:hover {
    transform: translateY(-4px);
    border-color: rgba(18, 87, 165, .35);
    box-shadow: var(--shadow-md);
}

.skill__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    color: var(--brand);
    background: var(--brand-soft);
}

.skill__name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text);
}

.skill__meta {
    margin-top: auto;
    font-size: 13px;
    color: var(--text-muted);
}

.skill--featured {
    background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
    border-color: transparent;
    box-shadow: 0 16px 36px rgba(18, 87, 165, .28);
}

.skill--featured:hover { border-color: transparent; }

.skill--featured .skill__icon {
    color: #fff;
    background: rgba(255, 255, 255, .15);
}

.skill--featured .skill__name { color: #fff; }
.skill--featured .skill__meta { color: rgba(255, 255, 255, .75); }

/* نشان مدرک شناور */
.hero__cert {
    position: absolute;
    top: -6px;
    inset-inline-end: -10px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 12px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    animation: float 6s ease-in-out infinite;
}

.hero__cert-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    color: #d97706;
    background: #fff4e0;
}

.hero__cert-text {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.hero__cert strong {
    font-size: 14px;
    font-weight: 700;
}

.hero__cert small {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- انیمیشن ورود ---------- */
.hero__content > *,
.hero__visual {
    animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
}

.hero__content > :nth-child(2) { animation-delay: .06s; }
.hero__content > :nth-child(3) { animation-delay: .12s; }
.hero__content > :nth-child(4) { animation-delay: .18s; }
.hero__content > :nth-child(5) { animation-delay: .24s; }
.hero__visual                  { animation-delay: .2s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes pulse {
    from { transform: scale(1);   opacity: .6; }
    to   { transform: scale(2.8); opacity: 0; }
}

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 991px) {
    .hero { padding: 48px 0 72px; }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero__visual {
        width: 100%;
        max-width: 560px;
        margin-inline: auto;
    }
}

@media (max-width: 575px) {
    .hero__lead { font-size: 15.5px; }

    .hero__actions .btn {
        flex: 1;
        justify-content: center;
        padding-inline: 16px;
    }

    .hero__stats {
        justify-content: space-between;
        gap: 12px;
    }

    .hero__stats dd { font-size: 21px; }
    .hero__stats dt { font-size: 12px; }

    .hero__visual { padding: 36px 0 44px; }

    .skills { gap: 12px; }
    .skills li:nth-child(even) { transform: translateY(24px); }

    .skill {
        min-height: 150px;
        padding: 16px;
        gap: 10px;
        border-radius: 16px;
    }

    .skill__icon {
        width: 42px;
        height: 42px;
    }

    .skill__name { font-size: 14.5px; }

    .hero__cert {
        top: -8px;
        inset-inline-end: 0;
        padding: 8px 12px 8px 10px;
    }

    .hero__cert small { display: none; }
}


/* ============================================================
   الگوی عمومی سکشن‌ها
   ============================================================ */
.section { padding: 96px 0; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-head__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
}

.section-head__eyebrow::before {
    content: "";
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

.section-head__title {
    margin: 0 0 10px;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.5;
}

.section-head__desc {
    max-width: 58ch;
    margin: 0;
    font-size: 15.5px;
    line-height: 2;
    color: var(--text-muted);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--brand);
    white-space: nowrap;
    transition: gap var(--transition);
}

.link-arrow:hover { gap: 10px; }


/* ============================================================
   دوره‌ها
   ============================================================ */

/* ---------- فیلتر ---------- */
.course-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.course-filter::-webkit-scrollbar { display: none; }

.course-filter__btn {
    flex-shrink: 0;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.course-filter__btn:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.course-filter__btn[aria-pressed="true"] {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

/* ---------- کارت‌ها ---------- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.course {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.course[hidden] { display: none; }

.course:hover {
    transform: translateY(-4px);
    border-color: rgba(18, 87, 165, .3);
    box-shadow: var(--shadow-md);
}

/* فوکوس کیبورد روی کل کارت نمایش داده شود */
.course:has(.course__link:focus-visible) {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

.course__link:focus-visible { outline: none; }

.course__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.course__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--brand);
    background: var(--brand-soft);
}

.course__tag {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.course__badge {
    margin-inline-start: auto;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    background: #fff4e0;
    border-radius: 999px;
}

.course__title {
    margin: 0 0 8px;
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.6;
    transition: color var(--transition);
}

.course:hover .course__title { color: var(--brand); }

/* لینک عنوان کل کارت را قابل کلیک می‌کند */
.course__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.course__desc {
    margin: 0 0 20px;
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--text-muted);
}

.course__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: auto 0 0;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
}

.course__meta li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.course__meta svg { color: var(--text-muted); }

.course__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
}

.course__start { color: var(--text-muted); }

.course__start time {
    font-weight: 700;
    color: var(--text);
}

.course__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--brand);
}

.course__more svg { transition: transform var(--transition); }

.course:hover .course__more svg { transform: translateX(-4px); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 991px) {
    .section { padding: 72px 0; }

    .courses-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .section { padding: 56px 0; }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .course { padding: 20px; }
}


/* ============================================================
   مقالات
   ============================================================ */
.blog {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.blog-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 28px;
}

.blog-list {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
}

/* ---------- کارت پایه ---------- */
.post {
    position: relative;
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.post:hover {
    border-color: rgba(18, 87, 165, .3);
    box-shadow: var(--shadow-md);
}

.post:has(.post__link:focus-visible) {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

.post__link:focus-visible { outline: none; }

/* لینک عنوان کل کارت را قابل کلیک می‌کند */
.post__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

/* ---------- کاور ---------- */
.post__cover,
.post__img {
    position: relative;
    overflow: hidden;
}

.post__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post__cover {
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .92);
    background: var(--cover, var(--brand));
    isolation: isolate;
}

/* شبکه نقشه‌کشی روی کاور */
.post__cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 75%);
            mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 75%);
}

.post__cover svg {
    transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.post:hover .post__cover svg { transform: scale(1.1) rotate(-5deg); }

.post__cover--navy  { --cover: linear-gradient(150deg, #1a64b8 0%, #0b2f5c 100%); }
.post__cover--amber { --cover: linear-gradient(150deg, #f7b23b 0%, #d9660b 100%); }
.post__cover--teal  { --cover: linear-gradient(150deg, #14917f 0%, #0d4d47 100%); }
.post__cover--slate { --cover: linear-gradient(150deg, #475569 0%, #111c2e 100%); }

.post__cover-label {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
}

/* ---------- محتوا ---------- */
.post__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

/* نقطه جداکننده بین آیتم‌های متا */
.post__meta > * + *::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-inline: 10px;
    vertical-align: middle;
    border-radius: 50%;
    background: #c3ccd6;
}

.post__cat {
    font-weight: 700;
    color: var(--brand);
}

.post__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;
    transition: color var(--transition);
}

.post:hover .post__title { color: var(--brand); }

.post__excerpt {
    margin: 12px 0 22px;
    font-size: 15px;
    line-height: 2;
    color: var(--text-muted);
}

.post__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--brand);
}

.post__more svg { transition: transform var(--transition); }

.post:hover .post__more svg { transform: translateX(-4px); }

/* ---------- مقاله ویژه ---------- */
.post--featured {
    flex-direction: column;
    overflow: hidden;
}

.post--featured .post__cover,
.post--featured .post__img { aspect-ratio: 16 / 9; }

.post--featured .post__body { padding: 24px 28px 28px; }

.post--featured .post__title {
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.75;
}

/* ---------- مقالات فهرستی ---------- */
.post--compact {
    align-items: stretch;
    gap: 18px;
    padding: 14px;
}

.post--compact:hover { transform: translateX(-4px); }

.post--compact .post__cover,
.post--compact .post__img {
    flex: 0 0 136px;
    min-height: 116px;
    border-radius: 14px;
}

.post--compact .post__body {
    justify-content: center;
    padding-block: 4px;
    padding-inline-end: 6px;
}

.post--compact .post__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 991px) {
    .blog-grid { grid-template-columns: 1fr; }

    .blog-list { grid-template-rows: none; }
}

@media (max-width: 575px) {
    .post--featured .post__body { padding: 20px; }

    .post__excerpt { font-size: 14.5px; }

    .post--compact {
        gap: 14px;
        padding: 12px;
    }

    .post--compact .post__cover,
    .post--compact .post__img {
        flex-basis: 92px;
        min-height: 92px;
        border-radius: 12px;
    }

    .post--compact .post__cover svg {
        width: 32px;
        height: 32px;
    }

    .post--compact .post__title { font-size: 15px; }

    .post--compact .post__meta { margin-bottom: 4px; }
}


/* ============================================================
   فوتر
   ============================================================ */
.site-footer {
    --footer-bg:     #0b1e36;
    --footer-text:   rgba(255, 255, 255, .7);
    --footer-muted:  rgba(255, 255, 255, .5);
    --footer-line:   rgba(255, 255, 255, .1);
    --footer-chip:   rgba(255, 255, 255, .07);

    position: relative;
    padding-top: 72px;
    color: var(--footer-text);
    background:
        radial-gradient(800px 400px at 90% 0%, rgba(18, 87, 165, .35), transparent 70%),
        var(--footer-bg);
}

.site-footer a { transition: color var(--transition), background var(--transition), transform var(--transition); }

/* ---------- دعوت به اقدام ---------- */
.footer-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 44px;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #1a64b8 0%, #0e4483 100%);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .25);
    isolation: isolate;
}

/* شبکه نقشه‌کشی مشترک با هیرو */
.footer-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 30px 30px;
    -webkit-mask-image: linear-gradient(to left, #000, transparent 75%);
            mask-image: linear-gradient(to left, #000, transparent 75%);
}

.footer-cta__title {
    margin: 0 0 8px;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    line-height: 1.6;
    color: #fff;
}

.footer-cta__text {
    max-width: 52ch;
    margin: 0;
    font-size: 15px;
    line-height: 2;
    color: rgba(255, 255, 255, .78);
}

.footer-cta__actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 12px;
}

.btn--accent {
    color: #1f1300;
    font-weight: 700;
    background: var(--accent);
    box-shadow: 0 6px 18px rgba(245, 158, 11, .35);
}

.btn--accent:hover {
    background: #fbbf24;
    transform: translateY(-1px);
}

.btn--outline-light {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
}

.btn--outline-light:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .6);
}

/* ---------- ستون‌ها ---------- */
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 40px;
    padding: 64px 0 48px;
}

.site-footer .logo__title { color: #fff; }
.site-footer .logo__sub   { color: var(--footer-muted); }

.site-footer .logo__mark {
    background: linear-gradient(135deg, #2f7fd6, #1257a5);
}

.footer-brand__text {
    max-width: 38ch;
    margin: 18px 0 22px;
    font-size: 14.5px;
    line-height: 2.05;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #fff;
    background: var(--footer-chip);
    border: 1px solid var(--footer-line);
    border-radius: 11px;
}

.footer-social a:hover {
    background: var(--brand);
    border-color: var(--brand);
    transform: translateY(-2px);
}

.footer-col__title {
    position: relative;
    margin: 6px 0 22px;
    padding-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.footer-col__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 24px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

.footer-links {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14.5px;
}

.footer-links a {
    display: inline-block;
    color: var(--footer-text);
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(-4px);
}

/* ---------- اطلاعات تماس ---------- */
.footer-contact {
    font-style: normal;
}

.footer-contact ul {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14.5px;
    line-height: 1.9;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-contact__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #93c5fd;
    background: var(--footer-chip);
    border-radius: 10px;
}

.footer-contact li > :last-child { padding-top: 4px; }

.footer-contact a { color: var(--footer-text); }
.footer-contact a:hover { color: #fff; }

/* ---------- نوار پایینی ---------- */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
    padding: 22px 0 26px;
    font-size: 13.5px;
    color: var(--footer-muted);
    border-top: 1px solid var(--footer-line);
}

.footer-bottom__copy { margin: 0; }

.footer-bottom__links {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom a { color: var(--footer-muted); }
.footer-bottom a:hover { color: #fff; }

.footer-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
}

.footer-top svg { transition: transform var(--transition); }
.footer-top:hover svg { transform: translateY(-3px); }

.site-footer :focus-visible { outline-color: #93c5fd; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 991px) {
    .site-footer { padding-top: 56px; }

    .footer-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 32px;
    }
}

@media (max-width: 575px) {
    .footer-cta {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .footer-cta__actions {
        width: 100%;
    }

    .footer-cta__actions .btn {
        flex: 1;
        justify-content: center;
        padding-inline: 16px;
    }

    .footer-grid {
        gap: 36px 20px;
        padding: 48px 0 36px;
    }

    .footer-brand,
    .footer-grid > .footer-col:last-child { grid-column: 1 / -1; }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-top { margin-inline-start: 0; }
}


/* ============================================================
   مزایا (چرا فنی البرز)
   ============================================================ */
.features {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

/* نسخه وسط‌چین تیتر سکشن */
.section-head--center {
    flex-direction: column;
    align-items: center;
    margin-bottom: 48px;
    text-align: center;
}

.section-head--center .section-head__desc { margin-inline: auto; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature {
    --c: var(--brand);
    --c2: var(--brand-dark);
    --tint: var(--brand-soft);

    position: relative;
    padding: 32px 28px 30px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--tint) 0%, var(--surface) 60%);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.feature--blue  { --c: #1a64b8; --c2: #0e4483; --tint: #eef4fc; }
.feature--amber { --c: #f0a020; --c2: #d9660b; --tint: #fff6e8; }
.feature--teal  { --c: #14917f; --c2: #0d5c53; --tint: #eaf7f5; }

.feature:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.feature__visual {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 26px;
}

.feature__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    color: #fff;
    background: linear-gradient(145deg, var(--c), var(--c2));
    border-radius: 18px;
    box-shadow: 0 14px 26px -12px var(--c);
    transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}

/* حلقه خط‌چین دور آیکن */
.feature__icon::after {
    content: "";
    position: absolute;
    inset: -8px;
    border: 1.5px dashed var(--c);
    border-radius: 24px;
    opacity: .3;
    transition: opacity .3s ease, transform .6s ease;
}

.feature:hover .feature__icon { transform: rotate(-6deg) scale(1.05); }
.feature:hover .feature__icon::after { opacity: .6; transform: rotate(6deg); }

.feature__num {
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    color: var(--c);
    opacity: .14;
    transition: opacity .3s ease;
}

.feature:hover .feature__num { opacity: .3; }

.feature__title {
    margin: 0 0 14px;
    font-size: 18.5px;
    font-weight: 700;
    line-height: 1.6;
}

.feature__line {
    display: block;
    width: 36px;
    height: 3px;
    margin-bottom: 16px;
    border-radius: 3px;
    background: var(--c);
    transition: width .35s ease;
}

.feature:hover .feature__line { width: 64px; }

.feature__text {
    margin: 0;
    font-size: 14.5px;
    line-height: 2.05;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .features-grid {
        grid-template-columns: 1fr;
        max-width: 640px;
        margin-inline: auto;
    }
}

@media (max-width: 575px) {
    .section-head--center { margin-bottom: 32px; }

    .feature { padding: 26px 22px; }

    .feature__icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .feature__num { font-size: 38px; }
}


/* ============================================================
   امکانات (نوار تیره)
   ============================================================ */
.highlights {
    position: relative;
    overflow: hidden;
    color: rgba(255, 255, 255, .7);
    background:
        radial-gradient(700px 360px at 50% 0%, rgba(26, 100, 184, .45), transparent 70%),
        #0b1e36;
    isolation: isolate;
}

/* شبکه نقشه‌کشی مشترک با هیرو */
.highlights::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
            mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}

/* نسخه روشن تیتر سکشن برای زمینه تیره */
.section-head--light .section-head__eyebrow { color: #93c5fd; }
.section-head--light .section-head__title   { color: #fff; }
.section-head--light .section-head__desc    { color: rgba(255, 255, 255, .7); }

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 14px 24px;
    text-align: center;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    transition: transform .3s ease, background .3s ease, border-color .3s ease;
}

.highlight:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, .08);
    border-color: rgba(147, 197, 253, .35);
}

.highlight__icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin-bottom: 18px;
    color: #93c5fd;
    background: rgba(147, 197, 253, .1);
    border: 1px solid rgba(147, 197, 253, .2);
    border-radius: 50%;
    transition: color .3s ease, background .3s ease, border-color .3s ease, transform .35s ease;
}

.highlight:hover .highlight__icon {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    transform: scale(1.08);
}

.highlight__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    color: #fff;
}

.highlight__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .6);
}

@media (max-width: 1099px) {
    .highlights-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 575px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .highlight { padding: 22px 10px 18px; }

    .highlight__icon {
        width: 52px;
        height: 52px;
        margin-bottom: 14px;
    }

    .highlight__title { font-size: 15px; }
    .highlight__text  { font-size: 12.5px; }
}


/* ============================================================
   سوالات متداول
   ============================================================ */
.faq__inner {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "head list"
        "help list";
    gap: 24px 56px;
    align-items: start;
}

.faq__head { grid-area: head; }
.faq-list  { grid-area: list; }
.faq-help  { grid-area: help; }

.faq__head .section-head__desc { max-width: 40ch; }

/* ---------- آکاردئون ---------- */
.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item:hover { border-color: rgba(18, 87, 165, .25); }

.faq-item[open] {
    border-color: rgba(18, 87, 165, .35);
    box-shadow: 0 10px 28px rgba(16, 32, 52, .08);
}

.faq-item__q {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    list-style: none;
    cursor: pointer;
    border-radius: 16px;
}

.faq-item__q::-webkit-details-marker { display: none; }

.faq-item__num {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 38px;
    height: 38px;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 11px;
    transition: color var(--transition), background var(--transition);
}

.faq-item[open] .faq-item__num {
    color: #fff;
    background: var(--brand);
}

.faq-item__title {
    flex: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
    transition: color var(--transition);
}

.faq-item__q:hover .faq-item__title,
.faq-item[open] .faq-item__title { color: var(--brand); }

/* آیکن + که هنگام باز شدن به − تبدیل می‌شود */
.faq-item__icon {
    position: relative;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: background var(--transition), border-color var(--transition), transform .3s ease;
}

.faq-item__icon::before,
.faq-item__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    margin: -1px 0 0 -6px;
    border-radius: 2px;
    background: var(--text);
    transition: transform .3s ease, background var(--transition);
}

.faq-item__icon::after { transform: rotate(90deg); }

.faq-item[open] .faq-item__icon {
    background: var(--brand-soft);
    border-color: transparent;
    transform: rotate(180deg);
}

.faq-item[open] .faq-item__icon::before,
.faq-item[open] .faq-item__icon::after { background: var(--brand); }

.faq-item[open] .faq-item__icon::after { transform: rotate(0deg); }

.faq-item__a {
    padding: 0 72px 20px 20px;
    animation: faq-in .3s ease;
}

.faq-item__a p {
    margin: 0;
    padding-top: 14px;
    font-size: 15px;
    line-height: 2.1;
    color: var(--text-muted);
    border-top: 1px dashed var(--border);
}

.faq-item__a a {
    font-weight: 700;
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 4px;
}

@keyframes faq-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- کارت راهنما ---------- */
.faq-help {
    padding: 26px;
    background:
        radial-gradient(260px 160px at 100% 0%, rgba(18, 87, 165, .08), transparent 70%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.faq-help__icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 16px;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 14px;
}

.faq-help__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
}

.faq-help__text {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.95;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .faq__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "head"
            "list"
            "help";
        gap: 28px;
    }

    .faq__head .section-head__desc { max-width: 58ch; }
}

@media (max-width: 575px) {
    .faq-item__q {
        gap: 12px;
        padding: 16px;
    }

    .faq-item__num {
        width: 34px;
        height: 34px;
    }

    .faq-item__title { font-size: 15px; }

    .faq-item__a { padding: 0 16px 18px; }

    .faq-help .btn {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================================
   رضایت کارآموزان
   ============================================================ */
.testimonials { background: var(--surface); }

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial {
    margin: 0;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.testimonial:hover {
    transform: translateY(-4px);
    border-color: rgba(18, 87, 165, .25);
    box-shadow: var(--shadow-md);
}

.testimonial__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0b1e36;
    border-radius: 14px;
}

.testimonial__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* دکمه پخش فقط وقتی جاوااسکریپت فعال است نمایش داده می‌شود */
.testimonial__play { display: none; }

.js .testimonial__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    color: var(--brand);
    background: linear-gradient(180deg, rgba(11, 30, 54, .05) 0%, rgba(11, 30, 54, .45) 100%);
    transition: opacity .3s ease, visibility .3s ease;
}

.js .testimonial__play svg {
    box-sizing: content-box;
    padding: 20px 18px 20px 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25), 0 0 0 10px rgba(255, 255, 255, .25);
    transition: transform .3s ease, box-shadow .3s ease;
}

.testimonial:hover .testimonial__play svg {
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25), 0 0 0 16px rgba(255, 255, 255, .2);
}

.testimonial.is-playing .testimonial__play {
    opacity: 0;
    visibility: hidden;
}

.testimonial__caption {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 8px 6px;
}

.testimonial__quote {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--accent);
    background: #fff4e0;
    border-radius: 12px;
}

.testimonial__caption strong {
    display: block;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.6;
}

.testimonial__caption small {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    /* در تبلت و موبایل کارت‌ها به‌صورت افقی اسکرول می‌شوند */
    .testimonials-grid {
        grid-template-columns: none;
        grid-auto-columns: minmax(280px, 46%);
        grid-auto-flow: column;
        gap: 16px;
        margin-inline: -16px;
        padding: 4px 16px 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .testimonials-grid::-webkit-scrollbar { display: none; }

    .testimonial { scroll-snap-align: start; }

    .testimonial:hover { transform: none; }
}

@media (max-width: 575px) {
    .testimonials-grid { grid-auto-columns: 84%; }
}


/* ============================================================
   صفحات داخلی — اجزای مشترک
   ============================================================ */
.nav__link.is-active { color: var(--brand); }

.btn--block {
    width: 100%;
    justify-content: center;
}

.btn--sm {
    padding: 7px 14px;
    font-size: 13.5px;
}

/* ---------- مسیر صفحه ---------- */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
    color: var(--text-muted);
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

/* فلش جداکننده رو به چپ */
.breadcrumb li + li::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-inline: 12px 10px;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    opacity: .55;
    transform: rotate(225deg);
}

.breadcrumb a { transition: color var(--transition); }
.breadcrumb a:hover { color: var(--brand); }

.breadcrumb [aria-current] {
    overflow: hidden;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.breadcrumb--light ol { color: rgba(255, 255, 255, .6); }
.breadcrumb--light a:hover,
.breadcrumb--light [aria-current] { color: #fff; }

/* ---------- آواتار و برچسب ---------- */
.avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-radius: 50%;
}

.avatar--lg {
    width: 88px;
    height: 88px;
    font-size: 26px;
    box-shadow: 0 0 0 6px var(--brand-soft);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 999px;
}

.chip--dark {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
}

.chip--accent {
    color: #1f1300;
    background: var(--accent);
}

/* ---------- متا (تاریخ، زمان و...) ---------- */
.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
    color: var(--text-muted);
}

.meta-list li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- لیست تیک‌دار ---------- */
.checklist {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    position: relative;
    padding-inline-start: 32px;
    font-size: 15px;
    line-height: 1.95;
}

.checklist li::before {
    content: "";
    position: absolute;
    top: 5px;
    inset-inline-start: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--check, var(--brand)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.checklist--green { --check: #16a34a; }

.checklist--2col {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 28px;
}

/* ---------- لیست ساده ---------- */
.bullets {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--text-muted);
}

.bullets li {
    position: relative;
    padding-inline-start: 18px;
}

.bullets li::before {
    content: "";
    position: absolute;
    top: .98em;
    inset-inline-start: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b7c3d0;
    transform: translateY(-50%);
}

/* ---------- جدول ---------- */
.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 14.5px;
    line-height: 1.9;
}

.table th,
.table td {
    padding: 14px 18px;
    text-align: start;
    vertical-align: middle;
}

.table thead th {
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text);
    background: #f3f6fa;
}

.table tbody tr + tr > * { border-top: 1px solid var(--border); }

.table tbody th {
    font-weight: 700;
    color: var(--text);
}

.table td { color: var(--text-muted); }

/* ---------- باکس نکته ---------- */
.callout {
    --c: #b45309;
    --bg: #fff8ec;
    --line: #fde6bf;

    display: flex;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.callout--info {
    --c: var(--brand);
    --bg: var(--brand-soft);
    --line: rgba(18, 87, 165, .15);
}

.callout__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--c);
    background: var(--surface);
    border-radius: 11px;
}

.callout__title {
    display: block;
    margin-bottom: 2px;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--c);
}

.callout p {
    margin: 0;
    font-size: 15px;
    line-height: 2;
    color: #3a4757;
}

.callout a {
    font-weight: 700;
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- کارت مقاله عمودی ---------- */
.post--card {
    flex-direction: column;
    overflow: hidden;
}

.post--card:hover { transform: translateY(-4px); }

.post--card .post__cover { aspect-ratio: 16 / 10; }

.post--card .post__body { padding: 20px 22px 22px; }

.post--card .post__title {
    margin-bottom: 18px;
    font-size: 16.5px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ---------- سکشن مرتبط ---------- */
.related {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

@media (max-width: 991px) {
    /* در تبلت و موبایل کارت‌ها به‌صورت افقی اسکرول می‌شوند */
    .posts-grid {
        grid-template-columns: none;
        grid-auto-columns: minmax(280px, 46%);
        grid-auto-flow: column;
        gap: 16px;
        margin-inline: -16px;
        padding: 4px 16px 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .posts-grid::-webkit-scrollbar { display: none; }

    .posts-grid > * { scroll-snap-align: start; }

    .post--card:hover { transform: none; }
}

@media (max-width: 575px) {
    .posts-grid { grid-auto-columns: 84%; }

    .checklist--2col { grid-template-columns: 1fr; }
}


/* ============================================================
   صفحه مقاله
   ============================================================ */

/* ---------- نوار پیشرفت مطالعه ---------- */
.read-progress {
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: 3px;
    background: linear-gradient(to left, var(--brand), #3b8ae0);
    transform: scaleX(0);
    transform-origin: right;
    pointer-events: none;
}

/* ---------- سربرگ (مشترک با سربرگ صفحات داخلی) ---------- */
.article-hero,
.page-hero {
    position: relative;
    padding: 36px 0 148px;
    overflow: hidden;
    background:
        radial-gradient(700px 420px at 85% 0%, rgba(18, 87, 165, .08), transparent 70%),
        linear-gradient(180deg, var(--surface) 0%, #f7f9fc 100%);
    isolation: isolate;
}

/* شبکه نقشه‌کشی مشترک با هیرو */
.article-hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(18, 87, 165, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 87, 165, .07) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(ellipse at 12% 30%, #000 10%, transparent 55%);
            mask-image: radial-gradient(ellipse at 12% 30%, #000 10%, transparent 55%);
}

.article-hero__inner { max-width: 780px; }

.article-hero__cat {
    margin-top: 28px;
    transition: background var(--transition), color var(--transition);
}

.article-hero__cat:hover {
    color: #fff;
    background: var(--brand);
}

.article-hero__title {
    margin: 16px 0;
    font-size: clamp(26px, 3.6vw, 40px);
    font-weight: 800;
    line-height: 1.6;
}

.article-hero__lead {
    max-width: 64ch;
    margin: 0 0 28px;
    font-size: 17px;
    line-height: 2.05;
    color: var(--text-muted);
}

.article-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
}

.article-hero__meta .meta-list {
    padding-inline-start: 28px;
    border-inline-start: 1px solid var(--border);
}

.byline {
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

.byline strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.byline small {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- کاور ---------- */
.article-cover {
    margin-top: -112px;
    aspect-ratio: 21 / 9;
    border-radius: 24px;
    box-shadow: 0 24px 48px -20px rgba(11, 47, 92, .45);
}

.article-cover .post__cover-label {
    top: 24px;
    inset-inline-start: 24px;
}

/* ---------- چیدمان ---------- */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) 300px;
    justify-content: space-between;
    gap: 56px;
    padding: 56px 0 96px;
}

.article-aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---------- خلاصه مقاله ---------- */
.article-summary {
    margin-bottom: 40px;
    padding: 24px 26px;
    background: var(--brand-soft);
    border: 1px solid rgba(18, 87, 165, .12);
    border-radius: 18px;
}

.article-summary__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 16.5px;
    font-weight: 800;
    color: var(--brand-dark);
}

/* ---------- متن مقاله ---------- */
.prose {
    font-size: 16.5px;
    line-height: 2.15;
    color: #2b3a4a;
}

.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.25em; }

.prose h2 {
    margin-top: 2.1em;
    font-size: clamp(21px, 2.3vw, 25px);
    font-weight: 800;
    line-height: 1.6;
    color: var(--text);
}

.prose h3 {
    margin-top: 1.7em;
    font-size: 18.5px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--text);
}

.prose h2 + *,
.prose h3 + * { margin-top: .6em; }

.prose strong {
    font-weight: 700;
    color: var(--text);
}

.prose a:not(.btn) {
    font-weight: 500;
    color: var(--brand);
    text-decoration: underline;
    text-decoration-color: rgba(18, 87, 165, .35);
    text-underline-offset: 5px;
    transition: text-decoration-color var(--transition);
}

.prose a:not(.btn):hover { text-decoration-color: currentColor; }

.prose > ul,
.prose > ol {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.prose > ul > li {
    position: relative;
    padding-inline-start: 24px;
}

.prose > ul > li::before {
    content: "";
    position: absolute;
    top: 1.07em;
    inset-inline-start: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    transform: translateY(-50%);
}

.prose > ol { counter-reset: step; }

.prose > ol > li {
    position: relative;
    padding-inline-start: 46px;
    counter-increment: step;
}

.prose > ol > li::before {
    content: counter(step, persian);
    position: absolute;
    top: 3px;
    inset-inline-start: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 9px;
}

.prose blockquote {
    margin-inline: 0;
    padding: 22px 26px;
    font-size: 17.5px;
    font-weight: 500;
    line-height: 2;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--accent);
    border-radius: 16px;
}

.prose blockquote p { margin: 0; }

.prose blockquote footer {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.prose figure { margin-inline: 0; }

.prose figcaption {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.8;
    text-align: center;
    color: var(--text-muted);
}

.prose-media {
    aspect-ratio: 16 / 9;
    border-radius: 18px;
}

/* ---------- دعوت به دوره داخل متن ---------- */
.inline-cta {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 26px;
    overflow: hidden;
    color: rgba(255, 255, 255, .78);
    background: linear-gradient(135deg, #1a64b8 0%, #0e4483 100%);
    border-radius: 20px;
    isolation: isolate;
}

.inline-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
            mask-image: linear-gradient(to left, #000, transparent 70%);
}

.inline-cta__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 54px;
    height: 54px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border-radius: 15px;
}

.inline-cta__body { flex: 1; }

.inline-cta__title {
    margin: 0 0 2px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.7;
    color: #fff;
}

.inline-cta__text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.9;
}

.inline-cta .btn { flex-shrink: 0; }

/* ---------- برچسب‌ها و اشتراک‌گذاری ---------- */
.article-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tags a {
    display: inline-flex;
    padding: 6px 14px;
    font-size: 13.5px;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: color var(--transition), border-color var(--transition);
}

.tags a::before {
    content: "#";
    margin-inline-end: 2px;
    opacity: .5;
}

.tags a:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.share__label {
    margin-inline-end: 4px;
    font-size: 14px;
    font-weight: 700;
}

.share__btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.share__btn:hover {
    color: var(--brand);
    background: var(--brand-soft);
    border-color: var(--brand);
}

.share__btn.is-copied {
    color: #16a34a;
    background: #e8f7ee;
    border-color: #16a34a;
}

.share__status {
    font-size: 13px;
    font-weight: 500;
    color: #16a34a;
}

/* ---------- نویسنده ---------- */
.author-box {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin-top: 32px;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.author-box__label {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.author-box__name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.7;
}

.author-box__role {
    margin: 0 0 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--brand);
}

.author-box__bio {
    margin: 0 0 14px;
    font-size: 14.5px;
    line-height: 2;
    color: var(--text-muted);
}

/* ---------- فهرست مطالب ---------- */
.toc {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.toc__head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.toc__head::-webkit-details-marker { display: none; }

.toc__head > svg:first-child { color: var(--brand); }

.toc__caret {
    display: none;
    margin-inline-start: auto;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.toc[open] .toc__caret { transform: rotate(180deg); }

.toc__list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    border-inline-start: 2px solid var(--border);
}

.toc__list a {
    display: block;
    margin-inline-start: -2px;
    padding: 7px 14px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-muted);
    border-inline-start: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.toc__list a:hover { color: var(--text); }

.toc__list a.is-active {
    font-weight: 700;
    color: var(--brand);
    background: linear-gradient(to left, var(--brand-soft), transparent);
    border-color: var(--brand);
}

/* ---------- کارت دوره مرتبط ---------- */
.promo-card {
    position: relative;
    padding: 24px;
    overflow: hidden;
    color: rgba(255, 255, 255, .75);
    background: linear-gradient(150deg, #1a64b8 0%, #0b2f5c 100%);
    border-radius: 18px;
    isolation: isolate;
}

.promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(circle at 0% 0%, #000 10%, transparent 65%);
            mask-image: radial-gradient(circle at 0% 0%, #000 10%, transparent 65%);
}

.promo-card__label {
    display: inline-block;
    padding: 3px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
}

.promo-card__title {
    margin: 14px 0 6px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
    color: #fff;
}

.promo-card__text {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.9;
}

.promo-card .meta-list {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, .85);
}

/* ---------- واکنش‌گرا ---------- */
@media (min-width: 992px) {
    /* در دسکتاپ فهرست مطالب همیشه باز است */
    .toc__head { pointer-events: none; }
}

@media (max-width: 991px) {
    .article-hero { padding: 28px 0 104px; }

    .article-cover {
        margin-top: -76px;
        aspect-ratio: 16 / 9;
        border-radius: 20px;
    }

    .article-layout {
        display: flex;
        flex-direction: column;
        gap: 28px;
        padding: 32px 0 72px;
    }

    /* فهرست مطالب بالای مقاله و کارت دوره پس از آن قرار می‌گیرد */
    .article-aside { display: contents; }

    .toc {
        position: static;
        order: -1;
        padding: 0;
    }

    .toc__head { padding: 16px 20px; }

    .toc__caret { display: block; }

    .toc__list { margin: 0 20px 18px; }

    .promo-card { order: 1; }
}

@media (max-width: 575px) {
    .article-hero__lead { font-size: 15.5px; }

    .article-hero__meta .meta-list {
        padding-inline-start: 0;
        border-inline-start: 0;
    }

    .article-cover {
        margin-top: -64px;
        border-radius: 16px;
    }

    .article-cover svg {
        width: 72px;
        height: 72px;
    }

    .article-summary { padding: 20px; }

    .prose {
        font-size: 15.5px;
        line-height: 2.1;
    }

    .prose blockquote {
        padding: 18px 20px;
        font-size: 16px;
    }

    .callout { padding: 16px; }

    .inline-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
    }

    .inline-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .author-box {
        flex-direction: column;
        padding: 22px 20px;
    }
}


/* ============================================================
   صفحه دوره
   ============================================================ */
.page-course {
    --aside-w:   350px;
    --aside-gap: 56px;
}

/* ---------- سربرگ ---------- */
.course-hero {
    position: relative;
    padding: 32px 0 80px;
    overflow: hidden;
    color: rgba(255, 255, 255, .72);
    background:
        radial-gradient(760px 420px at 100% 0%, rgba(26, 100, 184, .55), transparent 70%),
        radial-gradient(520px 320px at 0% 100%, rgba(245, 158, 11, .1), transparent 70%),
        #0b1e36;
    isolation: isolate;
}

/* شبکه نقشه‌کشی مشترک با هیرو */
.course-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(ellipse at 80% 20%, #000 15%, transparent 65%);
            mask-image: radial-gradient(ellipse at 80% 20%, #000 15%, transparent 65%);
}

.course-hero__content { max-width: calc(100% - var(--aside-w) - var(--aside-gap)); }

.course-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 16px;
}

.course-hero__title {
    margin: 0 0 14px;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 800;
    line-height: 1.55;
    color: #fff;
}

.course-hero__lead {
    max-width: 60ch;
    margin: 0 0 28px;
    font-size: 16.5px;
    line-height: 2.05;
}

.course-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.course-hero__facts li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
}

.course-hero__facts svg { color: #93c5fd; }

.course-hero__by {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
}

.course-hero__by strong {
    font-weight: 700;
    color: #fff;
}

.course-hero__by .avatar {
    width: 40px;
    height: 40px;
    font-size: 13px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .12);
}

/* ---------- چیدمان ---------- */
.course-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--aside-w);
    grid-template-areas: "main aside";
    gap: 0 var(--aside-gap);
    align-items: start;
    padding-bottom: 88px;
}

.course-main { grid-area: main; }

/* کارت ثبت‌نام روی سربرگ می‌نشیند و هنگام اسکرول ثابت می‌ماند */
.course-aside {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    z-index: 2;
    grid-area: aside;
    margin-top: -300px;
}

/* ---------- کارت ثبت‌نام ---------- */
.enroll-card {
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 24px 48px -24px rgba(11, 30, 54, .35);
}

.enroll-card__label {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
}

.enroll-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.enroll-card__price strong {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--text);
}

.enroll-card__note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    font-size: 13.5px;
    font-weight: 500;
    color: #15803d;
}

.capacity {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #fff8ec;
    border-radius: 14px;
}

.capacity__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13.5px;
    color: #92400e;
}

.capacity__row strong { font-weight: 800; }

.capacity__bar {
    height: 8px;
    overflow: hidden;
    background: rgba(245, 158, 11, .18);
    border-radius: 99px;
}

.capacity__bar span {
    display: block;
    width: var(--fill, 0%);
    height: 100%;
    background: linear-gradient(to left, var(--accent), #d97706);
    border-radius: inherit;
}

.enroll-card__actions {
    display: grid;
    gap: 10px;
}

.enroll-card__list {
    display: grid;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.enroll-card__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    color: var(--text-muted);
}

.enroll-card__list li + li { border-top: 1px dashed var(--border); }

.enroll-card__list svg {
    flex-shrink: 0;
    color: var(--brand);
}

.enroll-card__list strong {
    margin-inline-start: auto;
    font-weight: 700;
    text-align: end;
    color: var(--text);
}

.enroll-card__foot {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0 0;
    padding-top: 16px;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.enroll-card__foot svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: #16a34a;
}

/* ---------- ناوبری بخش‌ها ---------- */
.course-tabs {
    position: sticky;
    top: var(--header-height);
    z-index: 5;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    background: #f7f9fc;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
}

.course-tabs::-webkit-scrollbar { display: none; }

.course-tabs a {
    position: relative;
    flex-shrink: 0;
    padding: 18px 14px 16px;
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-muted);
    transition: color var(--transition);
}

.course-tabs a::after {
    content: "";
    position: absolute;
    inset-inline: 10px;
    bottom: -1px;
    height: 3px;
    background: var(--brand);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform var(--transition);
}

.course-tabs a:hover { color: var(--text); }

.course-tabs a.is-active { color: var(--brand); }

.course-tabs a.is-active::after { transform: scaleX(1); }

/* ---------- بلوک‌های محتوا ---------- */
.course-block {
    padding: 44px 0;
    /* فاصله برای ناوبری چسبان بخش‌ها */
    scroll-margin-top: 64px;
}

.course-block + .course-block { border-top: 1px solid var(--border); }

.course-block__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.course-block__title {
    margin: 0 0 20px;
    font-size: clamp(21px, 2.4vw, 25px);
    font-weight: 800;
    line-height: 1.6;
}

.course-block__head .course-block__title { margin-bottom: 0; }

.course-block__sub {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-muted);
}

.course-text p {
    margin: 0 0 1em;
    font-size: 15.5px;
    line-height: 2.1;
    color: #2b3a4a;
}

.course-text p:last-child { margin-bottom: 0; }

.text-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
    border-radius: 8px;
    transition: background var(--transition);
}

.text-btn:hover { background: var(--brand-soft); }

/* ---------- چه می‌آموزید ---------- */
.learn-box {
    margin-top: 28px;
    padding: 26px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.learn-box__title {
    margin: 0 0 18px;
    font-size: 17.5px;
    font-weight: 800;
}

.learn-box .checklist li { font-size: 14.5px; }

/* ---------- مخاطبان و پیش‌نیازها ---------- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.info-card__title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.6;
}

.info-card__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 12px;
}

.info-card--amber .info-card__icon {
    color: #d97706;
    background: #fff4e0;
}

/* ---------- سرفصل‌ها ---------- */
.curriculum {
    display: grid;
    gap: 12px;
}

.module {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.module:hover { border-color: rgba(18, 87, 165, .25); }

.module[open] {
    border-color: rgba(18, 87, 165, .3);
    box-shadow: 0 10px 28px rgba(16, 32, 52, .07);
}

.module__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "num title caret"
        "num meta  caret";
    align-items: center;
    column-gap: 14px;
    padding: 16px 20px;
    list-style: none;
    cursor: pointer;
    border-radius: 16px;
}

.module__head::-webkit-details-marker { display: none; }

.module__num {
    display: grid;
    grid-area: num;
    place-items: center;
    width: 42px;
    height: 42px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 12px;
    transition: color var(--transition), background var(--transition);
}

.module[open] .module__num {
    color: #fff;
    background: var(--brand);
}

.module__title {
    grid-area: title;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
    transition: color var(--transition);
}

.module__head:hover .module__title,
.module[open] .module__title { color: var(--brand); }

.module__meta {
    grid-area: meta;
    font-size: 13px;
    color: var(--text-muted);
}

.module__caret {
    grid-area: caret;
    color: var(--text-muted);
    transition: transform .3s ease, color var(--transition);
}

.module[open] .module__caret {
    color: var(--brand);
    transform: rotate(180deg);
}

.lessons {
    margin: 0 20px;
    padding: 4px 0 10px;
    list-style: none;
    border-top: 1px solid var(--border);
    animation: faq-in .3s ease;
}

.lesson {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    font-size: 14.5px;
}

.lesson + .lesson { border-top: 1px dashed var(--border); }

.lesson__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    background: #f3f6fa;
    border-radius: 9px;
}

.lesson__title {
    flex: 1;
    min-width: 0;
}

.lesson__type {
    flex-shrink: 0;
    padding: 1px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 99px;
}

.lesson__type--practice {
    color: #0d7a6b;
    background: #e6f6f3;
}

.lesson__type--theory {
    color: var(--brand);
    background: var(--brand-soft);
}

.lesson__time {
    flex-shrink: 0;
    min-width: 54px;
    font-size: 13px;
    text-align: end;
    color: var(--text-muted);
}

/* ---------- مربی ---------- */
.instructor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 24px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.instructor .avatar--lg { margin: 6px; }

.instructor__name {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.6;
}

.instructor__role {
    margin: 2px 0 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--brand);
}

.instructor__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.instructor__stats div {
    display: flex;
    flex-direction: column-reverse;
    min-width: 120px;
    padding: 10px 16px;
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.instructor__stats dd {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--text);
}

.instructor__stats dt {
    font-size: 12.5px;
    color: var(--text-muted);
}

.instructor__bio {
    margin: 0;
    font-size: 15px;
    line-height: 2.05;
    color: var(--text-muted);
}

/* ---------- زمان‌بندی ---------- */
.table--schedule td:last-child { text-align: end; }

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 99px;
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status--open { color: #15803d; background: #e8f7ee; }
.status--few  { color: #b45309; background: #fff4e0; }
.status--full { color: #64748b; background: #f1f5f9; }

/* ---------- مراحل دریافت مدرک ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    counter-increment: step;
}

.step::before {
    content: counter(step, persian);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    border-radius: 13px;
    box-shadow: 0 10px 20px -10px var(--brand);
}

/* خط‌چین اتصال مراحل */
.step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 44px;
    inset-inline-end: -21px;
    width: 22px;
    border-top: 2px dashed #c3ccd6;
}

.step__title {
    margin: 0 0 6px;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.6;
}

.step__text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--text-muted);
}

/* ---------- نوار ثبت‌نام موبایل ---------- */
.enroll-bar { display: none; }

.enroll-bar__price {
    display: flex;
    flex-direction: column;
    margin: 0;
    line-height: 1.5;
}

.enroll-bar__price small {
    font-size: 12px;
    color: var(--text-muted);
}

.enroll-bar__price strong {
    font-size: 17px;
    font-weight: 800;
}

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 991px) {
    .course-hero { padding: 24px 0 88px; }

    .course-hero__content { max-width: none; }

    .course-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "aside"
            "main";
        padding-bottom: 64px;
    }

    .course-aside {
        position: static;
        margin-top: -56px;
    }

    .course-tabs {
        margin: 28px -16px 0;
        padding-inline: 16px;
    }

    .enroll-bar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 80;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--border);
        box-shadow: 0 -8px 24px rgba(16, 32, 52, .08);
        -webkit-backdrop-filter: blur(10px);
                backdrop-filter: blur(10px);
        visibility: hidden;
        transform: translateY(110%);
        transition: transform .3s ease, visibility .3s ease;
    }

    .enroll-bar.is-visible {
        visibility: visible;
        transform: none;
    }

    /* جا برای نوار ثبت‌نام پایین صفحه */
    .page-course .footer-bottom { padding-bottom: 96px; }
}

@media (max-width: 767px) {
    .info-grid { grid-template-columns: 1fr; }

    .steps { grid-template-columns: 1fr; }

    .step:not(:last-child)::after { display: none; }

    /* جدول زمان‌بندی به کارت تبدیل می‌شود */
    .table--stack { min-width: 0; }

    .table--stack thead { display: none; }

    .table--stack,
    .table--stack tbody,
    .table--stack tr,
    .table--stack th,
    .table--stack td { display: block; }

    .table--stack tr { padding: 16px 18px; }

    .table--stack tbody tr + tr > * { border-top: 0; }
    .table--stack tbody tr + tr { border-top: 1px solid var(--border); }

    .table--stack th,
    .table--stack td { padding: 5px 0; }

    .table--stack tbody th {
        padding-bottom: 8px;
        font-size: 16px;
    }

    .table--stack td[data-label] {
        display: flex;
        justify-content: space-between;
        gap: 16px;
    }

    .table--stack td[data-label]::before {
        content: attr(data-label);
        color: var(--text-muted);
    }

    .table--stack td[data-label] { color: var(--text); }

    .table--schedule td:last-child { padding-top: 12px; }

    .table--schedule td:last-child .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .course-hero__lead { font-size: 15.5px; }

    .course-hero__facts li {
        padding: 7px 12px;
        font-size: 13px;
    }

    .enroll-card { padding: 22px 18px; }

    .enroll-card__price strong { font-size: 26px; }

    .course-block { padding: 36px 0; }

    .course-block__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .learn-box,
    .info-card { padding: 22px 18px; }

    .module__head {
        column-gap: 12px;
        padding: 14px 16px;
    }

    .module__num {
        width: 36px;
        height: 36px;
    }

    .module__title { font-size: 15px; }

    .lessons { margin-inline: 16px; }

    .lesson { font-size: 14px; }

    .lesson__type { display: none; }

    .instructor {
        grid-template-columns: 1fr;
        padding: 22px 18px;
    }
}


/* ============================================================
   سربرگ صفحات داخلی (آرشیو، درباره ما، تماس)
   ============================================================ */
.page-hero {
    padding: 36px 0 56px;
    border-bottom: 1px solid var(--border);
}

.page-hero__inner { max-width: 780px; }

.page-hero__eyebrow { margin-top: 28px; }

.page-hero__title {
    margin: 0 0 12px;
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 800;
    line-height: 1.55;
}

.page-hero__lead {
    max-width: 62ch;
    margin: 0;
    font-size: 16.5px;
    line-height: 2.05;
    color: var(--text-muted);
}

.page-hero__facts {
    margin-top: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.page-hero__facts svg { color: var(--brand); }

/* ---------- آمار ---------- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 760px;
    margin: 32px 0 0;
}

.stats-strip div {
    display: flex;
    flex-direction: column-reverse;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.stats-strip dd {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--brand);
}

.stats-strip dt {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 575px) {
    .page-hero { padding: 28px 0 40px; }

    .page-hero__lead { font-size: 15.5px; }

    .stats-strip { grid-template-columns: repeat(2, 1fr); }

    .stats-strip dd { font-size: 22px; }
}


/* ============================================================
   آرشیو (دوره‌ها و مقالات)
   ============================================================ */
.archive { padding: 40px 0 96px; }

.archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.archive-toolbar .course-filter {
    min-width: 0;
    margin-bottom: 0;
}

.archive-toolbar__side {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
}

/* ---------- فیلد جستجو ---------- */
.search-field {
    position: relative;
    display: block;
    width: 260px;
}

.search-field svg {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    color: var(--text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.search-field input,
.select__input {
    width: 100%;
    padding: 10px 14px;
    font: inherit;
    font-size: 14.5px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-field input { padding-inline-start: 42px; }

.search-field input::placeholder { color: #9aa8b6; }

.search-field input:focus,
.select__input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(18, 87, 165, .12);
}

/* ---------- منوی کشویی ---------- */
.select {
    position: relative;
    display: inline-block;
}

.select--block { display: block; }

.select select {
    padding-inline-end: 38px;
    cursor: pointer;
    -webkit-appearance: none;
            appearance: none;
}

.select::after {
    content: "";
    position: absolute;
    top: 50%;
    inset-inline-end: 15px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--text-muted);
    border-bottom: 1.5px solid var(--text-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

/* ---------- تعداد نتایج و حالت خالی ---------- */
.archive-count {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.archive-count strong {
    font-weight: 700;
    color: var(--text);
}

.empty-state {
    padding: 56px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed #cfd8e3;
    border-radius: 20px;
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 50%;
}

.empty-state__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
}

.empty-state__text {
    max-width: 46ch;
    margin: 0 auto 20px;
    font-size: 14.5px;
    line-height: 2;
    color: var(--text-muted);
}

/* ---------- کارت‌های مقاله در آرشیو ---------- */
.post--card .post__excerpt {
    display: -webkit-box;
    margin: -8px 0 18px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.95;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.posts-grid--archive { margin-top: 24px; }

/* مقاله ویژه افقی */
.post--wide {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    overflow: hidden;
}

.post--wide .post__cover { min-height: 340px; }

.post--wide .post__body {
    justify-content: center;
    padding: 36px 40px;
}

.post--wide .post__title {
    font-size: clamp(20px, 2.2vw, 26px);
    line-height: 1.7;
}

.post--wide .post__excerpt { margin: 14px 0 24px; }

/* ---------- صفحه‌بندی ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.pagination__link:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.pagination__link[aria-current] {
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.pagination__link[aria-disabled="true"] {
    opacity: .45;
    pointer-events: none;
}

.pagination__gap {
    padding-inline: 4px;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .archive-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .archive-toolbar .course-filter {
        margin-inline: -16px;
        padding-inline: 16px;
    }

    .search-field {
        flex: 1;
        width: auto;
    }

    /* در آرشیو کارت‌ها به‌جای اسکرول افقی، زیر هم چیده می‌شوند */
    .posts-grid--archive {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-flow: row;
        margin-inline: 0;
        padding: 0;
        overflow: visible;
        scroll-snap-type: none;
    }

    .post--wide { grid-template-columns: 1fr; }

    .post--wide .post__cover {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .post--wide .post__body { padding: 24px 24px 28px; }
}

@media (max-width: 640px) {
    .archive { padding: 28px 0 64px; }

    .posts-grid--archive {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .post--wide .post__body { padding: 20px; }

    .pagination__link--nav { display: none; }
}


/* ============================================================
   درباره ما
   ============================================================ */

/* ---------- داستان ما ---------- */
.about-story__inner {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 64px;
}

.about-story__text {
    margin: 0 0 16px;
    font-size: 15.5px;
    line-height: 2.1;
    color: var(--text-muted);
}

.about-story .checklist { margin-top: 24px; }

.about-visual {
    position: relative;
    padding: 32px 24px;
}

.about-visual__card {
    aspect-ratio: 4 / 3.4;
    border-radius: 24px;
    box-shadow: 0 30px 60px -28px rgba(11, 47, 92, .55);
}

.about-visual__badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 12px;
    line-height: 1.5;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    animation: float 6s ease-in-out infinite;
}

.about-visual__badge strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.about-visual__badge small {
    font-size: 12px;
    color: var(--text-muted);
}

.about-visual__badge--top {
    top: 0;
    inset-inline-end: 0;
}

.about-visual__badge--bottom {
    bottom: 0;
    inset-inline-start: 0;
    animation-delay: 1.5s;
}

.about-visual__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 11px;
}

.about-visual__icon--amber {
    color: #d97706;
    background: #fff4e0;
}

/* ---------- خط زمانی ---------- */
.timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 9px;
    inset-inline: 0;
    border-top: 2px dashed #c3ccd6;
}

.timeline__item {
    position: relative;
    padding-top: 40px;
}

.timeline__item::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 20px;
    height: 20px;
    background: var(--surface);
    border: 5px solid var(--brand);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--brand-soft);
}

.timeline__item:last-child::before {
    border-color: var(--accent);
    box-shadow: 0 0 0 5px #fff4e0;
}

.timeline__year {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 12px;
    font-size: 14px;
    font-weight: 800;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 999px;
}

.timeline__title {
    margin: 0 0 6px;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.6;
}

.timeline__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.95;
    color: var(--text-muted);
}

/* ---------- تیم آموزشی ---------- */
.team {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.member {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px 26px;
    text-align: center;
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}

.member:hover {
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.member .avatar--lg { margin-bottom: 18px; }

.member__name {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.6;
}

.member__role {
    margin: 2px 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--brand);
}

.member__meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.avatar--amber { background: linear-gradient(135deg, #f7b23b, #d9660b); }
.avatar--teal  { background: linear-gradient(135deg, #14917f, #0d4d47); }
.avatar--slate { background: linear-gradient(135deg, #475569, #111c2e); }

.avatar--lg.avatar--amber { box-shadow: 0 0 0 6px #fff4e0; }
.avatar--lg.avatar--teal  { box-shadow: 0 0 0 6px #e6f6f3; }
.avatar--lg.avatar--slate { box-shadow: 0 0 0 6px #eef1f5; }

@media (max-width: 991px) {
    .about-story__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-visual {
        width: 100%;
        max-width: 560px;
        margin-inline: auto;
    }

    /* خط زمانی عمودی */
    .timeline {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-inline-start: 36px;
    }

    .timeline::before {
        top: 0;
        bottom: 0;
        inset-inline: 9px auto;
        border-top: 0;
        border-inline-start: 2px dashed #c3ccd6;
    }

    .timeline__item { padding-top: 0; }

    .timeline__item::before {
        top: 4px;
        inset-inline-start: -36px;
    }

    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .about-visual { padding: 28px 0; }

    .about-visual__badge { padding: 8px 12px 8px 10px; }

    .team-grid { gap: 12px; }

    .member { padding: 24px 12px 20px; }

    .member .avatar--lg {
        width: 68px;
        height: 68px;
        font-size: 20px;
    }

    .member__name { font-size: 15px; }

    .member__role { font-size: 13px; }
}


/* ============================================================
   تماس با ما
   ============================================================ */
.contact { padding: 48px 0 96px; }

/* ---------- کارت‌های ارتباطی ---------- */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
}

.contact-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.contact-card:hover {
    border-color: rgba(18, 87, 165, .3);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.contact-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 14px;
}

.contact-card__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.contact-card__value {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
}

.contact-card__value a { transition: color var(--transition); }
.contact-card__value a:hover { color: var(--brand); }

.contact-card__note {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- فرم ---------- */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
    gap: 28px;
}

.form-card {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
}

.form-card__title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.6;
}

.form-card__text {
    margin: 0 0 26px;
    font-size: 14.5px;
    line-height: 2;
    color: var(--text-muted);
}

.form {
    display: grid;
    gap: 18px;
}

.form__row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.field__label {
    font-size: 14px;
    font-weight: 700;
}

.field__req { color: #dc2626; }

.field__input {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.field__input::placeholder { color: #9aa8b6; }

.field__input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(18, 87, 165, .12);
}

.field__input:user-invalid { border-color: #dc2626; }

.field__input[dir="ltr"] { text-align: right; }

textarea.field__input {
    min-height: 140px;
    line-height: 1.9;
    resize: vertical;
}

.form__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 4px;
}

.form__note {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- نقشه و شبکه‌های اجتماعی ---------- */
.contact-aside {
    display: grid;
    gap: 20px;
}

.map-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
}

/* نقشه نمادین؛ برای نقشه واقعی iframe را جایگزین کنید */
.map-card__map {
    position: relative;
    height: 220px;
    background-color: #e9f0f8;
    background-image:
        linear-gradient(35deg, transparent 46%, #fff 46%, #fff 53%, transparent 53%),
        linear-gradient(-58deg, transparent 47%, #fff 47%, #fff 51%, transparent 51%),
        linear-gradient(rgba(18, 87, 165, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 87, 165, .08) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px;
    isolation: isolate;
}

.map-card__pin {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #fff;
    background: var(--brand);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(18, 87, 165, .4);
    transform: translate(-50%, -50%);
}

.map-card__pin::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: inherit;
    animation: pulse 2.4s ease-out infinite;
}

.map-card__body { padding: 22px; }

.map-card__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
}

.map-card__text {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.social-card {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
}

.social-card__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.social-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14.5px;
    font-weight: 500;
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.social-list svg { color: var(--brand); }

.social-list a:hover {
    color: var(--brand);
    background: var(--brand-soft);
    border-color: var(--brand);
}

@media (max-width: 1099px) {
    .contact-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .contact-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 575px) {
    .contact { padding: 28px 0 64px; }

    .contact-cards {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 28px;
    }

    .contact-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 14px;
        padding: 18px;
    }

    .contact-card__icon {
        grid-row: span 3;
        margin-bottom: 0;
    }

    .form-card { padding: 24px 18px; }

    .form__row { grid-template-columns: 1fr; }

    .form__footer .btn {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================================
   صفحه ۴۰۴
   ============================================================ */
.error-page {
    position: relative;
    padding: 72px 0 96px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(600px 360px at 50% 20%, rgba(18, 87, 165, .08), transparent 70%),
        linear-gradient(180deg, var(--surface) 0%, #f7f9fc 100%);
    isolation: isolate;
}

.error-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(18, 87, 165, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 87, 165, .08) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 25%, #000 10%, transparent 55%);
            mask-image: radial-gradient(ellipse at 50% 25%, #000 10%, transparent 55%);
}

.error-page__inner { max-width: 640px; }

.error-page__code {
    margin: 0;
    font-size: clamp(96px, 18vw, 168px);
    font-weight: 800;
    line-height: 1.15;
    color: transparent;
    background: linear-gradient(160deg, #2f7fd6 15%, var(--brand) 45%, #0b2f5c 90%);
    -webkit-background-clip: text;
            background-clip: text;
}

.error-page__title {
    margin: 4px 0 12px;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.6;
}

.error-page__text {
    max-width: 48ch;
    margin: 0 auto 28px;
    font-size: 16px;
    line-height: 2.05;
    color: var(--text-muted);
}

.error-page__search {
    max-width: 520px;
    margin: 0 auto 20px;
    padding: 0;
}

.error-page__search .search-form__input { background: var(--surface); }

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
}

.error-page__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.error-page__links .tags a::before { content: none; }

/* به‌خاطر base در صفحه ۴۰۴، لینک #main به صفحه اصلی می‌رود؛ این صفحه کوتاه است و نیازی به آن ندارد */
.page-error .footer-top { display: none; }

@media (max-width: 575px) {
    .error-page { padding: 48px 0 64px; }

    .error-page__actions .btn {
        flex: 1;
        justify-content: center;
        padding-inline: 16px;
    }
}
