/* LEGAL PAGES (privacy, terms, thanks)
   Предполагается, что основные переменные и базовая типографика уже есть в style.css
*/

.legal-main {
  background-color: #fff;
}

/* Hero блоки */

.legal-hero {
  padding-top: 160px;
  padding-bottom: 80px;
  background: linear-gradient(135deg, #0e0e0e, #1c1c1c);
  color: var(--white, #fff);
}

.legal-hero--terms {
  background: linear-gradient(135deg, #121212, #2a2a2a);
}

.legal-hero--thanks {
  background: linear-gradient(135deg, #0e0e0e, #3b3b3b);
}

.legal-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.legal-hero-inner--center {
  text-align: center;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 999px;
  background-color: rgba(253, 245, 103, 0.1);
  color: var(--primary, #fdf567);
  font-size: 14px;
  margin-bottom: 18px;
}

.legal-hero-title {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  color: var(--white, #fff);
}

.legal-hero-text {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 16px;
}

.legal-hero-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* Основной контент */

.legal-content {
  padding-top: 60px;
  padding-bottom: 100px;
  background-color: #fff;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-column-gap: 60px;
  align-items: flex-start;
}

.legal-sidebar {
  position: sticky;
  top: 110px;
}

.legal-sidebar-title {
  font-size: 16px;
  margin-bottom: 12px;
}

.legal-toc {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-toc-link {
  font-size: 14px;
  color: var(--paragraph-gray, #555);
  padding: 6px 0;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.legal-toc-link:hover {
  color: var(--black, #000);
  border-color: var(--primary, #fdf567);
  transform: translateX(2px);
}

.legal-article {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.legal-block h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.legal-block p {
  margin-bottom: 10px;
}

.legal-list {
  margin: 8px 0 12px;
  padding-left: 18px;
}

.legal-list li {
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 1.5;
}

/* THANKS PAGE */

.thanks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  align-items: flex-start;
}

.thanks-card {
  border-radius: 20px;
  padding: 32px 28px;
  background-color: var(--light-gray, #f9f9fa);
}

.thanks-card h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.thanks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.thanks-secondary-link {
  border-radius: var(--large, 60px);
  border: 1px solid var(--dark-gray, #d6d6d6);
  padding: 14px 20px;
  font-size: 16px;
}

.thanks-contacts {
  border-radius: 20px;
  padding: 24px 22px;
  border: 1px solid var(--dark-gray-50, rgba(0, 0, 0, 0.1));
  background-color: #fff;
}

.thanks-contacts h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.thanks-note {
  margin-top: 12px;
  font-size: 15px;
  color: var(--paragraph-gray, #555);
}

/* Адаптив */

@media screen and (max-width: 991px) {
  .legal-hero {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .legal-hero-title {
    font-size: 32px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    grid-row-gap: 40px;
  }

  .legal-sidebar {
    position: static;
  }

  .thanks-layout {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 767px) {
  .legal-hero {
    padding-top: 100px;
    padding-bottom: 50px;
  }

  .legal-hero-title {
    font-size: 28px;
  }

  .legal-content {
    padding-top: 40px;
    padding-bottom: 70px;
  }

  .thanks-card,
  .thanks-contacts {
    padding: 22px 18px;
  }
}

@media screen and (max-width: 479px) {
  .legal-hero-title {
    font-size: 24px;
  }

  .legal-hero-text {
    font-size: 16px;
  }

  .thanks-actions {
    flex-direction: column;
  }
}
