/* ==========================================================================
   SynaMed — Estilos das páginas legais (Termos de Uso / Política de Privacidade)
   ========================================================================== */

:root {
  --blue:       #1b6dfe;
  --blue-light: #e8f0ff;
  --blue-dark:  #0d4dd1;
  --orange:     #ff6b00;
  --orange-h:   #e55e00;
  --white:      #ffffff;
  --off-white:  #f7f9ff;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --gray-800:   #1e293b;
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --shadow-sm:  0 1px 4px rgba(27,109,254,.08);
  --shadow-md:  0 4px 20px rgba(27,109,254,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ──────────────────────────────────────────
   HERO
────────────────────────────────────────── */
.legal-hero {
  background: linear-gradient(180deg, #eef5ff 0%, var(--white) 100%);
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--gray-200);
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color .15s;
}
.legal-back:hover { color: var(--blue); }
.legal-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.legal-title {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--gray-800);
  margin-bottom: 14px;
}
.legal-lede {
  font-size: 17px;
  color: var(--gray-600);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 24px;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.legal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
}
.legal-chip-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────
   BODY LAYOUT
────────────────────────────────────────── */
.legal-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  padding: 48px 0 96px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 24px;
}
.legal-toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.legal-toc-nav {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  border-left: 2px solid var(--gray-200);
  padding-left: 4px;
}
.legal-toc-nav ol { display: flex; flex-direction: column; }
.legal-toc-nav li { display: block; }
.legal-toc-nav a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  padding: 7px 14px;
  border-left: 2px solid transparent;
  margin-left: -2px;
  line-height: 1.4;
  transition: color .15s, border-color .15s;
}
.legal-toc-nav a:hover { color: var(--blue); }
.legal-toc-nav a.active {
  color: var(--blue);
  font-weight: 700;
  border-left-color: var(--blue);
}
.legal-toc-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  flex-shrink: 0;
}
.legal-toc-nav a.active .legal-toc-num { color: var(--blue); }

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

.legal-note {
  background: var(--blue-light);
  border: 1.5px solid #bcd4ff;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 40px;
}
.legal-note p { font-size: 14.5px; color: var(--gray-800); line-height: 1.7; }

.legal-content section {
  margin-bottom: 44px;
  scroll-margin-top: 24px;
}
.legal-content h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-200);
}
.legal-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.legal-content h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 20px 0 10px;
}
.legal-content p {
  font-size: 14.5px;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 12px;
}
.legal-content p:last-child { margin-bottom: 0; }
.legal-content ul {
  margin: 0 0 12px;
  padding-left: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-content ul li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--gray-600);
  line-height: 1.7;
}
.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
.legal-content strong { color: var(--gray-800); font-weight: 700; }
.legal-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-content a:hover { color: var(--blue-dark); }

.legal-callout {
  display: flex;
  gap: 14px;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px 0;
}
.legal-callout-icon {
  width: 22px; height: 22px;
  color: #c2410c;
  flex-shrink: 0;
  margin-top: 2px;
}
.legal-callout-icon svg { width: 100%; height: 100%; }
.legal-callout p { color: #7c2d12; margin: 0; }
.legal-callout strong { color: #7c2d12; }

.legal-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 480px;
}
.legal-table th {
  text-align: left;
  background: var(--gray-100);
  color: var(--gray-800);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.legal-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
  vertical-align: top;
  line-height: 1.6;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td strong { color: var(--gray-800); }

.legal-end {
  margin-top: 56px;
  padding: 32px;
  background: var(--gray-800);
  border-radius: var(--radius-lg);
  text-align: center;
}
.legal-end h2 {
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  border: none;
  padding: 0;
  margin-bottom: 8px;
  justify-content: center;
}
.legal-end p { color: rgba(255,255,255,.75); margin-bottom: 4px; }
.legal-end a { color: #93c5fd; }
.legal-company {
  margin-top: 14px;
  font-size: 12.5px;
  color: rgba(255,255,255,.5) !important;
  line-height: 1.6;
}

/* ──────────────────────────────────────────
   BACK TO TOP
────────────────────────────────────────── */
.legal-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px; height: 44px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  z-index: 50;
}
.legal-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.legal-top svg { width: 18px; height: 18px; }

/* ──────────────────────────────────────────
   FOOTER
────────────────────────────────────────── */
.site-footer {
  background: var(--gray-800);
  padding: 40px 0 24px;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.footer-legal, .footer-contact {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,.65);
  margin-top: 6px;
}
.footer-legal a, .footer-contact a {
  color: rgba(255,255,255,.9);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
.footer-legal a:hover, .footer-contact a:hover { color: var(--white); }
.footer-copy {
  margin-top: 18px;
  font-size: 12px;
  color: rgba(255,255,255,.65);
}

/* ──────────────────────────────────────────
   MOBILE
────────────────────────────────────────── */
@media (max-width: 900px) {
  .legal-body { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .legal-toc { position: static; }
  .legal-toc-nav { max-height: none; overflow: visible; }
  .legal-toc-nav ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    border-left: none;
  }
  .legal-toc-nav a {
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    padding: 6px 12px;
    margin-left: 0;
  }
  .legal-toc-nav a.active { background: var(--blue-light); border-color: var(--blue); }
  .legal-toc-num { display: none; }
}
@media (max-width: 640px) {
  .legal-hero { padding: 40px 0 28px; }
  .legal-content h2 { font-size: 18px; }
  .legal-end { padding: 24px 20px; }
}
