/* css/faq.css */

/* ─── HERO ─── */
.faq-hero { background: var(--surface); padding: 40px 0; }

.faq-hero__card {
  background: var(--white);
  border-radius: var(--r-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  align-items: center;
}

.faq-hero__body {
  padding: 52px 48px 52px 56px;
  position: relative;
  z-index: 1;
}

.faq-hero__title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 16px;
}

.faq-hero__sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 480px;
}

.faq-hero__img-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.faq-hero__img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* ─── ЧАТ-ОКНО ─── */
.faq-chat { padding: 16px 0 40px; }

.faq-chat__window {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}

/* Пара вопрос + ответ */
.chat-pair {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Разделитель между парами */
.chat-sep {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
  border: none;
}

/* Строка сообщения */
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.chat-row--q { justify-content: flex-start; }
.chat-row--a { justify-content: flex-end; }

/* Аватарка-иконка */
.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-avatar--q {
  background: var(--red-dim);
  color: var(--red);
  border: 1.5px solid rgba(255,0,0,.15);
}

.chat-avatar--a {
  overflow: hidden;
  border: none;
}

.chat-avatar--a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Баббл */
.chat-bubble {
  max-width: 72%;
  padding: 14px 22px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  position: relative;
}

.chat-bubble--q { border-radius: 18px 18px 18px 4px; }
.chat-bubble--a { border-radius: 18px 18px 4px 18px; }

.chat-text {
  font-size: 15px;
  line-height: 1.65;
}

.chat-bubble--q .chat-text {
  font-weight: 700;
  color: var(--ink);
}

.chat-bubble--a .chat-text {
  font-weight: 400;
  color: var(--muted);
}

/* Ссылки в ответах */
.faq-chat .chat-bubble--a .chat-text a {
  color: var(--red) !important;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  transition: opacity .15s;
}
.faq-chat .chat-bubble--a .chat-text a:hover { opacity: .7; }

/* ─── АДАПТИВ ─── */
@media (max-width: 900px) {
  .faq-hero__card      { grid-template-columns: 1fr; min-height: auto; }
  .faq-hero__body      { padding: 36px 32px; }
  .faq-hero__img-wrap  { position: relative; top: auto; right: auto; bottom: auto;
                         width: 100%; height: 240px; }
  .faq-hero__img       { width: 100%; height: 100%; }
  .chat-bubble         { max-width: 80%; }
}

@media (max-width: 560px) {
  .faq-hero__body      { padding: 28px 24px; }
  .faq-hero__img-wrap  { height: 180px; }
  .chat-bubble         { max-width: 88%; padding: 10px 14px; }
  .chat-text           { font-size: 14px; }
  .chat-avatar         { width: 28px; height: 28px; }
  .chat-row            { gap: 7px; }
  .chat-sep            { margin: 14px 0; }
}
