/* Главная и шапка: верхняя полоса, баннер у поиска, слайдер акций,
 корпоративный блок и форма заявки. Блоки настраиваются в админке
 (Контент -> Главная страница). Отдельным файлом, потому что Tailwind темы
 собирается с purge и новых утилит в stylesheet.css нет. */

/* ---------- Верхняя полоса ---------- */
.hp-strip {
  position: relative;
  isolation: isolate;
  height: 40px;
  overflow: hidden;
  background-color: #2a0a3a;
  background-position: top;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: "Jost", sans-serif;
}

/* Фон перекрашивается в фирменный красный, светотень остаётся от картинки */
.hp-strip::before,
.hp-search::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #d5001a;
  mix-blend-mode: color;
  pointer-events: none;
}

.hp-strip__link {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.hp-strip__link:hover,
.hp-strip__link:focus {
  color: #fff;
}

.hp-strip__text {
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hp-strip__text b,
.hp-search__text b {
  font-weight: 700;
}

.hp-strip__coin-left,
.hp-strip__coin-right {
  display: none;
  flex-shrink: 0;
  object-fit: contain;
}

.hp-strip__coin-left {
  width: 131px;
  height: 78px;
  transform: translateY(20px) rotateX(-15deg) rotateY(15deg);
}

.hp-strip__coin-right {
  width: 64px;
  height: 69px;
}

.hp-strip__close {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 2;
  display: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}

.hp-strip__close svg {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
}

@media (min-width: 768px) {
  .hp-strip__text {
    font-size: 29px;
  }

  .hp-strip__coin-left,
  .hp-strip__coin-right {
    display: block;
  }

  .hp-strip__close {
    display: flex;
  }
}

/* ---------- Баннер у поиска ---------- */
.hp-search-col {
  flex: 0 0 100%;
  width: 100%;
  margin-top: 12px;
}

.hp-search {
  position: relative;
  isolation: isolate;
  display: flex;
  height: 50px;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  padding: 12px;
  border-radius: 8px;
  background-color: #2a0a3a;
  background-position: top;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  font-family: "Jost", sans-serif;
  text-decoration: none;
}

.hp-search:hover,
.hp-search:focus {
  color: #fff;
}

.hp-search__coin {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: auto;
  max-width: none;
  height: 80px;
  pointer-events: none;
}

.hp-search__text {
  position: relative;
  z-index: 1;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

@media (min-width: 576px) {
  .hp-search-col {
    display: flex;
    flex: 0 0 auto;
    width: auto;
    align-items: center;
    margin-top: 0;
  }

  .hp-search {
    width: 169px;
    justify-content: flex-end;
  }

  .hp-search__coin {
    position: absolute;
    top: 50%;
    left: -8px;
    height: 58px;
    transform: translateY(-50%);
  }

  .hp-search__text {
    font-size: 16px;
  }
}

@media (min-width: 992px) {
  .hp-search {
    width: 200px;
  }

  .hp-search__text {
    font-size: 18px;
  }
}

/* ---------- Слайдер акций ---------- */
.hp-promo {
  display: grid;
  gap: 10px;
  margin: 0 -1rem 40px;
}

.hp-promo__slider {
  position: relative;
  order: 1;
  min-width: 0;
}

.hp-promo__slide {
  width: 100%;
  height: auto;
}

/* Пропорция баннера 7:4 (1120x640) на любой ширине - текст на баннерах не обрезается */
.hp-promo__card {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 4;
  overflow: hidden;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

.hp-promo__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-promo__arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #000;
  box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.hp-promo__arrow svg {
  display: block;
  width: 12px;
  height: 20px;
}

.hp-promo__arrow--prev {
  left: 8px;
  transform: translate(-50%, -50%);
}

.hp-promo__arrow--prev svg {
  transform: scaleX(-1);
}

.hp-promo__arrow--next {
  right: 8px;
  transform: translate(50%, -50%);
}

.hp-promo__dots {
  order: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hp-promo__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c9c9c9;
  cursor: pointer;
  transition: background-color 0.2s;
}

.hp-promo__dot--active {
  background: #d5001a;
}

.hp-promo__arrow.swiper-button-lock,
.hp-promo__dots.swiper-pagination-lock {
  display: none;
}

/* ---------- Корпоративный блок ---------- */
.hp-corp {
  position: relative;
  order: 3;
  overflow: hidden;
  padding: 20px 28px;
  background: #d5001a;
  color: #fff;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

.hp-promo--corp .hp-promo__dots {
  order: 2;
}

/* Менеджер развёрнут к тексту, как в макете; прозрачные поля обрезаны на сервере */
.hp-corp__image {
  position: absolute;
  right: calc(95px - 33.3%);
  bottom: 0;
  width: auto;
  max-width: none;
  height: 81%;
  pointer-events: none;
  transform: scaleX(-1);
}

.hp-corp__body {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 16px;
}

.hp-corp__title {
  max-width: 70%;
  margin: 0;
  color: #fff;
  font-family: "Jost", sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.hp-corp__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-corp__btn {
  display: block;
  width: max-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.hp-corp__btn--offer {
  border: 2px solid #000;
  background: #fff;
  color: #000;
  font-weight: 700;
}

.hp-corp__btn--offer:hover {
  background: #f1f1f1;
}

.hp-corp__btn--link {
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
}

.hp-corp__btn--link:hover,
.hp-corp__btn--link:focus {
  background: #fff;
  color: #d5001a;
}

@media (min-width: 448px) {
  .hp-promo {
    margin: 0 0 40px;
  }

  .hp-promo .hp-promo__swiper {
    margin: -8px;
    padding: 8px;
  }

  /* Ширина как у Swiper (2 в ряд) ещё до его запуска и при одном баннере */
  .hp-promo__slide {
    width: calc((100% - 12px) / 2);
    margin-right: 12px;
  }

  .hp-promo__card {
    border-radius: 16px;
  }

  .hp-promo__arrow {
    display: flex;
  }

  .hp-corp {
    order: 2;
    height: 204px;
    border-radius: 16px;
  }

  .hp-promo--corp .hp-promo__dots {
    order: 3;
  }

  .hp-corp__image {
    right: calc(110px - 25%);
    height: 98%;
  }

  .hp-corp__body {
    gap: 10px;
  }

  .hp-corp__title {
    max-width: 76%;
  }
}

@media (min-width: 576px) {
  .hp-promo__arrow {
    padding: 20px 12px;
    border-radius: 12px;
  }

  .hp-corp {
    height: 175px;
  }

  .hp-corp__image {
    right: calc(107px - 16.7%);
    height: 110%;
  }

  .hp-corp__title {
    max-width: 79%;
    font-size: 28px;
  }

  .hp-corp__buttons {
    flex-direction: row;
  }

  .hp-corp__btn {
    white-space: nowrap;
  }
}

@media (min-width: 768px) {
  .hp-corp {
    height: 147px;
  }

  .hp-corp__image {
    right: calc(90px - 8.3%);
  }
}

@media (min-width: 992px) {
  .hp-corp__title {
    max-width: 65%;
  }
}

@media (min-width: 1200px) {
  .hp-promo__slide {
    width: calc((100% - 16px) / 2);
    margin-right: 16px;
  }

  .hp-promo--corp {
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: 20px;
  }

  .hp-promo--corp .hp-promo__slider {
    grid-column: 1;
    grid-row: 1;
  }

  .hp-promo--corp .hp-promo__dots {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .hp-corp {
    grid-column: 2;
    grid-row: 1;
    height: auto;
    padding: 24px;
  }

  .hp-corp__image {
    right: -60px;
    height: 65%;
  }

  .hp-corp__title {
    max-width: none;
    font-size: 23px;
  }

  .hp-corp__buttons {
    width: 130px;
    flex-direction: column;
  }

  .hp-corp__btn {
    width: auto;
    white-space: normal;
  }
}

/* ---------- Форма «Получить предложение» ---------- */
.hp-offer-dialog {
  max-width: 520px;
}

.hp-offer {
  position: relative;
  padding: 32px 40px;
  border: 0;
  border-radius: 20px;
}

.hp-offer__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: #818181;
  cursor: pointer;
}

.hp-offer__close:hover {
  color: #000;
}

.hp-offer__title {
  margin: 0 32px 12px 0;
  color: #000;
  font-family: "Jost", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.hp-offer__intro {
  margin: 0 0 16px;
  color: #000;
  font-size: 16px;
}

.hp-offer__success {
  margin: 8px 0 0;
  font-size: 18px;
}

.hp-offer__field {
  margin-bottom: 10px;
}

.hp-input {
  display: flex;
  height: 50px;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #bcbbbb;
  border-radius: 8px;
  background: #fff;
  cursor: text;
}

.hp-input.is-invalid,
.hp-check.is-invalid .hp-check__box {
  border-color: #d5001a;
}

.hp-input__req {
  color: #d5001a;
  font-size: 18px;
}

.hp-input__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 50%;
  background: #e5e5e5;
  color: #000;
}

.hp-input input,
.hp-input select {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #000;
  font-size: 18px;
}

.hp-input input::placeholder {
  color: #818181;
}

.hp-input--select {
  position: relative;
  padding: 0;
}

.hp-input select {
  width: 100%;
  padding: 0 36px 0 12px;
  border-radius: 8px;
  color: #818181;
  cursor: pointer;
  appearance: none;
}

.hp-input select.is-filled {
  color: #000;
}

.hp-input__arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  color: #4d4d4d;
  pointer-events: none;
  transform: translateY(-50%) rotate(90deg);
}

.hp-offer__error {
  margin-top: 4px;
  color: #d5001a;
  font-size: 14px;
}

.hp-offer__error:empty {
  display: none;
}

.hp-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0 0;
  color: #000;
  font-size: 16px;
  line-height: 1.35;
  cursor: pointer;
}

.hp-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.hp-check__box {
  display: flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  border: 1px solid #bcbbbb;
  border-radius: 3px;
  background: #fff;
  color: #fff;
}

.hp-check__box svg {
  opacity: 0;
}

.hp-check input:checked + .hp-check__box {
  border-color: #d5001a;
  background: #d5001a;
}

.hp-check input:checked + .hp-check__box svg {
  opacity: 1;
}

.hp-check input:focus-visible + .hp-check__box {
  outline: 2px solid #71000e;
  outline-offset: 1px;
}

.hp-check a {
  color: #d5001a;
}

.hp-check a:hover {
  text-decoration: underline;
}

.hp-offer__submit {
  display: block;
  height: 52px;
  margin: 18px auto 0;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: #d5001a;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.hp-offer__submit:hover {
  background: #a81f26;
}

.hp-offer__submit:disabled {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 575.98px) {
  .hp-offer {
    padding: 24px 16px;
  }

  .hp-offer__title {
    font-size: 20px;
  }

  .hp-offer__intro,
  .hp-check {
    font-size: 14px;
  }

  .hp-input input,
  .hp-input select {
    font-size: 15px;
  }

  .hp-offer__submit {
    height: 48px;
    font-size: 17px;
  }
}
/*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   */
