/* ============================================================
   UNIVERSAL SURVEY — Legal Pages Shared Stylesheet
   (privacy.html & legal.html)
   ============================================================ */

/* ─── ACTIVE NAV ─────────────────────────────────────────── */
.nav-link.active { color: var(--white) !important; }
.nav-link.active::after { transform: translateX(-50%) scaleX(1) !important; }

/* ─── PAGE BANNER ────────────────────────────────────────── */
.legal-banner {
  position: relative;
  padding-top: 90px;
  min-height: 34vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-900);
}

.legal-banner-pattern {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 60%, #162d4f 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60L60 0M-15 15L15-15M45 75L75 45' stroke='rgba(200,144,58,.05)' stroke-width='1'/%3E%3C/svg%3E") repeat;
  background-blend-mode: normal;
}

.legal-banner-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,144,58,.08) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}

.legal-banner-content {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  padding-bottom: 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.breadcrumb a {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--gold-300); }

.breadcrumb svg {
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,.25);
}

.breadcrumb span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-400);
}

.legal-banner-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-400);
  border: 1px solid rgba(200,144,58,.3);
  background: rgba(200,144,58,.1);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.legal-banner-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 12px;
}

.legal-banner-meta {
  font-size: 0.85rem;
  color: rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.legal-banner-meta svg {
  width: 14px;
  height: 14px;
  color: var(--gold-500);
}

.legal-banner-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}
.legal-banner-wave svg { width: 100%; }

/* ─── MAIN LAYOUT ────────────────────────────────────────── */
.legal-layout {
  padding: 72px 0 96px;
  background: var(--white);
}

.legal-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: flex-start;
}

/* ─── SIDEBAR / TABLE OF CONTENTS ────────────────────────── */
.legal-sidebar {
  position: sticky;
  top: 100px;
}

.toc-card {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.toc-header {
  background: var(--navy-800);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toc-header svg {
  width: 16px;
  height: 16px;
  color: var(--gold-400);
  flex-shrink: 0;
}

.toc-header span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
}

.toc-list {
  padding: 16px 0;
  list-style: none;
  counter-reset: toc;
}

.toc-list li {
  counter-increment: toc;
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
  border-left: 2px solid transparent;
}

.toc-list a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-500);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.toc-list a:hover {
  background: var(--white);
  color: var(--navy-800);
  padding-left: 24px;
  border-left-color: var(--gold-500);
}

.toc-list a.active {
  background: var(--white);
  color: var(--navy-800);
  border-left-color: var(--gold-500);
  font-weight: 600;
}

/* Contact card in sidebar */
.sidebar-contact-card {
  margin-top: 16px;
  background: var(--navy-800);
  border-radius: var(--radius-md);
  padding: 20px;
}

.scc-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 12px;
}

.scc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.scc-item:last-child { border-bottom: none; }

.scc-item svg {
  width: 15px;
  height: 15px;
  color: var(--gold-500);
  flex-shrink: 0;
}

.scc-item a,
.scc-item span {
  font-size: 0.8rem;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
  line-height: 1.4;
}
.scc-item a:hover { color: var(--gold-300); }

/* ─── LEGAL CONTENT ──────────────────────────────────────── */
.legal-content {
  min-width: 0;
}

.legal-section {
  margin-bottom: 52px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--gray-100);
}
.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--gold-100);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-500);
  margin-bottom: 12px;
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 16px;
  line-height: 1.3;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
}

.legal-section p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.85;
  margin-bottom: 14px;
}

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

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

.legal-section ul li,
.legal-section ol li {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.75;
  padding: 5px 0 5px 22px;
  position: relative;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  background: var(--gold-500);
  border-radius: 50%;
}

.legal-section ol {
  counter-reset: ol-count;
}
.legal-section ol li {
  counter-increment: ol-count;
}
.legal-section ol li::before {
  content: counter(ol-count) ".";
  position: absolute;
  left: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-500);
}

/* Highlight / info box */
.legal-highlight {
  background: var(--gold-100);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.legal-highlight p {
  font-size: 0.88rem !important;
  color: var(--text) !important;
  margin-bottom: 0 !important;
  font-weight: 500;
}

/* Info table */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.88rem;
}

.legal-table th {
  background: var(--navy-800);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
}

.legal-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--text-light);
  line-height: 1.6;
  vertical-align: top;
}

.legal-table tr:last-child td { border-bottom: none; }
.legal-table tr:nth-child(even) td { background: var(--off-white); }
.legal-table td:first-child { font-weight: 600; color: var(--text); min-width: 160px; }

/* Last updated badge */
.updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
}
.updated-badge svg {
  width: 13px;
  height: 13px;
  color: var(--gold-500);
}

/* Related links strip */
.legal-related {
  background: var(--off-white);
  border-top: 1px solid var(--gray-200);
  padding: 40px 0;
}

.legal-related-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-related p {
  font-size: 0.88rem;
  color: var(--text-light);
}

.legal-related-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legal-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}
.legal-pill svg { width: 15px; height: 15px; color: var(--gold-500); }
.legal-pill:hover {
  border-color: var(--gold-500);
  color: var(--navy-800);
  box-shadow: var(--shadow-sm);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .legal-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .legal-sidebar { grid-template-columns: 1fr; }
  .legal-layout { padding: 48px 0 72px; }
  .legal-table { font-size: 0.82rem; }
  .legal-table td:first-child { min-width: 120px; }
  .legal-related-inner { flex-direction: column; align-items: flex-start; }
}
