/* ===== Legal Pages Stylesheet ===== */
:root {
  --color-navy: #1B2D4F;
  --color-navy-dark: #111D33;
  --color-terracotta: #CC5A3D;
  --color-teal: #2D8B7F;
  --color-cream: #FAF7F2;
  --color-cream-alt: #EFEBE2;
  --color-text: #1C1C1C;
  --color-text-light: #FAF7F2;
  --color-muted: #5A6270;
  --color-border: #D5D1C8;
  --color-white: #FFFFFF;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 860px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

/* ===== Top Navigation Bar ===== */
.legal-nav {
  background-color: var(--color-navy);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.legal-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.legal-nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-decoration: none;
}

.legal-nav-logo span {
  color: var(--color-terracotta);
}

.legal-nav-home {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-decoration: none;
  padding: 8px 18px;
  border: 1.5px solid var(--color-text-light);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.legal-nav-home:hover {
  background-color: var(--color-text-light);
  color: var(--color-navy);
}

/* ===== Page Header ===== */
.legal-header {
  background: linear-gradient(135deg, var(--color-navy) 0%, #253D66 100%);
  padding: 64px 0 52px;
  text-align: center;
}

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

.legal-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.legal-header .effective-date {
  font-size: 0.9375rem;
  color: #B0B8C4;
}

/* ===== Content Area ===== */
.legal-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ===== Table of Contents ===== */
.toc {
  background-color: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  margin-bottom: 48px;
}

.toc h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  counter-reset: toc-counter;
}

.toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 8px;
}

.toc ol li:last-child {
  margin-bottom: 0;
}

.toc ol li a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--color-teal);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--transition);
}

.toc ol li a::before {
  content: counter(toc-counter) '.';
  font-weight: 700;
  color: var(--color-muted);
  min-width: 24px;
  flex-shrink: 0;
}

.toc ol li a:hover {
  color: var(--color-navy);
}

/* ===== Section Content ===== */
.legal-content section {
  margin-bottom: 48px;
}

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

.legal-content section h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-teal);
}

.legal-content section h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-top: 20px;
  margin-bottom: 10px;
}

.legal-content section p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: 14px;
}

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

.legal-content section ul li,
.legal-content section ol li {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 8px;
  color: var(--color-text);
}

.legal-content section strong {
  color: var(--color-navy);
}

.legal-content section a {
  color: var(--color-teal);
  text-decoration: underline;
}

.legal-content section a:hover {
  color: var(--color-teal);
}

/* ===== Back to Top ===== */
.back-to-toc {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
  margin-top: 8px;
  transition: color var(--transition);
}

.back-to-toc:hover {
  color: var(--color-teal);
}

/* ===== Footer ===== */
.legal-footer {
  background-color: var(--color-navy-dark);
  padding: 40px 24px;
  text-align: center;
}

.legal-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.legal-footer p {
  font-size: 0.875rem;
  color: #8B95A8;
  margin-bottom: 8px;
}

.legal-footer a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-decoration: none;
  transition: color var(--transition);
}

.legal-footer a:hover {
  color: var(--color-terracotta);
}

.legal-footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.legal-footer-links a {
  font-size: 0.875rem;
  color: #B0B8C4;
}

.legal-footer-links a:hover {
  color: var(--color-text-light);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .legal-header h1 {
    font-size: 1.8rem;
  }

  .toc {
    padding: 24px 20px;
  }

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

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

  .legal-nav-inner {
    padding: 0 16px;
  }

  .legal-nav-logo {
    font-size: 1.1rem;
  }
}

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

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