/* ==============================================
   CaribbeanBuy Autos — Legal Pages Stylesheet
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

.legal-page {
  background-color: #0A0C14;
  color: #E2E8F0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

.legal-page *,
.legal-page *::before,
.legal-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* ============ LEGAL HEADER ============ */

.legal-header {
  background: linear-gradient(135deg, #0A0C14 0%, #11142A 50%, #0D1020 100%);
  border-bottom: 1px solid #1D2030;
  padding: 48px 0;
  text-align: center;
}

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

.legal-header .legal-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 24px;
}

.legal-header .legal-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7C8DFF 0%, #6366F1 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  margin-right: 10px;
}

.legal-header .legal-logo-text {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
}

.legal-header .legal-logo-text span {
  color: #7C8DFF;
}

.legal-header h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 38px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.legal-header p {
  font-size: 15px;
  color: #9CA3B5;
}

/* ============ TABLE OF CONTENTS ============ */

.legal-toc {
  padding: 32px 0;
  background: #0E1019;
  border-bottom: 1px solid #1D2030;
}

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

.legal-toc h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #7C8DFF;
  margin-bottom: 16px;
}

.legal-toc ol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.legal-toc ol li {
  font-size: 14px;
  color: #9CA3B5;
  line-height: 1.6;
}

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

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

/* ============ LEGAL CONTENT ============ */

.legal-content {
  padding: 48px 0 64px;
  background-color: #0A0C14;
}

.legal-content h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 44px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1D2030;
  letter-spacing: -0.3px;
}

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

.legal-content p {
  font-size: 15px;
  color: #9CA3B5;
  line-height: 1.8;
  margin-bottom: 16px;
}

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

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

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

.legal-content ul li,
.legal-content ol li {
  font-size: 15px;
  color: #9CA3B5;
  line-height: 1.8;
  margin-bottom: 8px;
}

.legal-content strong {
  color: #E2E8F0;
  font-weight: 600;
}

.legal-content a {
  color: #7C8DFF;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: #818CF8;
}

/* ============ BACK TO TOP LINK ============ */

.back-to-top {
  display: inline-block;
  margin-top: 40px;
  padding: 10px 20px;
  background: rgba(124, 141, 255, 0.1);
  border: 1px solid rgba(124, 141, 255, 0.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #7C8DFF;
  text-decoration: none;
  transition: all 0.2s;
}

.back-to-top:hover {
  background: rgba(124, 141, 255, 0.18);
  border: 1px solid rgba(124, 141, 255, 0.35);
}

/* ============ LEGAL FOOTER ============ */

.legal-footer {
  background: #0E1019;
  border-top: 1px solid #1D2030;
  padding: 32px 0;
  text-align: center;
}

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

.legal-footer p {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 6px;
}

.legal-footer a {
  color: #7C8DFF;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.legal-footer a:hover {
  color: #818CF8;
}

/* ============ RESPONSIVE ============ */

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

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

  .legal-toc ol {
    grid-template-columns: 1fr;
  }

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

  .legal-header {
    padding: 36px 0;
  }
}

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

  .legal-content h2 {
    font-size: 18px;
  }

  .legal-content p,
  .legal-content ul li,
  .legal-content ol li {
    font-size: 14px;
  }
}
