/* ===================== CSS VARIABLES & RESET ===================== */
:root {
  --bg-1: #f2f5f7;
  --brand: #24a558;
  --brand-2: #1e8a4a;
  --txt: #1d2430;
  --muted: #6b7280;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bd: rgba(255, 255, 255, 0.45);
  --glass-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  --radius: 22px;
  --blur: 14px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: var(--txt);

  /* раньше здесь были радиальные градиенты + background-attachment: fixed; 
     оставляем только базовый цвет фона, без fixed — это ключевой фикс */
  background: var(--bg-1);

  line-height: 1.6;
}

/* отдельный фиксированный слой с градиентами ниже всего контента */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1; /* за всем контентом */
  pointer-events: none;

  /* прежние радиальные градиенты 1 в 1 */
  background: radial-gradient(
      1200px 600px at 20% -10%,
      rgba(114, 219, 255, 0.35),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 90% 10%,
      rgba(106, 235, 170, 0.3),
      transparent 60%
    );

  /* даём браузеру подсказку по компоновке слоёв */
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* ===================== NAVBAR ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.navbar__logo {
  height: 48px;
}
.navbar__brand {
  display: inline-flex;
  align-items: baseline;
  color: #1d3c2a;
  font-size: clamp(1.15rem, 2.4vw, 1.48rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
  white-space: nowrap;
}
.navbar__brand span {
  color: var(--brand);
}
.navbar__nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.navbar__link {
  font-weight: 600;
  color: #1f3b2f;
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s, background-color 0.2s;
}
.navbar__link:hover {
  color: var(--brand-2);
  background: rgba(36, 165, 88, 0.08);
}

/* Spacer so first section doesn't hide under sticky header */
.hero-spacer {
  height: 14px;
}

/* ===================== SECTIONS ===================== */
.section {
  padding: 56px 0;
}
.section__title {
  text-align: center;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.2;
  font-weight: 1000;
  margin: 0 0 28px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===================== CARDS GRID ===================== */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 на десктопі */
  gap: 22px;
  align-items: stretch; /* всі елементи одного ряду мають однакову висоту */
}

/* планшети */
@media (max-width: 1320px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* телефони — 2 в ряд */
@media (max-width: 630px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* дуже вузькі екрани (старі 320px) — 1 колонка щоб не ламалось */
@media (max-width: 380px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.offer {
  display: block;
  height: 100%;
}
.card-item {
  display: flex;
  flex-direction: column;
  height: 100%; /* розтягнути на висоту рядка */
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--glass-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}
.card-item:hover,
.card-item.is-hovered {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.16);
}
.card-item__logo {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card-item__logo img {
  height: 60px;
  object-fit: contain;
}
.card-item__label {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1rem;
  color: #1e8a4a;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card-item__desc {
  text-align: center;
  margin: 0 0 12px;
  color: #2c3442;
  font-size: rem;
}
.card-item__links {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.text-link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.text-link:hover {
  color: var(--brand-2);
}

/* Pill Button pinned at bottom */
.btn-pill {
  --pad-x: 20px;
  appearance: none;
  border: 0;
  outline: 0;
  padding: 12px var(--pad-x);
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 24px rgba(36, 165, 88, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s;
  margin-top: auto; /* відштовхує кнопку вниз — всі картки однакові */
}
.btn-pill::after {
  content: "";
  display: inline-block;
  margin-left: 10px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.btn-pill:hover {
  filter: brightness(0.98);
  box-shadow: 0 14px 30px rgba(36, 165, 88, 0.45);
}

/* ===================== CREDITORS ===================== */
.creditors {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 960px) {
  .creditors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .creditors {
    grid-template-columns: 1fr;
  }
}

.info-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--glass-shadow);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.16);
}
.info-card__title {
  margin: 0;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.65)
  );
  flex: 0 0 auto;
}
.info-card__content {
  flex: 1 1 auto;
  padding: 12px 16px 16px;
}
.info-card__grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 12px;
  margin: 0;
}
.info-card__grid dt {
  color: var(--muted);
  font-weight: 600;
}
.info-card__grid dd {
  margin: 0;
}

@media (max-width: 600px) {
  .info-card__grid {
    grid-template-columns: 120px 1fr;
  }
}

/* ----------------------- АДАПТАЦИЯ ПО ТВОИМ БРЕЙКПОИНТАМ ------------------ */

/* ≤960px: остаётся 2 колонки, таблица компактнее */
@media (max-width: 960px) {
  .creditors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .info-card {
    border-radius: 16px;
  }
  .info-card__title {
    padding: 12px 14px;
    font-size: 0.98rem;
  }
  .info-card__content {
    padding: 12px 14px 14px;
  }
  .info-card__grid {
    grid-template-columns: 140px 1fr;
    gap: 8px 10px;
  }
}

/* ≤600px: 1 колонка, карточка компактная, как на фото */
@media (max-width: 600px) {
  .creditors {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .info-card {
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  }

  .info-card__title {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  .info-card__title::after {
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 5px;
  }
  .info-card__content {
    padding: 12px 12px 14px;
  }
  /* две узкие колонки как в примере — метка/значение */
  .info-card__grid {
    grid-template-columns: 110px 1fr; /* узкая колонка слева */
    gap: 7px 10px;
  }
  .info-card__grid dt {
    color: #8a909b;
    font-weight: 600;
  }
  .info-card__grid dd {
    line-height: 1.35;
  }
}

/* ≤560px: сохраняем 1 колонку, ещё плотнее отступы */
@media (max-width: 560px) {
  .info-card__title {
    font-size: 0.94rem;
  }
  .info-card__grid {
    grid-template-columns: 105px 1fr;
  }
}

/* ≤450px: чтобы ничего не “прыгало” */
@media (max-width: 450px) {
  .info-card__grid {
    grid-template-columns: 100px 1fr;
  }
}

/* ≤380px: на очень узких телефонах — безопасные паддинги */
@media (max-width: 380px) {
  .info-card__title {
    padding: 10px;
  }
  .info-card__content {
    padding: 10px 10px 12px;
  }
  .info-card__grid {
    grid-template-columns: 96px 1fr;
  }
}

/* ===================== CONDITIONS ===================== */
.conditions {
  display: grid;
  gap: 22px;
  align-items: start;
  grid-template-columns: 1.1fr 0.9fr;
}
@media (max-width: 980px) {
  .conditions {
    grid-template-columns: 1fr;
  }
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.accordion__item {
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--glass-shadow);
}
.accordion__summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  position: relative;
}
.accordion__summary::-webkit-details-marker {
  display: none;
}
.accordion__summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--txt);
  border-bottom: 2px solid var(--txt);
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 0.2s ease;
  opacity: 0.75;
}
.accordion__item[open] .accordion__summary::after {
  transform: translateY(-50%) rotate(135deg);
}

/* Плавна анімація контенту акордеона */
.accordion__content {
  padding: 0 18px;
  overflow: hidden;
  max-height: 0;
}
.accordion__item[open] .accordion__content {
  padding-bottom: 16px;
}

.list {
  margin: 0;
  padding-left: 18px;
}
.list li {
  margin: 6px 0;
}
.muted {
  color: var(--muted);
}

/* Company info */
.company {
  border-radius: 16px;
  padding: 18px 18px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--glass-shadow);
}
.company__title {
  margin: 0.2rem 0 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1f3b2f;
}
.company__rule {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 8px 0 12px;
}

/* ===================== FOOTER ===================== */
.footer {
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 10px 22px rgba(0, 0, 0, 0.06);
}
.footer .container {
  padding: 26px 0 34px;
}
.footer__lead {
  margin: 0 0 16px;
  color: #2b3440;
  text-align: center;
}
.footer__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 6px 0 10px;
}
.footer__link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.footer__link:hover {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__copy {
  text-align: center;
  color: #8c93a3;
  font-size: 0.9rem;
  margin: 6px 0 0;
}

/* ======= Mobile burger (как на скрине) ======= */
.navbar__toggle {
  display: none;
  width: 40px; /* квадратнее и компактнее */
  height: 36px;
  padding: 0;
  border-radius: 10px; /* скругление как на примере */
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e3e8ef; /* тонкая серая рамка */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 8px 16px rgba(0, 0, 0, 0.06); /* мягкая тень вокруг кнопки */
  cursor: pointer;
}

.navbar__toggle span {
  display: block;
  width: 20px; /* короткие «палочки» по центру */
  height: 2px;
  margin: 0 auto; /* центрируем по горизонтали */
  background: #828a96; /* серый как на скрине */
  border-radius: 2px;
}

/* регулируем вертикальные отступы между линиями */
.navbar__toggle span + span {
  margin-top: 5px;
}

/* hover/focus — лёгкое затемнение и обводка как в iOS/Material */
.navbar__toggle:hover,
.navbar__toggle:focus {
  border-color: #d7dde6;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 10px 18px rgba(0, 0, 0, 0.08);
}

/* Отображаем бургер только на мобильных */
@media (max-width: 820px) {
  .navbar__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  @media (max-width: 820px) {
    .navbar__toggle {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column; /* <-- добавили */
      gap: 5px; /* <-- добавили; можно убрать правило ниже с margin-top */
    }

    /* остальной код как был ... */
  }

  /* выпадающее меню — без изменений из прошлого шага */
  .navbar__nav {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    margin-top: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-bd);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .navbar__nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .navbar__nav .navbar__link {
    width: 100%;
    padding: 10px 8px;
    border-radius: 10px;
  }
  .navbar__inner {
    position: relative;
  }
}

.navbar__toggle span {
  flex: 0 0 auto;
}
/* было для «ступеньки» — удаляем или обнуляем */
.navbar__toggle span + span {
  margin-top: 0;
}

/* шире контейнер — карточки визуально «длиннее» */
.container {
  width: min(1240px, 94%); /* было 1120px */
}

/* планшеты и ниже — без изменений 3/2/1, но оставим минималку 260px */
@media (max-width: 1050px) {
  .cards {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }
}
@media (max-width: 820px) {
  .cards {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 380px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* более мощная кнопка */
.btn-pill {
  font-size: 18px; /* + размер шрифта */
  font-weight: 580; /* жирнее, чем раньше */
  letter-spacing: 0.3px;
  box-shadow: 0 12px 28px rgba(36, 165, 88, 0.38);
}
.btn-pill:hover {
  box-shadow: 0 16px 34px rgba(36, 165, 88, 0.46);
}

/* ====== Логотип в карточке оффера — увеличенный ====== */
.card-item__logo {
  height: 90px; /* было 56–60px → делаем больше */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 6px 0; /* чуть больше воздуха сверху/снизу */
}

.card-item__logo img {
  height: 100px; /* само изображение крупнее */
  object-fit: contain;
  max-width: 100%;
}

/* ======= МОБИЛЬНАЯ ВЕРСИЯ КАРТОЧЕК (улучшенная) ======= */
@media (max-width: 600px) {
  /* Две карточки в ряд, ровные по высоте */
  .cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    justify-items: center;
    align-items: stretch;
  }

  /* Сама карточка — плотнее, аккуратнее */
  .card-item {
    width: 100%;
    max-width: 250px; /* фиксируем ширину для ровных рядов */
    min-height: 260px; /* одинаковая высота */
    padding: 16px 14px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
  }

  /* логотип — по центру и крупнее */
  .card-item__logo {
    height: 70px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .card-item__logo img {
    max-height: 68px;
    width: auto;
    object-fit: contain;
  }

  /* текст — меньше отступов и центр */
  .card-item__label {
    font-size: 0.95rem;
    margin-bottom: 8px;
    text-align: center;
  }
  .card-item__desc {
    font-size: 0.88rem;
    margin-bottom: 6px;
    line-height: 1.3;
    text-align: center;
  }

  /* ссылки внутри карточки */
  .text-link {
    display: block;
    font-size: 0.86rem;
    margin-bottom: 4px;
    text-align: center;
  }

  /* кнопка — большая, широкая, центрирована */
  .btn-pill {
    width: 100%;
    max-width: 200px;
    margin-top: auto;
    font-size: 15px;
    font-weight: 800;
    border-radius: 30px;
    padding: 12px 0;
    text-align: center;
    justify-content: center;
  }
}

/* Для мобилок <450px */

@media (max-width: 450px) {
  /* Две карточки в ряд, ровные по высоте */

  #cards {
    margin-top: 0 !important;
    padding-top: 20px !important;
  }

  .cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    justify-items: center;
    align-items: stretch;
  }

  /* Сама карточка — плотнее, аккуратнее */
  .card-item {
    width: 100%;
    max-width: 250px; /* фиксируем ширину для ровных рядов */
    min-height: 260px; /* одинаковая высота */
    padding: 16px 10px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
  }

  /* логотип — по центру и крупнее */
  .card-item__logo {
    height: 70px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .card-item__logo img {
    max-height: 68px;
    width: auto;
    object-fit: contain;
  }

  /* текст — меньше отступов и центр */
  .card-item__label {
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-align: center;
  }
  .card-item__desc {
    font-size: 0.8rem;
    margin-bottom: 6px;
    line-height: 1.3;
    text-align: center;
  }

  /* ссылки внутри карточки */
  .text-link {
    display: none;
    font-size: 0.86rem;
    margin-bottom: 4px;
    text-align: center;
  }

  /* кнопка — большая, широкая, центрирована */
  .btn-pill {
    width: 100%;
    max-width: 200px;
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    border-radius: 30px;
    padding: 12px 0;
    text-align: center;
    justify-content: center;
  }

  .btn-pill::after {
    content: none !important;
  }

  #cards .section__title {
    display: none;
  }
}

@media (max-width: 365px) {
  .btn-pill {
    width: 100%;
    max-width: 200px;
    margin-top: auto;
    font-size: 12px;
    font-weight: 600;
    border-radius: 30px;
    padding: 12px 0;
    text-align: center;
    justify-content: center;
  }
}

/* ===== Glass Backdrop */
.rating-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 33, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
}
.rating-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Modal */
.rating-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.rating-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.rating-modal > * {
  filter: none;
}

.rating-modal {
  align-content: start;
}
.rating-modal .rating-title {
  text-align: center;
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 25px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rating-sub {
  text-align: center;
  margin: 0 0 16px;
  color: rgb(0, 0, 0);
  font-size: large;
}

.rating-modal {
  max-width: 620px;
  margin: auto;
}
.rating-modal .rating-list {
  list-style: none;
  margin: 0 auto;
  padding: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  width: min(560px, 92%);
}

.rating-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 8px;
}
.rating-item + .rating-item {
  border-top: 1px solid rgba(90, 90, 90, 0.06);
}

.rating-logo {
  display: block;
  width: auto;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) inset;
}

.rating-btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 12px 28px rgba(36, 165, 88, 0.28);
}

/* Close button */
.rating-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

/* Responsive */
@media (max-width: 600px) {
  .rating-logo {
    height: 48px;
    padding: 6px 8px;
  }
  .rating-btn {
    padding: 12px 18px;
    font-size: 15px;
  }
  .rating-modal .rating-title {
    font-size: 22px;
  }
  .rating-list {
    padding: 12px;
    border-radius: 16px;
  }
}

/* Метка ТОП для карточек */
.offer-label {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: white;
  background: rgba(36, 165, 88, 0.75); /* var(--brand) с прозрачностью */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 5;
  text-transform: uppercase;
}

/* Коррекция для карточек с меткой */
.card-item {
  position: relative;
}

/* Родитель карточки */
.card-item {
  position: relative; /* чтобы абсолюты позиционировались от карточки */
  overflow: visible; /* важно: позволяем бейджу выходить за рамку */
}

/* "ТОП", выступающая над углом */
.offer-label {
  position: absolute;
  top: 0; /* привязываемся к верхнему краю */
  left: 16px; /* сдвиг от левого края — подгони под свой внутренний отступ */
  transform: translateY(
    -50%
  ); /* поднимаем на половину высоты — получится "висящей" над углом */

  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;

  color: #fff;
  background: #24a558; /* или rgba(36,165,88,.9) если нужен полупрозрачный */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 5;
}

/* чуть компактнее на мобилках */
@media (max-width: 600px) {
  .offer-label {
    left: 12px;
    font-size: 11px;
    padding: 4px 10px;
  }
}

/* "ТОП", выступающая над углом */
.offer-label-1 {
  position: absolute;
  top: 0; /* привязываемся к верхнему краю */
  left: 16px; /* сдвиг от левого края — подгони под свой внутренний отступ */
  transform: translateY(
    -50%
  ); /* поднимаем на половину высоты — получится "висящей" над углом */

  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;

  color: #fff;
  background: #fd5f54; /* или rgba(36,165,88,.9) если нужен полупрозрачный */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 5;
}

/* чуть компактнее на мобилках */
@media (max-width: 600px) {
  .offer-label-1 {
    left: 12px;
    font-size: 11px;
    padding: 4px 10px;
  }
}

.offer-label-2 {
  position: absolute;
  top: 0; /* привязываемся к верхнему краю */
  left: 16px; /* сдвиг от левого края — подгони под свой внутренний отступ */
  transform: translateY(
    -50%
  ); /* поднимаем на половину высоты — получится "висящей" над углом */

  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;

  color: #fff;
  background: #fc924b; /* или rgba(36,165,88,.9) если нужен полупрозрачный */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 5;
}

/* чуть компактнее на мобилках */
@media (max-width: 600px) {
  .offer-label-2 {
    left: 12px;
    font-size: 11px;
    padding: 4px 10px;
  }
}

/* ===================== LANDING UPDATE: HERO + OFFER SHOWCASE ===================== */
/* Mobile first: the controls and offer details remain readable down to 320px. */
.hero {
  padding: 30px 0 32px;
}

.hero__inner {
  display: grid;
  gap: 22px;
  align-items: center;
}

.hero__copy {
  padding: 4px 2px;
}

.hero__eyebrow {
  margin: 0 0 10px;
  color: var(--brand-2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 640px;
  margin: 0;
  color: #183326;
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero__lead {
  max-width: 570px;
  margin: 16px 0 0;
  color: #405048;
  font-size: 1rem;
  line-height: 1.55;
}

.hero__benefits {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.hero__benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #263d30;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.35;
}

.hero__benefits li::before {
  content: "✓";
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 5px 12px rgba(36, 165, 88, 0.25);
  font-size: 0.78rem;
}

.credit-calculator {
  padding: 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(31, 77, 51, 0.14);
}

.credit-calculator__heading {
  margin-bottom: 20px;
}

.credit-calculator__heading h2 {
  margin: 0;
  color: #183326;
  font-size: 1.4rem;
  line-height: 1.2;
}

.credit-calculator__heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.calculator-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  margin: 0 0 24px;
}

.calculator-control__label {
  color: #38453e;
  font-size: 0.91rem;
  font-weight: 700;
}

.calculator-control__value {
  color: var(--brand-2);
  font-size: 0.98rem;
  font-weight: 800;
  text-align: right;
}

.calculator-range {
  --range-fill: 30%;
  grid-column: 1 / -1;
  width: 100%;
  height: 44px;
  margin: -10px 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  background: linear-gradient(
    to right,
    var(--brand) 0 var(--range-fill),
    #dce9e0 var(--range-fill) 100%
  ) center / 100% 7px no-repeat;
}

.calculator-range::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background: transparent;
}

.calculator-range::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -8px;
  appearance: none;
  -webkit-appearance: none;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 3px 9px rgba(30, 138, 74, 0.35);
}

.calculator-range::-moz-range-track {
  height: 7px;
  border-radius: 999px;
  background: #dce9e0;
}

.calculator-range::-moz-range-progress {
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
}

.calculator-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 3px 9px rgba(30, 138, 74, 0.35);
}

.calculator-range:focus-visible {
  outline: none;
}

.calculator-range:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgba(36, 165, 88, 0.3);
  outline-offset: 3px;
}

.calculator-range:focus-visible::-moz-range-thumb {
  outline: 3px solid rgba(36, 165, 88, 0.3);
  outline-offset: 3px;
}

.calculator-control__limits {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-top: -7px;
  color: #89968e;
  font-size: 0.78rem;
  font-weight: 600;
}

.calculator-button,
.offer-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(36, 165, 88, 0.3);
  cursor: pointer;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.calculator-button:hover,
.offer-card__button:hover {
  box-shadow: 0 15px 28px rgba(36, 165, 88, 0.42);
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.calculator-button:focus-visible,
.offer-card__button:focus-visible {
  outline: 3px solid rgba(36, 165, 88, 0.32);
  outline-offset: 3px;
}

/* The offer grid is intentionally one column on every phone size. */
#cards {
  padding-top: 34px;
  scroll-margin-top: 82px;
}

#cards .section__title {
  display: block;
  margin-bottom: 26px;
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.offer-card {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 334px;
  flex-direction: column;
  padding: 24px 16px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 30px rgba(25, 53, 37, 0.1);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.offer-card:hover {
  box-shadow: 0 21px 38px rgba(25, 53, 37, 0.16);
  transform: translateY(-3px);
}

.offer-card:focus-visible {
  outline: 3px solid rgba(36, 165, 88, 0.38);
  outline-offset: 3px;
}

.offer-card__badge {
  position: absolute;
  top: 0;
  left: 14px;
  z-index: 1;
  padding: 5px 9px;
  border-radius: 0 0 10px 10px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 5px 12px rgba(36, 165, 88, 0.22);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.offer-card__badge--warm {
  background: #f28d43;
}

.offer-card__badge--blue {
  background: #4386c8;
}

.offer-card__badge--coral {
  background: #dc6a57;
}

.offer-card__badge--violet {
  background: #7563b8;
}

.offer-card__head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 17px;
}

.offer-card__logo {
  display: flex;
  width: 120px;
  height: 40px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(245, 249, 246, 0.86);
}

.offer-card__logo img {
  display: block;
  width: 120px;
  max-width: 100%;
  height: 40px;
  object-fit: contain;
}

.offer-card__logo-fallback {
  padding: 0 4px;
  color: #1d3c2a;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.offer-card__head h3 {
  min-width: 0;
  margin: 0;
  color: #1d3c2a;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.offer-card__details {
  display: grid;
  gap: 0;
  margin: 0 0 18px;
}

.offer-card__details div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(30, 64, 43, 0.1);
}

.offer-card__details div:last-child {
  border-bottom: 1px solid rgba(30, 64, 43, 0.1);
}

.offer-card__details dt {
  flex: 0 0 auto;
  color: #7b8a80;
  font-size: 0.84rem;
  font-weight: 600;
}

.offer-card__details dd {
  min-width: 0;
  margin: 0;
  color: #24372b;
  font-size: 0.87rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: right;
}

.offer-card__button {
  min-height: 48px;
  margin-top: auto;
  padding: 10px 14px;
  font-size: 0.91rem;
}

.offer-card__button span {
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 0;
}

/* 0–768px: one stable column, including all phone widths. */
@media (min-width: 769px) {
  .hero {
    padding: 42px 0 38px;
  }

  .credit-calculator {
    padding: 28px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .offer-card {
    padding: 28px 20px 20px;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr);
    gap: 44px;
  }

  .hero__lead {
    font-size: 1.08rem;
  }

  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
  }
}

.offer-card.is-ineligible {
  opacity: 0.42;
  filter: grayscale(0.35);
}

.calculator-match-status {
  min-height: 1.25em;
  margin: 12px 0 0;
  color: #5e7365;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 380px) {
  .hero {
    padding-top: 22px;
  }

  .credit-calculator {
    padding: 20px 14px 16px;
    border-radius: 18px;
  }

  .offer-card {
    min-height: 0;
    width: 100%;
    padding: 24px 14px 14px;
    border-radius: 18px;
  }

  .offer-card__details div {
    gap: 8px;
  }
}

/* Compact first screen for Telegram and other mobile webviews.
   The calculator, both controls and its CTA stay above the fold. */
@media (max-width: 768px) {
  body {
    background: linear-gradient(145deg, #edf9f1 0%, var(--bg-1) 62%);
  }

  /* A fixed, composited background is costly in embedded mobile browsers. */
  body::before {
    display: none;
  }

  .navbar__inner {
    padding: 8px 0;
  }

  .hero {
    padding: 14px 0 18px;
  }

  .hero__inner {
    gap: 14px;
  }

  .hero__copy {
    padding: 0 2px;
  }

  .hero__eyebrow,
  .hero__lead,
  .hero__benefits {
    display: none;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 8.5vw, 2.25rem);
    line-height: 1.06;
  }

  .credit-calculator {
    padding: 16px 18px 14px;
    border-radius: 18px;
  }

  .credit-calculator__heading {
    margin-bottom: 12px;
  }

  .credit-calculator__heading h2 {
    font-size: 1.28rem;
  }

  .credit-calculator__heading p,
  .calculator-match-status {
    display: none;
  }

  .calculator-control {
    gap: 6px 12px;
    margin-bottom: 14px;
  }

  .calculator-range {
    height: 44px;
    margin: -8px 0;
  }

  .calculator-control__limits {
    margin-top: -5px;
  }

  .calculator-button {
    min-height: 48px;
  }

  /* Do not paint long, below-the-fold sections during the initial app open. */
  main > .section {
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .offer-card,
  .calculator-button,
  .offer-card__button {
    transition: none;
  }
}

