/* LEGAL PAGES HEADER & LAYOUT */

/* Новый хедер поверх тёмного фона */
.legal-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(12px);
}

.legal-header-bar {
  padding: 16px 0;
}

.legal-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-header-brand img {
  max-height: 40px;
}

.legal-header-nav {
  margin-left: 40px;
}

.legal-header-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal-header-link {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 8px;
  line-height: 120%;
  transition: color 0.25s ease;
}

.legal-header-link:hover {
  color: var(--secondary);
}

.legal-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legal-header-cta {
  background-color: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  line-height: 130%;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.25s ease;
}

.legal-header-cta:hover {
  background-color: var(--secondary);
}

/* Бургер */
.legal-header-burger {
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: transparent;
  width: 38px;
  height: 38px;
  display: none; /* desktop по умолчанию */
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.legal-burger-line {
  width: 18px;
  height: 2px;
  background-color: #ffffff;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.legal-burger-line + .legal-burger-line {
  margin-top: 4px;
}

/* Состояние открытого бургера */
.legal-header-burger.is-open .legal-burger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.legal-header-burger.is-open .legal-burger-line:nth-child(2) {
  opacity: 0;
}

.legal-header-burger.is-open .legal-burger-line:nth-child(3) {
  transform: translateY(-12px) rotate(-45deg);
}

/* Основной контейнер для legal-страниц */
.legal-main {
  margin-bottom: var(--desktop);
}

.legal-section {
  background-color: var(--bg);
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px 26px;
  margin-bottom: 24px;
}

.legal-section--center {
  text-align: center;
}

.legal-heading {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 14px;
}

.legal-list {
  list-style: disc;
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 0;
}

.legal-list li {
  margin-bottom: 6px;
}

/* Кнопки на thanks-странице */
.legal-thanks-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

/* ====== RESPONSIVE ====== */

@media screen and (max-width: 991px) {
  .legal-header-container {
    gap: 16px;
  }

  .legal-header-nav {
    margin-left: 0;
  }

  .legal-header-menu {
    position: fixed;
    inset: 60px 20px auto 20px;
    background-color: var(--bg);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-direction: column;
    padding: 18px 18px 14px;
    gap: 10px;
    display: none; /* управляется JS */
  }

  .legal-header-menu.is-open {
    display: flex;
  }

  .legal-header-cta {
    display: none; /* CTA убираем, можно оставить только в меню */
  }

  .legal-header-burger {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .legal-main {
    margin-bottom: var(--tablet);
  }
}

@media screen and (max-width: 767px) {
  .legal-section {
    padding: 24px 20px;
  }

  .legal-heading {
    font-size: 20px;
  }

  .legal-thanks-actions {
    flex-direction: column;
  }
}

@media screen and (max-width: 479px) {
  .legal-section {
    padding: 20px 16px;
  }

  .legal-heading {
    font-size: 18px;
  }
  .ft-info {
    display: none;
  }
  h1 {
    font-size: 30px;
  }
}


