/* ===== Legal Page Stylesheet ===== */
/* Scope isolation rule — GUARANTEES legal pages never get polluted by homepage section styling */
.legal-page section {
  background-color: transparent !important;
}

.legal-page {
  --legal-max-width: 820px;
  font-size: 16px;
  line-height: 1.8;
  color: #2c2c3e;
  background-color: #faf9f6;
}

.legal-page .legal-header {
  background: linear-gradient(135deg, #2a2347 0%, #3d3560 100%);
  padding: 48px 0;
  text-align: center;
  border-bottom: 4px solid #d49b3e;
}

.legal-page .legal-header h1 {
  color: #f5f0e8;
  font-size: 38px;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', serif;
  margin: 0;
}

.legal-page .legal-header .legal-date {
  color: #c4bdd8;
  font-size: 14px;
  margin-top: 12px;
}

.legal-page .legal-container {
  max-width: var(--legal-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.legal-page .legal-body {
  padding: 48px 0 32px;
}

.legal-page .legal-body section {
  margin-bottom: 32px;
  padding: 32px;
  background-color: #ffffff;
  border-radius: 10px;
  border: 1px solid #e0dbd3;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.legal-page .legal-body section:last-child {
  margin-bottom: 0;
}

.legal-page .legal-body h2 {
  color: #2a2347;
  font-size: 24px;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f5f0e8;
}

.legal-page .legal-body h3 {
  color: #3d3560;
  font-size: 18px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
}

.legal-page .legal-body p {
  margin-bottom: 14px;
  line-height: 1.8;
}

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

.legal-page .legal-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

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

.legal-page .legal-body strong {
  color: #2a2347;
  font-weight: 700;
}

.legal-page .legal-body .highlight-box {
  background-color: #f5f0e8;
  border-left: 4px solid #d49b3e;
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
}

/* ===== Table of Contents ===== */
.legal-page .toc {
  background-color: #ffffff;
  border: 1px solid #e0dbd3;
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 40px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.legal-page .toc h2 {
  color: #2a2347;
  font-size: 20px;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: none;
}

.legal-page .toc ol {
  list-style: decimal;
  padding-left: 22px;
}

.legal-page .toc ol li {
  margin-bottom: 8px;
}

.legal-page .toc ol li a {
  color: #4a7c59;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-page .toc ol li a:hover {
  color: #d49b3e;
}

/* ===== Back to Top ===== */
.legal-page .back-to-top {
  display: block;
  text-align: center;
  margin-top: 32px;
  padding: 14px 0;
  color: #d49b3e;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-page .back-to-top:hover {
  color: #b8852a;
}

/* ===== Legal Footer ===== */
.legal-page .legal-footer-wrapper {
  background-color: #1e1b35;
  padding: 32px 0;
  text-align: center;
  border-top: 4px solid #d49b3e;
}

.legal-page .legal-footer-wrapper a {
  color: #f5f0e8;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 24px;
  border: 2px solid #d49b3e;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: inline-block;
}

.legal-page .legal-footer-wrapper a:hover {
  background-color: #d49b3e;
  color: #1e1b35;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .legal-page .legal-header h1 {
    font-size: 28px;
  }

  .legal-page .legal-body section {
    padding: 24px 20px;
  }

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

  .legal-page .toc {
    padding: 20px 24px;
  }
}

@media (max-width: 480px) {
  .legal-page .legal-header h1 {
    font-size: 24px;
  }

  .legal-page .legal-body {
    padding: 32px 0 24px;
  }
}
