/* ===================== پایه ===================== */
:root {
    --brand: #6d28d9;
    --brand-dark: #4c1d95;
    --gold: #d4a24c;
    --ink: #1c2430;
    --muted: #667085;
    --bg: #f7f8f5;
    --card: #ffffff;
    --border: #e7e9e3;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-card: 0 10px 24px rgba(17,24,39,.06);
    --container-max: 1180px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.5; margin: 0; }
img { max-width: 100%; display: block; }

/* رفع باگ مرورگرها: دکمه/اینپوت/سلکت به‌صورت پیش‌فرض فونت صفحه را ارث نمی‌برند */
button, input, select, textarea {
    font-family: inherit;
}

/* ===================== هدر ===================== */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.brand-name { font-weight: 700; font-size: 17px; color: var(--brand-dark); }
.brand-tagline { font-size: 11px; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
    position: relative; font-size: 13.5px; font-weight: 500; color: var(--ink);
    padding: 9px 15px; border-radius: var(--radius-sm); transition: color .15s, background-color .15s;
    white-space: nowrap;
}
.main-nav a:hover { color: var(--brand); background: rgba(var(--brand-rgb), .07); }
.main-nav a.active { color: var(--brand); font-weight: 700; }
.main-nav a.active::after {
    content: ''; position: absolute; right: 15px; left: 15px; bottom: 3px; height: 2px;
    border-radius: 2px; background: var(--brand);
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.mobile-nav-toggle {
    display: none; align-items: center; justify-content: center; width: 40px; height: 40px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; color: var(--ink);
}
.btn-ghost { border: 1px solid var(--border); padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13px; display: inline-flex; align-items: center; gap: 7px; }
.btn-brand { background: var(--gold); color: #2a1e05; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; }
.btn-brand-outline { border: 2px solid var(--brand); color: var(--brand); padding: 12px 22px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; display: inline-flex; align-items:center; gap:8px; }
.btn-brand-solid { background: var(--brand); color: #fff; padding: 13px 24px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; display: inline-flex; align-items:center; gap:8px; border:none; cursor:pointer; }

/* ===================== هیرو ===================== */
.hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); padding: 56px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero-inner.no-visual { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; text-align: center; }
.hero-inner.no-visual .hero-ctas { justify-content: center; }
.hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 18px; }
.hero p.lead { color: var(--muted); font-size: 15.5px; line-height: 2; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
    position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 400px;
    display: flex; align-items: center; justify-content: center; padding: 32px;
    isolation: isolate;
}
.hero-visual.has-image { background: var(--brand-dark); }
.hero-visual.image-only { padding: 0; min-height: 380px; }
.hero-slideshow { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.active { opacity: 1; }
.hero-visual.has-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(195deg, rgba(76,29,149,.18) 0%, rgba(59,19,114,.5) 55%, rgba(38,9,80,.82) 100%); z-index: 1; }

/* ---- نقاط ناوبری اسلایدشو (وقتی چند اسلاید هست) ---- */
.slide-dots { position: absolute; z-index: 3; bottom: 18px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.slide-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); transition: all .3s ease; display: block; }
.slide-dots span.active { background: #fff; width: 20px; border-radius: 4px; }

/* ---- حالت «سینمایی» (Ken Burns): زوم و پن آهسته روی هر اسلاید ---- */
.hero-slide.style-kenburns { animation: kb-zoom 13s ease-in-out infinite alternate; transform-origin: 55% 45%; }
@keyframes kb-zoom { from { transform: scale(1); } to { transform: scale(1.09); } }

/* ---- حالت «قاب کلاس»: اسلایدشو داخل یک پنجره‌ی شبیه‌سازی‌شده‌ی نرم‌افزار کلاس آنلاین ---- */
.hero-visual.style-framed { background: transparent; padding: 0; align-items: stretch; }
.hero-visual.style-framed::before, .hero-visual.style-framed::after { content: none; }
.frame-window {
    position: relative; width: 100%; border-radius: var(--radius-lg); overflow: hidden;
    background: #180f28; box-shadow: 0 30px 60px -14px rgba(76,29,149,.4), inset 0 0 0 1px rgba(255,255,255,.06);
}
.frame-chrome { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 12px 15px; background: rgba(10,6,18,.75); backdrop-filter: blur(8px); }
.frame-chrome .fc-dots { display: flex; gap: 6px; }
.frame-chrome .fc-dots span { width: 9px; height: 9px; border-radius: 50%; display: block; }
.frame-chrome .fc-dots span:nth-child(1) { background: #f87171; }
.frame-chrome .fc-dots span:nth-child(2) { background: #fbbf24; }
.frame-chrome .fc-dots span:nth-child(3) { background: #34d399; }
.frame-chrome .fc-label { margin: 0 auto; font-size: 11px; color: rgba(255,255,255,.5); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.frame-chrome .fc-live { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: #fca5a5; }
.frame-chrome .fc-live .dot { width: 6px; height: 6px; border-radius: 50%; background: #f87171; animation: lp-pulse 1.6s ease-in-out infinite; }
.frame-body { position: relative; height: 360px; }
.frame-body .hero-slide { position: absolute; inset: 0; }
.frame-body::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,6,18,.55) 0%, transparent 35%); z-index: 1; }

@media (prefers-reduced-motion: reduce) {
    .hero-slide.style-kenburns { animation: none; }
}
.hero-visual:not(.has-image) {
    background: linear-gradient(155deg, var(--brand-dark) 0%, var(--brand) 70%, var(--brand) 100%);
}
.hero-visual:not(.has-image)::before,
.hero-visual:not(.has-image)::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(46px); z-index: 0;
}
.hero-visual:not(.has-image)::before {
    width: 260px; height: 260px; background: rgba(255,255,255,.28);
    top: -60px; inset-inline-end: -60px;
}
.hero-visual:not(.has-image)::after {
    width: 220px; height: 220px; background: rgba(var(--brand-rgb),.35);
    bottom: -70px; inset-inline-start: -50px;
}

/* ---- کارت شیشه‌ای «پخش زنده» - عنصر شاخص هیرو ---- */
.live-preview-card {
    position: relative; z-index: 2; width: 300px; border-radius: var(--radius); overflow: hidden;
    background: rgba(var(--brand-dark-rgb), 0.55); backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
}
.lp-topbar {
    display: flex; align-items: center; gap: 8px; padding: 13px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
}
.lp-topbar .lp-dots { display: flex; gap: 5px; }
.lp-topbar .lp-dots span { width: 8px; height: 8px; border-radius: 50%; display: block; }
.lp-topbar .lp-dots span:nth-child(1) { background: #f87171; }
.lp-topbar .lp-dots span:nth-child(2) { background: #fbbf24; }
.lp-topbar .lp-dots span:nth-child(3) { background: #34d399; }
.lp-topbar .lp-label { font-size: 11px; color: rgba(255,255,255,0.55); font-weight: 600; margin-inline-end: auto; }
.lp-live-badge {
    display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700;
    color: #fca5a5; letter-spacing: .03em;
}
.lp-live-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #f87171; animation: lp-pulse 1.6s ease-in-out infinite; }
@keyframes lp-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(248,113,113,.5); } 50% { opacity: .55; box-shadow: 0 0 0 5px rgba(248,113,113,0); } }

.lp-body { padding: 18px 18px 16px; }
.lp-speaker-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.lp-avatar {
    width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    display: flex; align-items: center; justify-content: center; color: #fff;
    box-shadow: 0 6px 16px rgba(var(--brand-rgb),.4);
}
.lp-waveform { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.lp-waveform span { width: 3px; border-radius: 2px; background: rgba(255,255,255,.65); animation: lp-wave 1.1s ease-in-out infinite; }
.lp-waveform span:nth-child(1) { height: 40%; animation-delay: 0s; }
.lp-waveform span:nth-child(2) { height: 90%; animation-delay: .15s; }
.lp-waveform span:nth-child(3) { height: 60%; animation-delay: .3s; }
.lp-waveform span:nth-child(4) { height: 100%; animation-delay: .45s; }
.lp-waveform span:nth-child(5) { height: 50%; animation-delay: .6s; }
@keyframes lp-wave { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }

.lp-eyebrow { font-size: 10.5px; color: rgba(255,255,255,0.5); font-weight: 600; margin-bottom: 4px; }
.lp-session-title { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.6; margin-bottom: 3px; }
.lp-session-meta { font-size: 11.5px; color: rgba(255,255,255,0.55); }

.lp-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 16px 0; }

.feature-chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feature-chip {
    display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 12px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
    font-size: 11px; color: rgba(255,255,255,0.85); line-height: 1.5;
}
.feature-chip .fc-icon {
    width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
    background: rgba(255,255,255,.16); color: #fff;
    display: flex; align-items: center; justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
    .lp-live-badge .dot, .lp-waveform span { animation: none; }
}

/* ===================== بخش‌های عمومی ===================== */
section { padding: 44px 0; }
.section-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 30px; }
.section-title span { color: var(--brand); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.week-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.week-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(15,111,92,0.12); }
.week-card .thumb { height: 110px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); display:flex; align-items:center; justify-content:center; color: #fff; position: relative; }
.week-card .thumb svg { width: 34px; height: 34px; position: relative; z-index: 1; }
.week-card .thumb::before {
    content: ''; position: absolute; inset: 0; opacity: .5;
    background-image: radial-gradient(circle, rgba(255,255,255,0.25) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
}
.week-card .body { padding: 14px 16px; }
.week-card .step-no { font-size: 10.5px; color: var(--gold); font-weight: 800; letter-spacing: .04em; margin-bottom: 4px; }
.week-card .body h3 { font-size: 14px; margin-bottom: 6px; }
.week-card .body p { font-size: 12.5px; color: var(--muted); margin: 0; }

.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; text-align: center; }
.feature-card .icon { width: 54px; height: 54px; border-radius: 15px; background: #eef6f3; color: var(--brand); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.feature-card .icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 15px; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.9; }

.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.guide-item {
    position: relative; border-radius: 14px; overflow: hidden; height: 108px;
    display: flex; align-items: flex-end; padding: 10px;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand)); background-size: cover; background-position: center;
}
.guide-item.has-image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,.05)); }
.guide-item span { color: #fff; font-size: 12.5px; font-weight: 700; position: relative; display: flex; align-items: center; gap: 5px; }
.guide-item span svg { width: 14px; height: 14px; flex-shrink: 0; }

.demo-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.demo-table { width: 100%; font-size: 13.5px; margin-bottom: 16px; }
.demo-table td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.demo-table td:first-child { color: var(--muted); width: 90px; }
.demo-exercise { background: var(--bg); border-radius: 12px; padding: 14px; }
.demo-exercise .opts { display: flex; gap: 8px; margin-top: 10px; }
.demo-exercise .opts span { border: 1px solid var(--border); background: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; }

.cta-banner { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); border-radius: var(--radius-lg); padding: 36px; color: #fff; text-align: center; }
.cta-banner h2 { font-size: 22px; margin-bottom: 10px; }
.cta-banner p { opacity: .9; margin-bottom: 22px; }
.cta-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.cta-chips span { background: rgba(255,255,255,0.12); padding: 8px 16px; border-radius: 20px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.cta-banner .btn-gold { background: var(--gold); color: #2a1e05; padding: 12px 26px; border-radius: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }

.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 700px; margin: 0 auto; }
.plan-card { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 26px; }
.plan-card.featured { border-color: var(--gold); background: #fffaf0; position: relative; }
.plan-card .badge-tag { position: absolute; top: -12px; left: 20px; background: var(--gold); color: #2a1e05; font-size: 11px; padding: 4px 12px; border-radius: 20px; font-weight: 700; }
.plan-card h3 { font-size: 17px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.plan-card h3 svg { color: var(--gold); flex-shrink: 0; }
.plan-card .price { font-size: 22px; font-weight: 800; margin: 10px 0 16px; }
.plan-card .price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 20px; }
.plan-card li { font-size: 13px; padding: 6px 0; display: flex; gap: 8px; align-items: center; }
.plan-card li svg { color: var(--brand); flex-shrink: 0; }

.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item summary { cursor: pointer; font-size: 14.5px; font-weight: 600; list-style: none; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span { color: var(--brand); flex-shrink: 0; transition: transform .2s; transform: rotate(-90deg); }
.faq-item[open] summary span { transform: rotate(90deg); }
.faq-item p { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; line-height: 1.9; }

/* ===================== فوتر ===================== */
.site-footer { background: #14101f; color: rgba(255,255,255,.78); padding: 40px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; padding-bottom: 30px; }
.footer-grid h4 { color: #fff; font-size: 13px; margin-bottom: 12px; }
.footer-grid a { display: block; font-size: 12.5px; color: rgba(255,255,255,.78); padding: 4px 0; transition: color .15s; }
.footer-grid a:hover { color: #fff; }
.footer-about { font-size: 12.5px; margin: 8px 0 14px; color: rgba(255,255,255,.72); line-height: 1.9; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 8px; font-size: 11.5px; color: rgba(255,255,255,.85); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 16px 0; font-size: 12px; text-align: center; color: rgba(255,255,255,.6); }

.search-box { position: relative; margin-bottom: 22px; }
.search-box input {
    width: 100%; padding: 13px 46px 13px 16px; border: 1px solid var(--border); border-radius: 12px;
    font-family: inherit; font-size: 14px; background: #fff;
}
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,111,92,0.12); }
.search-box svg { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-empty { display: none; text-align: center; color: var(--muted); font-size: 13.5px; padding: 30px 0; }

/* ===================== صفحه‌بندی ===================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 30px 0; flex-wrap: wrap; }
.page-btn {
    min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13.5px; color: var(--ink);
}
.page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.page-btn.disabled { opacity: .4; pointer-events: none; }
.page-dots { padding: 0 4px; color: var(--muted); }
.page-header { background: #fff; border-bottom: 1px solid var(--border); padding: 30px 0; margin-bottom: 30px; }
.page-header h1 { font-size: 22px; }
.simple-list { display: grid; gap: 14px; }
.list-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-card); }
.list-card h3 { font-size: 15px; margin-bottom: 6px; }
.list-card p { font-size: 13px; color: var(--muted); margin: 0; }
.badge-plan { font-size: 11px; padding: 3px 10px; border-radius: 20px; background: #fff4ed; color: #b93815; }
.badge-plan.free { background: #ecfdf3; color: #067647; }
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; max-width: 560px; margin: 0 auto; }
.form-card .form-group { margin-bottom: 16px; }
.form-card label { display: block; font-size: 13px; margin-bottom: 6px; }
.form-card input, .form-card select, .form-card textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 13.5px;
}

/* ===================== پنل یادگیری تعاملی ===================== */
.learn-header { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); padding: 22px 0; color: #fff; }
.learn-header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.learn-header h1 { font-size: 17px; }
.learn-progress-track { background: rgba(255,255,255,0.2); border-radius: 8px; height: 8px; overflow: hidden; width: 200px; }
.learn-progress-track span { display: block; height: 100%; background: var(--gold); transition: width .3s; }
.learn-progress-label { font-size: 12px; opacity: .9; margin-top: 6px; }

.learn-stage { max-width: 560px; margin: 40px auto; padding: 0 20px; }

.flash-wrap { text-align: center; }
.flashcard { perspective: 1200px; cursor: pointer; height: 260px; }
.flashcard-inner {
    position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
    position: absolute; inset: 0; backface-visibility: hidden; border-radius: 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
    box-shadow: 0 12px 30px rgba(15,111,92,0.12);
}
.flashcard-front { background: #fff; border: 1px solid var(--border); }
.flashcard-back { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; transform: rotateY(180deg); }
.fc-label { font-size: 12px; opacity: .7; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; }
.fc-main { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.fc-sub { font-size: 14px; opacity: .9; margin-top: 4px; }
.fc-note { font-size: 12.5px; opacity: .8; margin-top: 10px; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 10px; }
.fc-hint { font-size: 12px; color: var(--muted); margin-top: 14px; }

.flash-actions { display: flex; gap: 12px; margin-top: 20px; justify-content: center; }
.btn-secondary-lg, .btn-brand-solid-lg {
    padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; font-family: inherit;
}
.btn-secondary-lg { background: #f1f2f4; color: #374151; }
.btn-brand-solid-lg { background: var(--brand); color: #fff; }

.exercise-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 30px; box-shadow: 0 12px 30px rgba(15,111,92,0.08); }
.ex-question { font-size: 18px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.ex-options { display: grid; gap: 10px; }
.ex-option {
    padding: 14px; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; font-family: inherit;
    font-size: 14px; cursor: pointer; text-align: center; transition: all .15s;
}
.ex-option:hover:not(:disabled) { border-color: var(--brand); background: #f3f9f7; }
.ex-option:disabled { cursor: default; }
.ex-option-correct { background: #ecfdf3 !important; border-color: #17b26a !important; color: #067647; }
.ex-option-wrong { background: #fef2f2 !important; border-color: #d92d20 !important; color: #b42318; }
.ex-input-wrap { display: flex; gap: 10px; }
.ex-input { flex: 1; padding: 13px; border: 1.5px solid var(--border); border-radius: 12px; font-family: inherit; font-size: 14px; }
.ex-feedback { margin-top: 18px; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 600; text-align: center; }
.ex-correct { background: #ecfdf3; color: #067647; }
.ex-incorrect { background: #fef2f2; color: #b42318; }
.ex-explain { font-size: 12.5px; font-weight: 400; margin-top: 8px; opacity: .85; }

.learn-done { text-align: center; padding: 40px 0; }
.learn-done-icon { font-size: 50px; margin-bottom: 10px; }
.learn-done h2 { font-size: 22px; margin-bottom: 8px; }
.learn-done p { color: var(--muted); margin-bottom: 24px; }

.locked-box { max-width: 480px; margin: 60px auto; text-align: center; padding: 40px 24px; background: #fff; border-radius: 20px; border: 1px solid var(--border); }
.locked-box .lock-icon { width: 60px; height: 60px; border-radius: 16px; background: #fff4ed; color: #b93815; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }

/* داشبورد یادگیری */
.dash-header { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 30px 0; }
.dash-stats { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.dash-stats .stat { background: rgba(255,255,255,0.12); padding: 10px 18px; border-radius: 12px; font-size: 13px; }
.dash-stats .stat b { font-size: 18px; display: block; }
.course-progress-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.course-progress-track { background: #f1f2f4; border-radius: 8px; height: 8px; overflow: hidden; margin: 10px 0; }
.course-progress-track span { display: block; height: 100%; background: var(--brand); }
.day-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 12px; margin: 3px; }
.day-pill.done { background: #ecfdf3; color: #067647; }
.day-pill.next { background: var(--brand); color: #fff; }
.day-pill.locked { background: #f1f2f4; color: var(--muted); }
.day-pill.todo { background: #fff; border: 1px solid var(--border); color: var(--ink); }

/* ===================== محتوای غنی (از ادیتور) و ویدیو ===================== */
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; margin: 20px 0; background: #000; box-shadow: 0 12px 32px rgba(11,83,71,0.18); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed-native video { width: 100%; height: 100%; object-fit: cover; background: #000; }

.rich-content { font-size: 14.5px; line-height: 2; color: var(--ink); }
.rich-content h3 { font-size: 18px; margin: 24px 0 10px; }
.rich-content p { margin: 0 0 14px; }
.rich-content a { color: var(--brand); text-decoration: underline; }
.rich-content img { max-width: 100%; border-radius: 12px; margin: 14px 0; }
.rich-content blockquote { border-right: 3px solid var(--brand); background: #f3f7f5; padding: 10px 18px; margin: 16px 0; border-radius: 0 10px 10px 0; color: #445; }
.rich-content ul { padding-right: 22px; margin: 0 0 14px; }

/* ===================== تقویم شمسی ===================== */
.jalali-popup {
    position: absolute; z-index: 999; background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.15); padding: 14px; width: 280px; font-size: 13px;
}
.jalali-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; }
.jalali-header button { background: #f1f2f4; border: none; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.jalali-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.jalali-wd { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; }
.jalali-day { background: none; border: none; padding: 8px 0; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px; }
.jalali-day:hover { background: #eef6f3; }
.jalali-day.selected { background: var(--brand); color: #fff; }

/* ===================== صفحه‌ی جزئیات (شهر/هتل/مقاله) ===================== */
.detail-hero { position: relative; height: 300px; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.detail-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,.1)); }
.detail-hero .container { position: relative; z-index: 1; padding-bottom: 28px; color: #fff; }
.detail-hero h1 { font-size: 26px; margin-bottom: 6px; }
.detail-hero p { opacity: .9; font-size: 14px; }
.detail-body { max-width: 780px; margin: 0 auto; padding: 34px 20px; }
.detail-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-meta span { background: #eef6f3; color: var(--brand-dark); font-size: 12.5px; padding: 6px 14px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 900px) {
    .hero-inner, .grid-2 { grid-template-columns: 1fr; }
    .grid-4, .grid-3, .grid-6, .guide-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; }
    .main-nav { display: none; }
    .mobile-nav-toggle { display: flex; }
    .hero-visual { justify-content: center; min-height: 320px; }
    .live-preview-card { width: 100%; max-width: 300px; }
}
@media (max-width: 560px) {
    .header-actions .btn-brand { display: none; }
    .brand-tagline { display: none; }
    .profile-name { display: none; }
}
@media (min-width: 901px) {
    .mobile-nav-panel { display: none !important; }
}

/* ===================== منوی موبایل (کشویی) ===================== */
.mobile-nav-panel {
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
    border-top: 1px solid var(--border); background: var(--card);
}
.mobile-nav-panel.open { max-height: 480px; }
.mobile-nav-panel .container { display: flex; flex-direction: column; padding: 10px 20px 18px; gap: 2px; }
.mobile-nav-panel a {
    display: block; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink);
    font-weight: 500;
}
.mobile-nav-panel a.active { color: var(--brand); font-weight: 700; background: rgba(var(--brand-rgb), .08); }
.mobile-nav-panel a:hover { background: var(--bg); }
.mobile-nav-panel .mobile-nav-divider { height: 1px; background: var(--border); margin: 8px 4px; }

/* ===================== آموزشگاه: کارت محصول (دوره/وبینار) ===================== */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; box-shadow: var(--shadow-card); }
.product-card:hover { transform: translateY(-4px); }
.product-card .thumb { height: 160px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); background-size: cover; background-position: center; position: relative; display: flex; align-items: flex-start; justify-content: space-between; padding: 12px; }
.product-type-badge { background: rgba(255,255,255,.92); color: var(--brand-dark); font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; }
.product-type-badge.live { background: #fee2e2; color: #b91c1c; }
.product-card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card h3 { font-size: 16.5px; line-height: 1.6; }
.product-card .desc { font-size: 13px; color: var(--muted); line-height: 1.9; flex: 1; }
.product-meta-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 12px; margin-top: auto; }
.product-price { font-weight: 800; color: var(--ink); font-size: 15px; }
.product-price .old { text-decoration: line-through; color: var(--muted); font-weight: 500; font-size: 12.5px; margin-inline-start: 6px; }
.product-price .free { color: var(--brand); }

/* نوار وبینارهای پیش‌رو */
.live-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.live-strip-item { flex: 0 0 260px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.live-strip-item .when { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--brand-dark); font-weight: 700; margin-bottom: 8px; }
.live-strip-item h4 { font-size: 14px; margin-bottom: 4px; }

/* فیلتر نوع محتوا (همه/دوره/وبینار) */
.type-filter { display: flex; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.type-filter a { padding: 9px 18px; border-radius: 24px; border: 1px solid var(--border); font-size: 13.5px; color: var(--muted); font-weight: 600; }
.type-filter a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ===================== صفحه‌ی جزئیات محصول: فصل ← جلسه ===================== */
.product-hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 40px 0; }
.product-hero .badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.product-hero .badges span { background: rgba(255,255,255,.15); padding: 5px 12px; border-radius: 20px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.product-hero h1 { font-size: 27px; margin-bottom: 10px; }
.product-hero .lead { opacity: .9; font-size: 14.5px; max-width: 640px; line-height: 2; }

.product-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 26px; align-items: start; padding: 30px 0 60px; }

.chapter-accordion { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--card); }
.chapter-item + .chapter-item { border-top: 1px solid var(--border); }
.chapter-item summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14.5px; }
.chapter-item summary::-webkit-details-marker { display: none; }
.chapter-item summary .chevron { transition: transform .2s; color: var(--muted); }
.chapter-item[open] summary .chevron { transform: rotate(180deg); }
.chapter-item .chapter-count { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-inline-end: auto; margin-inline-start: 10px; }
.session-list { padding: 4px 18px 16px; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; font-size: 13.5px; border-top: 1px solid #f1f2f0; }
.session-row:first-child { border-top: none; }
.session-row .s-icon { width: 30px; height: 30px; border-radius: 9px; background: #f3eefe; color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.session-row .s-title { flex: 1; }
.session-row .s-meta { color: var(--muted); font-size: 12px; }
.session-row.locked { color: var(--muted); }
.session-row.locked .s-icon { background: #f1f2f4; color: var(--muted); }

.buy-box { border: 1px solid var(--border); border-radius: 18px; padding: 22px; background: var(--card); position: sticky; top: 20px; }
.buy-box .price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.buy-box .price-row .amount { font-size: 24px; font-weight: 800; }
.buy-box .price-row .old { text-decoration: line-through; color: var(--muted); font-size: 14px; }
.buy-box ul { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.buy-box ul li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.buy-box ul li svg { color: var(--brand); flex-shrink: 0; }
.instructor-box { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-top: 16px; }
.instructor-box .avatar { width: 42px; height: 42px; border-radius: 50%; background: #f3eefe; color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.instructor-box .label { font-size: 11.5px; color: var(--muted); }
.instructor-box .name { font-size: 13.5px; font-weight: 700; }

@media (max-width: 900px) {
    .product-grid { grid-template-columns: 1fr; }
    .product-layout { grid-template-columns: 1fr; }
    .buy-box { position: static; }
}

/* نشان تعداد آیتم سبد خرید روی آیکون هدر */
.cart-badge {
    position: absolute; top: -6px; left: -6px;
    background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
    min-width: 17px; height: 17px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ===================== منوی کشویی پروفایل ===================== */
.profile-menu { position: relative; }
.profile-menu-trigger { cursor: pointer; font-family: inherit; }
.profile-menu-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 190px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card); padding: 6px; display: none; flex-direction: column; gap: 2px;
}
.profile-menu.open .profile-menu-dropdown { display: flex; }
.profile-menu-dropdown a,
.profile-menu-dropdown button {
    display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 8px;
    font-size: 13px; color: var(--ink); text-decoration: none; border: none; background: none;
    width: 100%; text-align: right; cursor: pointer; font-family: inherit;
}
.profile-menu-dropdown a:hover,
.profile-menu-dropdown button:hover { background: var(--bg); }
.profile-menu-dropdown form { display: contents; }
.profile-menu-dropdown button { color: #d92d20; }

/* ===================== هیرو - چیدمان تمام‌عرض با متن روی تصویر ===================== */
.hero-overlay {
    position: relative; overflow: hidden; min-height: 560px;
    display: flex; align-items: flex-end; padding: 0;
}
.hero-overlay-bg { position: absolute; inset: 0; z-index: 0; }
.hero-overlay-bg:not(.has-image) { background: linear-gradient(155deg, var(--brand-dark) 0%, var(--brand) 100%); }
.hero-overlay-bg .hero-slideshow { position: absolute; inset: 0; }
.hero-overlay-scrim {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(15,8,28,.58) 0%, rgba(var(--brand-dark-rgb),.8) 42%, rgba(15,8,28,.96) 100%);
}
.hero-overlay-content { position: relative; z-index: 2; width: 100%; text-align: center; padding: 90px 20px 60px; color: #fff; }
.hero-overlay-textbox {
    display: inline-block; max-width: 860px; margin: 0 auto 6px; padding: 24px 30px 20px;
    background: rgba(8,5,16,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,.08);
}
.hero-overlay-content h1,
.hero-overlay-textbox h1 {
    font-size: 36px; max-width: 780px; margin: 0 auto 16px; color: #fff !important; line-height: 1.5; font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,.7);
}
.hero-overlay-content .lead,
.hero-overlay-content p.lead,
.hero-overlay-textbox p.lead {
    color: #fff !important; max-width: 620px; margin: 0 auto; font-size: 15px; line-height: 1.9;
    text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.hero-overlay-content .hero-ctas { justify-content: center; margin-top: 30px; margin-bottom: 44px; }
.hero-overlay-btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.hero-overlay-btn-outline:hover { background: rgba(255,255,255,.1); }

.hero-live-pill {
    display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.16);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.3);
    color: #fff; padding: 8px 16px; border-radius: 30px; font-size: 12.5px; margin-bottom: 24px;
    text-decoration: none; transition: background-color .15s; text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.hero-live-pill:hover { background: rgba(255,255,255,.26); }

.hero-icon-strip { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.hero-icon-strip .hi-item { display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 12px; color: rgba(255,255,255,.92); max-width: 100px; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.hero-icon-strip .hi-icon {
    width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
}

.hero-overlay .overlay-dots { position: absolute; bottom: 18px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 3; }

@media (max-width: 700px) {
    .hero-overlay { min-height: 460px; }
    .hero-overlay-content { padding: 70px 20px 46px; }
    .hero-overlay-textbox { padding: 18px 18px 14px; }
    .hero-overlay-content h1 { font-size: 25px; }
    .hero-icon-strip { gap: 18px; }
    .hero-icon-strip .hi-item { max-width: 76px; font-size: 11px; }
    .hero-icon-strip .hi-icon { width: 38px; height: 38px; }
}

/* ===================== فوتر: بخش مجوزها/گواهی‌ها ===================== */
.footer-grid h4 svg { color: var(--brand, #6d28d9); vertical-align: -3px; margin-inline-end: 3px; }
.license-badge-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.license-badge-card {
    background: #fff; border-radius: var(--radius-sm, 10px); padding: 10px; width: 90px; height: 90px;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.25);
    transition: transform .15s; text-decoration: none; overflow: hidden;
}
.license-badge-card:hover { transform: translateY(-3px); }
.license-badge-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.footer-license-compact .license-badge-card { width: 84px; height: 84px; padding: 10px; border-radius: 11px; }

@media (max-width: 900px) {
    .footer-grid.no-licenses { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .footer-grid, .footer-grid.no-licenses { grid-template-columns: 1fr 1fr; row-gap: 28px; }
}
@media (max-width: 460px) {
    .footer-grid, .footer-grid.no-licenses { grid-template-columns: 1fr; }
}

/* ===================== گواهی پایان دوره ===================== */
.certificate-frame {
    border-radius: var(--radius-lg); padding: 10px; box-shadow: 0 20px 50px rgba(17,24,39,.12);
    position: relative; overflow: hidden;
}
.certificate-frame.cert-tpl-modern { display: flex; padding: 0; min-height: 460px; }
.certificate-frame.cert-tpl-compact { padding: 0; }

/* ---- ابعاد دقیق A4 (فقط چیدمان‌های تمام‌صفحه؛ «فشرده» چون یه بج کوچیکه از این مستثناست) ---- */
.certificate-frame.orientation-landscape { aspect-ratio: 297 / 210; display: flex; flex-direction: column; }
.certificate-frame.orientation-landscape.cert-tpl-modern { flex-direction: row; }
.certificate-frame.orientation-portrait { aspect-ratio: 210 / 297; }
.certificate-frame.orientation-landscape .certificate-inner,
.certificate-frame.orientation-landscape .cert-minimal-inner,
.certificate-frame.orientation-landscape .cert-elegant-inner,
.certificate-frame.orientation-landscape .cert-modern-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
/* تو حالت عمودی، قالب مدرن پنل رنگی رو به‌جای کنار، بالا می‌بره */
.certificate-frame.orientation-portrait.cert-tpl-modern { flex-direction: column; }
.certificate-frame.orientation-portrait .cert-modern-side { width: 100%; padding: 26px 20px; }
.cert-kicker { font-size: 11.5px; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }

.cert-logo-text { font-weight: 800; font-size: 18px; color: var(--brand-dark); }
.cert-title { font-size: 26px; font-weight: 800; color: var(--brand-dark); margin-bottom: 22px; }
.cert-lead { font-size: 14px; color: var(--muted); line-height: 2.2; }
.cert-student-name {
    font-size: 32px; font-weight: 800; color: var(--ink); margin: 10px 0 18px; padding-bottom: 10px;
    display: inline-block; border-bottom: 3px solid var(--gold);
}
.cert-course-name { color: var(--brand); font-weight: 700; }
.cert-extra-text { font-size: 12.5px; color: var(--muted); margin-top: 14px; font-style: italic; }

.cert-stamp { display: flex; align-items: center; gap: 6px; color: var(--brand); font-size: 12px; font-weight: 700; }
.cert-stamp-img { width: 76px; height: 76px; object-fit: contain; transform: rotate(-6deg); opacity: .92; }
.cert-stamp-img-sm { width: 52px; height: 52px; }

.cert-signature { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cert-signature-img { max-height: 46px; max-width: 140px; object-fit: contain; margin-bottom: 2px; }
.cert-signature-line { width: 130px; height: 1px; background: var(--ink); opacity: .3; }

.cert-qr-box { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.cert-qr-box img { border-radius: 8px; background: #fff; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.cert-qr-sm img { padding: 3px; }

/* ---- قالب کلاسیک ---- */
.certificate-inner { border-radius: calc(var(--radius-lg) - 6px); padding: 48px 44px; position: relative; text-align: center; }
.certificate-frame.has-border .certificate-inner { border: 2px solid var(--brand); }
.certificate-frame.has-border .certificate-inner::before {
    content: ''; position: absolute; inset: 8px; border: 1px solid rgba(var(--brand-rgb), .35); border-radius: calc(var(--radius-lg) - 12px);
    pointer-events: none;
}
.cert-classic-logo { height: 54px; max-width: 200px; object-fit: contain; }
.cert-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 32px; }
.cert-footer {
    display: flex; align-items: flex-start; justify-content: space-between; margin-top: 42px;
    padding-top: 20px; border-top: 1px dashed var(--border); gap: 16px;
}
.cert-meta { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.cert-meta strong { font-size: 13px; color: var(--ink); }
.cert-classic-qr-row { display: flex; justify-content: center; margin-top: 18px; }

/* ---- قالب مدرن ---- */
.cert-modern-side {
    width: 34%; flex-shrink: 0; background: linear-gradient(165deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff; padding: 34px 24px; display: flex; flex-direction: column; align-items: center;
    justify-content: space-between; text-align: center;
}
.cert-modern-logo { height: 50px; max-width: 85%; object-fit: contain; filter: brightness(0) invert(1); }
.cert-modern-side-title { font-size: 22px; font-weight: 800; line-height: 1.6; }
.cert-qr-on-brand { color: rgba(255,255,255,.85); }
.cert-qr-on-brand img { box-shadow: none; }
.cert-modern-main { flex: 1; padding: 40px 36px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.cert-modern-main .cert-stamp { position: absolute; top: 20px; left: 20px; }
.cert-modern-main { position: relative; }

/* ---- قالب مینیمال ---- */
.cert-minimal-inner { padding: 54px 46px; text-align: center; }
.cert-minimal-logo { height: 48px; max-width: 200px; object-fit: contain; margin-bottom: 26px; }
.cert-minimal-title { font-size: 22px; margin-bottom: 12px; }
.cert-minimal-rule { width: 46px; height: 3px; background: var(--brand); border-radius: 3px; margin: 0 auto 26px; }
.cert-minimal-row { display: flex; align-items: center; justify-content: center; gap: 30px; margin-top: 30px; flex-wrap: wrap; }
.cert-footer-minimal { display: flex; justify-content: center; gap: 40px; margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); }

/* ---- قالب رسمی (طلایی) ---- */
.certificate-frame.cert-tpl-elegant { padding: 14px; }
.cert-elegant-inner {
    border: 2px solid var(--gold); border-radius: calc(var(--radius-lg) - 8px); padding: 50px 46px;
    text-align: center; position: relative; z-index: 1;
}
.cert-elegant-inner::before {
    content: ''; position: absolute; inset: 7px; border: 1px solid rgba(212,162,76,.5); border-radius: calc(var(--radius-lg) - 14px);
    pointer-events: none;
}
.cert-elegant-watermark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(var(--brand-rgb),.05); pointer-events: none; z-index: 0; }
.cert-elegant-logo { height: 52px; max-width: 200px; object-fit: contain; margin-bottom: 18px; }
.cert-elegant-kicker { font-size: 11.5px; letter-spacing: .05em; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.cert-elegant-title { color: var(--ink); }
.cert-elegant-name { border-bottom-color: var(--gold); }
.cert-elegant-footer { border-top-color: rgba(212,162,76,.4); }
.cert-elegant-stamp { position: absolute; bottom: 34px; left: 40px; }
.cert-elegant-qr { position: absolute; bottom: 34px; right: 40px; }

/* ---- قالب فشرده (بج دیجیتال) ---- */
.cert-compact-inner { display: flex; align-items: center; gap: 20px; padding: 26px 28px; }
.cert-compact-badge {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.cert-compact-badge img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.cert-compact-main { flex: 1; min-width: 0; text-align: right; }
.cert-compact-logo { height: 26px; margin-bottom: 6px; }
.cert-compact-title { font-size: 11px; color: var(--muted); font-weight: 700; }
.cert-compact-name { font-size: 19px; margin: 4px 0 6px; padding-bottom: 4px; border-bottom-width: 2px; }
.cert-compact-meta { display: flex; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.cert-compact-qr { flex-shrink: 0; }
.cert-compact-qr img { border-radius: 8px; }

.cert-actions { text-align: center; margin-top: 28px; }
.cert-verify-note {
    display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px;
    font-size: 12px; color: var(--muted); text-align: center; flex-wrap: wrap;
}
.cert-verify-note svg { color: #067647; flex-shrink: 0; }

@media print {
    .site-header, .site-footer, .mobile-nav-panel, .cert-actions, .cert-verify-note { display: none !important; }
    body { background: #fff; }
    .certificate-frame { box-shadow: none; aspect-ratio: unset !important; width: 100%; height: 100vh; }
    .container { max-width: none !important; padding: 0 !important; }
    section { padding: 0 !important; }
}

@media (max-width: 640px) {
    .certificate-inner, .cert-minimal-inner, .cert-elegant-inner { padding: 30px 20px; }
    .cert-title { font-size: 20px; }
    .cert-student-name { font-size: 24px; }
    .cert-footer, .cert-footer-minimal { flex-direction: column; align-items: center; gap: 16px; text-align: center; }
    .certificate-frame.cert-tpl-modern, .certificate-frame.orientation-portrait.cert-tpl-modern { flex-direction: column; }
    .cert-modern-side { width: 100%; padding: 24px; }
    .cert-modern-main { padding: 28px 20px; }
    .cert-elegant-stamp, .cert-elegant-qr { position: static; margin-top: 16px; }
    .cert-compact-inner { flex-direction: column; text-align: center; }
    .cert-compact-main { text-align: center; }
    .cert-compact-meta { justify-content: center; }
    /* رو گوشی، تناسب دقیق A4 محدودیت ایجاد می‌کنه - آزادش می‌ذاریم تا محتوا جا بشه */
    .certificate-frame.orientation-landscape, .certificate-frame.orientation-portrait { aspect-ratio: unset; }
}
