/* ===== Legal Page Styles ===== */

/* Scope isolation - prevent homepage section styles from leaking */
.legal-page section {
  background-color: transparent !important;
  color: #1C1D20;
}

.legal-page .section-title {
  color: #121820;
}

/* ===== Legal Main Layout ===== */
.legal-main {
  padding: 120px 0 60px;
  background-color: #F8F6F2;
}

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

/* ===== Legal Header ===== */
.legal-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 2px solid #E4E1DA;
}

.legal-title {
  font-size: 38px;
  font-weight: 800;
  color: #121820;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.legal-meta {
  font-size: 14px;
  color: #6B6E75;
  margin-bottom: 20px;
}

.legal-intro {
  font-size: 16px;
  color: #3A3C40;
  line-height: 1.8;
}

/* ===== Table of Contents ===== */
.toc {
  background-color: #FFFFFF;
  border: 1px solid #E4E1DA;
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 48px;
}

.toc-title {
  font-size: 18px;
  font-weight: 700;
  color: #121820;
  margin-bottom: 18px;
}

.toc-list {
  list-style: none;
  counter-reset: toc-counter;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 32px;
}

.toc-list li {
  counter-increment: toc-counter;
  font-size: 15px;
  line-height: 1.6;
}

.toc-list li::before {
  content: counter(toc-counter) ". ";
  font-weight: 600;
  color: #A3C94F;
}

.toc-list a {
  color: #3A3E44;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.toc-list a:hover {
  color: #A3C94F;
  border-bottom-color: #A3C94F;
}

/* ===== Legal Sections ===== */
.legal-page section {
  padding: 40px 0;
  border-bottom: 1px solid #E9E5DE;
}

.legal-page section:last-of-type {
  border-bottom: none;
}

.legal-page section h2 {
  font-size: 24px;
  font-weight: 700;
  color: #121820;
  margin-bottom: 18px;
  padding-top: 8px;
  letter-spacing: -0.3px;
}

.legal-page section p {
  font-size: 16px;
  color: #3A3C40;
  line-height: 1.8;
  margin-bottom: 16px;
}

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

/* ===== Legal Contact Block ===== */
.legal-contact-block {
  background-color: #FFFFFF;
  border: 1px solid #E4E1DA;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 20px 0;
}

.legal-contact-block p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.legal-contact-block p strong {
  color: #121820;
  font-size: 17px;
}

/* ===== Legal Page Navbar Adjustment ===== */
.legal-page .nav-link.active {
  color: #A3C94F;
}

/* ===== Responsive for Legal Pages ===== */
@media (max-width: 768px) {
  .legal-main {
    padding: 100px 0 40px;
  }

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

  .toc-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .legal-page section p {
    font-size: 15px;
  }
}
