@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaBlack.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaBold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaExtraBold.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaExtraLight.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaLight.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaMedium.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaRegular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaSemiBold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Lufga";
  src: url("../fonts/LufgaThin.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}
:root {
  --font-family: "Lufga", sans-serif;
}
:root {
  --primary-primary-800: #3b269d;
  --primary-primary-600: #6432ff;
  --primary-primary-200: #d2cde8;
  --secondary-blue: #1badff;
  --secondary-pink: #e93fe2;
  --text-primary: #051f2e;
  --text-secondary: #375262;
  --text-extra: #a4afb5;
  --text-white: #fff;
  --dark-shades-900: #051f2e;
  --dark-shades-800: #0e2b3b;
  --dark-shades-400: #2c688a;
  --light-shades-300: #e1e7eb;
  --light-shades-200: #f5f7fa;
  --light-shades-white: #fff;
  --gradient-primary: linear-gradient(135.98deg, #6b83f4 0%, #a862eb 100%);
  --gradient-secondary: linear-gradient(90deg, #6835ff 0%, #1aadff 100%);
  --gradient-tertiary: linear-gradient(128.26deg, #a3deff 0%, #fdadf2 100%);
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  height: 100%;
}

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: inherit;
}

body {
  background: #ffffff1a;
  height: 100%;
  font-style: normal;
  font-variation-settings: "wdth" 100, "YTLC" 500;
}

li {
  list-style-type: none;
}

a {
  text-decoration: none;
}

h1 {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 45px;
  line-height: 133%;
  text-align: center;
  color: var(--text-primary);
}

h2 {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 45px;
  line-height: 133%;
  text-align: center;
  color: var(--text-primary);
}

h3 {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 24px;
  line-height: 150%;
  color: var(--text-primary);
}

h4 {
  font-family: var(--font-family);
  font-size: 19px;
  font-weight: 400;
  line-height: 168%;
  text-align: left;
}

p {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 175%;
  color: var(--text-secondary);
}

.wrapper-faq {
  background: var(--light-shades-white);
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--light-shades-200);
}

.faq-wrapper {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 64px 50px 120px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.faq-wrapper-buttons-container {
    max-width: 935px;
    width: 100%;
    margin: 0 auto;
}

.faq-wrapper-buttons {
    max-width: 1056px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  gap: 12px;
}

.faq-wrapper-button {
  display: flex;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 137%;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--text-secondary);
  transition: background-color 0.3s ease;
}

.faq-wrapper-button:hover {
  border: 1px solid var(--text-secondary);
}

/* Стиль для активной кнопки */
.faq-wrapper-button.active {
    background-color: var(--dark-shades-900);
    color: var(--text-white);
}


.faq-wrapper-accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 auto;
  max-width: 1056px;
  width: 100%;
}

.faq-accordion-item {
  padding: 20px 0 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  border-top: 1.5px solid var(--light-shades-300);
}

.faq-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: none;
  cursor: pointer;
  outline: none;
  background: transparent;
  margin-bottom: 12px;
  gap: 10px;
}

.faq-accordion-text {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 19px;
  line-height: 168%;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-align: left;
}

.faq-accordion-icon {
  transition: transform 0.3s ease;
}

.faq-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  transition: height 0.3s ease;
}

.faq-accordion-content p,
.faq-accordion-content li {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 175%;
  color: var(--text-secondary);
}

.faq-accordion-content ul {
  padding: 0 0 0 25px;
}

.faq-accordion-content ul li {
  list-style-type: disc;
}

.faq-accordion-content ol li {
  list-style-type: decimal;
}

.faq-accordion-item.active .faq-accordion-content {
  max-height: max-content;
  height: fit-content;
  margin: 0;
  padding: 24px 0;
}

.faq-accordion-item.active .faq-accordion-content ul li {
  list-style-type: disc;
}

.faq-accordion-item.active .faq-accordion-icon {
  transform: rotate(180deg);
}

/* Анимация исчезновения */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Класс для исчезновения */
.fade-out {
    animation: fadeOut 0.5s forwards;
}

/* Класс для появления */
.fade-in {
    animation: fadeIn 0.5s forwards;
}

/* Скрываем аккордеоны по умолчанию */
.faq-wrapper-accordion {
    display: none;
}


/* Breakpoint */

@media (max-width: 1024px) {
  h1 {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 36px;
    line-height: 144%;
    text-align: center;
    color: var(--text-primary);
  }

  .faq-wrapper {
    max-width: 1023px;
    width: 100%;
    padding: 64px 84px;
    gap: 48px;
  }

  .faq-wrapper-buttons-container {
      max-width: 100%;
  }

  .faq-wrapper-buttons {
    gap: 13px;
    max-width: 100%;
  }

  .faq-wrapper-button {
    padding: 10px 14px;
    font-size: 14px;
    line-height: 157%;
  }

  .questions-wrapper-accordion {
    max-width: 856px;
    width: 100%;
  }

  .questions-accordion-item {
    padding: 20px 0 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border-top: 1.5px solid var(--light-shades-300);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 36px;
    line-height: 144%;
  }

  .faq-wrapper {
    padding: 40px 64px;
    gap: 36px;
  }

  .faq-wrapper-title {
      padding-left: 20px;
      padding-right: 20px;
  }

  .faq-wrapper-buttons-container {
    width: 100%;
    overflow: hidden;
    padding-left: 20px;     
  }

  .faq-wrapper-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
    justify-content: flex-start;
    width: auto; 
  }

  /* Скрываем стандартную полосу прокрутки в Chrome и Safari */
  .faq-wrapper-buttons::-webkit-scrollbar {
    display: none;
  }


  .faq-wrapper-button {
    flex: 0 0 auto;
    padding: 10px;
    font-size: 13px;
    line-height: 138%;
    white-space: nowrap;
    min-width: auto;
  }

  /* Добавляем немного места в конце для скроллинга */
  .faq-wrapper-buttons::after {
    content: '';
    flex: 0 0 16px;
  }
  .faq-wrapper-accordion {
      padding-left: 20px;
      padding-right: 20px;
  }

}

@media (max-width: 520px) {
      .faq-wrapper {
    max-width: 393px;
    width: 100%;
    padding: 40px 20px;
    gap: 36px;
  }
}
