/* ==========================================================================
   CupTrack — Довідка (FAQ)
   Спільні стилі для рамки (index.html) і для окремих сторінок (pages/*.html).
   Кожна сторінка в pages/ — самостійний HTML-файл, який підключає цей файл і
   тому коректно виглядає як усередині iframe, так і якщо відкрити її окремо
   (зручно редагувати в Dreamweaver).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  background: #f5f5f5;
}

/* ──────────────────────────────────────────────────────────────────────────
   РАМКА (index.html): фіксований сайдбар + область з iframe
   ────────────────────────────────────────────────────────────────────────── */
.faq-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 16px 4px;
  font-weight: 700;
  font-size: 16px;
  color: #1a1a1a;
}
.sidebar-sub {
  padding: 0 16px 12px;
  font-size: 12px;
  color: #999;
  border-bottom: 1px solid #f0f0f0;
}

/* Перемикач мови довідки. Кожна мова — окремий index (index.html / index_ru.html /
   index_en.html) зі своєю текою сторінок, тож перемикання — це звичайне посилання
   без JavaScript. */
.faq-lang {
  display: flex;
  gap: 6px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.faq-lang a {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-decoration: none;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.faq-lang a:hover { background: #f5f5f5; color: #0f6b5c; }
.faq-lang a.active { background: #0f6b5c; border-color: #0f6b5c; color: #fff; }

.sidebar-nav { flex: 1; padding: 8px 0; }

.nav-group-label {
  padding: 12px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
}

.nav-item {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: #444;
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
  margin: 1px 8px;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: #f5f5f5; color: #0f6b5c; }
.nav-item.active { background: #e8f5f1; color: #0f6b5c; font-weight: 600; }

/* Область праворуч від сайдбара — сюди вбудований iframe */
.faq-main {
  margin-left: 240px;
  width: calc(100% - 240px);
  min-height: 100vh;
}
.faq-frame {
  width: 100%;
  height: 100vh;
  border: none;
  display: block;
}

/* ──────────────────────────────────────────────────────────────────────────
   КОНТЕНТ-СТОРІНКИ (pages/*.html)
   ────────────────────────────────────────────────────────────────────────── */
.faq-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.faq-content h1 {
  font-size: 26px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.faq-content .lead {
  color: #666;
  font-size: 15.5px;
  margin-bottom: 28px;
}

.faq-content h2 {
  font-size: 19px;
  margin: 34px 0 12px;
  padding-top: 18px;
  border-top: 1px solid #ececec;
}
.faq-content h2:first-of-type { border-top: none; padding-top: 0; }

.faq-content h3 { font-size: 16px; margin: 20px 0 8px; }

.faq-content p { font-size: 15.5px; line-height: 1.7; margin: 0 0 14px; }
.faq-content ul, .faq-content ol { margin: 0 0 16px; padding-left: 24px; }
.faq-content li { font-size: 15.5px; line-height: 1.7; margin-bottom: 7px; }
.faq-content strong { font-weight: 600; }
.faq-content a { color: #0f6b5c; text-decoration: none; }
.faq-content a:hover { text-decoration: underline; }

/* Кроки (нумерований список з акцентом) */
.faq-steps { counter-reset: step; list-style: none; padding-left: 0; margin: 0 0 20px; }
.faq-steps > li {
  position: relative;
  padding: 2px 0 2px 44px;
  margin-bottom: 14px;
  min-height: 30px;
}
.faq-steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  background: #0f6b5c;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Фото (плейсхолдери — реальні додасть власник) */
.faq-figure { margin: 20px 0 24px; }
.faq-figure img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  background: #f0f0f0;
  display: block;
}
.faq-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: #999;
  text-align: center;
}

/* Підказка / примітка */
.faq-tip, .faq-note {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0 22px;
  font-size: 14.5px;
  line-height: 1.6;
}
.faq-tip  { background: #e8f5f1; border: 1px solid #cfeae1; color: #14503f; }
.faq-note { background: #fff8e6; border: 1px solid #f3e2b3; color: #6b5514; }
.faq-tip strong, .faq-note strong { font-weight: 700; }

/* Дрібні хлібні крихти вгорі кожної сторінки (необов'язкові) */
.faq-crumb { font-size: 12px; color: #aaa; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.5px; }

@media (max-width: 700px) {
  .sidebar { position: static; width: 100%; min-height: auto; }
  .faq-main { margin-left: 0; width: 100%; }
  .faq-frame { height: 70vh; }
  .faq-content { padding: 28px 18px 60px; }
}
