/* ============================================================
   GUIDE SECTION — shares every color/font token with style.css on
   purpose (import style.css before this file), so the guide never
   feels like a separate, bolted-on product.
============================================================ */

/* --- Index page: hero + search --- */
.guide-hero { background: var(--ink-black); padding: 100px 0 50px; text-align: center; color: #fff; }
.guide-hero h1 { font-size: clamp(30px, 4.5vw, 44px); color: #fff; margin-bottom: 16px; }
html[dir="ltr"] .guide-hero h1 {
  background: linear-gradient(90deg, #ffffff 15%, var(--gold-light) 55%, #ffffff 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.guide-hero p { color: #D7E3DA; max-width: 600px; margin: 0 auto; font-size: 16px; }

.guide-search {
  max-width: 480px; margin: 32px auto 0; position: relative;
  display: flex; align-items: center; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; padding: 4px 6px;
}
.guide-search .icon { padding: 0 10px; font-size: 15px; opacity: 0.7; }
.guide-search input {
  flex: 1; background: none; border: none; outline: none; color: #fff;
  font-size: 14.5px; font-family: inherit; padding: 11px 6px;
}
.guide-search input::placeholder { color: rgba(255,255,255,0.45); }

/* --- Module grid --- */
.guide-grid-section { background: var(--cream); padding: 60px 0 100px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.guide-card {
  background: var(--cream-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(27,85,92,0.12); border-color: var(--gold); }
.guide-card-num { font-family: var(--font-display-en); font-size: 12.5px; font-weight: 700; color: var(--gold); }
.guide-card h3 { font-size: 16.5px; color: var(--brand-green); font-weight: 700; }
.guide-card p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
html[dir="rtl"] .guide-card p { line-height: 1.65; }

/* --- Module detail page: header --- */
.guide-page-header { background: var(--ink-black); padding: 105px 0 40px; color: #fff; }
.guide-breadcrumb { font-size: 12.5px; color: rgba(255,255,255,0.55); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.guide-breadcrumb a { color: rgba(255,255,255,0.85); font-weight: 600; }
.guide-breadcrumb a:hover { color: var(--gold-light); }
.guide-page-header h1 { font-size: clamp(28px, 4vw, 38px); color: #fff; }
.guide-page-header .lead { color: #D7E3DA; margin-top: 14px; font-size: 15.5px; max-width: 640px; }

/* --- Module detail page: layout (TOC sidebar + content) --- */
.guide-body { background: var(--cream); padding: 50px 0 100px; }
.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: 50px; align-items: start; }

.guide-toc {
  position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px;
}
.guide-toc-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
html[dir="rtl"] .guide-toc-label { letter-spacing: normal; }
.guide-toc a {
  font-size: 13.5px; color: var(--ink); padding: 7px 0 7px 14px; border-inline-start: 2.5px solid transparent;
  transition: color 0.15s ease;
}
html[dir="rtl"] .guide-toc a { padding: 7px 14px 7px 0; }
.guide-toc a:hover { color: var(--brand-green); }

.guide-content { background: var(--cream-card); border: 1px solid var(--border); border-radius: 20px; padding: 40px 44px; }
.guide-section { margin-bottom: 44px; scroll-margin-top: 90px; }
.guide-section:last-of-type { margin-bottom: 0; }
.guide-section h2 {
  font-size: 21px; color: var(--brand-green); font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.guide-section-icon { font-size: 19px; }
.guide-section p { font-size: 15px; color: var(--ink); line-height: 1.65; margin-bottom: 14px; }
html[dir="rtl"] .guide-section p { line-height: 1.85; }
.guide-section p:last-child { margin-bottom: 0; }

.guide-shot {
  background: var(--cream); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px; margin: 18px 0; box-shadow: 0 10px 24px rgba(27,85,92,0.07);
}
.guide-shot img { width: 100%; height: auto; border-radius: 8px; display: block; }

.guide-steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 16px; margin: 18px 0; }
.guide-steps li {
  counter-increment: step; position: relative; padding-inline-start: 42px; font-size: 15px; color: var(--ink); line-height: 1.6;
}
html[dir="rtl"] .guide-steps li { line-height: 1.8; }
.guide-steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: -1px;
  width: 28px; height: 28px; border-radius: 9px; background: var(--brand-green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  font-family: var(--font-display-en);
}
.guide-steps b { color: var(--brand-green); }

.guide-callout {
  background: #F7F3E7; border-inline-start: 4px solid var(--gold); border-radius: 10px;
  padding: 14px 18px; font-size: 14px; color: var(--ink); line-height: 1.6; margin: 16px 0;
}
html[dir="rtl"] .guide-callout { line-height: 1.75; }
.guide-callout.warn { border-inline-start-color: #C77B4A; background: #FBF1E8; }
.guide-callout b { color: var(--brand-green); }
.guide-callout.warn b { color: #A8562A; }

.guide-nextprev {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 48px;
  padding-top: 28px; border-top: 1px solid var(--border);
}
.guide-nav-link {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--cream); max-width: 260px; flex: 1;
  transition: border-color 0.15s ease;
}
.guide-nav-link:hover { border-color: var(--gold); }
.guide-nav-link.next { text-align: end; margin-inline-start: auto; }
.dir-label { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.mod-name { font-size: 14.5px; color: var(--brand-green); font-weight: 700; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-layout { grid-template-columns: 1fr; gap: 24px; }
  .guide-toc {
    position: static; flex-direction: row; flex-wrap: wrap; gap: 6px 14px;
    padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--border);
  }
  .guide-toc-label { display: none; }
  .guide-toc a { padding: 4px 0; border-inline-start: none; }
  .guide-content { padding: 26px 22px; }
}
@media (max-width: 640px) {
  .guide-grid { grid-template-columns: 1fr; }
  .guide-nextprev { flex-direction: column; }
  .guide-nav-link, .guide-nav-link.next { max-width: 100%; text-align: start; margin-inline-start: 0; }
}
