/* ===== Legal Pages Stylesheet ===== */
/* Scope isolation: guarantee legal pages are never polluted by homepage section styling */
.legal-page section {
  background-color: transparent !important;
}

.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 60px;
  color: #1C181F;
}

.legal-page h1 {
  font-size: 38px;
  font-weight: 800;
  color: #25202A;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  border-bottom: 3px solid #B8863B;
  padding-bottom: 16px;
}

.legal-page .legal-meta {
  font-size: 14px;
  color: #5A5560;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 24px;
  font-weight: 700;
  color: #25202A;
  margin-top: 40px;
  margin-bottom: 14px;
  padding-top: 12px;
  scroll-margin-top: 90px;
}

.legal-page h3 {
  font-size: 18px;
  font-weight: 700;
  color: #25202A;
  margin-top: 24px;
  margin-bottom: 10px;
}

.legal-page p {
  font-size: 16px;
  line-height: 1.75;
  color: #3A3540;
  margin-bottom: 14px;
}

.legal-page ul, .legal-page ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-page ul {
  list-style: disc;
}

.legal-page ol {
  list-style: decimal;
}

.legal-page li {
  font-size: 16px;
  line-height: 1.75;
  color: #3A3540;
  margin-bottom: 8px;
}

.legal-page strong {
  color: #1C181F;
}

.legal-page address {
  font-style: normal;
  color: #3A3540;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Table of Contents */
.legal-page .toc {
  background-color: #F3F0EB;
  border: 1px solid #E0DCD6;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 36px;
}

.legal-page .toc h2 {
  font-size: 18px;
  font-weight: 700;
  color: #25202A;
  margin: 0 0 14px;
  padding-top: 0;
}

.legal-page .toc ol {
  list-style: decimal;
  padding-left: 0;
  counter-reset: toc-counter;
  margin-bottom: 0;
}

.legal-page .toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 6px;
  list-style: none;
}

.legal-page .toc ol li::before {
  content: counter(toc-counter) ". ";
  font-weight: 600;
  color: #B8863B;
}

.legal-page .toc a {
  color: #5A5560;
  font-size: 15px;
  transition: color 0.3s ease;
  text-decoration: none;
}

.legal-page .toc a:hover {
  color: #B8863B;
  text-decoration: underline;
}

/* Back to top link */
.legal-page .back-top {
  display: inline-block;
  margin-top: 36px;
  padding: 10px 22px;
  background-color: #25202A;
  color: #FFFFFF;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.legal-page .back-top:hover {
  background-color: #383242;
}

/* Legal footer */
.legal-footer {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 40px;
  font-size: 14px;
  color: #5A5560;
  text-align: center;
}

.legal-footer a {
  color: #B8863B;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-footer a:hover {
  color: #9A7130;
  text-decoration: underline;
}

.legal-footer .legal-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .legal-page {
    padding: 90px 20px 40px;
  }

  .legal-page h1 {
    font-size: 28px;
  }

  .legal-page h2 {
    font-size: 20px;
  }
}
