/* ═══════════════════════════════════════════════════════
   QA.CSS — раздел «Вопрос-ответ» (/vopros/)
   Зависит от: css/styles.css (токены, .container, кнопки),
   css/blog.css (.breadcrumb, .art-tag), css/wp-theme.css (.post-entry, пагинация).
   Подключается только на страницах раздела, см. functions.php, секция 2.
═══════════════════════════════════════════════════════ */

/* ───────────── Шапка раздела ───────────── */
.qa-hero { padding: 96px 0 34px; background: var(--bg); }
.qa-hero .s-tag { margin-bottom: 14px; }
.qa-hero-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  max-width: 900px;
}
.qa-hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 760px;
  margin: 0;
}
.qa-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-2);
}
.qa-stat strong { color: var(--text); font-weight: 600; }
.qa-stat-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.qa-stat-link:hover { text-decoration: underline; }
.qa-hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ───────────── Сетка тем ───────────── */
.qa-temy { padding: 26px 0 8px; background: var(--bg); }
.qa-section-title {
  font-size: clamp(21px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0 0 20px;
}
.qa-tema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.qa-tema-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.qa-tema-card:hover {
  border-color: rgba(110,79,247,.32);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13,11,26,.07);
}
.qa-tema-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.qa-tema-count {
  flex: 0 0 auto;
  min-width: 34px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 50px;
  padding: 3px 10px;
}

/* ───────────── Лента вопросов ───────────── */
.qa-feed { padding: 34px 0 84px; background: var(--bg); }
.qa-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.qa-item {
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  transition: border-color .2s;
}
.qa-item:hover { border-color: rgba(110,79,247,.28); }
.qa-item-title {
  font-family: 'Geologica', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
}
.qa-item-title a { color: var(--text); text-decoration: none; }
.qa-item-title a:hover { color: var(--accent); }
.qa-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}
.qa-sep { color: var(--text-3); }
.qa-item-teaser {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.qa-item-expert { font-weight: 600; color: var(--text); }
.qa-other-temy { margin-top: 46px; }

/* ───────────── Страница вопроса ───────────── */
.qa-single { padding: 96px 0 84px; background: var(--bg); }
.qa-single .container { max-width: 860px; }
.qa-single-head { margin-bottom: 24px; }
.qa-title {
  font-size: clamp(25px, 3.4vw, 36px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 0;
}

.qa-question-card,
.qa-answer-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.qa-question-card { display: flex; gap: 16px; align-items: flex-start; }
.qa-answer-card { margin-top: 16px; border-color: var(--border); }

.qa-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: 'Geologica', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--text-2);
  background: var(--bg-section);
}
.qa-avatar-expert { color: var(--white); background: var(--accent); font-size: 15px; }

.qa-q-body { flex: 1; min-width: 0; }
.qa-q-who { font-size: 14px; color: var(--text-3); margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.qa-q-who strong { color: var(--text); font-weight: 600; }
.qa-q-text { font-size: 16.5px; line-height: 1.68; color: var(--text); }
.qa-q-text p { margin: 0 0 12px; }
.qa-q-text p:last-child { margin-bottom: 0; }

.qa-answer-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.qa-answer-who { flex: 1; min-width: 0; }
.qa-a-name { margin: 0; font-size: 15.5px; }
.qa-a-role, .qa-a-date { margin: 2px 0 0; font-size: 13px; color: var(--text-3); }
.qa-badge {
  flex: 0 0 auto;
  font-family: 'Geologica', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 11px;
  border-radius: 50px;
}
.qa-answer-text { font-size: 16.5px; }
.qa-answer-text p:last-child { margin-bottom: 0; }

/* Ссылка на статью блога */
.qa-related-article {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 18px 22px;
  background: var(--accent-06);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.qa-related-article:hover { background: var(--accent-10); border-color: rgba(110,79,247,.32); }
.qa-ra-kicker {
  flex: 0 0 auto;
  font-family: 'Geologica', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.qa-ra-title { flex: 1; font-weight: 600; color: var(--text); font-size: 15.5px; line-height: 1.4; }
.qa-ra-arrow { color: var(--accent); font-size: 18px; }

.qa-similar { margin-top: 52px; }
.qa-more { margin-top: 14px; font-size: 15px; }
.qa-more a { color: var(--accent); text-decoration: none; font-weight: 600; }
.qa-more a:hover { text-decoration: underline; }

/* ───────────── Форма вопроса ───────────── */
.qa-form-box {
  margin-top: 56px;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.qa-form-title { font-size: clamp(21px, 2.4vw, 27px); font-weight: 700; margin: 10px 0 8px; letter-spacing: -.015em; }
.qa-form-note { font-size: 15px; color: var(--text-2); margin: 0 0 22px; line-height: 1.6; }
.qa-form-ok, .qa-form-error {
  font-size: 15px;
  line-height: 1.6;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  margin: 0 0 18px;
}
.qa-form-ok { color: var(--ok); background: var(--ok-bg); }
.qa-form-error { color: var(--danger); background: var(--danger-bg); }
.qa-form-ok[hidden], .qa-form-error[hidden], .qa-form[hidden] { display: none; }

.qa-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qa-field { display: block; margin-bottom: 14px; }
.qa-field > span { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.qa-field input, .qa-field textarea {
  width: 100%;
  font-family: 'Onest', sans-serif;
  font-size: 15.5px;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  transition: border-color .2s, background .2s;
}
.qa-field textarea { resize: vertical; min-height: 118px; line-height: 1.55; }
.qa-field input:focus, .qa-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}
.qa-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 6px 0 22px;
}
.qa-consent input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--accent); width: 16px; height: 16px; }
.qa-consent a { color: var(--accent); }
.qa-submit { display: inline-flex; }
/* honeypot: поле для ботов, человеку не показываем */
.qa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ───────────── Блок вопросов на главной и в статье ───────────── */
.qa-home { padding: 78px 0; background: var(--bg-section); }
.qa-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.qa-home-head h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.02em; margin: 8px 0 0; }
.qa-home-all { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.qa-home-all:hover { text-decoration: underline; }
.qa-home .qa-item { background: var(--white); }
.qa-post-block { margin: 44px 0 0; padding: 24px; background: var(--accent-06); border: 1px solid var(--border-soft); border-radius: var(--r-md); }
.qa-post-block .qa-section-title { font-size: 19px; margin-bottom: 14px; }
.qa-post-block ul { margin: 0; padding-left: 20px; }
.qa-post-block li { margin-bottom: 8px; font-size: 15.5px; line-height: 1.5; }
.qa-post-block a { color: var(--text); text-decoration: none; }
.qa-post-block a:hover { color: var(--accent); text-decoration: underline; }

/* ───────────── Адаптив ───────────── */
@media (max-width: 860px) {
  .qa-hero { padding: 84px 0 28px; }
  .qa-single { padding: 84px 0 64px; }
  .qa-form-box { padding: 24px 20px; }
  .qa-form-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 560px) {
  .qa-question-card, .qa-answer-card { padding: 20px 17px; border-radius: var(--r-md); }
  .qa-avatar { width: 38px; height: 38px; font-size: 15px; }
  .qa-related-article { flex-wrap: wrap; gap: 8px; padding: 16px 18px; }
  .qa-ra-arrow { display: none; }
  .qa-item { padding: 16px 16px; }
  .qa-hero-stats { gap: 8px 16px; font-size: 13px; }
}
