/* ===== Сайт «Знать. Помнить. Творить.» ===== */

:root {
  --bg: #f4efe6;          /* тёплый беж */
  --panel: #fffdf7;
  --ink: #3b3427;         /* тёмный тёплый текст */
  --muted: #7a705f;
  --olive: #6b733f;       /* оливковый */
  --olive-dark: #565c33;
  --red: #a33b2b;         /* тёмно-красный акцент */
  --gold: #c99a3f;
  --correct: #4a7a3d;
  --wrong: #b03a2e;
  --border: #ddd2bd;
  --radius: 14px;
  --shadow: 0 4px 14px rgba(59, 52, 39, 0.10);
  --sidebar-w: 230px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  display: flex;
}

/* ===== Меню (вкладки справа) ===== */
.menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--olive), var(--olive-dark));
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
}

.menu-toggle {
  display: none;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-btn {
  appearance: none;
  border: none;
  background: rgba(255, 253, 247, 0.12);
  color: #f7f1e4;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, transform 0.2s;
}

.menu-btn:hover { background: rgba(255, 253, 247, 0.22); transform: translateX(-4px); }
.menu-btn.active {
  background: var(--panel);
  color: var(--olive-dark);
  box-shadow: var(--shadow);
}

/* ===== Контент ===== */
.content {
  flex: 1;
  margin-right: var(--sidebar-w);
  padding: 40px 28px 60px;
  max-width: 920px;
}

.section { display: none; }
.section.active { display: block; animation: fade 0.3s ease; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 2.1rem;
  margin: 0 0 6px;
  color: var(--olive-dark);
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ===== Викторина ===== */
.quiz-score {
  position: sticky;
  top: 16px;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-weight: 700;
  color: var(--olive-dark);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  display: inline-block;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  max-width: 640px;
}

.q-num {
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.q-text {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 20px;
}

.option {
  display: block;
  width: 100%;
  text-align: left;
  background: #faf6ec;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 1.05rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.option:hover:not(:disabled) { border-color: var(--olive); }
.option.selected { border-color: var(--gold); background: #fdf3d9; }
.option.correct { border-color: var(--correct); background: #e8f2e2; }
.option.wrong { border-color: var(--wrong); background: #f8e3df; }
.option:disabled { cursor: default; opacity: 0.85; }

.result {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
}
.result.true  { background: #e8f2e2; color: var(--correct); }
.result.false { background: #f8e3df; color: var(--wrong); }

.fact {
  margin-top: 10px;
  padding: 14px 16px;
  background: #fdf3d9;
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
}
.fact .fact-label {
  font-weight: 800;
  color: var(--red);
  display: block;
  margin-bottom: 4px;
}

.btn {
  appearance: none;
  border: none;
  background: var(--olive);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 18px;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover { background: var(--olive-dark); }
.btn:active { transform: scale(0.98); }

.btn.disabled {
  background: #cfc7b5;
  color: #f5f1e6;
  cursor: not-allowed;
}

/* Итог */
.final {
  text-align: center;
  padding: 30px 20px;
}
.final .big-score {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--red);
}
.final .praise {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 6px;
}

/* ===== Заглушки ===== */
.placeholder {
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  color: var(--muted);
  max-width: 640px;
}

.author-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 640px;
  margin-bottom: 20px;
}

.placeholder-block {
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 10px;
  text-align: center;
  color: var(--muted);
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
  body { flex-direction: column; }

  .menu {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    box-shadow: var(--shadow);
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 253, 247, 0.15);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
  }

  .menu-links {
    display: none;
    position: absolute;
    top: 68px;
    right: 12px;
    left: 12px;
    flex-direction: column;
    background: var(--olive-dark);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
  }
  .menu-links.open { display: flex; }

  .content {
    margin-right: 0;
    padding: 24px 16px 48px;
  }

  h1 { font-size: 1.7rem; }
}
