/* =====================================================================
   legal.css — páginas legais (Termos, Privacidade, LGPD)
   Tema claro, layout de documento com sumário lateral fixo.
   Depende dos tokens/headers/footer de styles.css (carregar ANTES).
   Escopo: classes .lg-  ·  body.lg-page
   ===================================================================== */

.lg-page { background: #fff; color: #1b1b22; }

/* styles.css pinta um body::before ESCURO fixo (tema escuro do site).
   Estas páginas são claras — troca por branco com glow de marca sutil. */
body.lg-page::before {
  background:
    radial-gradient(ellipse at 12% -5%, rgba(255,176,32,0.07) 0%, transparent 42%),
    radial-gradient(ellipse at 100% 102%, rgba(230,57,70,0.05) 0%, transparent 45%),
    #ffffff;
}

/* ---------------------------------------------------------------- HERO */
.lg-hero {
  position: relative;
  overflow: hidden;
  padding: 140px 0 64px;
  color: #fff;
  isolation: isolate;
  background: var(--gradient-fire, linear-gradient(120deg,#c1121f 0%,#e63946 25%,#ff7a05 60%,#fcc305 100%));
}
.lg-hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(255,255,255,0.26) 0%, transparent 45%),
    radial-gradient(ellipse at 88% 100%, rgba(193,18,31,0.5) 0%, transparent 55%);
  mix-blend-mode: overlay;
}
.lg-hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 72%);
}
.lg-hero-inner { max-width: 860px; position: relative; z-index: 2; }
.lg-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.82); margin-bottom: 18px;
}
.lg-breadcrumb a { color: #fff; text-decoration: none; opacity: 0.9; transition: opacity .15s ease; }
.lg-breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.lg-breadcrumb i { font-size: 0.9rem; opacity: 0.7; }
.lg-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.35);
  color: #fff; margin-bottom: 20px;
}
.lg-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900; line-height: 1.05; letter-spacing: -0.035em;
  margin-bottom: 16px; text-shadow: 0 6px 30px rgba(0,0,0,0.22);
}
.lg-hero-sub {
  font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.55;
  color: rgba(255,255,255,0.94); max-width: 660px; font-weight: 400;
}
.lg-hero-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.lg-hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.86rem; font-weight: 700; color: #fff;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.3);
}
.lg-hero-pill i { font-size: 1.05rem; }

/* -------------------------------------------------------------- LAYOUT */
.lg-doc { padding: 56px 0 90px; }
.lg-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* ----------------------------------------------------------- SUMÁRIO */
.lg-toc {
  position: sticky; top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding: 22px 20px;
  border-radius: 18px;
  background: #fafafb;
  border: 1.5px solid #ececf2;
}
.lg-toc-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: #9a9aa6; margin-bottom: 14px;
}
.lg-toc ol { list-style: none; counter-reset: lgtoc; display: grid; gap: 2px; }
.lg-toc li { counter-increment: lgtoc; }
.lg-toc a {
  display: flex; gap: 9px; align-items: baseline;
  padding: 8px 10px; border-radius: 10px;
  font-size: 0.9rem; line-height: 1.35; font-weight: 600;
  color: #5a5a66; text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.lg-toc a::before {
  content: counter(lgtoc);
  font-family: var(--font-mono, monospace); font-size: 0.74rem; font-weight: 700;
  color: #c0c0cc; flex-shrink: 0; min-width: 16px;
}
.lg-toc a:hover { background: #f0f0f4; color: #16161c; }
.lg-toc a.is-active {
  background: linear-gradient(135deg, rgba(255,122,5,0.1), rgba(230,57,70,0.07));
  color: var(--orange-dark, #e06800);
  border-left-color: var(--orange, #ff7a05);
}
.lg-toc a.is-active::before { color: var(--orange, #ff7a05); }

/* ------------------------------------------------------------ CONTEÚDO */
.lg-content { max-width: 760px; }
.lg-intro {
  font-size: 1.12rem; line-height: 1.65; color: #3a3a45;
  padding-bottom: 26px; margin-bottom: 12px; border-bottom: 1.5px solid #ececed;
}
.lg-intro strong { color: #16161c; }

.lg-content section { scroll-margin-top: 90px; padding-top: 30px; }
.lg-content h2 {
  display: flex; align-items: baseline; gap: 12px;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 900;
  letter-spacing: -0.02em; color: #14141a; line-height: 1.2;
  margin-bottom: 16px; padding-bottom: 4px;
}
.lg-content h2 .lg-num {
  font-family: var(--font-mono, monospace); font-size: 1rem; font-weight: 700;
  color: #fff; background: var(--gradient-brand, linear-gradient(135deg,#e63946,#ff7a05));
  border-radius: 9px; padding: 4px 11px; flex-shrink: 0; line-height: 1.2;
  box-shadow: 0 6px 16px rgba(255,122,5,0.28);
}
.lg-content h3 {
  font-size: 1.08rem; font-weight: 800; color: #1f1f28;
  margin: 24px 0 8px; letter-spacing: -0.01em;
}
.lg-content p { font-size: 1rem; line-height: 1.72; color: #41414d; margin-bottom: 14px; }
.lg-content a { color: var(--orange-dark, #e06800); font-weight: 700; text-decoration: none; }
.lg-content a:hover { text-decoration: underline; }
.lg-content strong { color: #1c1c24; font-weight: 700; }
.lg-content ul, .lg-content ol.lg-list { margin: 6px 0 18px; padding-left: 4px; display: grid; gap: 9px; }
.lg-content ul { list-style: none; }
.lg-content ul li {
  position: relative; padding-left: 26px; font-size: 1rem; line-height: 1.62; color: #41414d;
}
.lg-content ul li::before {
  content: ''; position: absolute; left: 4px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg);
  background: var(--gradient-sunset, linear-gradient(135deg,#fcc305,#ff7a05,#e63946));
}
.lg-content ol.lg-list { counter-reset: lglist; list-style: none; padding-left: 0; }
.lg-content ol.lg-list li {
  counter-increment: lglist; position: relative; padding-left: 34px;
  font-size: 1rem; line-height: 1.62; color: #41414d;
}
.lg-content ol.lg-list li::before {
  content: counter(lglist); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center;
  font-family: var(--font-mono, monospace); font-size: 0.76rem; font-weight: 700;
  color: var(--orange-dark, #e06800); background: rgba(255,122,5,0.12);
}
.lg-content ul li strong, .lg-content ol.lg-list li strong { color: #1c1c24; }

/* Caixa de destaque (avisos, contato do Encarregado, prazos) */
.lg-callout {
  display: flex; gap: 16px; align-items: flex-start;
  margin: 22px 0; padding: 20px 22px; border-radius: 16px;
  background: #fafafb; border: 1.5px solid #ececf2; border-left: 4px solid var(--orange, #ff7a05);
}
.lg-callout.is-info { border-left-color: #3b82f6; background: #f5f8ff; }
.lg-callout.is-warn { border-left-color: #f59e0b; background: #fffaf0; }
.lg-callout-ico { flex-shrink: 0; font-size: 1.5rem; color: var(--orange, #ff7a05); line-height: 1; margin-top: 2px; }
.lg-callout.is-info .lg-callout-ico { color: #3b82f6; }
.lg-callout.is-warn .lg-callout-ico { color: #d97706; }
.lg-callout p { margin: 0 0 6px; font-size: 0.98rem; line-height: 1.6; }
.lg-callout p:last-child { margin-bottom: 0; }
.lg-callout strong { color: #16161c; }

/* Tabela (bases legais, retenção, etc.) */
.lg-table-wrap { overflow-x: auto; margin: 18px 0; border-radius: 14px; border: 1.5px solid #ececf2; }
.lg-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 460px; }
.lg-table th, .lg-table td { padding: 13px 16px; text-align: left; vertical-align: top; line-height: 1.5; }
.lg-table thead th {
  background: #16161c; color: #fff; font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.lg-table tbody tr { border-top: 1px solid #ececf2; }
.lg-table tbody tr:nth-child(even) { background: #fafafb; }
.lg-table td strong { color: #1c1c24; }

/* Grade de cards (direitos do titular na página LGPD) */
.lg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; margin: 20px 0; }
.lg-rcard {
  padding: 22px; border-radius: 18px; background: #fff;
  border: 1.5px solid #ececf2; box-shadow: 0 6px 20px rgba(20,20,30,0.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.lg-rcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20,20,30,0.12); border-color: transparent; }
.lg-rcard-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 1.45rem; color: #fff; margin-bottom: 14px;
  background: var(--gradient-brand, linear-gradient(135deg,#e63946,#ff7a05));
  box-shadow: 0 8px 18px rgba(255,122,5,0.28);
}
.lg-rcard h3 { font-size: 1.05rem; font-weight: 800; color: #16161c; margin: 0 0 6px; }
.lg-rcard p { font-size: 0.92rem; line-height: 1.55; color: #5a5a66; margin: 0; }

/* Bloco de contato/CTA final */
.lg-contact {
  margin-top: 40px; padding: 30px; border-radius: 22px; color: #fff;
  background: linear-gradient(160deg, #16161c 0%, #20202a 100%);
  box-shadow: 0 18px 50px rgba(20,20,30,0.18);
}
.lg-contact h3 { font-size: 1.3rem; font-weight: 900; margin: 0 0 8px; color: #fff; }
.lg-contact p { color: rgba(255,255,255,0.8); margin: 0 0 18px; font-size: 0.98rem; line-height: 1.6; }
.lg-contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lg-contact-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px; font-weight: 800; font-size: 0.98rem; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.lg-contact-btn-wa { background: #25d366; color: #06351c; box-shadow: 0 12px 28px rgba(37,211,102,0.32); }
.lg-contact-btn-mail { background: #fff; color: #16161c; }
.lg-contact-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0,0,0,0.3); }

.lg-updated { margin-top: 34px; font-size: 0.88rem; color: #8a8a96; font-style: italic; }

/* ----------------------------------------------------------- RESPONSIVO */
@media (max-width: 900px) {
  .lg-layout { grid-template-columns: 1fr; gap: 0; }
  .lg-toc {
    position: static; max-height: none; margin-bottom: 30px;
    /* sumário recolhível no mobile */
  }
  .lg-toc.lg-toc-collapsible .lg-toc-list { display: none; }
  .lg-toc.lg-toc-collapsible.is-open .lg-toc-list { display: grid; }
  .lg-toc-title { cursor: pointer; display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; }
  .lg-toc-collapsible.is-open .lg-toc-title { margin-bottom: 14px; }
  .lg-toc-caret { transition: transform .2s ease; }
  .lg-toc-collapsible.is-open .lg-toc-caret { transform: rotate(180deg); }
}
@media (min-width: 901px) {
  .lg-toc-caret { display: none; }
}
@media (max-width: 560px) {
  .lg-hero { padding: 116px 0 52px; }
  .lg-doc { padding: 36px 0 64px; }
  .lg-content h2 { gap: 10px; }
  .lg-contact { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-rcard, .lg-contact-btn { transition: none; }
}
