/* ═══════════════════════════════════════════════════════════════
   CALIVORA PRO — LEGAL PAGE STYLES (LIGHT THEME)
   Extends styles.css
════════════════════════════════════════════════════════════════ */

.nav-links a.active-link { color: var(--emerald) !important; }

/* ══════════════════════════════════ LEGAL HERO ═══════════════ */
.legal-hero {
  position: relative; padding: 140px 0 60px;
  text-align: center; overflow: hidden;
  background: linear-gradient(135deg, #f0fdf9 0%, #ecfeff 40%, #f5f3ff 100%);
}
.legal-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.legal-hero-content { position: relative; z-index: 1; }
.legal-breadcrumb {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 13px; color: var(--text-dim); margin-bottom: 20px;
}
.legal-breadcrumb a { color: var(--text-dim); text-decoration: none; transition: color .2s; }
.legal-breadcrumb a:hover { color: var(--emerald); }
.legal-hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 900; line-height: 1.15; margin-bottom: 28px; color: var(--text); }
.legal-meta-bar {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 28px; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.legal-meta-item { display: flex; flex-direction: column; align-items: center; padding: 0 20px; }
.meta-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.meta-val { font-size: 13px; font-weight: 600; color: var(--text); }
.legal-meta-sep { width: 1px; height: 36px; background: var(--border); }

/* ══════════════════════════════════ LEGAL BODY ═══════════════ */
.legal-body { padding-bottom: 80px; background: var(--bg); }
.legal-layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 48px; max-width: 1200px; margin: 0 auto; padding: 48px 24px 0;
}

/* ── Sidebar TOC ── */
.legal-toc {
  position: sticky; top: 96px; height: fit-content;
  background: #fff; border: 1px solid var(--border);
  border-radius: 18px; padding: 24px; align-self: start;
  box-shadow: var(--shadow-sm);
}
.toc-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-dim); margin-bottom: 16px;
}
.legal-toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  display: block; color: var(--text-muted); text-decoration: none;
  font-size: 13px; font-weight: 500; padding: 7px 10px;
  border-radius: 8px; transition: all .2s ease; border-left: 2px solid transparent;
}
.toc-link:hover { color: var(--text); background: var(--bg-soft); }
.toc-link.active { color: var(--emerald); border-left-color: var(--emerald); background: rgba(5,150,105,0.06); }
.toc-related { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.toc-rel-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 10px; }
.toc-rel-link {
  display: block; color: var(--teal); text-decoration: none;
  font-size: 13px; font-weight: 600; padding: 6px 0; transition: opacity .2s;
}
.toc-rel-link:hover { opacity: 0.7; }

/* ── Main Content ── */
.legal-main { min-width: 0; }
.legal-section {
  margin-bottom: 52px; padding-bottom: 52px;
  border-bottom: 1px solid var(--border);
}
.legal-section:last-of-type { border-bottom: none; }
.legal-section h2 {
  font-size: 24px; font-weight: 800; margin-bottom: 18px;
  color: var(--text); line-height: 1.3; scroll-margin-top: 110px;
}
.legal-section h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin: 22px 0 10px; letter-spacing: 0.2px;
}
.legal-section p { color: var(--text-muted); font-size: 15px; line-height: 1.8; margin-bottom: 14px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-list {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
  margin: 12px 0; padding: 0;
}
.legal-list li { color: var(--text-muted); font-size: 15px; line-height: 1.7; padding-left: 20px; position: relative; }
.legal-list li::before { content: '–'; position: absolute; left: 0; color: var(--emerald); font-weight: 700; }
.legal-link { color: var(--teal); text-decoration: none; font-weight: 500; transition: opacity .2s; }
.legal-link:hover { opacity: 0.75; text-decoration: underline; }

/* ── Info Boxes ── */
.legal-infobox {
  border-radius: 14px; padding: 20px 22px;
  margin: 20px 0; font-size: 14px; line-height: 1.75;
}
.infobox-blue { background: rgba(8,145,178,0.06); border: 1px solid rgba(8,145,178,0.2); color: #0369a1; }
.infobox-orange { background: rgba(217,119,6,0.06); border: 1px solid rgba(217,119,6,0.2); color: #92400e; }
.infobox-red { background: rgba(220,38,38,0.06); border: 1px solid rgba(220,38,38,0.2); color: #991b1b; }
.infobox-green { background: rgba(5,150,105,0.06); border: 1px solid rgba(5,150,105,0.2); color: #065f46; }

/* ── Cross link ── */
.legal-crosslink {
  display: flex; align-items: center; gap: 16px; margin-top: 48px;
  padding: 28px; flex-wrap: wrap; background: rgba(5,150,105,0.04);
  border: 1px solid rgba(5,150,105,0.15); border-radius: 18px;
}
.legal-crosslink span { color: var(--text-muted); font-size: 15px; }

/* ══════════════════════════════════ RESPONSIVE ═══════════════ */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; margin-bottom: 24px; }
  .legal-toc ul { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .toc-link { padding: 6px 10px; border-left: none; border-bottom: 2px solid transparent; }
  .toc-link.active { border-bottom-color: var(--emerald); border-left: none; }
  .legal-meta-bar { padding: 14px 16px; gap: 0; }
  .legal-meta-item { padding: 0 12px; }
  .legal-meta-sep { display: none; }
}

@media (max-width: 600px) {
  .legal-hero { padding: 120px 0 40px; }
  .legal-hero h1 { font-size: 32px; }
  .legal-section h2 { font-size: 20px; }
  .legal-meta-bar { flex-direction: column; gap: 12px; align-items: flex-start; border-radius: 12px; }
  .legal-meta-item { align-items: flex-start; padding: 0; }
}
