/* Правки для статической версии (восстановление из вебархива).
   Фоны hero/policy отсутствовали в архиве — заменены на SVG в брендовых тонах. */

html, body {
  background-color: #0d0d0d;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body.fti-menu-open {
  overflow: hidden;
}

[data-overlay-container] {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

[data-overlay-container] > div {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* flex-колонки: иначе широкий потомок (лента, бегущая строка) раздувает всю страницу */
[data-overlay-container] .flex {
  min-width: 0;
  max-width: 100%;
}

[data-overlay-container] .flex.flex-col > * {
  min-width: 0;
  max-width: 100%;
}

/* Плавная прокрутка по якорям меню (fallback, если Lenis не загрузился) */
html {
  scroll-behavior: smooth;
}

/* Lenis — плавный скролл всей страницы (как в оригинале) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Активная вкладка: фон не меняется при наведении (как в оригинале) */
[data-product-tabs] button.bg-white:hover,
[data-product-tabs] button.bg-white:focus-visible,
[data-works-tabs] button.bg-white:hover,
[data-works-tabs] button.bg-white:focus-visible {
  background-color: #fff !important;
  color: #222 !important;
}

/* FAQ: только один открытый ответ */
.fti-answer[hidden] {
  display: none !important;
}
[data-slot="base"]:not(.fti-faq-active) .fti-answer {
  display: none !important;
}
[data-slot="base"].fti-faq-active .fti-answer {
  display: block;
}

/* FAQ-аккордеон: панель ответа */
.fti-answer {
  overflow: hidden;
  animation: ftiFade .25s ease;
}
@keyframes ftiFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Индикатор аккордеона в открытом состоянии */
[data-slot="trigger"] {
  cursor: pointer;
}
[data-slot="trigger"] [data-slot="indicator"] {
  transition: transform .25s ease;
}
[data-slot="trigger"].fti-open [data-slot="indicator"] {
  transform: rotate(-90deg);
}

/* Активный (открытый) пункт FAQ — фирменная градиентная рамка */
[data-slot="base"].fti-faq-active {
  border: 2px solid transparent;
  background:
    linear-gradient(#222222, #222222) padding-box,
    linear-gradient(90deg, #832196, #cf1010) border-box;
}

/* Статус отправки формы */
.fti-form-status {
  min-height: 1em;
  color: #ff8080;
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
}

/* Пустой виджет отзывов из архива не должен рисовать белый блок */
#myReviews__block-widget {
  min-height: 0;
}

/* Бегущая строка (восстановлена из дизайна: текст раньше добавлял JS) */
.fti-marquee {
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-montserrat), Montserrat, sans-serif;
  font-weight: 700;
  letter-spacing: .02em;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.fti-marquee__track {
  display: inline-flex;
  will-change: transform;
  animation: ftiMarquee 28s linear infinite;
  width: max-content;
}
.fti-marquee:hover .fti-marquee__track {
  animation-play-state: paused;
}
@keyframes ftiMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Вкладки «Наши продукты»: карточки — те же классы, что у «За 1 урок» */
[data-product-panel][hidden] { display: none; }
[data-works-panel][hidden] { display: none; }

/* Ленты плиток «свапаются» перетаскиванием мышью */
.fti-works, .cursor-grab {
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  min-width: 0;
  max-width: 100%;
}
.fti-works.fti-grabbing,
.cursor-grab.fti-grabbing {
  cursor: grabbing;
}
.cursor-grab > .mr-4 {
  scroll-snap-align: start;
}

/* Галерея «Работы сделанные на обучении» */
.fti-works {
  display: flex;
  gap: 16px;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.fti-works::-webkit-scrollbar { display: none; }
.fti-works img {
  height: 380px;
  width: auto;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 16px;
}
@media (max-width: 768px) {
  .fti-works img { height: 260px; }
}

/* Списки внутри карточек продуктов (как в макете) */
.fti-pcard__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fti-pcard__list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  line-height: 1.4;
  color: #e6e6e6;
}
.fti-pcard__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(90deg, #832196, #cf1010);
}
.fti-pcard__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #b9b9b9;
  font-style: italic;
}

/* Отзывы: статичный скрин из Figma */
.fti-reviews {
  display: flex;
  justify-content: center;
  width: 100%;
}
.fti-reviews img {
  width: 100%;
  max-width: 1040px;
  height: auto;
  border-radius: 20px;
}

/* Табы «Наши продукты»: ширина по тексту, горизонтальная карусель */
.fti-product-tabs-scroll {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
  min-width: 0;
}

.fti-product-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.fti-product-tabs-scroll.fti-grabbing {
  cursor: grabbing;
}

[data-product-tabs],
.fti-product-tabs {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
  flex-shrink: 0 !important;
}

[data-product-tabs] button,
.fti-product-tabs button {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  width: auto !important;
  max-width: none !important;
  scroll-snap-align: start;
}

@media (min-width: 1024px) {
  .fti-product-tabs-scroll {
    justify-content: center !important;
  }

  [data-product-tabs],
  .fti-product-tabs {
    justify-content: center !important;
  }
}

/* Фон страницы: чёрный, без градиента (как в вебархиве) */
[data-overlay-container] > div.bg-cover {
  background-image: none !important;
  background-color: #0d0d0d !important;
}

/* Поле телефона hero — все ширины экрана */
#form .fti-phone-field-wrap {
  width: 100%;
}

#form .fti-phone-field-wrap.border-gradient-input {
  padding: 2px;
  background: transparent !important;
}

#form .fti-phone-field {
  display: flex !important;
  align-items: center;
  gap: 4px;
  width: 100%;
  background: #1c1a1a !important;
  border-radius: 6px;
  padding: 16px 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

#form .fti-phone-field__prefix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: #7b7b7b;
  font-size: 16px;
  font-family: Montserrat, sans-serif;
  line-height: 1;
}

#form .fti-phone-field__chevron {
  width: 12px;
  height: 12px;
  opacity: 0.9;
}

#form .fti-phone-field__input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  outline: none;
  background: transparent !important;
  background-color: transparent !important;
  color: #fff !important;
  font-size: 16px;
  font-family: Montserrat, sans-serif;
  padding: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

#form .fti-phone-field__input::placeholder {
  color: #a5a5a5;
}

#form .fti-phone-field__input:-webkit-autofill,
#form .fti-phone-field__input:-webkit-autofill:hover,
#form .fti-phone-field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 1000px #1c1a1a inset;
  transition: background-color 9999s ease-out 0s;
}

/* Hero — адаптив до планшета (одна колонка, полная ширина) */
@media (max-width: 1023px) {
  .fti-hero {
    margin-top: 0 !important;
    padding-top: 32px;
    width: 100%;
  }

  .fti-hero > .max-w-\[1200px\] {
    width: 100%;
    max-width: 100%;
  }

  .fti-hero-title,
  main h1 {
    font-family: Montserrat, sans-serif !important;
    font-size: clamp(24px, 6.2vw, 56px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.24px !important;
    margin-bottom: 0 !important;
    width: 100%;
    max-width: none;
    text-transform: uppercase;
  }

  main .grid.grid-cols-3 {
    margin-top: 0 !important;
    max-height: none !important;
    gap: 32px;
    width: 100%;
  }

  main section.grid-cols-1 {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
  }

  #form {
    margin-top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    gap: 16px !important;
  }

  #form > p.font-semibold {
    font-size: 20px;
    line-height: 1.5;
    font-weight: 500;
    font-family: Inter, system-ui, sans-serif;
    margin: 0;
  }

  #form > p.text-\[14px\] {
    line-height: normal;
    font-family: Montserrat, sans-serif;
    margin: 0;
  }

  #form > .border-gradient-input,
  #form .fti-name-field.border-gradient-input,
  #form .fti-phone-field-wrap.border-gradient-input {
    width: 100%;
    padding: 0;
  }

  #form > .border-gradient-input,
  #form .fti-name-field.border-gradient-input,
  #form .fti-phone-field-wrap.border-gradient-input {
    border: 1px solid #832196;
    border-radius: 8px;
    background: #1a1a1a;
    overflow: visible;
  }

  #form > .border-gradient-input::before,
  #form > .border-gradient-input::after,
  #form .fti-name-field.border-gradient-input::before,
  #form .fti-name-field.border-gradient-input::after,
  #form .fti-phone-field-wrap.border-gradient-input::before,
  #form .fti-phone-field-wrap.border-gradient-input::after {
    display: none !important;
  }

  #form > .border-gradient-input input,
  #form .fti-name-field input {
    background: #1a1a1a !important;
    border: 0 !important;
    font-size: 16px;
    padding: 16px 24px !important;
    font-family: Montserrat, sans-serif;
    color: #fff;
  }

  #form > .border-gradient-input input::placeholder,
  #form .fti-name-field input::placeholder {
    color: #a5a5a5;
  }

  #form button {
    font-size: 16px;
    font-weight: 600;
    padding: 16px 32px !important;
    letter-spacing: 0.16px;
    border-radius: 9999px;
  }
}

/* Hero и бегущая строка — мобилка (отступы) */
@media (max-width: 639px) {
  .max-sm\:px-\[10px\] {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  main > .max-w-\[1200px\] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .overflow-x-auto,
  .overflow-x-scroll {
    max-width: 100%;
    min-width: 0;
  }

  .pl-56 {
    padding-left: 16px !important;
  }

  /* Список hero — только мобилка; на десктопе оригинальная вёрстка */
  .fti-hero-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
  }

  .fti-hero-list > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0;
  }

  .fti-hero-list li {
    display: block !important;
    position: relative;
    padding-left: 36px;
    min-height: 24px;
  }

  .fti-hero-list li img {
    position: absolute;
    left: 0;
    top: 8px;
    width: 26px;
    height: 8px;
    margin: 0;
    flex-shrink: 0;
    object-fit: contain;
  }

  .fti-hero-list li span {
    display: block;
    font-size: 16px;
    line-height: 1.5;
    font-family: Inter, system-ui, sans-serif;
    font-weight: 400;
  }

  .fti-marquee {
    font-size: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
    letter-spacing: 0.16px;
    text-transform: uppercase;
  }

  .gap-\[120px\] {
    gap: 64px !important;
  }
}

/* Мобильная шапка — до десктопа */
@media (max-width: 1023px) {
  .fti-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
    padding: 20px 10px;
    box-sizing: border-box;
  }

  .fti-mobile-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
  }

  .fti-mobile-header__title {
    display: flex;
    flex-direction: column;
    font-family: Cormorant, "Times New Roman", serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.04em;
  }

  .fti-mobile-header__title span:first-child {
    font-size: 14.4px;
    letter-spacing: 0.576px;
  }

  .fti-mobile-header__title span:last-child {
    font-size: 12.59px;
    letter-spacing: 0.504px;
  }

  .fti-mobile-header__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .fti-mobile-nav {
    position: fixed;
    inset: 88px 0 0 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 20px;
    background: rgba(13, 13, 13, 0.96);
    backdrop-filter: blur(8px);
  }

  .fti-mobile-nav[hidden] {
    display: none !important;
  }

  .fti-mobile-nav a {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
  }
}

/* Адрес и телефон в блоке контактов (филиальные страницы) */
.fti-contact-info a {
  text-decoration: none;
}
.fti-contact-info a:hover {
  text-decoration: underline;
}

@media (min-width: 1024px) {
  .fti-mobile-header,
  .fti-mobile-nav {
    display: none !important;
  }
}
