/*
 * الصفحة العامّة — رفيق الأستاذ.
 *
 * مبناها مبنى صفحة profpartner المطلوب نقلُها (ترويسة بيضاء، عارضة صور
 * بمصغّرات، ثلاث بطاقات، تذييل بثلاثة أعمدة)، وألوانُها ألوانُ الشعار:
 * الأحمر للفعل، والحبريّ للنصّ، والرملُ للخلفيات. حرفٌ واحد يحمل الشخصية
 * (Cairo في العناوين)، وما عداه هادئ.
 */
:root {
    --red: #e8461f; --red-dark: #b93412;
    --teal: #12b5a5; --violet: #6a4cff;
    --ink: #14110f; --muted: #57524b; --faint: #7d766c;
    --paper: #ffffff; --sand: #faf6f1; --line: #e8e0d6;
    --radius: 16px;
}

* { box-sizing: border-box; }

body.pub {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
    font-size: 16px; line-height: 1.75; overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: "Cairo", "IBM Plex Sans Arabic", sans-serif; margin: 0; line-height: 1.28; }
h1 { font-size: clamp(30px, 6vw, 54px); font-weight: 900; letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 800; }
h4 { font-size: 15px; font-weight: 800; }
p { margin: 0 0 14px; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }

.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ------------------------------ الترويسة ------------------------------ */
.pub-head { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pub-bar { max-width: 1140px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.pub-logo img { height: 40px; width: auto; }
.pub-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.pub-nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.pub-nav a:hover { color: var(--ink); background: var(--sand); }
.pub-actions { display: flex; gap: 8px; }

.pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 12px; text-decoration: none; font-weight: 800; font-size: 15px;
    border: 2px solid transparent; white-space: nowrap; transition: background .15s, color .15s, transform .1s; }
.pub-btn:active { transform: translateY(1px); }
.pub-btn.solid { background: var(--red); color: #fff; }
.pub-btn.solid:hover { background: var(--red-dark); }
.pub-btn.ghost { color: var(--ink); }
.pub-btn.ghost:hover { background: var(--sand); }
.pub-btn.line { border-color: currentColor; }
.pub-btn.lg { padding: 14px 26px; font-size: 17px; border-radius: 14px; }

/* القائمة على الهاتف: مربّعُ اختيارٍ يفتحها بلا نصٍّ برمجيّ */
.pub-burger { display: none; margin-inline-start: auto; padding: 8px; cursor: pointer; }
.pub-burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

@media (max-width: 860px) {
    .pub-burger { display: block; }
    .pub-nav { position: absolute; inset-inline: 0; top: 100%; flex-direction: column; gap: 0;
        background: var(--paper); border-bottom: 1px solid var(--line); padding: 6px 12px 12px; display: none; }
    .pub-menu-check:checked ~ .pub-nav { display: flex; }
    .pub-nav a { padding: 12px; border-radius: 0; border-bottom: 1px solid var(--line); }
    .pub-actions .ghost { display: none; }
}

/* ------------------------------- العارضة ------------------------------ */
.hero { position: relative; background: var(--ink); color: #fff; padding: 68px 0 60px; overflow: hidden; }
/* وهجان خافتان بلوني الشعار: يكسران سوادَ الخلفية بلا صورة تُحمَّل */
.hero::before, .hero::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
    filter: blur(120px); opacity: .5; pointer-events: none; }
.hero::before { background: rgba(232,70,31,.55); top: -180px; inset-inline-start: -120px; }
.hero::after { background: rgba(18,181,165,.35); bottom: -240px; inset-inline-end: -140px; }

.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.hero-eyebrow { color: #6ee7db; font-weight: 700; font-size: 14px; margin: 0 0 10px; }
.hero-lead { max-width: 560px; font-size: 18px; color: #ded7cf; margin-top: 14px; }
.hero-lead strong { color: #fff; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-btns .line { color: #fff; }
.hero-btns .line:hover { background: rgba(255,255,255,.12); }

.hero-stats { list-style: none; display: flex; gap: 30px; flex-wrap: wrap; margin: 32px 0 0; padding: 0; }
.hero-stats b { display: block; font-family: "Cairo", sans-serif; font-size: 26px; font-weight: 900; }
.hero-stats span { color: #b9b1a8; font-size: 13px; }

/* إطارُ اللقطة: شريطُ نافذةٍ صغير يوحي بأنّ ما بداخله شاشةٌ حقيقيّة */
.shot-frame { background: #211d1a; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 10px;
    box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.shot-dots { display: flex; gap: 6px; padding: 2px 4px 8px; }
.shot-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.22); }
.shot-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #fff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center;
    opacity: 0; transition: opacity .6s ease; }
.hero-img.on { opacity: 1; }

.hero-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.hero-thumb { padding: 6px; border-radius: 10px; cursor: pointer; background: rgba(255,255,255,.06);
    border: 2px solid transparent; color: #cfc7be; font: inherit; font-size: 11px; font-weight: 600;
    display: grid; gap: 4px; justify-items: center; transition: border-color .2s, background .2s, color .2s; }
.hero-thumb img { width: 100%; height: 40px; object-fit: cover; object-position: top center; border-radius: 6px; }
.hero-thumb:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero-thumb.on { border-color: var(--red); color: #fff; }

@media (max-width: 860px) {
    .hero { padding: 44px 0 40px; }
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero-stats { gap: 22px; }
    .hero-stats b { font-size: 22px; }
    .hero-thumb span { display: none; }
    .hero-thumb img { height: 46px; }
}

/* ------------------------------ الخدمات ------------------------------- */
.band { background: var(--sand); padding: 72px 0; text-align: center; }
.eyebrow { color: var(--red); font-weight: 800; font-size: 14px; margin: 0 0 6px; }
.band h2 { margin-bottom: 34px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; text-align: start; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card h3 { margin: 14px 0 8px; }
.ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; }
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico.red { background: #fdece7; color: var(--red); }
.ico.teal { background: #e2f7f4; color: #0d8a7e; }
.ico.violet { background: #ece8ff; color: var(--violet); }

@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } .band { padding: 52px 0; } }

/* ------------------------------ لماذا رفيق ---------------------------- */
.why { padding: 76px 0; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.why h2 { margin-bottom: 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { position: relative; padding-inline-start: 30px; margin-bottom: 12px; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0;
    color: var(--red); font-weight: 900; }
.why-shot { margin: 0; }
.why-shot img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(20,17,15,.12); }
.why-shot figcaption { color: var(--faint); font-size: 13px; text-align: center; margin-top: 10px; }

@media (max-width: 860px) { .why { padding: 52px 0; } .why-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ------------------------------- الأسئلة ------------------------------ */
.faq { text-align: start; }
.faq h2, .faq .eyebrow { text-align: center; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details[open] summary { color: var(--red); }
.faq details p { color: var(--muted); margin: 10px 0 0; font-size: 15px; }

/* ------------------------------ شريط الدعوة --------------------------- */
.cta { background: var(--ink); color: #fff; padding: 64px 0; text-align: center; }
.cta h2 { margin-bottom: 22px; }

/* -------------------------------- التذييل ----------------------------- */
.pub-foot { background: var(--paper); border-top: 1px solid var(--line); padding: 48px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-logo { height: 40px; width: auto; }
.foot-tag { color: var(--muted); margin-top: 12px; font-size: 15px; }
.pub-foot h4 { margin-bottom: 10px; }
.pub-foot a { display: block; color: var(--muted); text-decoration: none; font-size: 15px; padding: 4px 0; }
.pub-foot a:hover { color: var(--red); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; color: var(--faint); font-size: 13px; }
.foot-bottom a { display: inline; }

@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; gap: 22px; } }

@media (prefers-reduced-motion: reduce) {
    .hero-img { transition: none; }
    .pub-btn { transition: none; }
}

/* ------------------------------- الوثائق ------------------------------ */
.doc { padding: 56px 0 72px; }
.doc h1 { font-size: clamp(28px, 5vw, 42px); margin-bottom: 6px; }
.doc h2 { font-size: 22px; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--muted); }
.doc .ticks li { margin-bottom: 10px; }
.doc .ticks li b { color: var(--ink); }
.doc-date { color: var(--faint); font-size: 14px; margin-bottom: 26px; }
.doc a { color: var(--red); }

/* أرقامٌ في صفحة «من نحن» */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 26px 0 6px; }
.facts div { background: var(--sand); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.facts b { display: block; font-family: "Cairo", sans-serif; font-size: 24px; font-weight: 900; color: var(--ink); }
.facts span { color: var(--faint); font-size: 13px; }
.doc-cta { margin-top: 30px; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }

/* صفحة الأسئلة: تفاصيلُ بيضاء على ورقٍ رمليّ خفيف */
.faq-page details { background: var(--sand); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq-page summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq-page details[open] summary { color: var(--red); }
.faq-page details p { margin: 10px 0 0; }

/* ---- الدورةُ المجّانيّة: لوحةٌ واحدة، الغلافُ بطلُها ---- */
.formation { padding: 76px 0; background: linear-gradient(180deg, var(--paper) 0%, #f3f0ff 100%); }
.formation-panel { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.formation-cover { position: relative; margin: 0; }
.formation-cover img { display: block; width: 100%; border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(106,76,255,.18); }
.formation-free { position: absolute; top: 16px; inset-inline-start: 16px; background: var(--teal); color: #fff; font-weight: 800; padding: 6px 14px; border-radius: 999px; font-size: 14px; box-shadow: 0 6px 16px rgba(18,181,165,.35); }
.formation-text h2 { margin: 6px 0 12px; font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
.formation-lead { color: var(--muted); font-size: 17px; margin: 0 0 16px; }
.formation-meta { display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--faint); font-size: 14px; margin: 14px 0 22px; }
.formation-meta span::before { content: "•"; color: var(--violet); margin-inline-end: 6px; }
.formation-meta span:first-child::before { content: none; }
.formation-acts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 860px) { .formation-panel { grid-template-columns: 1fr; gap: 26px; } .formation { padding: 56px 0; } }

/* ---- صفحةُ الدورة العامّة ---- */
.course-pub { padding: 56px 0 72px; }
.course-pub-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.course-pub h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.3; margin: 8px 0 14px; }
.course-pub .desc { color: var(--muted); font-size: 17px; white-space: pre-line; }
.course-pub ol.parts { list-style: none; padding: 0; margin: 18px 0; counter-reset: p; display: grid; gap: 8px; }
.course-pub ol.parts li { counter-increment: p; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; }
.course-pub ol.parts li::before { content: counter(p); inline-size: 30px; block-size: 30px; border-radius: 50%; background: #f3f0ff; color: var(--violet); font-weight: 800; display: grid; place-items: center; flex: none; }
@media (max-width: 860px) { .course-pub-grid { grid-template-columns: 1fr; } }

/* ---- المدوّنة ---- */
.blog { padding: 48px 0 72px; }
.blog h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 6px 0 10px; }
.blog-lead { color: var(--muted); font-size: 17px; max-width: 720px; margin: 0 0 28px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.blog-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.blog-card img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.blog-card h2 { font-size: 19px; margin: 0; line-height: 1.45; }
.blog-card h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.blog-card h2 a:hover, .card h3 a:hover { color: var(--red); }
.blog-card p { color: var(--muted); margin: 0; font-size: 15px; }
.blog-meta { color: var(--faint); font-size: 13px; margin-top: auto; }
.blog-post h1 { margin: 6px 0 8px; }
.blog-post .eyebrow a { color: inherit; text-decoration: none; }
.blog-cover { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin: 18px 0; }
.blog-body { font-size: 17.5px; line-height: 1.95; margin-top: 18px; }
.blog-body h2 { font-size: 24px; margin: 34px 0 10px; }
.blog-body h3 { font-size: 19px; margin: 26px 0 8px; }
.blog-body p { margin: 0 0 16px; }
.blog-body ul, .blog-body ol { padding-inline-start: 24px; margin: 0 0 16px; }
.blog-body li { margin-bottom: 6px; }
.blog-body blockquote { margin: 18px 0; padding: 12px 18px; border-inline-start: 4px solid var(--violet); background: var(--sand); border-radius: 10px; color: var(--muted); }
.blog-body table { border-collapse: collapse; width: 100%; margin: 14px 0 20px; font-size: 15px; }
.blog-body th, .blog-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: start; }
.blog-body th { background: var(--sand); }
.blog-body a { color: var(--red); }
.blog-cta { margin-top: 36px; padding: 22px 24px; background: var(--sand); border-radius: var(--radius); display: flex; gap: 12px 18px; align-items: center; flex-wrap: wrap; }
.blog-more { padding-inline-start: 20px; }
.blog-more li { margin-bottom: 8px; }
.blog-more a { color: var(--ink); }
@media (max-width: 860px) { .blog-grid { grid-template-columns: 1fr; } }
