@font-face {
  font-family: 'TTNormsPro';
  src:
    url('fonts/TTNormsPro-Regular.woff2') format('woff2'),
    url('fonts/TTNormsPro-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TTNormsPro';
  src:
    url('fonts/TTNormsPro-Medium.woff2') format('woff2'),
    url('fonts/TTNormsPro-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Variable collection */
:root {
  --base-01: #f3f5f8;
  --base-02: #ffffff;
  --base-03: #19191929;
  --primary: #9d4ee2;
  --primary-hover: #641a9d;
  --text-01: #222835;
  --text-02: #505560;
  --text-primary: #ffffff;
  --banner-bg: #ff4f27;
  --Brand: #B00C00;
  --Primary: #181D27;
  --Secondary: #717680;
  --Bg-Secondary: #F5F5F5;
  --xxs: 0.125rem;
  --xs: 0.5rem;
  --s: 0.75rem;
  --m: 1rem;
  --max-width: 50rem;
  --text-body: 'TTNormsPro';
  --text-header: 'TTNormsPro';
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'TTNormsPro', sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-01);
  background-color: var(--base-02);
  overflow-x: hidden;
  margin: auto;
}

img {
  max-width: 100%;
  max-height: 32px;
  height: auto;
  display: block;
}

h2 {
  font-size: 20px;
  font-weight: 500;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Контейнер */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 15px;
  margin: 0 auto;
}

/* Шапка */
.header {
  width: 100%;
  box-shadow: 0px 2px 12px 0px #0000001A;
  background: var(--base-02);
}

.header__inner {
  display: flex;
  flex-direction: column;
  gap: var(--xs);
  padding: var(--m);
  margin-bottom: 44px;
  max-width: 1168px;
  width: 100%;
}

.header__title {
  font-weight: 600;
  font-size: 32px;
  line-height: 40px;
}

.header__description {
  color: var(--text-02);
  font-size: 12px;
  line-height: 16px;
}

/* Основное содержимое */
.main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.main section {
  padding: var(--m);
}

/* Баннер */
.banner {
  position: relative;
  border-radius: var(--m);
  background: linear-gradient(90deg, #B00C00 0%, #EA3528 74%, #FF6055 100%);
  padding: var(--m);
  color: var(--text-primary);
}

.banner__inner {
  display: flex;
  flex-direction: column;
}

.banner__title {
  font-size: 20px;
  font-weight: 500;
}

.banner__body {
  display: flex;
  flex-direction: row;
  gap: 24px;
  border-radius: var(--m);
  padding: var(--m);
}

.banner__body-offer {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--xs, 24px);
  border-radius: var(--m);
  background: var(--base-02);
  padding: var(--m);
}

.banner__body-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.banner__body-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner__body-header-title {
  font-size: 16px;
  font-weight: 500;
  color: inherit;
}

.banner__body-offer-description {
  margin-bottom: 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.banner__body-offer-conditions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 16px 0;
}

.banner__body-offer-condition {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--Bg-Secondary);
  gap: 4px;
  padding: 6px 8px;
  opacity: 1;
  min-height: 64px;
  max-height: 64px;
  overflow: hidden;
}

.banner__body-offer-condition div:first-child {
  font-family: Inter, sans-serif;
  font-size: 14px;
  color: var(--Secondary);
}

.banner__body-offer-condition div:last-child {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--Primary);
  line-height: 1.2;
  word-break: break-word;
  max-height: 2.4em;
  overflow: hidden;
}

/* Для "Лимита" */
.banner__body-offer-conditions .banner__body-offer-condition:nth-child(1) {
  border-top-left-radius: 8px;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  border-bottom-left-radius: 8px;
}

/* Для "Ставки" */
.banner__body-offer-conditions .banner__body-offer-condition:nth-child(2) {
  border-radius: 2px;
}

/* Для "Периода" */
.banner__body-offer-conditions .banner__body-offer-condition:nth-child(3) {
  border-top-left-radius: 2px;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 2px;
}

/* Кнопки */
.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #B00C00;
  color: #fff;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 16px;
  width: 100%;
  height: 44px;
  border-radius: 99px;
  cursor: pointer;
  transition: 0.2s ease;
  margin-top: auto;
}

.btn:hover {
  opacity: 0.9;
}

.btn__outline {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 44px;
  width: 100%;
  border-radius: 99px;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--Brand);
  border: 1px solid var(--Brand);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn__outline:hover {
  background: rgba(176, 12, 0, 0.05);
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
  font-family: Inter, sans-serif;
  font-size: 12px;
  color: var(--Secondary);
}

.tooltip .tooltip__content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  color: var(--text-01);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-size: 13px;
  min-width: 260px;
  text-align: left;
}

.tooltip .tooltip__content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

.tooltip:hover .tooltip__content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Займы */
.loans {
  border-radius: var(--m);
  background: var(--base-02);
  padding: var(--m);
  display: flex;
  flex-direction: column;
  gap: var(--m);
}

.loans__header {
  display: flex;
  align-items: center;
}

.loans__title {
  color: var(--text-01);
  font-size: 18px;
  font-weight: 500;
}

.loans__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--xs);
}

.loan {
  border-radius: var(--s);
  /* background: var(--base-01); */
  box-shadow: 0px 2px 12px 0px #0000001A;
  padding: var(--xs);
  display: flex;
  flex-direction: column;
  gap: var(--xs);
  text-align: center;
}

.loan__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.loan__header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loan__header img {
  width: 32px;
  height: 32px;
}

.loan__body {
  display: flex;
  padding: var(--s);
  flex-direction: column;
  gap: var(--xs);
  background: var(--base-02);
}

.loan__description {
  min-height: 40px;
  font-size: 14px;
  line-height: 20px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.loan__conditions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 12px 0;
  text-align: left;
}

.loan__condition {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--Bg-Secondary);
  min-height: 64px;
  max-height: 64px;
  overflow: hidden;
  gap: 4px;
  padding: 6px 8px;
  opacity: 1;
}

/* Для "Лимита" */
.loan__conditions .loan__condition:nth-child(1) {
  border-top-left-radius: 8px;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  border-bottom-left-radius: 8px;
}

/* Для "Ставки" */
.loan__conditions .loan__condition:nth-child(2) {
  border-radius: 2px;
}

/* Для "Периода" */
.loan__conditions .loan__condition:nth-child(3) {
  border-top-left-radius: 2px;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 2px;
}

.loan__condition-title,
.loan__condition-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loan__condition-title {
  font-family: Inter, sans-serif;
  font-size: 16px;
  color: var(--Secondary);
}

.loan__condition-value {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--Primary);
}

/* Футер */
.footer {
  width: 100vw;
  height: 174px;
  padding: 44px 100px;
  background: var(--base-01);
  margin: 0 auto;
}

.footer__text {
  text-align: left;
}

.footer__text p {
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-02);
}

/* Шаблон для скелетона */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: #eee;
}

/* Псевдоэлемент для shimmer-эффекта */
.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(100%);
  }
}

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

  .loans__grid {
    grid-template-columns: 1fr;
  }

  .btn {
    font-size: 14px;
    width: 100%;
  }

  .btn__outline {
    width: 100%;
  }

  .footer {
    width: 100%;
    padding: 20px;
  }
}