/* Страница-гайд «Контроль рассрочки» (/ru/halyk-installment).
   Секции, контейнер, заголовки, кнопки и бейдж — из guide.css. Хедер и футер —
   из style.css языковой папки. Здесь только блоки этой страницы. */

.installment{
  --inst-term: var(--g-blue);
  --inst-term-dark: var(--g-blue-dark);
  --inst-term-soft: #eaf2ff;
  --inst-switch-off: #d5d5dd;
}

/* Появление блоков при скролле — как на остальных гайдах */
@keyframes instRise{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: none; }
}

.installment [data-reveal]{
  animation: instRise .7s cubic-bezier(.2, .7, .2, 1) both;
}

@supports (animation-timeline: view()){
  .installment [data-reveal]{
    animation: instRise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}

/* Подзаголовок под h2 секции */
.installment__lead{
  margin: 12px 0 0;
  max-width: 44em;
  font-size: 17px;
  line-height: 1.55;
  color: var(--g-muted);
  text-wrap: pretty;
}

.installment__center{
  text-align: center;
}

.installment__lead.installment__center{
  margin-inline: auto;
}

.installment__price{
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------- */
/* 1. Первый экран */

.inst-hero__title{
  max-width: 20em;
}

.inst-hero__lead{
  max-width: 44em;
}

.inst-hero__actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

/* Сроки рассрочки: 3 · 6 · 12 · 24 */
.inst-terms{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.inst-terms__list{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inst-term{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 96px;
  padding: 16px 10px;
  border: 1px solid var(--g-line-2);
  border-radius: 14px;
  background: #ffffff;
}

.inst-term__value{
  font-family: var(--g-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--g-title);
}

.inst-term__unit{
  font-size: 12px;
  color: var(--g-muted);
}

.inst-terms__note,
.inst-hero__meta{
  margin: 0;
  font-size: 13px;
  color: var(--g-muted);
}

/* ---------------------------------------------------------------------------- */
/* 2. Демо: одна карточка на Halykmarket */

.inst-demo__head{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}

.inst-demo__meta{
  font-size: 13px;
  color: var(--g-muted);
}

.inst-demo{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 48px;
  margin-top: 26px;
  align-items: start;
}

.inst-demo__controls{
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.inst-control__title{
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--g-ink);
}

.inst-control__hint{
  margin: 4px 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--g-muted);
}

/* Переключатель срока */
.inst-segmented{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--g-line-2);
  border-radius: var(--g-radius-pill);
  background: #ffffff;
}

.installment .inst-segmented__button{
  padding: 9px 18px;
  border: 0;
  border-radius: var(--g-radius-pill);
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--g-text);
  transition: background .2s, color .2s;
}

.installment .inst-segmented__button:hover{
  color: var(--inst-term);
}

.installment .inst-segmented__button[aria-pressed="true"]{
  background: var(--inst-term);
  color: #ffffff;
}

/* Тумблер */
.installment .inst-switch{
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--g-line-2);
  border-radius: var(--g-radius-card);
  background: #ffffff;
  font-size: 16px;
  font-weight: 600;
  color: var(--g-muted);
  text-align: left;
  transition: background .2s, border-color .2s, color .2s;
}

.inst-switch__track{
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: var(--g-radius-pill);
  background: var(--inst-switch-off);
  transition: background .2s;
}

.inst-switch__track::after{
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px #0000002e;
  transition: transform .2s;
}

.installment .inst-switch[aria-checked="true"]{
  border-color: #cdeed5;
  background: var(--g-green-soft);
  color: var(--g-green-text);
}

.inst-switch[aria-checked="true"] .inst-switch__track{
  background: var(--g-green);
}

.inst-switch[aria-checked="true"] .inst-switch__track::after{
  transform: translateX(18px);
}

/* Цена бота */
.inst-result{
  padding: 22px 24px 24px;
  border-top: 3px solid var(--g-green);
  background: #ffffff;
  box-shadow: 0 24px 60px -34px #18181833;
  transition: border-color .3s;
}

.inst-demo[data-mode="all"] .inst-result{
  border-top-color: var(--g-red);
}

.inst-result__label{
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--g-muted);
  text-transform: uppercase;
}

.inst-result__row{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-top: 10px;
}

.inst-result__price{
  font-family: var(--g-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--g-title);
}

.inst-result__against{
  font-size: 15px;
  color: var(--g-muted);
}

.inst-result__text{
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--g-green-text);
}

.inst-demo[data-mode="all"] .inst-result__text{
  color: var(--g-red-text);
}

/* Продавцы в карточке */
.inst-sellers__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--g-line-2);
}

.inst-sellers__title{
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--g-muted);
  text-transform: uppercase;
}

.inst-sellers__count{
  font-size: 13px;
  color: var(--g-muted);
}

.inst-sellers__list{
  margin: 0;
  padding: 0;
  list-style: none;
}

.inst-seller{
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--g-line);
  transition: opacity .3s;
}

.inst-seller::before{
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--inst-term);
}

.inst-seller__name{
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  color: var(--g-ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.inst-seller__term{
  padding: 3px 10px;
  border-radius: var(--g-radius-pill);
  background: var(--inst-term-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--inst-term-dark);
  white-space: nowrap;
}

.inst-seller__price{
  font-family: var(--g-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--g-title);
}

/* Не учитывается ботом */
.inst-seller.is-muted{
  opacity: .4;
}

.inst-seller.is-muted::before{
  background: var(--g-line-2);
}

.inst-seller.is-muted .inst-seller__term{
  background: var(--g-pill);
  color: var(--g-muted);
}

/* Продавец, от которого считается цена */
.inst-seller.is-target::before{
  background: var(--g-red);
  box-shadow: 0 0 0 4px var(--g-red-soft);
}

.inst-sellers__note{
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--g-muted);
}

/* ---------------------------------------------------------------------------- */
/* 3. Две настройки: срок и тумблер */

.inst-settings{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 40px;
}

.inst-setting{
  padding: 28px 40px 8px 0;
  border-top: 3px solid var(--inst-term);
}

.inst-setting + .inst-setting{
  padding-left: 40px;
  border-left: 1px solid var(--g-line);
  border-top-color: var(--g-violet);
}

.inst-setting__eyebrow{
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--inst-term);
  text-transform: uppercase;
}

.inst-setting + .inst-setting .inst-setting__eyebrow{
  color: var(--g-violet);
}

.inst-setting__title{
  margin: 0;
  font-family: var(--g-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--g-title);
}

.inst-setting__text{
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--g-text);
}

.inst-setting__list{
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.inst-setting__item{
  padding: 14px 0;
  border-top: 1px solid var(--g-line);
  font-size: 15px;
  line-height: 1.55;
  color: var(--g-muted);
}

.inst-setting__item b{
  color: var(--g-ink);
}

/* ---------------------------------------------------------------------------- */
/* 4. Что это даёт */

.inst-benefits{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.inst-benefit{
  padding-top: 22px;
  border-top: 3px solid var(--g-green);
}

.inst-benefit__title{
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--g-ink);
}

.inst-benefit__text{
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--g-muted);
}

/* ---------------------------------------------------------------------------- */
/* 5. Где найти + Важно знать */

.inst-split{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 64px;
}

.inst-steps{
  margin: 28px 0 0;
  padding: 0;
  border-top: 2px solid var(--g-ink);
  list-style: none;
  counter-reset: inst-step;
}

.inst-step{
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--g-line);
  counter-increment: inst-step;
}

.inst-step::before{
  content: '0' counter(inst-step);
  font-family: var(--g-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--g-faint);
}

.inst-step__title{
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--g-ink);
}

.inst-step__text{
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--g-text);
}

.inst-facts{
  margin: 28px 0 0;
  padding: 0;
  border-top: 2px solid var(--g-ink);
  list-style: none;
}

.inst-fact{
  padding: 20px 0;
  border-bottom: 1px solid var(--g-line);
  font-size: 16px;
  line-height: 1.6;
  color: var(--g-text);
}

.inst-alert{
  margin: 24px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--g-red);
  background: var(--g-red-soft);
  font-size: 16px;
  line-height: 1.55;
  color: var(--g-ink);
}

.inst-alert b{
  font-weight: 700;
}

/* ---------------------------------------------------------------------------- */
/* 6. FAQ — стили общие, в guide.css (.guide-faq) */

/* ---------------------------------------------------------------------------- */
/* 7. Финальный блок */

.inst-final-section{
  border-top: 1px solid var(--g-line);
}

.inst-final{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.inst-final__title{
  flex: 1 1 420px;
  max-width: 22em;
  text-wrap: balance;
}

/* ---------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce){
  .installment *,
  .installment *::before,
  .installment *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media screen and (max-width: 1024px){
  .inst-demo,
  .inst-split{
    grid-template-columns: minmax(0, 1fr);
  }
  .inst-settings{
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .inst-setting,
  .inst-setting + .inst-setting{
    padding: 24px 0 0;
    border-left: 0;
  }
  .inst-benefits{
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    max-width: 640px;
  }
}

@media screen and (max-width: 600px){
  .inst-hero__actions{
    width: 100%;
  }
  .inst-hero__actions .guide__cta{
    width: 100%;
  }
  .inst-term{
    width: 72px;
    padding: 12px 6px;
  }
  .inst-term__value{
    font-size: 22px;
  }
  .inst-segmented{
    display: flex;
  }
  .installment .inst-segmented__button{
    flex: 1 1 0;
    padding-inline: 8px;
  }
  .inst-result{
    padding: 18px 18px 20px;
  }
  .inst-result__price{
    font-size: 30px;
  }
  .inst-seller{
    gap: 10px;
  }
  .inst-seller__name,
  .inst-seller__price{
    font-size: 15px;
  }
  .inst-setting__title{
    font-size: 21px;
  }

  .inst-final .guide__cta{
    width: 100%;
  }
}
