/* ============================================================
   GUIDES PAGES · Trainee & Trainer · Editorial Documentation
   ============================================================ */

/* ─── HERO ───────────────────────────────────────────────── */
.guide-hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-deeper) 0%, var(--primary-dark) 55%, var(--primary) 100%);
  color: #fff;
  padding: 70px 0 90px;
  overflow: hidden;
  isolation: isolate;
}
.guide-hero-trainer {
  background: linear-gradient(135deg, #211B08 0%, #564615 50%, #8E7629 100%);
}
.guide-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(201,175,94,.15), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(12,162,226,.18), transparent 40%);
  z-index: -1;
}
.guide-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}
.guide-hero-orb-1 {
  width: 360px; height: 360px;
  background: rgba(201,175,94,.22);
  top: -100px; right: -80px;
}
.guide-hero-orb-2 {
  width: 320px; height: 320px;
  background: rgba(12,162,226,.18);
  bottom: -120px; left: -60px;
}

.guide-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.65);
  margin-bottom: 30px;
}
.guide-breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; }
.guide-breadcrumb a:hover { color: var(--accent); }
.guide-breadcrumb .current { color: #fff; font-weight: 700; }

.guide-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 60px;
  align-items: end;
}

.guide-hero-tag {
  display: inline-block;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(10px);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: normal;   /* Arabic is connected script — tracking breaks the joins */
  margin-bottom: 22px;
}

.guide-hero-title {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: #fff;
}
.guide-hero-title em {
  font-style: normal;
  color: #E9D8A6;
  -webkit-text-fill-color: #E9D8A6;
}

.guide-hero-desc {
  font-size: 16.5px;
  line-height: 1.75;
  color: rgba(255,255,255,.82);
  max-width: 560px;
  margin-bottom: 32px;
}

.guide-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.guide-hero-actions .btn-outline {
  color: #fff !important;
  border-color: rgba(255,255,255,.4) !important;
}
.guide-hero-actions .btn-outline:hover {
  background: rgba(255,255,255,.10) !important;
  border-color: #fff !important;
}

.guide-hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  text-align: center;
}
.guide-hero-card-icon {
  width: 70px; height: 70px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 12px 28px rgba(201,175,94,.35);
}
.guide-hero-card h3 {
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
html[lang="ar"] .guide-hero-card h3, body:dir(rtl) .guide-hero-card h3 {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
}
.guide-hero-card p {
  font-size: 14px;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  margin-bottom: 16px;
}
.guide-hero-card-meta {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11.5px;
  color: rgba(255,255,255,.55);
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 14px;
}

/* ─── BODY LAYOUT ────────────────────────────────────────── */
.guide-body { background: var(--bg); }
.guide-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  align-items: start;
}

/* ─── TOC SIDEBAR ────────────────────────────────────────── */
.guide-toc {
  position: sticky;
  top: 96px;
  align-self: start;
}
.guide-toc-inner {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
}
.guide-toc-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.guide-toc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.guide-toc-list li { list-style: none; }
.guide-toc-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: 8px;
  text-decoration: none;
  transition: all .2s;
  line-height: 1.4;
}
.guide-toc-list a span {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  transition: all .2s;
}
.guide-toc-list a:hover {
  background: var(--primary-xlt);
  color: var(--primary);
}
.guide-toc-list a:hover span {
  background: var(--primary);
  color: #fff;
}
.guide-toc-list a.active {
  background: var(--primary-xlt);
  color: var(--primary);
  font-weight: 800;
}
.guide-toc-list a.active span {
  background: var(--accent);
  color: #211B08;
}
.guide-toc-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  width: 100%;
}
.guide-toc-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2,114,180,.22);
}

/* ─── CONTENT ────────────────────────────────────────────── */
.guide-content { min-width: 0; }
.guide-section {
  position: relative;
  padding: 0 0 56px;
  margin: 0 0 56px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.guide-section:last-of-type { border-bottom: none; padding-bottom: 30px; }
.guide-section-num {
  display: inline-block;
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  color: var(--primary-xlt);
  letter-spacing: -0.04em;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.35;
}
.guide-section h2 {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.32;
  color: var(--ink);
  margin: 0 0 22px;
  letter-spacing: -0.02em;
}
.guide-section p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.guide-section p.lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 20px;
}
.guide-section a {
  color: var(--primary);
  font-weight: 700;
  border-bottom: 1.5px solid var(--primary-xlt);
  text-decoration: none;
  transition: all .2s;
}
.guide-section a:hover {
  border-bottom-color: var(--primary);
}
.guide-section strong { color: var(--ink); font-weight: 800; }

/* ─── LISTS ──────────────────────────────────────────────── */
.guide-list-check, .guide-list-num {
  list-style: none;
  padding: 0;
  margin: 16px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-list-check li, .guide-list-num li {
  position: relative;
  padding-inline-start: 36px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.guide-list-check li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary-xlt);
  background-image: linear-gradient(135deg, rgba(5,150,105,.10), rgba(5,150,105,.20));
}
.guide-list-check li::after {
  content: "✓";
  position: absolute;
  inset-inline-start: 4px;
  top: 4px;
  width: 22px; height: 22px;
  text-align: center;
  color: #047857;
  font-weight: 900;
  font-size: 14px;
  line-height: 22px;
}
.guide-list-num { counter-reset: gli; }
.guide-list-num li {
  counter-increment: gli;
}
.guide-list-num li::before {
  content: counter(gli);
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12.5px;
  font-family: 'Cairo', sans-serif;
  box-shadow: 0 4px 10px rgba(2,114,180,.22);
}

/* ─── CALLOUT ────────────────────────────────────────────── */
.guide-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--primary-xlt), rgba(229,241,245,.5));
  border-inline-start: 4px solid var(--primary);
  border-radius: var(--r);
  margin: 20px 0;
}
.guide-callout svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}
.guide-callout p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.guide-callout.warning {
  background: linear-gradient(135deg, #FEF3C7, rgba(254,243,199,.5));
  border-inline-start-color: #D97706;
}
.guide-callout.warning svg { color: #D97706; }

/* ─── FEATURE CARDS ──────────────────────────────────────── */
.guide-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 22px 0;
}
.guide-cards-grid.two { grid-template-columns: repeat(2, 1fr); }
.guide-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 20px;
  transition: all .25s;
}
.guide-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-xlt);
}
.guide-feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.guide-feature-card h4 {
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
}
.guide-feature-card p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* ─── FAQ ────────────────────────────────────────────────── */
.guide-faq {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all .2s;
}
.guide-faq[open] {
  border-color: var(--primary-xlt);
  box-shadow: var(--shadow-sm);
}
.guide-faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after {
  content: "+";
  width: 28px; height: 28px;
  background: var(--primary-xlt);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform .25s;
}
.guide-faq[open] summary::after {
  content: "−";
  background: var(--primary);
  color: #fff;
}
.guide-faq p {
  padding: 0 20px 18px;
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ─── FOOTER CTA ─────────────────────────────────────────── */
.guide-footer-cta {
  margin-top: 40px;
  padding: 44px 40px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--r-lg);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.guide-footer-cta::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(201,175,94,.15), transparent 50%);
  pointer-events: none;
}
.guide-footer-cta h3 {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
  margin: 0 0 10px;
  color: #fff;
  position: relative;
}
.guide-footer-cta p {
  color: rgba(255,255,255,.8);
  font-size: 15px;
  margin: 0 0 24px;
  position: relative;
}
.guide-footer-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.guide-footer-cta .btn-outline {
  color: #fff !important;
  border-color: rgba(255,255,255,.4) !important;
}
.guide-footer-cta .btn-outline:hover {
  background: rgba(255,255,255,.12) !important;
  border-color: #fff !important;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .guide-layout { grid-template-columns: 1fr; gap: 30px; }
  .guide-toc { position: static; }
  .guide-toc-inner { padding: 18px; }
  .guide-toc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-bottom: 16px; }
}
/* ─── PRINT (PDF) ────────────────────────────────────────── */
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body { background: #fff !important; color: #111 !important; font-size: 11.5pt; }
  #topbar, #navbar-header, #mobile-drawer, #footer, .whatsapp-float, .scroll-top-btn,
  .skip-link, .guide-toc, .guide-hero-actions, .guide-footer-actions, .guide-footer-cta { display: none !important; }
  .guide-hero {
    padding: 0 0 18px !important;
    background: #fff !important;
    color: #0B485B !important;
    border-bottom: 3px double #C9AF5E;
    margin-bottom: 22px;
  }
  .guide-hero::before, .guide-hero-orb { display: none !important; }
  .guide-hero-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .guide-hero-card { display: none !important; }
  .guide-hero-tag { background: #E5F1F5 !important; color: #0B485B !important; border: 1px solid #CADDE2 !important; }
  .guide-hero-title { color: #0B485B !important; text-shadow: none !important; font-size: 30pt !important; }
  .guide-hero-title em { color: #A48A37 !important; -webkit-text-fill-color: #A48A37 !important; background: none !important; }
  .guide-hero-desc { color: #2D4249 !important; font-size: 12pt !important; }
  .guide-breadcrumb { color: #6B838A !important; }
  .guide-breadcrumb a, .guide-breadcrumb .current { color: #0B485B !important; }
  .guide-body { padding: 0 !important; }
  .guide-layout { grid-template-columns: 1fr !important; gap: 0 !important; }
  .guide-content { min-width: 0; }
  .guide-section {
    page-break-inside: avoid;
    break-inside: avoid;
    border-bottom: 1px solid #D4D4D4 !important;
    padding-bottom: 16pt !important;
    margin-bottom: 16pt !important;
  }
  .guide-section h2 { page-break-after: avoid; color: #083745 !important; font-size: 18pt !important; }
  .guide-section-num {
    -webkit-text-fill-color: #C9AF5E !important;
    background: none !important;
    color: #C9AF5E !important;
    opacity: 1 !important;
    font-size: 28pt !important;
  }
  .guide-section p, .guide-section li { color: #2D4249 !important; font-size: 11.5pt !important; line-height: 1.7 !important; }
  .guide-callout {
    background: #F2F7F8 !important;
    border-inline-start: 3px solid #0B485B !important;
    page-break-inside: avoid;
  }
  .guide-callout.warning { background: #FEF3C7 !important; border-inline-start-color: #D97706 !important; }
  .guide-cards-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8pt !important; }
  .guide-feature-card { border: 1px solid #DCEAF3 !important; page-break-inside: avoid; box-shadow: none !important; }
  .guide-feature-icon { background: #0B485B !important; }
  .guide-faq { border: 1px solid #DCEAF3 !important; page-break-inside: avoid; }
  .guide-faq[open] summary::after, .guide-faq summary::after { display: none !important; }
  .guide-faq summary { color: #083745 !important; font-size: 12pt !important; }
  .guide-faq p { display: block !important; padding-top: 0 !important; }
  /* Force all FAQ items open in print */
  details:not([open]) > *:not(summary) { display: block !important; }
  a { color: #0B485B !important; text-decoration: underline; }
}

/* When PDF-mode forced via ?print=1 */
body.pdf-mode #topbar,
body.pdf-mode #navbar-header,
body.pdf-mode #mobile-drawer,
body.pdf-mode #footer,
body.pdf-mode .whatsapp-float,
body.pdf-mode .scroll-top-btn,
body.pdf-mode .skip-link,
body.pdf-mode .guide-toc,
body.pdf-mode .guide-hero-actions,
body.pdf-mode .guide-footer-actions,
body.pdf-mode .guide-footer-cta { display: none !important; }

@media (max-width: 880px) {
  .guide-hero { padding: 50px 0 60px; }
  .guide-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .guide-hero-card { padding: 26px 20px; }
  .guide-hero-card h3 { font-size: 28px; }
  .guide-breadcrumb { font-size: 12px; margin-bottom: 22px; }
  .guide-hero-title { font-size: clamp(28px, 8vw, 42px); }
  .guide-hero-desc { font-size: 15px; }
  .guide-section { padding-bottom: 38px; margin-bottom: 38px; }
  .guide-section-num { font-size: 42px; }
  .guide-cards-grid { grid-template-columns: 1fr; gap: 12px; }
  .guide-toc-list { grid-template-columns: 1fr; }
  .guide-footer-cta { padding: 32px 22px; }
  .guide-footer-actions .btn { width: 100%; }
}
