/* ===== Legal Pages Shared Stylesheet ===== */

/* SCOPE ISOLATION: Prevent homepage section styles from leaking into legal pages */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* Legal page header (div/header element, NOT section) */
.legal-header {
  background: linear-gradient(160deg, #14131A 0%, #1F1C2D 60%, #18172A 100%);
  border-bottom: 1px solid #302E3E;
  padding: 120px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.legal-header::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(228, 135, 62, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.legal-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #EDEBF0;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.legal-header .legal-date {
  color: #A29FB2;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* Legal content area */
.legal-content {
  padding: 64px 0;
  background: #14131A;
  color: #A29FB2;
  line-height: 1.85;
}

.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #EDEBF0;
  margin: 44px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #302E3E;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #D5D0E0;
  margin: 28px 0 10px;
}

.legal-content p {
  margin-bottom: 16px;
  font-size: 0.98rem;
  color: #A29FB2;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 20px 20px;
  color: #A29FB2;
}

.legal-content ul li,
.legal-content ol li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  padding-left: 4px;
}

.legal-content a {
  color: #E4873E;
}

.legal-content a:hover {
  color: #F59B54;
  text-decoration: underline;
}

.legal-content strong {
  color: #D5D0E0;
}

/* Table of Contents */
.legal-toc {
  background: #1E1C28;
  border: 1px solid #302E3E;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 40px;
}

.legal-toc h2 {
  font-size: 1.15rem;
  margin-top: 0 !important;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #302E3E;
  color: #EDEBF0;
}

.legal-toc ol {
  list-style: decimal;
  margin: 0;
  padding-left: 20px;
  column-count: 2;
  column-gap: 32px;
}

.legal-toc ol li {
  margin-bottom: 8px;
  break-inside: avoid;
  font-size: 0.9rem;
}

.legal-toc ol li a {
  color: #A29FB2;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Back to top link */
.back-to-top {
  display: inline-block;
  margin-top: 32px;
  padding: 10px 20px;
  background: rgba(228, 135, 62, 0.1);
  border: 1px solid #302E3E;
  border-radius: 8px;
  color: #E4873E;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.back-to-top:hover {
  background: rgba(228, 135, 62, 0.2);
  border-color: #E4873E;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .legal-header {
    padding: 100px 0 40px;
  }

  .legal-content {
    padding: 40px 0;
  }

  .legal-toc {
    padding: 20px;
  }

  .legal-toc ol {
    column-count: 1;
  }

  .legal-content .container {
    padding: 0 20px;
  }
}
