/* =========================================================
   Универсальный баннер: .cta-banner--light / .cta-banner--dark
   Заменяет quiz-banner.css.
   ========================================================= */
:root {
  --font-base: "Gilroy", "Montserrat", "Segoe UI", Arial, sans-serif;
}

.cta-banner {
  /* Светлый вариант (по умолчанию) */
  --banner-bg: #f6e6dc;
  --banner-text: #2e241d;
  --btn-bg: #33271e;
  --btn-bg-hover: #4a392c;
  --btn-text: #ffffff;
  --btn-border: #33271e;
  --title-max: 14em;

  font-family: var(--font-base);
  color: var(--banner-text);
}

/* Тёмный (коричневый) вариант */
.cta-banner--dark {
  --banner-bg: #6b4023;
  --banner-text: #ffffff;
  --btn-bg: #fdf8f4;
  --btn-bg-hover: #ffffff;
  --btn-text: #2e241d;
  --btn-border: #fdf8f4;
  --title-max: 8em; /* «Не можете / определиться / с выбором?» в три строки */
}

.cta-banner__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 560px;
  margin: 16px;
  padding: 24px 20px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--banner-bg);
  isolation: isolate;
}

.cta-banner__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.cta-banner__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.cta-banner__content {
  max-width: 560px;
}

.cta-banner__title {
  max-width: var(--title-max);
  margin: 0 0 20px;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: pre-line; /* перенос строки из ACF */
}

.cta-banner__text {
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.3;
  white-space: pre-line;
}

.cta-banner__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.cta-banner__btn:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
}

.cta-banner__btn:focus-visible {
  outline: 2px solid var(--banner-text);
  outline-offset: 3px;
}

/* ---------- Планшет ---------- */
@media (min-width: 640px) {
  .cta-banner__inner {
    margin-inline: 40px;
    padding: 40px;
  }
  .cta-banner__title { font-size: 2.5rem; }
  .cta-banner__text { font-size: 1.125rem; }
  .cta-banner__content { display: flex; flex-direction: column; align-items: flex-start; }
  .cta-banner__btn {
    display: inline-flex;
    min-height: 48px;
  }
}

/* ---------- Десктоп: текст слева, композиция справа ---------- */
@media (min-width: 900px) {
  .cta-banner__inner {
    justify-content: center;
    width: calc(100% - 160px);
    max-width: 1280px;
    min-height: 500px;
    margin: 16px auto;
    padding: 40px;
    border-radius: 24px;
  }

  .cta-banner__img { object-position: right center; }

  .cta-banner__content { max-width: 760px; }

  .cta-banner__title {
    margin-bottom: 32px;
    font-size: clamp(2.75rem, 1.2rem + 3.4vw, 3.5rem);
    line-height: 1.05;
  }

  .cta-banner__text {
    max-width: 460px;
    margin-bottom: 40px;
  }

  .cta-banner__btn { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-banner__btn { transition: none; }
}
