/* ============================================================
   CoreDeo — Legal Pages Stylesheet
   Loaded by privacy.html and terms-of-service.html
   ============================================================ */

/* ----- SCOPE ISOLATION: prevent homepage section styles ----- */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ----- LEGAL PAGE BASE ----- */
.legal-page {
  font-family: 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

/* ----- LEGAL HEADER (uses <header>, NOT <section>) ----- */
.legal-header {
  background: linear-gradient(135deg, #1C2030 0%, #252B3D 100%);
  color: #FFFFFF;
  padding: 100px 0 56px;
  text-align: center;
}

.legal-header h1 {
  font-size: 2.2em;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.legal-header .legal-meta {
  font-size: 0.95em;
  color: #A0A8B8;
  font-weight: 500;
}

/* ----- LEGAL CONTENT CONTAINER ----- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 20px;
}

.legal-content section {
  margin-bottom: 44px;
}

.legal-content h2 {
  font-size: 1.4em;
  font-weight: 700;
  color: #1C2030;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #E0DBD2;
  letter-spacing: -0.3px;
}

.legal-content h3 {
  font-size: 1.1em;
  font-weight: 600;
  color: #2C3345;
  margin: 20px 0 10px;
}

.legal-content p {
  font-size: 1em;
  line-height: 1.85;
  color: #5E5E6E;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 8px 0 20px 22px;
  padding: 0;
  list-style: disc;
}

.legal-content ul li,
.legal-content ol li {
  font-size: 1em;
  line-height: 1.85;
  color: #5E5E6E;
  margin-bottom: 8px;
}

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

.legal-content strong {
  color: #1C2030;
  font-weight: 700;
}

/* ----- TABLE OF CONTENTS ----- */
.toc {
  background-color: #F5F0E9;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 48px;
  border: 1px solid #E0DBD2;
}

.toc h2 {
  font-size: 1.15em;
  font-weight: 800;
  color: #1C2030;
  margin-bottom: 16px;
  padding: 0;
  border: none;
  letter-spacing: 0;
}

.toc ol {
  list-style: decimal;
  margin: 0;
  padding-left: 22px;
}

.toc ol li {
  margin-bottom: 8px;
  font-size: 0.95em;
  line-height: 1.6;
}

.toc ol li a {
  color: #D4893B;
  font-weight: 500;
  transition: color 0.25s ease;
  text-decoration: none;
}

.toc ol li a:hover {
  color: #C0782A;
  text-decoration: underline;
}

/* ----- BACK TO TOP ----- */
.back-to-top {
  display: inline-block;
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 0.95em;
  color: #D4893B;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.25s ease;
}

.back-to-top:hover {
  color: #C0782A;
  text-decoration: underline;
}

/* ----- BACK TO HOME ----- */
.back-home-wrap {
  text-align: center;
  padding: 12px 0 40px;
}

.back-home {
  display: inline-block;
  padding: 12px 28px;
  background-color: #1C2030;
  color: #FFFFFF;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95em;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.back-home:hover {
  background-color: #2C3345;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
  .legal-header {
    padding: 90px 20px 44px;
  }

  .legal-header h1 {
    font-size: 1.7em;
  }

  .legal-content {
    padding: 40px 20px 16px;
  }

  .legal-content h2 {
    font-size: 1.2em;
  }

  .toc {
    padding: 20px 22px;
  }
}
