/* ═══════════════════════════════════════════
   Guide Buying — Гид покупки недвижимости в Болгарии
   NashDomBG · Neo-Glassmorphism
   ═══════════════════════════════════════════ */

/* ─── Section Switcher (shared with risk-check) ─── */
.guide-section-switcher {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0 auto 24px;
  max-width: 400px;
  background: rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 4px;
  position: relative;
  z-index: 1;
}
.section-switch {
  flex: 1;
  text-align: center;
  padding: 10px 20px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}
.section-switch.is-active {
  background: white;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.section-switch:hover:not(.is-active) {
  color: var(--text-primary);
}

/* ─── Layout ─── */
.guide-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 1;
}

/* ─── Header ─── */
.guide-header {
  text-align: center;
  padding: 40px 20px 32px;
  position: relative;
  z-index: 1;
}

.guide-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.guide-back,
.guide-risk-link {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.guide-back:hover { color: var(--accent); }

.guide-risk-link {
  color: var(--accent);
  background: rgba(59, 122, 140, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(59, 122, 140, 0.2);
}

.guide-risk-link:hover {
  background: rgba(59, 122, 140, 0.18);
}

.guide-header h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.guide-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 auto;
  max-width: 560px;
  line-height: 1.55;
}

/* ─── Tabs ─── */
.guide-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--border-glass);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.guide-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body, 'Source Sans 3', sans-serif);
  white-space: nowrap;
}

.guide-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.5);
}

.guide-tab.is-active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(59, 122, 140, 0.35);
}

/* ─── Timeline ─── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 50px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(180deg, rgba(59, 122, 140, 0.5) 0%, rgba(59, 122, 140, 0.08) 100%);
  z-index: 0;
}

.timeline-step {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-glass);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
  position: relative;
  z-index: 1;
}

.timeline-step:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.timeline-step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(59, 122, 140, 0.4);
}

.timeline-step.is-stop .step-num {
  background: var(--palette-danger, #C0392B);
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.4);
}

.step-meta {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
}

.timeline-step.is-stop .step-title {
  color: var(--palette-danger, #C0392B);
}

.step-duration {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.step-chevron {
  font-size: 18px;
  color: var(--text-tertiary);
  transition: transform 0.25s;
  line-height: 1;
  flex-shrink: 0;
}

.timeline-step.is-expanded .step-chevron {
  transform: rotate(180deg);
}

.timeline-step-body {
  display: none;
  padding: 4px 22px 22px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.timeline-step.is-expanded .timeline-step-body {
  display: block;
}

.timeline-step-body p {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 14px 0 0;
}

.timeline-step-body ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.timeline-step-body li {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 7px;
}

/* Callout boxes */
.step-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.55;
}

.step-box strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-box--red {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.2);
  color: var(--red-text, #b91c1c);
}

.step-box--green {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: var(--green-text, #15803d);
}

.step-box--blue {
  background: rgba(59, 122, 140, 0.08);
  border: 1px solid rgba(59, 122, 140, 0.2);
  color: var(--accent, #3B7A8C);
}

.step-box--amber {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: var(--amber-text, #b45309);
}

.step-box code {
  background: rgba(0,0,0,0.07);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  font-size: 13px;
}

/* Practical case / tip / redflag blocks inside timeline steps */
.timeline-test,
.timeline-tip,
.timeline-redflag {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 13px;
  line-height: 1.55;
}

.timeline-test {
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid #3b82f6;
  color: var(--text-secondary, #374151);
}

.timeline-tip {
  background: rgba(34, 197, 94, 0.06);
  border-left: 3px solid #22c55e;
  color: var(--green-text, #15803d);
}

.timeline-redflag {
  background: rgba(192, 57, 43, 0.06);
  border-left: 3px solid #c0392b;
  color: var(--red-text, #b91c1c);
}

.timeline-test strong,
.timeline-tip strong,
.timeline-redflag strong {
  font-weight: 700;
}

/* STOP step highlight */
.timeline-step.is-stop .timeline-step-header {
  background: rgba(192, 57, 43, 0.04);
}

/* ─── Fraud Cards ─── */
.fraud-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fraud-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-glass);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
}

.fraud-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.fraud-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  cursor: pointer;
  user-select: none;
}

.fraud-icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}

.fraud-card-meta {
  flex: 1;
  min-width: 0;
}

.fraud-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 5px;
}

.fraud-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(192, 57, 43, 0.1);
  color: var(--palette-danger, #C0392B);
  border: 1px solid rgba(192, 57, 43, 0.18);
}

.fraud-chevron {
  font-size: 18px;
  color: var(--text-tertiary);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.fraud-card.is-expanded .fraud-chevron {
  transform: rotate(180deg);
}

.fraud-card-body {
  display: none;
  padding: 4px 22px 22px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.fraud-card.is-expanded .fraud-card-body {
  display: block;
}

.fraud-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin: 14px 0 6px;
}

.fraud-card-body p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
}

.fraud-flag {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.18);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--palette-danger, #C0392B);
}

.fraud-flag::before {
  content: '🚩 ';
}

.fraud-protect {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--green-text, #15803d);
  line-height: 1.5;
}

.fraud-protect::before {
  content: '✓ ';
  font-weight: 700;
}

/* ─── Checklist ─── */
.checklist-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checklist-warning {
  background: rgba(192, 57, 43, 0.08);
  border: 1.5px solid rgba(192, 57, 43, 0.25);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  text-align: center;
}

.warn-icon {
  font-size: 38px;
  display: block;
  margin-bottom: 8px;
}

.warn-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--palette-danger, #C0392B);
  margin: 0 0 6px;
}

.warn-sub {
  font-size: 14px;
  color: var(--red-text, #b91c1c);
  margin: 0;
}

.checklist-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-glass);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-md);
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}

.checklist-item:has(.deposit-check:checked) {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.22);
}

.deposit-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checklist-label {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
}

.checklist-item:has(.deposit-check:checked) .checklist-label {
  color: var(--green-text, #15803d);
  text-decoration: line-through;
  text-decoration-color: rgba(34, 197, 94, 0.5);
}

/* Progress */
.deposit-progress-wrap {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-glass);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.deposit-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.deposit-progress-bar {
  height: 10px;
  background: rgba(0,0,0,0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 16px;
}

.deposit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #3B7A8C), #22c55e);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 0.4s ease;
}

.deposit-status {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  transition: all 0.3s;
  line-height: 1.4;
}

.deposit-status.is-not-ready {
  background: rgba(192, 57, 43, 0.1);
  color: var(--palette-danger, #C0392B);
  border: 1px solid rgba(192, 57, 43, 0.2);
}

.deposit-status.is-ready {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green-text, #15803d);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.checklist-reset-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body, 'Source Sans 3', sans-serif);
  transition: all 0.2s;
}

.checklist-reset-btn:hover {
  color: var(--palette-danger, #C0392B);
  border-color: rgba(192, 57, 43, 0.3);
  background: rgba(192, 57, 43, 0.04);
}

/* ─── Body base ─── */
body {
  background: var(--scene-bg-gradient, linear-gradient(160deg, #F8F4EF 0%, #F0EBE4 40%, #E5DED6 100%));
  min-height: 100vh;
  font-family: var(--font-body, 'Source Sans 3', sans-serif);
  color: var(--text-primary, #2D3436);
  margin: 0;
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
  .guide-header h1 {
    font-size: 26px;
  }

  .guide-subtitle {
    font-size: 14px;
  }

  .guide-tabs {
    gap: 4px;
    padding: 4px;
  }

  .guide-tab {
    font-size: 12px;
    padding: 9px 8px;
  }

  .timeline::before {
    left: 28px;
  }

  .step-num {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .timeline-step-header,
  .fraud-card-header {
    padding: 14px 16px;
    gap: 12px;
  }

  .timeline-step-body,
  .fraud-card-body {
    padding: 4px 16px 16px;
  }

  .checklist-card,
  .deposit-progress-wrap {
    padding: 16px;
  }

  .guide-nav-top {
    padding: 0 16px;
  }

  .fraud-icon {
    width: 32px;
    font-size: 22px;
  }
}

/* ─── Print ─── */
@media print {
  .guide-tabs { display: none; }

  .guide-tab-content { display: block !important; }

  .scene-bg-shape { display: none; }

  .timeline-step,
  .fraud-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    backdrop-filter: none;
  }

  .timeline-step-body,
  .fraud-card-body {
    display: block !important;
  }

  .step-chevron,
  .fraud-chevron {
    display: none;
  }

  body {
    background: white;
  }

  .guide-risk-link,
  .checklist-reset-btn {
    display: none;
  }

  .deposit-progress-wrap {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
