/* ==========================================================================
   مفیدآموز | صفحه دوره‌های آموزشی
   مسیر: MainAssets/css/mofidamooz-courses.css
   فونت‌ها: MainAssets/webFonts/  (هم‌سطح پوشه css)
   ========================================================================== */

/* ------------------------------------------------------------------ فونت */
@font-face { font-family: 'Vazirmatn'; src: url('../../webFonts/Vazirmatn-Regular.woff2') format('woff2');    font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../../webFonts/Vazirmatn-Medium.woff2') format('woff2');     font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../../webFonts/Vazirmatn-SemiBold.woff2') format('woff2');   font-weight: 600; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../../webFonts/Vazirmatn-Bold.woff2') format('woff2');       font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../../webFonts/Vazirmatn-ExtraBold.woff2') format('woff2');  font-weight: 800; font-display: swap; }

/* --------------------------------------------------------------- توکن‌ها */
:root {
    --ink: #0b1020;
    --ink-soft: #5a6376;
    --ink-mute: #8d95a6;

    --paper: #ffffff;
    --bg: #f4f6fb;
    --bg-2: #eef1f8;
    --line: #e4e8f2;

    --accent: #0f766e;
    --accent-2: #14b8a6;
    --gold: #b8860b;
    --gold-2: #d4a017;
    --rose: #be123c;

    --r-md: 18px;
    --r-lg: 26px;
    --r-xl: 34px;

    --shadow-1: 0 2px 6px rgba(11, 16, 32, .04);
    --shadow-2: 0 18px 40px -24px rgba(11, 16, 32, .28);
    --shadow-3: 0 30px 60px -30px rgba(11, 16, 32, .35);

    --max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: 400;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

.ico {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

/* -------------------------------------------------------------------- هدر */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar__in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 72px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand__mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--ink), #2b3550);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 20px;
    box-shadow: var(--shadow-2);
}

.brand__name { display: block; font-weight: 800; font-size: 17px; letter-spacing: -.2px; }
.brand__sub { display: block; font-size: 11.5px; color: var(--ink-mute); line-height: 1.4; }

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

.nav a {
    padding: 9px 14px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-soft);
    transition: .2s;
}

.nav a:hover { background: var(--bg-2); color: var(--ink); }

/* ----------------------------------------------------------------- دکمه‌ها */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 13px;
    padding: 11px 20px;
    font-size: 13.5px;
    font-weight: 700;
    transition: .22s;
    white-space: nowrap;
}

.btn--dark {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 14px 26px -16px rgba(11, 16, 32, .75);
}

.btn--dark:hover { background: #000; transform: translateY(-2px); }

.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 14px 26px -16px rgba(15, 118, 110, .8);
}

.btn--accent:hover { background: #0b5f59; transform: translateY(-2px); }

.btn--soft {
    background: var(--bg);
    color: var(--ink-soft);
    border: 1px solid var(--line);
    padding: 10px 14px;
    font-size: 12.5px;
}

.btn--soft:hover { color: var(--accent); border-color: var(--accent); }

.btn--muted {
    background: var(--bg-2);
    color: var(--ink-mute);
    border: 1px dashed var(--line);
    pointer-events: none;
}

.btn--block { width: 100%; }

/* ------------------------------------------------------------------- هیرو */
.hero { padding: 56px 0 40px; }

.hero__card {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, #0b1020 0%, #16203a 55%, #0f2f2c 100%);
    color: #fff;
    padding: 54px 44px;
    box-shadow: var(--shadow-3);
}

.hero__card::after {
    content: '';
    position: absolute;
    inset-inline-start: -80px;
    bottom: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, .38), transparent 68%);
}

.hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 40px;
    align-items: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #d9fbf6;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: 34px;
    line-height: 1.55;
    font-weight: 800;
    letter-spacing: -.5px;
}

.hero h1 span {
    background: linear-gradient(90deg, #5eead4, #b8e986);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    margin: 0 0 26px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, .74);
    max-width: 56ch;
}

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

.hero__cta .btn--ghost {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
}

.hero__cta .btn--ghost:hover { background: rgba(255, 255, 255, .16); }

.stats { display: grid; gap: 12px; }

.stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-bottom: 2px solid var(--accent-2);
}

.stat__ico {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(20, 184, 166, .18);
    color: #5eead4;
    font-size: 20px;
}

.stat__num { display: block; font-size: 19px; font-weight: 800; line-height: 1.3; }
.stat__lbl { display: block; font-size: 12px; color: rgba(255, 255, 255, .66); }

/* -------------------------------------------------------------- عنوان‌ها */
.sec { padding: 34px 0; }

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

.sec__title {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sec__title::before {
    content: '';
    width: 5px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
}

.sec__desc { margin: 6px 0 0; font-size: 13px; color: var(--ink-mute); }

/* ----------------------------------------------------------------- تب‌ها */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px;
    border-radius: var(--r-lg);
    background: var(--paper);
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--bg-2);
    box-shadow: var(--shadow-1);
    margin-bottom: 26px;
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

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

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    transition: .2s;
    white-space: nowrap;
}

.tab:hover { border-color: var(--ink-mute); color: var(--ink); }

.tab[aria-selected="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    box-shadow: 0 12px 22px -14px rgba(11, 16, 32, .8);
}

.tab__count {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(11, 16, 32, .08);
}

.tab[aria-selected="true"] .tab__count { background: rgba(255, 255, 255, .18); }

.tools { display: flex; align-items: center; gap: 10px; }

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink-mute);
}

.search input {
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    width: 170px;
}

.view {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--line);
}

.view button {
    width: 36px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-soft);
    display: grid;
    place-items: center;
    font-size: 17px;
    transition: .2s;
}

.view button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------------ کارت */
.deck {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--accent);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    transition: transform .26s, box-shadow .26s, border-color .26s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 34px 50px -30px rgba(15, 118, 110, .5);
    border-bottom-color: var(--accent-2);
}

.card--featured { border-bottom-color: var(--gold-2); }
.card--featured:hover { box-shadow: 0 34px 50px -30px rgba(184, 134, 11, .5); }

.card__head {
    position: relative;
    min-height: 130px;
    background: linear-gradient(135deg, #16203a, #0f2f2c);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    color: #fff;
}

.card__head img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .55;
}

.card__head::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 16, 32, .22), rgba(11, 16, 32, .76));
}

.card__badges,
.card__headfoot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.8;
}

.badge .ico { font-size: 13px; }

.badge--glass {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .26);
    color: #fff;
    backdrop-filter: blur(6px);
}

.badge--gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    color: #1a1200;
    box-shadow: 0 8px 16px -10px rgba(184, 134, 11, .9);
}

.badge--teal {
    background: linear-gradient(135deg, var(--accent-2), #2dd4bf);
    color: #04201d;
}

.badge--rose { background: linear-gradient(135deg, var(--rose), #e11d48); color: #fff; }

.badge--line {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, .38);
    color: rgba(255, 255, 255, .9);
}

.card__body { padding: 18px 18px 12px; flex: 1; }

.card__title {
    margin: 0 0 8px;
    font-size: 15.5px;
    font-weight: 800;
    line-height: 1.75;
    letter-spacing: -.2px;
}

.card__text {
    margin: 0;
    font-size: 12.8px;
    color: var(--ink-soft);
    line-height: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--line);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-soft);
}

.meta .ico { font-size: 14px; color: var(--accent); }

.card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px dashed var(--line);
    background: linear-gradient(180deg, #fff, var(--bg));
}

.price { line-height: 1.5; }

.price__now { display: block; font-size: 16px; font-weight: 800; color: var(--ink); }
.price__now small { font-size: 11.5px; font-weight: 600; color: var(--ink-mute); }
.price__free { font-size: 15px; font-weight: 800; color: var(--accent); }

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

/* ------------------------------------------------------------ نمای لیستی */
.deck[data-view="list"] { grid-template-columns: 1fr; }

.deck[data-view="list"] .card { flex-direction: row; align-items: stretch; }

.deck[data-view="list"] .card__head {
    width: 235px;
    flex: 0 0 235px;
    min-height: auto;
    padding: 16px;
}

.deck[data-view="list"] .card__body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.deck[data-view="list"] .card__text { -webkit-line-clamp: 3; }

.deck[data-view="list"] .card__foot {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    width: 235px;
    flex: 0 0 235px;
    border-top: 0;
    border-inline-start: 1px dashed var(--line);
    text-align: center;
}

.deck[data-view="list"] .card__actions { flex-direction: column; }
.deck[data-view="list"] .card__actions .btn { width: 100%; }

/* -------------------------------------------------------------- بدون نتیجه */
.empty {
    display: none;
    text-align: center;
    padding: 60px 20px;
    border-radius: var(--r-lg);
    background: var(--paper);
    border: 1px dashed var(--line);
}

.empty.is-on { display: block; }

.empty__ico {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 20px;
    background: var(--bg-2);
    color: var(--ink-mute);
    display: grid;
    place-items: center;
    font-size: 26px;
}

.empty h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.empty p { margin: 0; font-size: 13px; color: var(--ink-mute); }

/* ------------------------------------------------------------------- CTA */
.cta {
    margin: 40px 0 0;
    border-radius: var(--r-xl);
    padding: 44px 40px;
    background: linear-gradient(135deg, #0b1020, #16203a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    border-bottom: 4px solid var(--accent-2);
    box-shadow: var(--shadow-3);
}

.cta h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.cta p { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .7); }

/* ------------------------------------------------------------------ فوتر */
.foot {
    margin-top: 48px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 44px 0 0;
}

.foot__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
}

.foot h4 { margin: 0 0 14px; font-size: 14px; font-weight: 800; }
.foot p { margin: 0; font-size: 12.8px; color: var(--ink-soft); }
.foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }

.foot ul a {
    font-size: 12.8px;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: .2s;
}

.foot ul a:hover { color: var(--accent); }

.foot__bar {
    border-top: 1px solid var(--line);
    padding: 18px 0;
    font-size: 12px;
    color: var(--ink-mute);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------- ریسپانسیو */
@media (max-width: 1024px) {
    .hero__grid { grid-template-columns: 1fr; gap: 30px; }
    .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .nav { display: none; }
    .hero { padding: 28px 0 20px; }
    .hero__card { padding: 32px 22px; border-radius: var(--r-lg); }
    .hero h1 { font-size: 25px; }
    .deck { grid-template-columns: 1fr; }
    .deck[data-view="list"] .card { flex-direction: column; }
    .deck[data-view="list"] .card__head { width: auto; flex: none; }
    .deck[data-view="list"] .card__foot {
        width: auto;
        flex: none;
        flex-direction: row;
        border-inline-start: 0;
        border-top: 1px dashed var(--line);
        text-align: start;
    }
    .deck[data-view="list"] .card__actions { flex-direction: row; }
    .search input { width: 120px; }
    .cta { padding: 30px 22px; }
    .foot__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}