/*
 * zarlit-article.css
 * Стилі для статей-гайдів сайту zarlit.com
 * Підключається разом із style.css
 * Класи: guide-page, guide-header, breadcrumb, guide-meta-tags,
 *         guide-toc, guide-intro, quick-ref, plot-section,
 *         characters-section, themes-section, devices-section,
 *         exam-section, context-section, mistakes-section, faq-section
 */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ══════════════════════════════════════
   ЗМІННІ
══════════════════════════════════════ */
:root {
  --ga-ink:         #1a1a2e;
  --ga-mid:         #34495e;
  --ga-soft:        #7f8c8d;
  --ga-border:      #dde3ea;
  --ga-bg:          #f7f9fc;
  --ga-white:       #ffffff;
  --ga-accent:      #2c3e50;
  --ga-accent-bg:   #eef2f7;
  --ga-green:       #1a7a4a;
  --ga-green-bg:    #edfaf3;
  --ga-red:         #c0392b;
  --ga-red-bg:      #fdf0ee;
  --ga-gold:        #b7770d;
  --ga-gold-bg:     #fef9ec;
  --ga-r:           8px;
  --ga-font-body:   'Merriweather', Georgia, serif;
  --ga-font-ui:     'IBM Plex Sans', system-ui, sans-serif;
}

/* ══════════════════════════════════════
   ОБГОРТКА СТАТТІ
══════════════════════════════════════ */
.guide-page {
  font-family: var(--ga-font-body);
  color: var(--ga-ink);
  line-height: 1.85;
  font-size: 17px;
}

/* ══════════════════════════════════════
   ХЛІБНІ КРИХТИ
══════════════════════════════════════ */
.breadcrumb {
  font-family: var(--ga-font-ui);
  font-size: 13px;
  color: var(--ga-soft);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--ga-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--ga-accent);
  text-decoration: underline;
}

/* ══════════════════════════════════════
   ШАПКА ГАЙДУ
══════════════════════════════════════ */
.guide-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--ga-border);
}
.guide-header h1 {
  font-family: var(--ga-font-body);
  font-size: 32px;
  font-weight: 700;
  color: var(--ga-ink);
  line-height: 1.25;
  margin: 14px 0 10px;
  text-align: left;
}
@media (max-width: 900px) {
  .guide-header h1 { font-size: 24px; }
}

/* ТЕГИ: жанр, клас */
.guide-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.tag {
  font-family: var(--ga-font-ui);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag-genre {
  background: var(--ga-accent-bg);
  color: var(--ga-accent);
  border: 1px solid #c5d4e8;
}
.tag-age {
  background: var(--ga-gold-bg);
  color: var(--ga-gold);
  border: 1px solid #f0d898;
}

/* ПІДЗАГОЛОВОК */
.guide-subtitle {
  font-family: var(--ga-font-ui);
  font-size: 16px;
  font-weight: 400;
  color: var(--ga-soft);
  line-height: 1.6;
  margin: 10px 0 20px;
  font-style: italic;
}

/* НАВІГАЦІЯ (зміст) */
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  background: var(--ga-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-r);
  padding: 14px 18px;
  font-family: var(--ga-font-ui);
  font-size: 13px;
  margin-top: 22px;
}
.guide-toc strong {
  color: var(--ga-mid);
  font-weight: 700;
  margin-right: 4px;
  white-space: nowrap;
}
.guide-toc a {
  color: var(--ga-mid);
  text-decoration: none;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--ga-white);
  border: 1px solid var(--ga-border);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.guide-toc a:hover {
  background: var(--ga-accent);
  border-color: var(--ga-accent);
  color: #fff;
}

/* ══════════════════════════════════════
   ЗАГАЛЬНІ СЕКЦІЇ — відступи та заголовки
══════════════════════════════════════ */
.guide-intro,
.quick-ref,
.plot-section,
.characters-section,
.themes-section,
.devices-section,
.exam-section,
.context-section,
.mistakes-section,
.faq-section {
  margin-bottom: 48px;
  scroll-margin-top: 20px;
}

.guide-intro h2,
.plot-section h2,
.characters-section h2,
.themes-section h2,
.devices-section h2,
.exam-section h2,
.context-section h2,
.mistakes-section h2,
.faq-section h2 {
  font-family: var(--ga-font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--ga-ink);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ga-border);
  text-align: left;
  line-height: 1.35;
}

/* sub-заголовки h3 всередині секцій */
.plot-section h3,
.characters-section h3,
.themes-section h3,
.devices-section h3,
.exam-section h3,
.context-section h3 {
  font-family: var(--ga-font-ui);
  font-size: 17px;
  font-weight: 700;
  color: var(--ga-mid);
  margin: 28px 0 10px;
}

/* ══════════════════════════════════════
   ВСТУП
══════════════════════════════════════ */
.guide-intro {
  background: var(--ga-accent-bg);
  border-left: 4px solid var(--ga-accent);
  border-radius: 0 var(--ga-r) var(--ga-r) 0;
  padding: 24px 28px;
}
.guide-intro h2 {
  font-size: 19px;
  font-style: italic;
  font-weight: 400;
  color: var(--ga-mid);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 14px;
}
.guide-intro p {
  margin-bottom: 12px;
  color: var(--ga-ink);
}
.guide-intro p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════
   ТАБЛИЦЯ-ДОВІДНИК
══════════════════════════════════════ */
.quick-ref {
  background: var(--ga-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-r);
  padding: 22px 24px;
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ga-font-ui);
  font-size: 15px;
}
.ref-table tr {
  border-bottom: 1px solid var(--ga-border);
}
.ref-table tr:last-child {
  border-bottom: none;
}
.ref-table th {
  width: 38%;
  padding: 11px 14px 11px 0;
  text-align: left;
  font-weight: 700;
  color: var(--ga-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  vertical-align: top;
}
.ref-table td {
  padding: 11px 0;
  color: var(--ga-ink);
  font-weight: 500;
  vertical-align: top;
  line-height: 1.55;
}

/* ══════════════════════════════════════
   СЮЖЕТ — article всередині секції
══════════════════════════════════════ */
.plot-section article {
  background: var(--ga-white);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-r);
  padding: 20px 24px;
  margin-bottom: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.plot-section article:hover {
  border-color: #b0bec5;
  box-shadow: 0 2px 10px rgba(44, 62, 80, 0.07);
}
.plot-section article h3 {
  margin-top: 0;
  margin-bottom: 10px;
}
.plot-section article p {
  margin-bottom: 0;
  font-size: 16px;
  color: var(--ga-mid);
  line-height: 1.8;
}

/* ══════════════════════════════════════
   ПЕРСОНАЖІ
══════════════════════════════════════ */
.char-card {
  background: var(--ga-white);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-r);
  padding: 22px 26px;
  margin-bottom: 16px;
  position: relative;
  border-left: 4px solid var(--ga-accent);
  transition: box-shadow 0.2s;
}
.char-card:hover {
  box-shadow: 0 3px 14px rgba(44, 62, 80, 0.09);
}
.char-name {
  font-family: var(--ga-font-ui);
  font-size: 18px;
  font-weight: 700;
  color: var(--ga-ink);
  margin: 0 0 12px;
}
.char-traits {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.char-traits li {
  font-family: var(--ga-font-ui);
  font-size: 14px;
  color: var(--ga-mid);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}
.char-traits li::before {
  content: '·';
  position: absolute;
  left: 0;
  font-size: 22px;
  color: var(--ga-accent);
  line-height: 1;
}
.char-insight {
  font-family: var(--ga-font-body);
  font-size: 14px;
  font-style: italic;
  color: var(--ga-soft);
  margin: 0;
  padding: 12px 14px;
  background: var(--ga-bg);
  border-radius: 4px;
  line-height: 1.65;
}

/* ══════════════════════════════════════
   ТЕМИ
══════════════════════════════════════ */
.theme-block {
  background: var(--ga-white);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-r);
  padding: 22px 26px;
  margin-bottom: 14px;
}
.theme-block h3 {
  font-family: var(--ga-font-ui);
  font-size: 17px;
  font-weight: 700;
  color: var(--ga-ink);
  margin: 0 0 12px;
}
.theme-block p {
  font-size: 15px;
  color: var(--ga-mid);
  line-height: 1.8;
  margin-bottom: 10px;
}
.theme-block p:last-child { margin-bottom: 0; }
.theme-block strong { color: var(--ga-ink); }

/* ══════════════════════════════════════
   ТИПОВІ ПОМИЛКИ
══════════════════════════════════════ */
.mistake-item {
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-r);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--ga-white);
}
.mistake-wrong {
  background: var(--ga-red-bg);
  border-left: 4px solid var(--ga-red);
  padding: 13px 18px;
  font-family: var(--ga-font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ga-red);
  line-height: 1.6;
}
.mistake-right {
  background: var(--ga-green-bg);
  border-left: 4px solid var(--ga-green);
  padding: 13px 18px;
  font-family: var(--ga-font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ga-green);
  line-height: 1.6;
}
.mistake-why {
  padding: 13px 18px;
  font-family: var(--ga-font-ui);
  font-size: 13px;
  color: var(--ga-soft);
  line-height: 1.7;
  background: var(--ga-bg);
  border-top: 1px solid var(--ga-border);
}

/* ══════════════════════════════════════
   FAQ
══════════════════════════════════════ */
.qa-item {
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-r);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--ga-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.qa-item:hover {
  border-color: #b0bec5;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
}
.qa-q {
  font-family: var(--ga-font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--ga-ink);
  padding: 15px 20px;
  background: var(--ga-bg);
  border-bottom: 1px solid var(--ga-border);
  line-height: 1.5;
}
.qa-a {
  font-family: var(--ga-font-ui);
  font-size: 14px;
  color: var(--ga-mid);
  padding: 15px 20px;
  line-height: 1.75;
}

/* ══════════════════════════════════════
   АДАПТИВ
══════════════════════════════════════ */
@media (max-width: 900px) {
  .guide-header { margin-bottom: 24px; padding-bottom: 20px; }
  .guide-header h1 { font-size: 22px; }
  .guide-intro { padding: 18px 20px; }
  .quick-ref { padding: 16px 18px; }
  .ref-table th { width: 42%; font-size: 11px; }
  .ref-table th, .ref-table td { padding: 9px 8px 9px 0; }
  .char-card { padding: 18px 18px; }
  .mistake-wrong, .mistake-right { font-size: 13px; }
  .guide-toc { padding: 12px 14px; }
}
