/* ===============================
   EDUCATION PAGE — education.css
================================= */

/* ── Nav Active State ─────────────────────────────────────── */
.nav-active { color: #ffffff !important; }
.nav-active::after { width: 100% !important; }

/* ══════════════════════════════════════════════════════════
   GUIDE HERO
══════════════════════════════════════════════════════════ */
.guide-hero {
  padding: 80px 0 60px 0;
  text-align: center;
  border-bottom: 1px solid rgba(123,77,255,0.15);
  margin-bottom: 0;
}

.guide-hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.guide-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9b7bff;
  margin-bottom: 20px;
}

.guide-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4.5vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 18px;
}

.guide-hero > .guide-hero-inner > p {
  font-size: clamp(15px, 1.5vw, 18px);
  opacity: 0.72;
  line-height: 1.7;
  margin-bottom: 32px;
}

.guide-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.guide-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(196,176,255,0.65);
  font-weight: 500;
}

.guide-meta-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.guide-meta-sep {
  color: rgba(123,77,255,0.35);
  font-size: 13px;
}

.guide-progress-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  margin: 0 auto;
}

.guide-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(123,77,255,0.15);
  border-radius: 4px;
  overflow: hidden;
}

.guide-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7b4dff, #c4b0ff);
  border-radius: 4px;
}

.guide-progress-label {
  font-size: 11px;
  color: rgba(196,176,255,0.5);
  white-space: nowrap;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   GUIDE LAYOUT — SIDEBAR + CONTENT
══════════════════════════════════════════════════════════ */
.guide-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
  padding: 56px 0 80px 0;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.guide-sidebar {
  position: sticky;
  top: 88px;
}

.guide-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(155,123,255,0.7);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(123,77,255,0.18);
}

.guide-chapter-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guide-chapter-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: rgba(196,176,255,0.55);
  transition: background 0.18s, color 0.18s;
  border-left: 2px solid transparent;
  cursor: pointer;
}

.guide-chapter-link:hover {
  background: rgba(123,77,255,0.08);
  color: #c4b0ff;
}

.guide-chapter-link.active {
  background: rgba(123,77,255,0.12);
  border-left-color: #7b4dff;
  color: #ffffff;
}

.guide-ch-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(123,77,255,0.6);
  margin-top: 1px;
  flex-shrink: 0;
}

.guide-chapter-link.active .guide-ch-num {
  color: #9b7bff;
}

.guide-ch-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.guide-chapter-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px 0;
  padding: 0 12px;
}

.guide-chapter-divider span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(123,77,255,0.4);
  white-space: nowrap;
}

.guide-chapter-divider::before,
.guide-chapter-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(123,77,255,0.18);
}

.guide-chapter-link--locked {
  opacity: 0.6;
  cursor: default;
  position: relative;
}

.guide-chapter-link--locked:hover {
  background: transparent;
  color: rgba(196,176,255,0.55);
}

/* Frosted overlay over the entire locked section */
.guide-locked-section {
  position: relative;
}

.guide-locked-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,15,0.45), rgba(5,5,15,0.72));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: 10px;
  pointer-events: none;
}

.guide-lock-icon {
  width: 12px;
  height: 12px;
  margin-left: auto;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.6;
}

/* ── Main Content ─────────────────────────────────────────── */
.guide-content {
  min-width: 0;
}

/* ══════════════════════════════════════════════════════════
   CHAPTER STYLES
══════════════════════════════════════════════════════════ */
.guide-chapter {
  scroll-margin-top: 100px;
  padding-bottom: 8px;
}

.guide-chapter-header {
  margin-bottom: 36px;
}

.guide-chapter-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9b7bff;
  margin-bottom: 12px;
  background: rgba(123,77,255,0.1);
  border: 1px solid rgba(123,77,255,0.25);
  border-radius: 20px;
  padding: 4px 12px;
}

.guide-chapter-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.18;
  margin-bottom: 14px;
}

.guide-chapter-intro {
  font-size: clamp(15px, 1.5vw, 18px);
  color: rgba(196,176,255,0.65);
  line-height: 1.75;
  margin: 0;
  font-style: italic;
  border-left: 3px solid rgba(123,77,255,0.4);
  padding-left: 16px;
}

/* ── Body Prose ───────────────────────────────────────────── */
.guide-body {
  font-size: clamp(16px, 1.4vw, 17px);
  line-height: 1.9;
  color: rgba(255,255,255,0.78);
}

.guide-body p {
  margin-bottom: 20px;
}

.guide-body p:last-child {
  margin-bottom: 0;
}

.guide-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 1.9vw, 23px);
  font-weight: 700;
  color: #e8e0ff;
  margin: 36px 0 14px 0;
  line-height: 1.3;
}

.guide-body h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #c4b0ff;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.guide-body strong { color: #c4b0ff; font-weight: 600; }
.guide-compound-link { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(196,176,255,0.35); transition: border-color 0.15s; }
.guide-compound-link:hover { border-bottom-color: #c4b0ff; }
.guide-body em { color: rgba(196,176,255,0.85); }

/* ── Callout Boxes ────────────────────────────────────────── */
.guide-callout {
  border-radius: 14px;
  padding: 24px 28px;
  margin: 28px 0;
}

.guide-callout-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.guide-callout p {
  font-size: 16px;
  line-height: 1.8;
  margin: 0 !important;
}

.guide-callout--dyk {
  background: rgba(123,77,255,0.08);
  border: 1px solid rgba(123,77,255,0.28);
  border-left: 4px solid #7b4dff;
}

.guide-callout--dyk .guide-callout-label { color: #9b7bff; }

.guide-callout--key {
  background: rgba(0,180,255,0.06);
  border: 1px solid rgba(0,180,255,0.2);
  border-left: 4px solid #7dd8ff;
}

.guide-callout--key .guide-callout-label { color: #7dd8ff; }

/* ── Timeline ─────────────────────────────────────────────── */
.guide-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 28px 0;
  position: relative;
}

/* Center vertical line */
.guide-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(123,77,255,0.6), rgba(123,77,255,0.1));
}

/* 3-column grid: [left content] [dot zone 40px] [right content] */
.guide-timeline-item {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 0;
  padding: 14px 0;
  position: relative;
  align-items: flex-start;
}

/* Dot always centered on the line */
.guide-timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7b4dff;
  border: 3px solid rgba(5,5,15,1);
  box-shadow: 0 0 8px rgba(123,77,255,0.5);
  z-index: 1;
}

/* ODD items: year + content stacked on LEFT */
.guide-timeline-item:nth-child(odd) .guide-timeline-year {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
  padding-right: 32px;
}
.guide-timeline-item:nth-child(odd) .guide-timeline-content {
  grid-column: 1;
  grid-row: 2;
  text-align: right;
  padding-right: 32px;
  padding-left: 0;
}
.guide-timeline-item:nth-child(odd) .guide-timeline-content h4,
.guide-timeline-item:nth-child(odd) .guide-timeline-content p {
  text-align: right;
}

/* EVEN items: year + content stacked on RIGHT */
.guide-timeline-item:nth-child(even) .guide-timeline-year {
  grid-column: 3;
  grid-row: 1;
  text-align: left;
  padding-left: 32px;
  padding-right: 0;
}
.guide-timeline-item:nth-child(even) .guide-timeline-content {
  grid-column: 3;
  grid-row: 2;
  text-align: left;
  padding-left: 32px;
  padding-right: 0;
}

.guide-timeline-year {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #c4b0ff;
  margin-bottom: 6px;
}

.guide-timeline-content h4 {
  font-size: 15px;
  color: #e8e0ff;
  margin-bottom: 5px !important;
}

.guide-timeline-content p {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
  margin-bottom: 0 !important;
}

/* ── Tables ───────────────────────────────────────────────── */
.guide-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 12px;
  border: 1px solid rgba(123,77,255,0.2);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.guide-table th {
  background: rgba(123,77,255,0.12);
  color: #c4b0ff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(123,77,255,0.2);
}

.guide-table td {
  padding: 12px 16px;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(123,77,255,0.1);
  vertical-align: top;
}

.guide-table tr:last-child td { border-bottom: none; }
.guide-table tr:hover td { background: rgba(123,77,255,0.04); }

/* ── Chapter Divider ──────────────────────────────────────── */
.guide-chapter-divider-hr {
  height: 1px;
  background: rgba(123,77,255,0.13);
  margin: 56px 0;
}

/* ── Bottom CTA ───────────────────────────────────────────── */
.guide-bottom-cta {
  margin: 0 auto;
  max-width: 680px;
  text-align: center;
  padding: 56px 40px;
  background: linear-gradient(135deg, rgba(123,77,255,0.1) 0%, rgba(90,43,255,0.05) 100%);
  border: 1px solid rgba(123,77,255,0.3);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(123,77,255,0.08);
}

.guide-bottom-cta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #9b7bff;
  margin-bottom: 16px;
}

.guide-bottom-cta-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.25;
}

.guide-bottom-cta-sub {
  font-size: 15px;
  color: rgba(196,176,255,0.65);
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto 28px auto;
}

.guide-bottom-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #7b4dff, #5a32cc);
  color: #ffffff !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 20px rgba(123,77,255,0.35);
}

.guide-bottom-cta-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ── Chapter Nav Buttons ──────────────────────────────────── */
.guide-chapter-nav-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(123,77,255,0.12);
  flex-wrap: wrap;
  gap: 12px;
}

.guide-next-btn,
.guide-prev-btn {
  font-size: 13px;
  font-weight: 600;
  color: #9b7bff;
  text-decoration: none;
  padding: 9px 18px;
  border: 1px solid rgba(123,77,255,0.3);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.guide-next-btn:hover,
.guide-prev-btn:hover {
  background: rgba(123,77,255,0.12);
  color: #c4b0ff;
  border-color: rgba(123,77,255,0.5);
}

/* ── Unlock locked section (authenticated users) ─────────── */
.guide-locked-section.is-unlocked::after {
  display: none;
}

.guide-locked-section.is-unlocked .guide-chapter-link--locked {
  opacity: 1;
  cursor: pointer;
}

/* ── Back to Library button (shown when authenticated) ───── */
.guide-library-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(123,77,255,0.18), rgba(123,77,255,0.08));
  border: 1px solid rgba(123,77,255,0.4);
  border-radius: 10px;
  color: #c4b0ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.guide-library-link:hover {
  background: rgba(123,77,255,0.24);
  border-color: rgba(123,77,255,0.6);
  color: #ffffff;
}

/* ══════════════════════════════════════════════════════════
   IN-PAGE EMAIL GATE (Chapter 5 fade)
══════════════════════════════════════════════════════════ */
.guide-chapter-fade {
  position: relative;
  margin-top: 28px;
}

.guide-fade-preview {
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  pointer-events: none;
  user-select: none;
  max-height: 220px;
  overflow: hidden;
}

.guide-fade-preview h3 { color: #e8e0ff; margin-bottom: 12px; }
.guide-fade-preview p  { color: rgba(255,255,255,0.65); font-size: 15px; line-height: 1.85; }

.guide-gate-overlay {
  position: relative;
  z-index: 2;
  margin-top: -60px;
  transition: opacity 0.4s ease;
}

.guide-gate-box {
  background: linear-gradient(160deg, rgba(18,10,38,0.99) 0%, rgba(8,5,20,0.99) 100%);
  border: 1px solid rgba(123,77,255,0.35);
  border-radius: 20px;
  padding: 44px 40px;
  text-align: center;
  box-shadow: 0 0 60px rgba(123,77,255,0.14), 0 24px 60px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.guide-gate-box::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 120px;
  background: radial-gradient(ellipse, rgba(123,77,255,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.guide-gate-lock {
  width: 44px;
  height: 44px;
  background: rgba(123,77,255,0.15);
  border: 1px solid rgba(123,77,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.guide-gate-lock svg {
  width: 20px;
  height: 20px;
  color: #9b7bff;
}

.guide-gate-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #9b7bff;
  margin-bottom: 12px;
}

.guide-gate-box h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.25;
}

.guide-gate-box > p {
  font-size: 14.5px;
  color: rgba(196,176,255,0.65);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.guide-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto 16px auto;
}

.guide-gate-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(123,77,255,0.3);
  border-radius: 10px;
  padding: 14px 18px;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.guide-gate-input::placeholder { color: rgba(196,176,255,0.35); }

.guide-gate-input:focus {
  border-color: rgba(123,77,255,0.6);
  box-shadow: 0 0 0 3px rgba(123,77,255,0.1);
}

.guide-gate-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #7b4dff 0%, #5a32cc 100%);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.guide-gate-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.guide-gate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.guide-gate-error {
  font-size: 13px;
  color: #ff7b7b;
  text-align: center;
  min-height: 18px;
}

.guide-gate-fine {
  font-size: 11px;
  color: rgba(196,176,255,0.3);
  margin-bottom: 20px !important;
}

.guide-gate-perks {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.guide-gate-perks span {
  font-size: 12px;
  color: rgba(196,176,255,0.6);
  background: rgba(123,77,255,0.1);
  border: 1px solid rgba(123,77,255,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1060px) {
  .guide-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
  }

  .guide-sidebar {
    position: static;
    overflow-x: auto;
    padding: 20px 0 16px 0;
    border-bottom: 1px solid rgba(123,77,255,0.15);
    margin-bottom: 40px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .guide-sidebar::-webkit-scrollbar { display: none; }
  .guide-sidebar-label { display: none; }

  .guide-chapter-nav {
    flex-direction: row;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .guide-chapter-divider { display: none; }

  .guide-chapter-link {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 8px;
    flex-shrink: 0;
    padding: 7px 14px;
    white-space: nowrap;
  }

  .guide-chapter-link.active {
    border-left: none;
    border-bottom-color: #7b4dff;
  }

  .guide-chapter-link--locked { display: none; }
  .guide-lock-icon { display: none; }
  .guide-ch-num { display: none; }
}

@media (max-width: 768px) {
  .guide-hero { padding: 60px 0 40px 0; }
  .guide-chapter-header h2 { font-size: clamp(20px, 5vw, 28px); }
  .guide-body { font-size: 15px; }
  .guide-callout { padding: 20px; }
  .guide-gate-box { padding: 32px 24px; }
  /* timeline stays centered on tablet */
}

@media (max-width: 480px) {
  .guide-timeline::before { left: 16px; transform: none; }
  .guide-timeline-item { grid-template-columns: 56px 1fr; gap: 0; }
  .guide-timeline-item::before { left: 9px; transform: none; top: 18px; }
  /* all items: year left, content right on mobile */
  .guide-timeline-item:nth-child(odd) .guide-timeline-year,
  .guide-timeline-item:nth-child(even) .guide-timeline-year {
    grid-column: 1; text-align: right; padding-right: 20px; padding-left: 0;
  }
  .guide-timeline-item:nth-child(odd) .guide-timeline-content,
  .guide-timeline-item:nth-child(even) .guide-timeline-content {
    grid-column: 2; padding-left: 16px; padding-right: 0; text-align: left;
  }
  .guide-timeline-item:nth-child(even) .guide-timeline-content h4,
  .guide-timeline-item:nth-child(even) .guide-timeline-content p { text-align: left; }
  .guide-chapter-nav-btns { flex-direction: column; }
  .guide-next-btn, .guide-prev-btn { width: 100%; text-align: center; }
  .guide-chapter-nav-btns { flex-direction: column; }
  .guide-next-btn, .guide-prev-btn { width: 100%; text-align: center; }
  .guide-gate-perks span { font-size: 11px; }
}
