/* ============================================
   LEGAL PAGES STYLING
   ============================================ */

/* Header */
.legal-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.legal-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--primary);
}

/* Main Content */
.legal-content {
  padding: 60px 0 80px;
  background: var(--gray-50);
  min-height: calc(100vh - 200px);
}

.legal-document {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 60px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.legal-document h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-updated {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--gray-200);
}

.legal-intro {
  background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 40px;
  border-left: 4px solid var(--primary);
}

.legal-intro p {
  margin-bottom: 12px;
}

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

.legal-intro strong {
  color: var(--primary);
}

.legal-section {
  margin-bottom: 48px;
}

.legal-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

.legal-section:first-of-type h2 {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.legal-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
  margin-top: 24px;
}

.legal-section p {
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-section ul {
  margin-bottom: 24px;
  padding-left: 0;
  list-style: none;
}

.legal-section ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--gray-700);
  line-height: 1.8;
}

.legal-section ul li::before {
  content: '•';
  position: absolute;
  left: 12px;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2em;
}

.legal-section ul li strong {
  color: var(--gray-900);
  font-weight: 600;
}

.legal-section a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.legal-section a:hover {
  border-bottom-color: var(--primary);
}

/* Summary Box */
.summary-box {
  background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
  padding: 32px;
  border-radius: 12px;
  border: 2px solid var(--primary);
  margin-top: 24px;
}

.summary-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  margin-top: 0;
}

.summary-box ul {
  margin-bottom: 0;
}

.summary-box ul li {
  padding-left: 32px;
  margin-bottom: 12px;
  font-weight: 500;
}

.summary-box ul li:last-child {
  margin-bottom: 0;
}

.summary-box ul li::before {
  content: '✓';
  left: 8px;
  font-size: 1.1em;
  font-weight: 700;
}

/* Table of Contents (Optional) */
.toc {
  background: var(--gray-50);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  margin-bottom: 40px;
}

.toc h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 16px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.toc ul li {
  padding-left: 0;
  margin-bottom: 8px;
}

.toc ul li::before {
  content: none;
}

.toc a {
  color: var(--gray-700);
  text-decoration: none;
  transition: color 0.3s;
}

.toc a:hover {
  color: var(--primary);
}

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

  .legal-document h1 {
    font-size: 2rem;
  }

  .legal-section h2 {
    font-size: 1.5rem;
  }

  .legal-section h3 {
    font-size: 1.125rem;
  }

  .legal-header .container {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .legal-content {
    padding: 40px 0;
  }

  .legal-document {
    padding: 32px 20px;
    border-radius: 12px;
  }

  .legal-document h1 {
    font-size: 1.75rem;
  }

  .legal-section h2 {
    font-size: 1.375rem;
  }

  .summary-box {
    padding: 24px;
  }
}

/* Print Styles */
@media print {
  .legal-header,
  .footer {
    display: none;
  }

  .legal-content {
    padding: 0;
    background: white;
  }

  .legal-document {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .legal-document h1 {
    color: black;
    -webkit-text-fill-color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}
