/* منارة المعلم — هوية: زمردي عميق وذهبي على عاجي */
:root {
    --ink: #123f38;
    --ink-2: rgb(18 63 56 / 0.72);
    --ink-3: rgb(18 63 56 / 0.5);
    --hairline: rgb(18 63 56 / 0.12);
    --gold: #a8792a;
    --gold-dark: #8a6420;
    --gold-bright: #ecc271;
    --card: #fffdf6;
    --ground: #ece5d2;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--ground);
    color: var(--ink);
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
.wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
h1, h2, h3, .display { font-family: 'Cairo', 'Tajawal', sans-serif; }
a { color: var(--ink); }
img { max-width: 100%; }

/* الترويسة: شريط زمردي داكن */
.hero {
    background: linear-gradient(155deg, #0d332d 0%, #14524a 60%, #1a6357 100%);
    border-radius: 20px;
    padding: 30px 24px;
    box-shadow: 0 12px 32px rgb(13 51 45 / 0.25);
}
.hero-title {
    margin: 0 0 6px;
    color: #f7f2e3;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.25;
}
.hero-fact {
    margin: 0 0 14px;
    color: var(--gold-bright);
    font-weight: 700;
    font-size: 18px;
}
.hero-intro {
    margin: 0;
    color: rgb(247 242 227 / 0.88);
    font-size: 16px;
    line-height: 1.8;
}

/* صورة الغلاف */
.cover {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgb(13 51 45 / 0.18);
}
.cover img { display: block; width: 100%; height: auto; }

/* عناوين المجموعات */
.group-label {
    margin: 0 0 2px;
    color: var(--ink-3);
    font-size: 14px;
    font-weight: 500;
}
.group-heading {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
}

/* بطاقات الأقسام */
.section-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    padding: 22px 20px;
    box-shadow: 0 4px 18px rgb(18 63 56 / 0.07);
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
a.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgb(18 63 56 / 0.14);
}
.section-card + .section-card { margin-top: 14px; }
.badge {
    align-self: flex-start;
    background: rgb(168 121 42 / 0.14);
    color: var(--gold-dark);
    font-weight: 700;
    font-size: 13px;
    padding: 3px 12px;
    border-radius: 999px;
}
.section-title {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
}
.section-about { color: var(--ink-2); line-height: 1.7; font-size: 16px; }
.section-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-weight: 700;
}
.section-count { color: var(--gold); }
.section-go { color: var(--ink); }
.section-soon {
    background: transparent;
    border-style: dashed;
    border-color: rgb(18 63 56 / 0.25);
    box-shadow: none;
}
.section-soon .section-title { color: rgb(18 63 56 / 0.6); }
.section-soon .section-about { color: rgb(18 63 56 / 0.55); }

/* خطوات مرقمة */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--ink-2);
}
.steps li:last-child { border-bottom: none; }
.step-n { color: var(--gold); font-weight: 700; flex: none; }

/* بطاقة مقدم المحتوى */
.presenter {
    background: linear-gradient(150deg, rgb(168 121 42 / 0.14), rgb(168 121 42 / 0.05));
    border: 1px solid rgb(168 121 42 / 0.3);
    border-radius: 18px;
    padding: 20px;
}
.presenter-row { display: flex; align-items: center; gap: 16px; }
.avatar {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    object-fit: cover;
    object-position: top;
    border: 2.5px solid var(--gold);
    flex: none;
}
.presenter-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.presenter-label { color: var(--gold-dark); font-weight: 700; font-size: 13px; }
.presenter-name {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
}
.presenter-role { color: var(--ink-2); line-height: 1.6; font-size: 15px; }

/* تنبيهات */
.callout { margin: 0 0 16px; }
.callout-title { font-weight: 800; font-size: 18px; margin: 0 0 4px; font-family: 'Cairo', 'Tajawal', sans-serif; }
.callout p { margin: 0; color: var(--ink-2); }

/* بطاقات المواد */
.course {
    background: var(--card);
    border: 1px solid rgb(18 63 56 / 0.1);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 18px rgb(18 63 56 / 0.07);
}
.course + .course { margin-top: 16px; }
.course-title {
    margin: 10px 0 8px;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.35;
}
.course-about { margin: 0 0 14px; color: var(--ink-2); line-height: 1.7; font-size: 16px; }

/* حقائق: صفوف تسمية/قيمة */
.facts { margin: 0 0 16px; }
.fact-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--hairline);
}
.fact-row:last-child { border-bottom: none; }
.fact-label { color: var(--ink-3); }
.fact-value { font-weight: 700; }

/* أزرار حبوب */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 24px;
    font-weight: 700;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    text-decoration: none;
    border: 1.5px solid rgb(18 63 56 / 0.35);
    color: var(--ink);
    background: transparent;
    transition: transform 0.12s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: #f6f1e4;
}
.btn .ext { font-size: 14px; transform: scaleX(-1); display: inline-block; }

/* زر رجوع */
.back-row { margin-top: -10px; }

/* الخاتمة */
.closing {
    color: var(--ink-3);
    font-size: 14px;
    text-align: center;
    padding-top: 8px;
}

@media (max-width: 400px) {
    .hero-title { font-size: 34px; }
    .group-heading { font-size: 25px; }
}

/* قسم الإنجليزية: جداول ودروس */
.tbl { width: 100%; border-collapse: collapse; margin: 10px 0 20px; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgb(18 63 56 / 0.06); }
.tbl th { background: var(--ink); color: #f6f1e4; font-family: 'Cairo', sans-serif; font-weight: 700; padding: 8px 10px; font-size: 15px; text-align: right; }
.tbl td { border-bottom: 1px solid var(--hairline); padding: 8px 10px; font-size: 15px; vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td:first-child { font-weight: 700; }
.tbl-caption { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 18px; margin: 18px 0 6px; }
.en { direction: ltr; unicode-bidi: embed; font-weight: 700; }

.lesson-body p { color: var(--ink-2); line-height: 1.85; margin: 0 0 12px; }
.lesson-body h2 { font-family: 'Cairo', sans-serif; font-size: 21px; font-weight: 800; margin: 22px 0 8px; }

.quiz { margin-top: 8px; }
.quiz-q { background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.quiz-q p { margin: 0 0 8px; font-weight: 700; color: var(--ink); }
.quiz-opts { margin: 0 0 4px; padding: 0; list-style: none; color: var(--ink-2); }
.quiz-opts li { padding: 3px 0; }
.quiz-q details { margin-top: 6px; }
.quiz-q summary { cursor: pointer; color: var(--gold-dark); font-weight: 700; }
.quiz-ans { color: #1e6e4e; font-weight: 700; margin-top: 6px; }

.lesson-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }

.en-note { background: rgb(168 121 42 / 0.1); border-right: 3px solid var(--gold); border-radius: 10px; padding: 10px 14px; color: var(--ink-2); margin: 8px 0; }
.lv-video { width: 100%; border-radius: 14px; background: #123f38; display: block; box-shadow: 0 2px 10px rgb(18 63 56 / 0.12); }

/* ===== تحديث التصميم v2 ===== */
body { background: #f3eedd; background-image: radial-gradient(circle at 15% -10%, rgb(236 194 113 / .28), transparent 40%), radial-gradient(circle at 100% 0, rgb(20 82 74 / .10), transparent 45%); background-attachment: fixed; }
.topbar { position: sticky; top: 0; z-index: 50; background: rgb(13 51 45 / .96); backdrop-filter: blur(8px); border-bottom: 2px solid var(--gold-bright); }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 18px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: #f7f2e3; text-decoration: none; font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 20px; flex: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: #123f38; border: 1.5px solid var(--gold-bright); display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-inline-start: auto; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: rgb(247 242 227 / .82); text-decoration: none; font-weight: 700; font-size: 15px; padding: 7px 13px; border-radius: 999px; white-space: nowrap; transition: background .15s, color .15s; }
.nav a:hover { background: rgb(255 255 255 / .1); color: #fff; }
.nav a.on { background: var(--gold-bright); color: #123f38; }
.wrap { max-width: 1080px; padding: 28px 18px 56px; gap: 34px; }
.hero { position: relative; overflow: hidden; padding: 44px 34px; border-radius: 26px; }
.hero::after { content: ""; position: absolute; left: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgb(236 194 113 / .32), transparent 70%); pointer-events: none; }
.hero-title { font-size: clamp(32px, 5vw, 56px); letter-spacing: -.5px; }
.hero-fact { font-size: 20px; }
.hero-intro { max-width: 640px; font-size: 17.5px; }
.cover { border-radius: 24px; border: 6px solid #fffdf6; box-shadow: 0 18px 44px rgb(13 51 45 / .22); }
.cover img { aspect-ratio: 2 / 1; object-fit: cover; }
.group-label { color: var(--gold-dark); font-weight: 700; font-size: 14px; }
.group-heading { font-size: clamp(26px, 3.4vw, 36px); position: relative; padding-bottom: 12px; }
.group-heading::after { content: ""; position: absolute; right: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold-bright), var(--gold)); }
section { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: stretch; }
section > .group-label, section > .group-heading, section > p, section > h2, section > h3, section > .steps, section > .lesson-body, section > .tbl, section > .quiz, section > .course, section > .callout, section > div:not(.section-card) { grid-column: 1 / -1; }
section > .group-label { margin-bottom: -14px; }
.section-card { margin: 0 !important; position: relative; overflow: hidden; border-radius: 22px; padding: 24px 22px; background: #fffdf6; border: 1px solid rgb(18 63 56 / .1); }
.section-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--gold-bright), var(--gold)); opacity: .0; transition: opacity .2s; }
a.section-card:hover::before { opacity: 1; }
a.section-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgb(18 63 56 / .16); }
.section-card .section-meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hairline); }
.section-go { color: var(--gold-dark); }
.badge { background: #123f38; color: var(--gold-bright); font-size: 12.5px; letter-spacing: .2px; }
.section-soon .badge { background: rgb(18 63 56 / .12); color: var(--ink-2); }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { flex-direction: column; gap: 10px; background: #fffdf6; border: 1px solid var(--hairline); border-radius: 20px; padding: 20px; border-bottom: 1px solid var(--hairline); box-shadow: 0 4px 16px rgb(18 63 56 / .06); }
.steps li:last-child { border-bottom: 1px solid var(--hairline); }
.step-n { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #123f38; display: grid; place-items: center; font-family: 'Cairo', sans-serif; font-size: 20px; }
.course { border-radius: 22px; padding: 24px; }
.btn { transition: transform .12s, box-shadow .15s, background .15s; }
.btn:hover { box-shadow: 0 6px 16px rgb(18 63 56 / .16); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #14524a, #0d332d); }
.btn-primary:hover { background: #0d332d; }
.back-row { margin-top: -14px; }
.site-foot { background: #0d332d; color: rgb(247 242 227 / .8); text-align: center; padding: 26px 16px; font-size: 15px; border-top: 3px solid var(--gold-bright); }
.site-foot strong { color: var(--gold-bright); font-family: 'Cairo', sans-serif; font-size: 18px; display: block; margin-bottom: 4px; }
/* صفحات الدروس والاختبارات: عمود قراءة أضيق */
.wrap:has(.lesson-body), .wrap:has(.quiz), .wrap:has(.lv-video) { max-width: 820px; }
@media (min-width: 900px) { .cover img { aspect-ratio: 21 / 8; } }
@media (max-width: 640px) {
  .brand span.brand-t { font-size: 17px; }
  .topbar-in { gap: 8px; padding: 0 10px; }
  .hero { padding: 30px 20px; border-radius: 20px; }
  section { grid-template-columns: 1fr; }
  .wrap { padding: 18px 12px 44px; }
}
@media print { .topbar, .site-foot { display: none; } }

/* خلفية متداخلة الألوان: منصة تعليمية */
html { background: #eef6f3; }
body { background-color: #f1f7f4;
  background-image:
    radial-gradient(ellipse 55% 45% at 8% 6%, rgb(255 214 110 / .55), transparent 70%),
    radial-gradient(ellipse 50% 45% at 95% 10%, rgb(94 196 182 / .50), transparent 70%),
    radial-gradient(ellipse 55% 50% at 90% 55%, rgb(140 170 240 / .38), transparent 70%),
    radial-gradient(ellipse 50% 45% at 5% 62%, rgb(255 160 140 / .30), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgb(190 150 235 / .30), transparent 70%),
    linear-gradient(180deg, #f6f9f2 0%, #e9f4f1 100%);
  background-attachment: fixed; background-repeat: no-repeat; }
.section-card, .course, .steps li { background: rgb(255 255 255 / .86); backdrop-filter: blur(6px); }
.section-soon { background: rgb(255 255 255 / .45); }
.lv-video { margin-inline: auto; max-width: 100%; }
/* قسم فوتوشوب */
.ps-fig { margin: 22px 0 28px; background: rgb(255 255 255 / .9); border: 1px solid var(--hairline); border-radius: 20px; padding: 14px; box-shadow: 0 6px 22px rgb(18 63 56 / .1); }
.ps-fig img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #1d1d1d; }
.ps-fig figcaption { margin: 12px 4px 6px; font-weight: 700; color: var(--ink); }
.ps-badge { display: inline-block; background: #123f38; color: var(--gold-bright); font-size: 12.5px; padding: 2px 10px; border-radius: 999px; margin-inline-end: 6px; }
.legend { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.legend li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); line-height: 1.7; }
.lg-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #ffb400; color: #1a1a1a; font-weight: 800; display: grid; place-items: center; font-family: 'Cairo', sans-serif; }
.ps-by { display: flex; align-items: center; gap: 12px; background: rgb(255 255 255 / .8); border: 1px solid rgb(168 121 42 / .3); border-radius: 16px; padding: 10px 16px; margin-top: -10px; }
.ps-av { width: 52px; height: 52px; }
.ps-by > div { display: flex; flex-direction: column; line-height: 1.35; }
.ps-by-l { color: var(--gold-dark); font-size: 12.5px; font-weight: 700; }
.ps-by-n { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 20px; }
.ps-by-p { color: var(--ink-3); font-size: 13px; }
.ps-hint { color: var(--ink-3); font-weight: 500; font-size: 13px; }
