/* ═══════════════════════════════════════════════════════════════
   JafariJudge — Public Website Design System
   RScard-inspired · Coral + Navy · Lighter & cleaner
   Persian only · RTL · No frameworks · Vanilla CSS3
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════ 1. Fonts (self-hosted) ═══════════════ */
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/vazirmatn/Vazirmatn-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/vazirmatn/Vazirmatn-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

@font-face { font-family: 'Estedad'; src: url('/fonts/estedad/Estedad-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Estedad'; src: url('/fonts/estedad/Estedad-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Estedad'; src: url('/fonts/estedad/Estedad-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Estedad'; src: url('/fonts/estedad/Estedad-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Estedad'; src: url('/fonts/estedad/Estedad-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Estedad'; src: url('/fonts/estedad/Estedad-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

/* ═══════════════ 2. Variables ═══════════════ */
:root {
    /* Brand palette — dark mode */
    --color-primary: #2C3340;
    --color-primary-light: #3A4252;
    --color-primary-dark: #1D232C;
    --color-accent: #E8676B;
    --color-accent-dark: #EF8085;
    --color-accent-soft: rgba(232, 103, 107, 0.14);
    --color-bg: #0F1218;
    --color-bg-alt: #161B23;
    --color-card: #1A202A;
    --color-border: #272F3B;
    --color-text: #DCE1E8;
    --color-muted: #96A0B2;
    --color-heading: #F3F5F8;

    /* Semantic / legacy aliases */
    --color-gold: #E8676B;
    --color-gold-light: #F3A5A8;
    --color-gold-dark: #EF8085;
    --color-navy: #2C3340;
    --color-light: #0F1218;
    --color-dark: #1D232C;
    --color-white: #FFFFFF;
    --color-text-light: #DCE1E8;
    --color-text-muted: #96A0B2;
    --color-success: #16A34A;
    --color-error: #DC2626;
    --color-danger: #DC2626;
    --color-warning: #B45309;
    --color-info: #2563EB;

    /* Typography */
    --font-body: "Vazirmatn", Tahoma, sans-serif;
    --font-heading: "Estedad", "Vazirmatn", Tahoma, sans-serif;
    --font-primary: "Estedad", "Vazirmatn", Tahoma, sans-serif;
    --font-secondary: "Vazirmatn", Tahoma, sans-serif;

    /* Elevation — dark shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.32), 0 1px 2px rgba(0, 0, 0, 0.26);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.42), 0 2px 8px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.52), 0 6px 16px rgba(0, 0, 0, 0.36);

    /* Shape & layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --max-width: 1200px;
    --header-height: 64px;
    --section-gap: 84px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════════════ 3. Reset ═══════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--color-text);
    background: var(--color-bg);
    direction: rtl;
    text-align: right;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-heading);
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--color-accent-dark);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}
a:hover { color: var(--color-accent); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

input, button, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: var(--color-accent); color: #fff; }

/* ═══════════════ 4. Layout ═══════════════ */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }
.container-article { max-width: 920px; }

main { flex: 1; }

.section { padding: var(--section-gap) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-box {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 44px;
    box-shadow: var(--shadow-sm);
}

.section-box-text-center { text-align: center; }
.section-box-text-center .rich-content p { text-align: center; }
.section-box-text-center .section-box-actions { margin-top: 24px; text-align: center; }
.section-box-text-center.container-narrow { margin: 0 auto; }

/* ═══════════════ 5. Section headings ═══════════════ */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head .eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-accent-dark);
    margin-bottom: 8px;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--color-muted); margin: 0; }
.section-head::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    margin: 18px auto 0;
}
.eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-accent-dark);
    margin-bottom: 12px;
}

/* ═══════════════ 6. Buttons ═══════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 0;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s var(--ease), color 0.2s var(--ease),
                border-color 0.2s var(--ease), transform 0.2s var(--ease),
                box-shadow 0.2s var(--ease);
}
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--color-accent); color: #fff; box-shadow: 0 6px 16px rgba(232, 103, 107, 0.28); }
.btn-primary:hover { background: var(--color-accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 103, 107, 0.34); }
.btn-secondary { background: var(--color-primary); color: #fff; }
.btn-secondary:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-2px); }
.btn-outline-primary { background: transparent; border-color: var(--color-accent); color: var(--color-accent-dark); }
.btn-outline-primary:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; transform: translateY(-2px); }
.btn-outline-dark { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-outline-dark:hover { background: var(--color-text); border-color: var(--color-text); color: var(--color-primary-dark); transform: translateY(-2px); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; transform: translateY(-2px); }
.btn-success { background: var(--color-success); color: #fff; box-shadow: 0 6px 16px rgba(22, 163, 74, 0.28); }
.btn-success:hover { background: #128A3E; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(22, 163, 74, 0.34); }
.btn-light { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-light:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.86rem; border-radius: 0; }
.btn-lg { padding: 14px 32px; font-size: 1.02rem; border-radius: 0; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ═══════════════ 7. Forms ═══════════════ */
.form-group { margin-bottom: 22px; }
.form-group > label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--color-heading); margin-bottom: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-card);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-control:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.form-control::placeholder { color: var(--color-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-group-checkbox { margin-bottom: 20px; }
.form-group-checkbox label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; color: var(--color-text); }
.form-group-checkbox input { width: 17px; height: 17px; accent-color: var(--color-accent); cursor: pointer; }

.field-error { display: block; color: var(--color-danger); font-size: 0.8rem; margin-top: 6px; }
.error-message { color: var(--color-danger); }
.validation-summary { background: rgba(220, 38, 38, 0.06); border: 1px solid rgba(220, 38, 38, 0.28); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; }
.validation-summary p { color: var(--color-danger); font-size: 0.88rem; margin-bottom: 4px; }
.validation-summary p:last-child { margin-bottom: 0; }

/* Floating underline inputs (RScard feel) */
.input-field { position: relative; margin-bottom: 28px; }
.input-field input,
.input-field textarea {
    width: 100%;
    padding: 12px 2px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 1rem;
    color: var(--color-text);
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s var(--ease);
}
.input-field input:focus,
.input-field textarea:focus { border-bottom-color: transparent; }
.input-field label {
    position: absolute;
    top: 14px;
    right: 2px;
    color: var(--color-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: top 0.2s var(--ease), font-size 0.2s var(--ease), color 0.2s var(--ease);
}
.input-field input:focus ~ label,
.input-field input:not(:placeholder-shown) ~ label,
.input-field textarea:focus ~ label,
.input-field textarea:not(:placeholder-shown) ~ label {
    top: -20px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--color-accent-dark);
}
.input-field .line {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s var(--ease);
}
.input-field input:focus ~ .line,
.input-field textarea:focus ~ .line { transform: scaleX(1); }

/* ═══════════════ 8. Alerts ═══════════════ */
.alert { border-radius: 0; padding: 13px 18px; margin-bottom: 20px; border: 1px solid transparent; font-size: 0.92rem; }
.alert-success { background: rgba(22, 163, 74, 0.14); border-color: rgba(22, 163, 74, 0.4); color: #86EFAC; }
.alert-danger { background: rgba(220, 38, 38, 0.13); border-color: rgba(220, 38, 38, 0.4); color: #FCA5A5; }
.alert-warning { background: rgba(180, 83, 9, 0.15); border-color: rgba(180, 83, 9, 0.4); color: #FDE68A; }
.alert-info { background: rgba(37, 99, 235, 0.13); border-color: rgba(37, 99, 235, 0.4); color: #93C5FD; }

/* ═══════════════ 9. Header & Navigation ═══════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
    box-shadow: 0 4px 20px rgba(20, 24, 31, 0.28);
    height: var(--header-height);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    height: var(--header-height);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.site-logo:hover { color: #fff; }
.site-logo .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(232, 103, 107, 0.4);
}
.site-logo .logo-icon-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
}

.main-nav { display: flex; align-items: center; gap: 3px; }
.main-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #B9C0CC;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.main-nav .nav-link svg { flex-shrink: 0; color: inherit; }
.main-nav .nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.main-nav .nav-link.active { color: #fff; font-weight: 600; }
.main-nav .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 2px;
    right: 12px;
    left: 12px;
    height: 2px;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
}
    .main-nav .nav-link-cta {
        background: var(--color-accent);
        color: #fff;
        font-weight: 700;
        box-shadow: 0 4px 12px rgba(232, 103, 107, 0.35);
        padding: 5px 10px 5px 10px;
        margin-left: 5px;
    }
.main-nav .nav-link-cta:hover { background: var(--color-accent-dark); color: #fff; }
.main-nav .nav-link-cta.active::after { display: none; }

.nav-dropdown { position: relative; }
.nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 8px;
}
.nav-dropdown > .nav-link { cursor: pointer; }
.nav-dropdown > .nav-link svg { transition: transform 0.2s var(--ease); }
.nav-dropdown:hover > .nav-link svg, .nav-dropdown:focus-within > .nav-link svg { transform: rotate(180deg); }
.nav-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s var(--ease) 0.4s, transform 0.2s var(--ease) 0.4s, visibility 0s linear 0.6s;
    z-index: 120;
}
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s;
}
.nav-dropdown .dropdown-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-dropdown .dropdown-menu a:hover, .nav-dropdown .dropdown-menu a.active-link { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.nav-dropdown .dropdown-menu a.sub-item { color: var(--color-muted); font-weight: 400; }

.nav-divider { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.16); margin: 0 4px; }

.nav-actions { display: inline-flex; align-items: center; gap: 3px; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #E4E7EE;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease),
                border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; transform: translateY(-2px); }
.icon-btn.active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.logout-form { display: inline-flex; }
.main-nav .btn-logout { color: #E4E7EE; }
.main-nav .btn-logout:hover { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 0;
    align-items: center;
    justify-content: center;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.08); }

.cart-link { position: relative; }
.cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.bell-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #E4E7EE;
    text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease),
                border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.bell-link:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; transform: translateY(-2px); }
.notification-bell { display: inline-flex; }
.nav-action-label { display: none; }
.bell-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--color-danger);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.notification-bell { display: inline-flex; }

.skip-link {
    position: fixed;
    top: -60px;
    right: 20px;
    z-index: 3000;
    background: var(--color-accent);
    color: #fff;
    padding: 10px 20px;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 600;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ═══════════════ 10. Breadcrumb ═══════════════ */
.breadcrumb { background: var(--color-bg-alt); border-bottom: 1px solid var(--color-border); padding: 12px 0; font-size: 0.86rem; }
.breadcrumb-list { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.breadcrumb-list li { display: inline-flex; align-items: center; color: var(--color-muted); }
.breadcrumb-list li:not(:last-child)::after { content: "/"; margin-right: 6px; color: var(--color-border); }
.breadcrumb-list a { color: var(--color-muted); }
.breadcrumb-list a:hover { color: var(--color-accent); }
.breadcrumb-list .active { color: var(--color-heading); font-weight: 600; }

.page-hero .breadcrumb-list,
.profile-hero .breadcrumb-list,
.course-detail-header .breadcrumb-list,
.blog-detail-header .breadcrumb-list {
    margin-bottom: 14px;
}
.page-hero .breadcrumb-list li,
.course-detail-header .breadcrumb-list li,
.blog-detail-header .breadcrumb-list li {
    color: rgba(255, 255, 255, 0.65);
}
.page-hero .breadcrumb-list li:not(:last-child)::after,
.course-detail-header .breadcrumb-list li:not(:last-child)::after,
.blog-detail-header .breadcrumb-list li:not(:last-child)::after {
    color: rgba(255, 255, 255, 0.35);
}
.page-hero .breadcrumb-list a,
.course-detail-header .breadcrumb-list a,
.blog-detail-header .breadcrumb-list a {
    color: rgba(255, 255, 255, 0.85);
}
.page-hero .breadcrumb-list a:hover,
.course-detail-header .breadcrumb-list a:hover,
.blog-detail-header .breadcrumb-list a:hover {
    color: var(--color-accent);
}
.page-hero .breadcrumb-list .active,
.course-detail-header .breadcrumb-list .active,
.blog-detail-header .breadcrumb-list .active {
    color: #fff;
}

/* ═══════════════ 11. Page hero ═══════════════ */
.page-hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    padding: 56px 0 52px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(232, 103, 107, 0.18), transparent 45%);
    pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: 6px; }
.page-hero p { color: #B9C0CC; margin: 0; }
.hero-eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin-bottom: 10px;
}

/* ═══════════════ 12. Home hero (profile card) ═══════════════ */
.home-hero {
    padding: 64px 0 64px 0;
}
.hero-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: grid;
    grid-template-columns: 5fr 7fr;
}
.hero-card-side {
    background: linear-gradient(160deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    padding: 44px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 22px;
}
.hero-card-side .profile-photo { position: relative; }
.hero-card-side .profile-photo .photo {
    width: 230px;
    height: 230px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
}
.hero-card-side .profile-photo .photo-hover {
    position: absolute;
    inset: 0;
    width: 230px;
    height: 230px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.16);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}
.hero-card-side .profile-photo:hover .photo-hover { opacity: 1; }
.hero-card-side .photo-caption { color: #B9C0CC; font-size: 0.86rem; }
.hero-card-main { padding: 44px 40px; }
.hero-card-main .hero-eyebrow { margin-bottom: 6px; }
.profile-title { font-size: 2.4rem; margin-bottom: 4px; }
.profile-position { color: var(--color-accent-dark); font-size: 1.1rem; font-weight: 600; margin-bottom: 22px; }
.profile-list { border-top: 1px dashed var(--color-border); }
.profile-list li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 11px 2px;
    border-bottom: 1px dashed var(--color-border);
    font-size: 0.94rem;
}
.profile-list .title { flex-shrink: 0; min-width: 120px; font-weight: 700; color: var(--color-heading); }
.profile-list .cont { color: var(--color-muted); }
.profile-list .cont a { color: var(--color-accent-dark); }

.profile-social { margin-top: 26px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-social-label { font-size: 0.86rem; color: var(--color-muted); font-weight: 600; }
.social { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.social a {
    width: 42px;
    height: 42px;
    border-radius: 0;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s var(--ease), color 0.2s var(--ease),
                border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.social a:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; transform: translateY(-3px); }
.social a svg { width: 19px; height: 19px; }

/* Stats strip */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}
.stats-bar .stat-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 22px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.stats-bar .stat-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-item .stat-num {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--color-accent-dark);
    line-height: 1.2;
}
.stat-item .stat-label { font-size: 0.86rem; color: var(--color-muted); }

/* Feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-card .feature-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.feature-card .feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--color-muted); font-size: 0.92rem; margin: 0; }

/* ═══════════════ 13. Profile page ═══════════════ */
.profile-hero { padding: 60px 0; }
.profile-hero-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: center;
}
.profile-hero-avatar {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--color-accent-soft);
    box-shadow: var(--shadow-md);
}
.profile-hero-info h1 { font-size: 2rem; margin-bottom: 4px; }
.profile-hero-info .profile-position { margin-bottom: 14px; }
.profile-hero-bio { color: var(--color-muted); font-size: 0.96rem; margin-bottom: 18px; }

.profile-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.profile-info-item { display: flex; gap: 10px; align-items: baseline; font-size: 0.92rem; padding-bottom: 10px; border-bottom: 1px dashed var(--color-border); }
.profile-info-item strong { min-width: 110px; color: var(--color-heading); font-weight: 700; }
.profile-info-item span { color: var(--color-muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.info-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
    display: flex;
    flex-direction: column;
}
.info-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.info-card .info-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.info-card .info-card-head .icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.info-card .info-card-head .icon svg { width: 20px; height: 20px; }
.info-card h3 { font-size: 1.05rem; margin: 0; }
.info-card .info-card-sub { color: var(--color-accent-dark); font-size: 0.84rem; font-weight: 600; margin-bottom: 8px; }
.info-card p { color: var(--color-muted); font-size: 0.9rem; flex: 1; margin: 0; }
.link-more { color: var(--color-accent-dark); font-weight: 600; font-size: 0.88rem; margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; }
.link-more:hover { color: var(--color-accent); }
.section-cta { margin-top: 36px; text-align: center; }

/* Timeline */
.timeline { position: relative; padding-right: 26px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; right: 7px; width: 2px; background: var(--color-border); }
.timeline-item { position: relative; padding-bottom: 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: "";
    position: absolute;
    top: 6px;
    right: -23px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-card);
    border: 3px solid var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.timeline-item .timeline-date {
    display: inline-block;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 8px;
}
.timeline-item h3 { font-size: 1.05rem; margin-bottom: 2px; }
.timeline-item .timeline-org { color: var(--color-accent-dark); font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.timeline-item p { color: var(--color-muted); font-size: 0.9rem; margin: 0; }

/* Skill bars */
.skill { margin-bottom: 20px; }
.skill-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.skill-name { font-weight: 600; font-size: 0.92rem; color: var(--color-heading); }
.skill-value { font-size: 0.84rem; font-weight: 700; color: var(--color-accent-dark); }
.skill-track { height: 8px; background: var(--color-bg-alt); border-radius: var(--radius-pill); overflow: hidden; }
.skill-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
    animation: grow-bar 1s var(--ease) forwards;
}
@keyframes grow-bar { from { width: 0; } }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    aspect-ratio: 4 / 3;
    background: var(--color-bg-alt);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .gallery-caption {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(transparent, rgba(29, 35, 44, 0.82));
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 26px 14px 12px;
}

/* ═══════════════ 14. Blog ═══════════════ */
.blog-layout { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; }
.blog-main, .course-main { min-width: 0; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.blog-grid-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.blog-card-image { aspect-ratio: 16 / 9; overflow: hidden; background: var(--color-bg-alt); }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.blog-card:hover .blog-card-image img { transform: scale(1.05); }
.blog-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta { display: flex; align-items: center; gap: 14px; font-size: 0.78rem; color: var(--color-muted); margin-bottom: 10px; }
.blog-card-meta .meta-category { color: var(--color-accent-dark); font-weight: 700; }
.blog-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.blog-card h3 a { color: var(--color-heading); }
.blog-card h3 a:hover { color: var(--color-accent-dark); }
.blog-card .blog-excerpt { color: var(--color-muted); font-size: 0.9rem; flex: 1; }
.blog-card .link-more { margin-top: 14px; }
.meta-date, .meta-reading { color: var(--color-muted); }

.sidebar-widget {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.sidebar-widget h3 {
    font-size: 1.02rem;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--color-accent-soft);
    position: relative;
}
.sidebar-widget h3::after { content: ""; position: absolute; bottom: -2px; right: 0; width: 42px; height: 2px; background: var(--color-accent); }
.sidebar-links li { margin-bottom: 2px; }
.sidebar-links .sub-item a { padding-right: 24px; font-size: 0.86rem; }
.sidebar-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.9rem;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.sidebar-links a:hover { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.sidebar-links .count { color: var(--color-muted); font-size: 0.8rem; }
.sidebar-links .active-link { background: var(--color-accent-soft); color: var(--color-accent-dark); font-weight: 600; }

.search-form { display: flex; gap: 8px; }
.search-form .form-control { flex: 1; min-width: 0; }
.search-form .btn { flex-shrink: 0; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: var(--radius-pill);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.8rem;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tag:hover, .tag.active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.tag-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.tag-section-head h2 { margin: 0; }
.tag-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
}
.tag-type-badge.tag-type-badge-post { background: var(--color-accent); }

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    font-size: 2.2rem;
}
.meta-author { color: var(--color-muted); }

.overview-lesson.locked .overview-lesson-status { background: var(--color-bg-alt); color: var(--color-muted); border-color: var(--color-border); }
.overview-lesson.locked .overview-lesson-title { color: var(--color-muted); }

/* Blog detail */
.blog-detail-header { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; padding: 60px 0; position: relative; overflow: hidden; }
.blog-detail-header::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(232, 103, 107, 0.18), transparent 45%); pointer-events: none; }
.blog-detail-header .container { position: relative; }
.blog-detail-header .blog-card-meta { color: #B9C0CC; }
.blog-detail-header h1 { color: #fff; font-size: 2rem; max-width: 760px; }
.blog-article {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 44px;
    margin-top: -44px;
    position: relative;
}
.blog-article .rich-content { font-size: 1rem; color: var(--color-text); }
.blog-article .rich-content img { border-radius: var(--radius-md); margin: 16px 0; }
.blog-article .rich-content h2, .blog-article .rich-content h3 { margin: 24px 0 10px; }
.blog-article .rich-content p { margin-bottom: 14px; }

/* ═══════════════ 15. Courses ═══════════════ */
.course-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.course-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--color-accent); }
.course-card-image { aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-bg-alt); position: relative; }
.course-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.course-card:hover .course-card-image img { transform: scale(1.06); }
.course-card-image .course-price-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 16px rgba(232, 103, 107, 0.45);
}
.course-card-image .course-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(29, 35, 44, 0.8);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(4px);
    text-decoration: line-through;
    opacity: 0.9;
}
.course-card-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.course-card-body h3 { font-size: 1.2rem; margin-bottom: 8px; line-height: 1.5; }
.course-card-body h3 a { color: var(--color-heading); }
.course-card-body h3 a:hover { color: var(--color-accent-dark); }
.course-card-body p { color: var(--color-muted); font-size: 0.93rem; flex: 1; line-height: 1.8; }
.course-card-meta { display: flex; align-items: center; gap: 16px; color: var(--color-muted); font-size: 0.85rem; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--color-border); }
.course-card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.course-card-meta .meta-category { color: var(--color-accent-dark); font-weight: 700; }
.course-card-meta .meta-category:hover { color: var(--color-accent); }
.course-card .link-more { margin-top: 18px; }

/* Course detail */
.course-detail-header { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; padding: 56px 0; position: relative; overflow: hidden; }
.course-detail-header::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(232, 103, 107, 0.18), transparent 45%); pointer-events: none; }
.course-detail-header .container { position: relative; }
.course-detail-header .course-badge { color: var(--color-accent); font-weight: 700; font-size: 0.85rem; }
.course-detail-category {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 5px 14px;
    border-radius: 0;
    margin-bottom: 14px;
}
.course-detail-category:hover { background: var(--color-accent); color: #fff; }
.course-detail-header h1 { color: #fff; font-size: 2rem; margin-bottom: 10px; max-width: 800px; }
.course-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; color: #B9C0CC; font-size: 0.9rem; }
.course-detail-meta span { display: inline-flex; align-items: center; gap: 6px; }
.course-detail-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.course-detail-tag {
    display: inline-block;
    color: #B9C0CC;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.course-detail-tag:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.course-detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.course-detail-content { padding-top: 20px; }
.course-detail-content .section-box { margin-bottom: 28px; }
.course-detail-sidebar { position: sticky; top: calc(var(--header-height) + 24px); margin-top: -56px; }
.course-detail-sidebar-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.course-detail-sidebar-card .side-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-bg-alt); }
.course-detail-sidebar-card .side-img img { width: 100%; height: 100%; object-fit: cover; }
.course-detail-sidebar-card .side-body { padding: 24px; }
.course-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.course-price-row .price { font-family: var(--font-heading); font-size: 1.7rem; font-weight: 800; color: var(--color-accent-dark); }
.course-price-row .old-price { color: var(--color-muted); text-decoration: line-through; font-size: 0.95rem; }
.course-info-list { margin: 16px 0; }
.course-info-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 2px; border-bottom: 1px dashed var(--color-border); font-size: 0.9rem; }
.course-info-list li span:first-child { color: var(--color-muted); display: inline-flex; align-items: center; gap: 7px; }
.course-info-list li strong { color: var(--color-heading); }

/* ═══════════════ 16. Cart ═══════════════ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 16px; }
.cart-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cart-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.cart-item-image { width: 96px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--color-bg-alt); }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h3 { font-size: 1rem; margin-bottom: 4px; }
.cart-item-info h3 a { color: var(--color-heading); }
.cart-item-price { color: var(--color-accent-dark); font-weight: 700; font-size: 0.95rem; }
.cart-item-actions { display: flex; align-items: center; gap: 8px; }
.cart-item-actions form { display: inline-flex; }
.summary-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 26px;
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.summary-card h3 { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px solid var(--color-accent-soft); }
.summary-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.summary-rows .row-line { display: flex; justify-content: space-between; color: var(--color-muted); font-size: 0.92rem; }
.summary-rows .row-line.total { color: var(--color-heading); font-weight: 700; font-size: 1.05rem; border-top: 1px dashed var(--color-border); padding-top: 12px; }

/* ═══════════════ 17. Checkout ═══════════════ */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.checkout-form-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 32px;
}
.checkout-form-card h3 { padding-bottom: 12px; margin-bottom: 20px; border-bottom: 2px solid var(--color-accent-soft); }
.payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.payment-method { position: relative; }
.payment-method input[type="radio"] { position: absolute; opacity: 0; }
.payment-method label {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.payment-method input:checked + label { border-color: var(--color-accent); background: var(--color-accent-soft); }
.payment-method .radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
    position: relative;
}
.payment-method input:checked + label .radio-dot { border-color: var(--color-accent); }
.payment-method input:checked + label .radio-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--color-accent); }
.payment-method.selected label { border-color: var(--color-accent); background: var(--color-accent-soft); }
.btn-checkout-submit { margin-top: 6px; }
.receipt-fields { display: none; }
.receipt-fields.open { display: block; }
.receipt-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 0; }

/* ═══════════════ 18. Payment result ═══════════════ */
.payment-result {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 560px;
    margin: 0 auto;
    padding: 52px 40px;
    text-align: center;
}
.payment-result-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
}
.payment-result-icon.success { background: var(--color-success); box-shadow: 0 10px 26px rgba(22, 163, 74, 0.3); }
.payment-result-icon.error { background: var(--color-danger); box-shadow: 0 10px 26px rgba(220, 38, 38, 0.3); }
.payment-result-icon.warning { background: var(--color-warning); box-shadow: 0 10px 26px rgba(180, 83, 9, 0.3); }
.payment-result-icon.info { background: var(--color-info); box-shadow: 0 10px 26px rgba(37, 99, 235, 0.3); }
.payment-result h1 { font-size: 1.5rem; margin-bottom: 10px; }
.payment-result .result-message { color: var(--color-muted); margin-bottom: 24px; }
.payment-result-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ═══════════════ 19. Contact ═══════════════ */
.contact-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 32px; align-items: start; }
.contact-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 36px;
}
.contact-card-narrow { max-width: 820px; margin: 0 auto; }
.contact-info-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.contact-item { display: flex; align-items: center; gap: 14px; }
.contact-item .contact-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-item .contact-icon svg { width: 22px; height: 22px; }
.contact-item strong { display: block; font-size: 0.84rem; color: var(--color-muted); font-weight: 600; }
.contact-item span, .contact-item a { font-size: 0.94rem; color: var(--color-heading); }
.contact-item a:hover { color: var(--color-accent-dark); }
.contact-socials { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.contact-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-bg-alt);
    color: var(--color-muted);
    transition: color .2s, background .2s;
}
.contact-socials a:hover { color: var(--color-accent-dark); background: var(--color-accent-soft); }
.contact-socials a svg { width: 20px; height: 20px; }
.contact-social { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.contact-social .social a { width: 38px; height: 38px; }
.captcha-row { display: flex; gap: 12px; align-items: stretch; }
.captcha-question {
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--color-heading);
    font-size: 0.95rem;
    white-space: nowrap;
}

/* ═══════════════ 20. Auth ═══════════════ */
.auth-wrap { display: flex; justify-content: center; padding: 56px 0; }
.auth-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
}
.auth-card .auth-head { text-align: center; margin-bottom: 26px; }
.auth-card .auth-head .auth-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.auth-card .auth-head .auth-icon svg { width: 28px; height: 28px; }
.auth-card .auth-head h1 { font-size: 1.4rem; }
.auth-card .auth-head p { color: var(--color-muted); font-size: 0.9rem; margin: 0; }
.auth-card .auth-form { margin-top: 8px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 0.88rem; }
.auth-links a { color: var(--color-accent-dark); font-weight: 600; }
.auth-links a:hover { color: var(--color-accent); }

/* ═══════════════ 21. Student & Learning ═══════════════ */
.my-courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.my-course-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.my-course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.my-course-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--color-bg-alt); }
.my-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-course-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.my-course-title { font-size: 1rem; margin-bottom: 12px; }
.my-course-title a { color: var(--color-heading); }
.my-course-title a:hover { color: var(--color-accent-dark); }
.my-course-progress { margin-bottom: 14px; }
.progress-bar-container { height: 8px; background: var(--color-bg-alt); border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark)); }
.progress-info { display: flex; justify-content: space-between; color: var(--color-muted); font-size: 0.78rem; margin-top: 6px; }

/* Tables */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 620px; }
.table-responsive th {
    text-align: right;
    padding: 12px 14px;
    background: var(--color-bg-alt);
    color: var(--color-heading);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}
.table-responsive td { padding: 12px 14px; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
.table-responsive tbody tr:last-child td { border-bottom: none; }
.table-responsive tbody tr { transition: background 0.2s var(--ease); }
.table-responsive tbody tr:hover { background: var(--color-bg-alt); }
.table-responsive code { background: var(--color-bg-alt); padding: 2px 8px; border-radius: 6px; font-size: 0.82rem; direction: ltr; display: inline-block; }

.profile-badge { display: inline-block; padding: 3px 12px; border-radius: 0; font-size: 0.76rem; font-weight: 700; }
.profile-badge.badge-primary { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.profile-badge.badge-info { background: rgba(37, 99, 235, 0.15); color: #93C5FD; }
.profile-badge.badge-success { background: rgba(22, 163, 74, 0.16); color: #86EFAC; }
.profile-badge.badge-warning { background: rgba(180, 83, 9, 0.18); color: #FDE68A; }
.profile-badge.badge-danger { background: rgba(220, 38, 38, 0.15); color: #FCA5A5; }
.profile-badge.badge-secondary { background: var(--color-bg-alt); color: var(--color-muted); }
.payment-item-course { display: block; color: var(--color-text); }

.learning-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; min-height: 70vh; background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.learning-sidebar {
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    padding: 26px 20px;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
}
.learning-sidebar h3 { font-size: 0.98rem; margin-bottom: 16px; }
.learning-progress-summary { display: flex; flex-direction: column; gap: 6px; }
.lesson-breadcrumb { color: var(--color-muted); font-size: 0.84rem; margin-bottom: 10px; }
.lesson-breadcrumb a { color: var(--color-accent-dark); font-weight: 600; }
.learning-chapters { display: flex; flex-direction: column; gap: 6px; }
.learning-chapter { margin-bottom: 14px; }
.learning-chapter .chapter-title { font-weight: 700; font-size: 0.88rem; color: var(--color-heading); margin-bottom: 6px; padding: 6px 10px; background: var(--color-bg-alt); border-radius: var(--radius-sm); }
.lesson-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.86rem;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lesson-link:hover { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.lesson-link.active { background: var(--color-accent-soft); color: var(--color-accent-dark); font-weight: 600; }
.lesson-link .lesson-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border); flex-shrink: 0; }
.lesson-link.completed .lesson-dot { background: var(--color-success); }
.lesson-link.active .lesson-dot { background: var(--color-accent); }
.lesson-completed-badge { color: var(--color-success); display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; margin-right: auto; }

.learning-main { padding: 36px 34px; min-width: 0; }
.learning-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px; text-align: center; }
.stat-card .stat-num { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: var(--color-accent-dark); }
.stat-card .stat-label { font-size: 0.82rem; color: var(--color-muted); }

.lesson-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.lesson-header h1 { font-size: 1.5rem; }
.lesson-duration-label { display: inline-flex; align-items: center; gap: 6px; color: var(--color-muted); font-size: 0.85rem; }
.lesson-video { margin-bottom: 24px; border-radius: var(--radius-lg); overflow: hidden; background: #0E1116; aspect-ratio: 16 / 9; box-shadow: var(--shadow-md); }
.lesson-video .video-embed { width: 100%; height: 100%; }
.lesson-video .video-player { width: 100%; height: 100%; border: none; }
.lesson-content { margin-bottom: 24px; }
.lesson-actions { display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px dashed var(--color-border); }
.lesson-nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }

.section-box-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}
.section-box-head h2 { font-size: 1.3rem; margin: 0; }
.section-box-meta { color: var(--color-muted); font-size: 0.86rem; }

.overview-chapter {
    margin-bottom: 18px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.overview-chapter:last-child { margin-bottom: 0; }
.overview-chapter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
    border-bottom: 1px solid var(--color-border);
}
.overview-chapter-index {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    font-weight: 800;
    font-size: 0.82rem;
}
.overview-chapter-title { font-weight: 700; color: var(--color-heading); font-size: 0.98rem; }
.overview-chapter-count {
    margin-right: auto;
    font-size: 0.74rem;
    color: var(--color-muted);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}
.overview-chapter-desc {
    margin: 0;
    padding: 12px 16px 0;
    color: var(--color-muted);
    font-size: 0.86rem;
}
.overview-lessons {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 2px;
}
.overview-lesson {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.overview-lesson:hover { background: var(--color-card); border-color: var(--color-border); }
.overview-lesson-status {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-accent-dark);
}
.overview-lesson-title { flex: 1; min-width: 0; font-weight: 600; font-size: 0.92rem; color: var(--color-heading); }
.overview-lesson-badges { display: inline-flex; align-items: center; gap: 8px; }
.lesson-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}
.lesson-badge-dur { color: var(--color-muted); background: var(--color-bg-alt); border: 1px solid var(--color-border); }
.lesson-badge-free { color: var(--color-success); background: rgba(22, 163, 74, 0.14); border: 1px solid rgba(22, 163, 74, 0.35); font-weight: 600; }
.overview-lesson.completed .overview-lesson-status { background: rgba(22, 163, 74, 0.14); color: var(--color-success); border-color: rgba(22, 163, 74, 0.35); }
.overview-lesson-preview {
    margin: 2px 54px 14px;
    padding: 14px;
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
}
.overview-lesson-preview .lesson-preview-item { margin-bottom: 10px; }
.overview-lesson-preview .lesson-preview-item:last-child { margin-bottom: 0; }
.overview-lesson-preview .lesson-preview-audio {
    max-width: 520px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px;
}
.overview-lesson-preview .lesson-preview-audio .name { margin-bottom: 6px; font-size: 0.86rem; }
.overview-lesson-preview audio, .overview-lesson-preview video { width: 100%; max-width: 520px; border-radius: var(--radius-sm); background: #000; }

/* ═══════════════ 22. Notification ═══════════════ */
.notification-page { max-width: 820px; margin: 0 auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.notification-list { display: flex; flex-direction: column; gap: 14px; }
.notification-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: border-color 0.2s var(--ease);
}
.notification-item.unread { border-right: 3px solid var(--color-accent); background: var(--color-accent-soft); }
.notification-content { flex: 1; min-width: 0; }
.notification-type-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 0;
    background: var(--color-bg-alt);
    color: var(--color-muted);
    margin-bottom: 8px;
}
.notification-type-badge.type-paymentcompleted,
.notification-type-badge.type-paymentrejected { background: rgba(220, 38, 38, 0.15); color: #FCA5A5; }
.notification-type-badge.type-enrollmentcreated { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.notification-type-badge.type-coursepublished { background: rgba(37, 99, 235, 0.15); color: #93C5FD; }
.notification-title { font-size: 1rem; margin-bottom: 4px; }
.notification-message { color: var(--color-muted); font-size: 0.9rem; margin: 0; }
.notification-date { display: block; color: var(--color-muted); font-size: 0.76rem; margin-top: 8px; }
.mark-read-btn { width: 32px; height: 32px; border-radius: 0; border: 1px solid var(--color-border); background: var(--color-card); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s var(--ease), border-color 0.2s var(--ease); }
.mark-read-btn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-accent); }
.mark-read-btn:hover { background: var(--color-accent); border-color: var(--color-accent); }
.mark-read-btn:hover .dot { background: #fff; }

/* ═══════════════ 23. Pagination ═══════════════ */
.pagination-nav { display: flex; justify-content: center; margin-top: 44px; }
.pagination-list { display: flex; align-items: center; gap: 8px; }
.pagination-item a, .pagination-item span, .pagination-item .pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 8px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.pagination-item a:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(232, 103, 107, 0.18);
}
.pagination-item.active a, .pagination-item.active span {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(232, 103, 107, 0.35);
}
.pagination-item.disabled span { opacity: 0.5; cursor: not-allowed; background: var(--color-muted-soft, var(--color-card)); }
.pagination-item:first-child a, .pagination-item:last-child a { min-width: 52px; }

/* ═══════════════ 24. CMS page & errors ═══════════════ */
.cms-page {
    padding: 30px 0 0 0;
}
.page-content {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 44px;
}
.rich-content h2, .rich-content h3 { margin: 26px 0 10px; }
.rich-content p { margin-bottom: 14px; color: var(--color-text); }
.rich-content ul { list-style: disc; padding-right: 22px; margin-bottom: 14px; }
.rich-content ol { list-style: decimal; padding-right: 22px; margin-bottom: 14px; }
.rich-content blockquote { border-right: 3px solid var(--color-accent); background: var(--color-bg-alt); padding: 14px 18px; border-radius: 8px; margin: 18px 0; color: var(--color-muted); }
.rich-content img { border-radius: var(--radius-md); margin: 14px 0; }
.rich-content a { color: var(--color-accent-dark); font-weight: 600; }
.rich-content .jf-text-lead { font-size: 1.15rem; font-weight: 600; }
.rich-content .jf-text-small { font-size: 0.875rem; color: var(--color-muted); }
.rich-content .jf-text-muted { color: var(--color-muted); }
.rich-content .jf-text-highlight { background: #fff3cd; border-right: 3px solid #ffc107; padding: 10px 14px; border-radius: 6px; }

.error-page {
    min-height: 62vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
}
.error-page .error-code { font-family: var(--font-heading); font-size: 6rem; font-weight: 800; color: var(--color-accent); line-height: 1.1; }
.error-page h1 { margin: 6px 0 10px; }
.error-page p { color: var(--color-muted); margin-bottom: 26px; }

/* ═══════════════ 25. Empty state ═══════════════ */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { color: var(--color-muted); margin-bottom: 20px; }

/* ═══════════════ 26. Footer ═══════════════ */
.site-footer { background: var(--color-primary-dark); color: #A7AEB8; margin-top: 60px; }
.site-footer .footer-top { padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-col { min-width: 0; }
.site-footer h3 { color: #fff; font-size: 1.02rem; margin-bottom: 16px; }
.site-footer p { color: #A7AEB8; font-size: 0.9rem; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul a { color: #A7AEB8; font-size: 0.9rem; transition: color 0.2s var(--ease), padding-right 0.2s var(--ease); }
.site-footer ul a:hover { color: var(--color-accent); padding-right: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 18px 0; text-align: center; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social .social a { border-color: rgba(255, 255, 255, 0.18); background: transparent; color: #B9C0CC; }
.footer-social .social a:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* ═══════════════ 27. Toasts ═══════════════ */
.jafari-toast-container { position: fixed; bottom: 24px; left: 24px; z-index: 5000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.jafari-toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 320px;
    max-width: 440px;
    background: var(--color-primary-dark);
    color: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    border-right: 4px solid var(--color-accent);
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    pointer-events: auto;
}
.jafari-toast.jafari-toast-show { opacity: 1; transform: translateY(0); }
.jafari-toast.success { border-right-color: var(--color-success); }
.jafari-toast.error { border-right-color: var(--color-danger); }
.jafari-toast.warning { border-right-color: var(--color-warning); }

.jafari-toast-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}
.jafari-toast-body { flex: 1; font-size: 0.9rem; line-height: 1.6; }

.jafari-toast-close {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.15rem;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.15s ease, background 0.15s ease;
}
.jafari-toast-close:hover { color: #fff; background: rgba(255, 255, 255, 0.15); }

.jafari-toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    transform-origin: right;
    animation: jafari-toast-progress 4.5s linear forwards;
    pointer-events: none;
}
.jafari-toast:hover .jafari-toast-progress { animation-play-state: paused; }
.jafari-toast.success .jafari-toast-progress { color: var(--color-success); }
.jafari-toast.error .jafari-toast-progress { color: var(--color-danger); }
.jafari-toast.warning .jafari-toast-progress { color: var(--color-warning); }
@keyframes jafari-toast-progress { from { width: 100%; } to { width: 0; } }

/* Scroll top */
.btn-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    width: 44px;
    height: 44px;
    border-radius: 0;
    border: none;
    background: var(--color-accent);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(232, 103, 107, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.btn-scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.btn-scroll-top:hover { background: var(--color-accent-dark); }

/* ═══════════════ 28. Responsive ═══════════════ */
@media (max-width: 1200px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--color-primary-dark);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px 20px 22px;
        display: none;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    .main-nav.open { display: flex; }
    .main-nav .nav-link { padding: 12px 14px; font-size: 1rem; color: #D6DAE2; border-radius: 0; }
    .main-nav .nav-link.active::after { display: none; }
    .main-nav .nav-link.active { background: rgba(255, 255, 255, 0.07); }
    .main-nav .nav-divider { width: 100%; height: 1px; margin: 8px 0; }

    .main-nav .nav-dropdown::after { display: none; }
    .main-nav .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0 14px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s var(--ease);
    }
    .main-nav .nav-dropdown.open .dropdown-menu, .main-nav .nav-dropdown:hover .dropdown-menu, .main-nav .nav-dropdown:focus-within .dropdown-menu {
        max-height: 480px;
        padding: 4px 14px 8px;
    }
    .main-nav .nav-dropdown .dropdown-menu a { padding: 8px 14px; white-space: normal; }

    .nav-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    .nav-actions .nav-link,
    .nav-actions .icon-btn,
    .nav-actions .bell-link,
    .nav-actions .logout-form {
        width: 100%;
        height: 46px;
        border-radius: 0;
        padding: 0 14px;
        gap: 10px;
        justify-content: center;
        transform: none;
    }
    .nav-actions .icon-btn,
    .nav-actions .bell-link,
    .nav-actions .btn-logout {
        border-color: rgba(255, 255, 255, 0.16);
        background: rgba(255, 255, 255, 0.05);
    }
    .nav-actions .icon-btn:hover,
    .nav-actions .bell-link:hover,
    .nav-actions .btn-logout:hover {
        background: var(--color-accent);
        border-color: var(--color-accent);
        color: #fff;
    }
    .nav-actions .notification-bell,
    .nav-actions .logout-form {
        display: flex;
        width: 100%;
    }
    .nav-actions .notification-bell { margin: 0; }
    .nav-actions .nav-link { color: #fff; }
    .nav-actions .nav-link-cta { background: var(--color-accent); }
    .nav-actions .nav-action-label { display: inline; }
    .nav-actions .cart-badge,
    .nav-actions .bell-badge {
        position: static;
        margin-right: 6px;
        min-width: 22px;
        height: 22px;
    }
}

@media (max-width: 1100px) {
    .hero-card { grid-template-columns: 1fr; }
    .hero-card-side { padding: 36px 24px; }
    .feature-grid, .card-grid, .blog-grid, .blog-grid-related, .course-grid, .my-courses-grid { grid-template-columns: repeat(2, 1fr); }
    .course-layout { grid-template-columns: 1fr; }
    .course-sidebar { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .course-sidebar .sidebar-widget { margin-bottom: 0; }
    .course-detail-layout { grid-template-columns: 1fr; }
    .course-detail-sidebar { position: static; margin-top: 0; }
    .course-detail-sidebar-card { max-width: 460px; }
    .cart-layout, .checkout-layout, .contact-layout { grid-template-columns: 1fr; }
    .cart-summary .summary-card { position: static; }
}

@media (max-width: 1024px) {
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .blog-sidebar .sidebar-widget { margin-bottom: 0; }
    .profile-hero-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .profile-hero-avatar { width: 200px; height: 200px; }
    .profile-info-grid { grid-template-columns: 1fr; }
    .learning-layout { grid-template-columns: 280px 1fr; }
    .learning-main { padding: 28px 24px; }
}

@media (max-width: 768px) {
    :root { --header-height: 60px; }
    .section { padding: 60px 0; }
    .section-box { padding: 28px 22px; }
    .section-head { margin-bottom: 34px; }

    .feature-grid, .card-grid, .blog-grid, .blog-grid-related, .course-grid, .my-courses-grid, .gallery-grid, .stats-bar { grid-template-columns: 1fr; }
    .learning-stats { grid-template-columns: 1fr; }

    .hero-card-main { padding: 30px 24px; }
    .hero-card-side .profile-photo .photo, .hero-card-side .profile-photo .photo-hover { width: 180px; height: 180px; }
    .profile-title { font-size: 1.9rem; }

    .form-row, .receipt-field-row { grid-template-columns: 1fr; }
    .profile-hero-card { padding: 28px 22px; }

    .learning-layout { display: block; }
    .learning-sidebar { position: static; max-height: none; border-left: none; border-bottom: 1px solid var(--color-border); }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .page-hero { padding: 44px 0; }
    .blog-detail-header h1 { font-size: 1.7rem; }
    .blog-article { padding: 26px 20px; margin-top: -24px; }
    .cart-item { flex-wrap: wrap; }
    .cart-item-actions { margin-right: auto; }

    .timeline { padding-right: 22px; }
    .timeline-item::before { right: -19px; }

    .profile-payments-table th, .profile-payments-table td { white-space: nowrap; }
}

@media (max-width: 576px) {
    .container { padding: 0 18px; }
    h1 { font-size: 1.8rem; }

    .site-logo { font-size: 1.05rem; }
    .site-logo .logo-icon { width: 34px; height: 34px; font-size: 1rem; }
    .site-logo .logo-icon-img { width: 34px; height: 34px; }
    .course-sidebar, .blog-sidebar { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-content { padding: 26px 20px; }
    .payment-result { padding: 40px 24px; }
    .auth-card { padding: 30px 24px; }
    .error-page .error-code { font-size: 4.5rem; }
    .jafari-toast { min-width: 0; width: calc(100vw - 32px); max-width: none; }
    .btn-scroll-top { bottom: 16px; right: 16px; }
}

/* ═══════════════ Learning environment (CourseLearning) ═══════════════ */
.learn-hero-progress { max-width: 560px; margin-top: 22px; }
.learn-hero-progress .progress-info span { font-size: 0.86rem; }

.learn-layout { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }

.learn-sidebar {
    margin-top: -46px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: sticky;
    top: 24px;
}
.learn-sidebar-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--color-border);
}
.learn-sidebar-head h3 { font-size: 0.95rem; margin: 0; }
.learn-sidebar-count { font-size: 0.8rem; color: var(--color-muted); }

.learn-chapter + .learn-chapter { border-top: 1px solid var(--color-border); }
.learn-chapter-group summary {
    list-style: none; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; gap: 10px;
}
.learn-chapter-group summary::-webkit-details-marker { display: none; }
.learn-chapter-group summary::before {
    content: "\25B8"; color: var(--color-muted); font-size: 0.75rem;
    transition: transform .2s ease;
}
.learn-chapter-group[open] summary::before { transform: rotate(90deg); }
.learn-chapter-title { font-weight: 700; font-size: 0.88rem; color: var(--color-heading); flex: 1; }
.learn-chapter-meta { font-size: 0.78rem; color: var(--color-muted); }
.learn-chapter-desc { padding: 0 20px 8px; margin: 0; font-size: 0.82rem; color: var(--color-muted); }

.learn-lesson-list { list-style: none; margin: 0; padding: 0 0 10px; }
.learn-lesson-list li { border-top: 1px dashed var(--color-border); }
.learn-lesson {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px 10px 34px; text-decoration: none;
    color: var(--color-text);
}
.learn-lesson:hover { background: var(--color-accent-soft); color: var(--color-heading); }
.learn-lesson.active, .learn-lesson.current {
    background: var(--color-accent-soft);
    border-right: 3px solid var(--color-accent);
}
.learn-lesson-status {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; color: var(--color-muted);
    background: var(--color-bg-alt);
}
.learn-lesson-status.done { background: var(--color-success); color: #fff; }
.learn-lesson-status:not(.done) { background: var(--color-bg-alt); }
.learn-lesson-title { flex: 1; font-size: 0.87rem; font-weight: 600; }
.learn-lesson-dur { font-size: 0.74rem; color: var(--color-muted); white-space: nowrap; }

.learn-main { min-width: 0; }
.learn-main .section-box { padding: 34px; }
.learn-welcome-head .eyebrow { display: inline-block; margin-bottom: 8px; }
.learn-welcome-head h2 { font-size: 1.45rem; margin-bottom: 14px; }
.learn-welcome > p { color: var(--color-muted); line-height: 1.9; margin-bottom: 24px; }

.learn-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px;
}
.learn-stat {
    background: var(--color-bg-alt); border: 1px solid var(--color-border);
    border-radius: var(--radius-md); padding: 16px 10px; text-align: center;
}
.learn-stat strong { display: block; font-size: 1.35rem; color: var(--color-heading); }
.learn-stat span { font-size: 0.8rem; color: var(--color-muted); }

.learn-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.learn-cta .btn { min-width: 200px; }

/* Lesson player */
.lesson-topbar { background: var(--color-card); border-bottom: 1px solid var(--color-border); }
.lesson-topbar-inner {
    display: flex; align-items: center; gap: 16px;
    padding-top: 14px; padding-bottom: 14px;
}
.lesson-back { font-size: 0.88rem; font-weight: 700; color: var(--color-accent-dark); text-decoration: none; white-space: nowrap; }
.lesson-course-title { flex: 1; font-weight: 700; color: var(--color-heading); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-progress-label { font-size: 0.82rem; color: var(--color-muted); white-space: nowrap; }

.lesson-player { padding: 38px; }
.lesson-player-head { margin-bottom: 26px; }
.lesson-player-head h1 { font-size: 1.6rem; margin-bottom: 10px; }
.lesson-duration { color: var(--color-muted); font-size: 0.88rem; margin: 0; }
.learn-lesson-badge {
    display: inline-block; font-size: 0.78rem; font-weight: 700;
    background: var(--color-accent-soft); color: var(--color-accent-dark);
    border-radius: var(--radius-pill); padding: 4px 12px; margin-bottom: 10px;
}
.learn-lesson-badge.free { background: var(--color-success); color: #fff; }

.lesson-media { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.lesson-media-item { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.lesson-video { width: 100%; max-height: 520px; background: #000; display: block; }
.lesson-audio { padding: 14px 18px; }
.lesson-media-name { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; color: var(--color-heading); }
.lesson-audio-el { width: 100%; }
.lesson-attachment {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; text-decoration: none; color: var(--color-accent-dark); font-weight: 600;
}
.lesson-attachment:hover { color: var(--color-accent-dark); }
.lesson-attachment-icon {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: var(--color-accent-soft); color: var(--color-accent-dark);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}

.lesson-content { margin-bottom: 30px; }
.lesson-content .rich-content { font-size: 1rem; line-height: 2; }

.lesson-complete-bar { border-top: 1px solid var(--color-border); padding-top: 24px; margin-bottom: 24px; }
.lesson-completed-msg {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--color-bg-alt); border: 1px solid var(--color-border);
    border-radius: var(--radius-md); padding: 14px;
}
.lesson-completed-msg span {
    width: 26px; height: 26px; border-radius: 50%; background: var(--color-success); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem;
}

.lesson-nav { display: flex; justify-content: space-between; gap: 16px; align-items: stretch; }
.lesson-nav-link {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--color-border); border-radius: var(--radius-md);
    padding: 14px 18px; text-decoration: none; background: var(--color-card);
    max-width: 46%;
}
.lesson-nav-link:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }
.lesson-nav-link.prev { flex-direction: row-reverse; text-align: left; }
.lesson-nav-link small { display: block; color: var(--color-muted); font-size: 0.75rem; }
.lesson-nav-link strong { color: var(--color-heading); font-size: 0.9rem; }
.lesson-nav-arrow { color: var(--color-accent-dark); font-size: 1.1rem; }

@media (max-width: 992px) {
    .learn-layout { grid-template-columns: 1fr; }
    .learn-sidebar { position: static; margin-top: 0; }
}
@media (max-width: 576px) {
    .learn-stats { grid-template-columns: repeat(2, 1fr); }
    .learn-cta { flex-direction: column; }
    .learn-cta .btn { width: 100%; }
    .lesson-nav { flex-direction: column; }
    .lesson-nav-link { max-width: none; }
}

/* ═══════════════ Jalali (Shamsi) Datepicker ═══════════════ */
.jalali-datepicker { position: relative; }
.jalali-datepicker .jalali-datepicker-input { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-left: 38px; }
.jalali-datepicker-popup {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 1060; width: 280px;
    background: #fff; border: 1px solid rgba(0,0,0,.1); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 12px; display: none; direction: rtl;
    font-family: Vazirmatn, Tahoma, sans-serif;
}
.jalali-datepicker.open .jalali-datepicker-popup { display: block; }
.jdp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 6px; }
.jdp-title { flex: 1; text-align: center; font-weight: 600; font-size: 14px; color: var(--color-primary); background: none; border: none; cursor: pointer; padding: 4px; border-radius: 8px; }
.jdp-title:hover { background: var(--color-accent-soft); }
.jdp-nav { width: 30px; height: 30px; border: 1px solid rgba(0,0,0,.1); background: #fff; border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1; color: var(--color-primary); }
.jdp-nav:hover { background: var(--color-accent-soft); }
.jdp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.jdp-weekdays span { text-align: center; font-size: 12px; font-weight: 600; color: var(--color-accent); padding: 4px 0; }
.jdp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.jdp-day { border: none; background: #fff; border-radius: 8px; padding: 7px 0; font-size: 13px; cursor: pointer; color: #333; text-align: center; }
.jdp-day:hover { background: var(--color-accent-soft); }
.jdp-empty { pointer-events: none; }
.jdp-today { color: var(--color-accent); font-weight: 700; }
.jdp-selected { background: var(--color-accent) !important; color: #fff !important; font-weight: 700; }
.jdp-today-btn { display: block; width: 100%; margin-top: 10px; border: 1px solid rgba(0,0,0,.1); background: #fff; color: var(--color-primary); border-radius: 8px; padding: 7px; font-size: 12px; cursor: pointer; }
.jdp-today-btn:hover { background: var(--color-accent-soft); }
.jdp-months, .jdp-years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.jdp-month, .jdp-year { border: none; background: #fff; border-radius: 8px; padding: 8px 4px; font-size: 13px; cursor: pointer; color: #333; text-align: center; }
.jdp-month:hover, .jdp-year:hover { background: var(--color-accent-soft); }
