/* === Legal Pages — Sidebar Layout === */
.legal-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 90px;
  background: #122772;
}

/* --- Sidebar --- */
.legal-sidebar {
  position: sticky;
  top: 90px;
  align-self: flex-start;
  width: 280px;
  min-width: 280px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 40px 28px 40px 40px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-sidebar-group {
  margin-bottom: 28px;
}

.legal-sidebar-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 12px;
}

.legal-sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-sidebar-links li {
  margin-bottom: 6px;
}

.legal-sidebar-links a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1.4;
}

.legal-sidebar-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.legal-sidebar-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

/* --- Content area --- */
.legal-content {
  flex: 1;
  min-width: 0;
  padding: 48px 64px 80px;
  max-width: 860px;
}

.legal-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.legal-body h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text);
}

.legal-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-body p {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.legal-body .legal-preamble {
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.legal-body strong {
  color: var(--text);
  font-weight: 600;
}

.legal-body a {
  color: #7B9AF5;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.legal-body a:hover {
  opacity: 0.8;
}

.legal-copyright {
  margin-top: 48px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.25);
}

/* --- Footer on legal pages --- */
.legal-footer {
  background: #41528E;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* === Responsive === */
@media (max-width: 900px) {
  .legal-layout {
    flex-direction: column;
    padding-top: 80px;
  }

  .legal-sidebar {
    position: relative;
    top: auto;
    width: 100%;
    min-width: 0;
    max-height: none;
    padding: 24px 24px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
  }

  .legal-sidebar-group {
    margin-bottom: 8px;
  }

  .legal-sidebar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .legal-content {
    padding: 32px 24px 60px;
  }
}
