/* ==============================================================
   legal.css — páginas de Política de Privacidade e Termos de Uso
   Escopo: .lgl-*
   ============================================================== */

.lgl-section {
    position: relative;
    padding: 80px 0 100px;
    background:
        radial-gradient(1000px 500px at 85% -10%, rgba(45, 182, 222, 0.05), transparent 60%),
        radial-gradient(900px 500px at 10% 110%, rgba(31, 111, 170, 0.04), transparent 60%),
        linear-gradient(180deg, #f7fbff 0%, #ffffff 60%);
}

.lgl-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(10, 58, 104, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 58, 104, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
            mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    pointer-events: none;
}

.lgl-section > .container {
    position: relative;
    z-index: 1;
}

/* Layout 2 colunas: índice (sticky) + conteúdo */
.lgl-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    max-width: 1120px;
    margin: 0 auto;
}

/* Índice (TOC) — sidebar premium com linha de destaque */
.lgl-toc {
    position: sticky;
    top: 110px;
    align-self: start;
    padding: 26px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid rgba(10, 58, 104, 0.08);
    border-radius: 18px;
    box-shadow:
        0 1px 2px rgba(10, 58, 104, 0.03),
        0 12px 30px -8px rgba(10, 58, 104, 0.08);
}

.lgl-toc__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono-font);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #2DB6DE;
    margin: 0 0 18px;
}

.lgl-toc__title::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 2px;
    background: linear-gradient(90deg, #7DD3EF, #1F6FAA);
    border-radius: 2px;
}

.lgl-toc ol {
    list-style: none;
    counter-reset: toc;
    margin: 0;
    padding: 0;
}

.lgl-toc li {
    counter-increment: toc;
    position: relative;
}

.lgl-toc li + li {
    margin-top: 2px;
}

.lgl-toc a {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 10px 9px 12px;
    color: #384455;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    border-radius: 8px;
    transition: color 0.25s ease, background 0.25s ease;
}

.lgl-toc a::before {
    content: counter(toc, decimal-leading-zero);
    font-family: var(--mono-font);
    font-size: 0.66rem;
    font-weight: 700;
    color: #a5b5c4;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    transition: color 0.25s ease;
}

.lgl-toc a:hover {
    color: #0A3A68;
    background: rgba(45, 182, 222, 0.06);
}

.lgl-toc a:hover::before {
    color: #2DB6DE;
}

/* Coluna de conteúdo */
.lgl-body {
    max-width: 720px;
}

/* Intro box — hero sutil com ícone decorativo */
.lgl-intro {
    position: relative;
    padding: 26px 28px 26px 32px;
    margin-bottom: 28px;
    background:
        radial-gradient(600px 200px at 0% 0%, rgba(45, 182, 222, 0.08), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border: 1px solid rgba(45, 182, 222, 0.18);
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(10, 58, 104, 0.04);
    overflow: hidden;
}

.lgl-intro::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #7DD3EF 0%, #2DB6DE 50%, #1F6FAA 100%);
    border-radius: 18px 0 0 18px;
}

.lgl-intro__eyebrow {
    font-family: var(--mono-font);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #1F6FAA;
}

.lgl-intro p {
    margin: 0;
    color: #1a2935;
    font-size: 0.98rem;
    line-height: 1.65;
}

.lgl-intro p + p {
    margin-top: 10px;
}

.lgl-intro strong {
    color: #0A3A68;
    font-weight: 700;
}

/* --------------------------------------------------------------
   Accordion moderno 2.0 — ícone morfante + → ×, animação fluida
   de altura via ::details-content (Chrome 131+, Safari TP) com
   fallback, halo radial no hover e número em badge squircle
   -------------------------------------------------------------- */
.lgl-body {
    counter-reset: article;
    interpolate-size: allow-keywords;
}

.lgl-article {
    counter-increment: article;
    scroll-margin-top: 120px;
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(10, 58, 104, 0.08);
    border-radius: 20px;
    box-shadow:
        0 1px 2px rgba(10, 58, 104, 0.03),
        0 6px 18px -8px rgba(10, 58, 104, 0.08);
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    isolation: isolate;
}

.lgl-article + .lgl-article { margin-top: 14px; }

/* Halo radial ambiente — aparece suavemente no hover/aberto */
.lgl-article::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(500px 220px at 0% 0%, rgba(45, 182, 222, 0.08), transparent 60%),
        radial-gradient(400px 200px at 100% 100%, rgba(31, 111, 170, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
}

.lgl-article:hover::before,
.lgl-article[open]::before {
    opacity: 1;
}

/* Acento lateral animado (cresce do centro pra fora) */
.lgl-article::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 0;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #7DD3EF 0%, #2DB6DE 50%, #1F6FAA 100%);
    border-radius: 0 3px 3px 0;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s ease;
    z-index: 1;
}

.lgl-article:hover::after { height: 40%; }

.lgl-article[open]::after {
    height: 100%;
    box-shadow: 0 0 16px rgba(45, 182, 222, 0.6);
}

.lgl-article:hover {
    border-color: rgba(45, 182, 222, 0.3);
    transform: translateY(-2px);
    box-shadow:
        0 2px 4px rgba(10, 58, 104, 0.04),
        0 16px 36px -10px rgba(10, 58, 104, 0.14);
}

.lgl-article[open] {
    border-color: rgba(45, 182, 222, 0.45);
    box-shadow:
        0 2px 6px rgba(10, 58, 104, 0.05),
        0 20px 48px -12px rgba(45, 182, 222, 0.28);
}

/* Remove o triângulo padrão do <details> */
.lgl-article summary { list-style: none; outline: none; cursor: pointer; }
.lgl-article summary::-webkit-details-marker { display: none; }
.lgl-article summary::marker { display: none; content: ""; }

/* Header clicável */
.lgl-article__toggle {
    position: relative;
    z-index: 2;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    user-select: none;
    transition: background 0.3s ease;
}

.lgl-article__toggle:focus-visible { outline: 2px solid #2DB6DE; outline-offset: -2px; border-radius: 20px; }

/* Número em badge squircle (rounded-square — mais moderno que círculo) */
.lgl-article__toggle::before {
    content: counter(article, decimal-leading-zero);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #f5fafd 0%, #e3eef5 100%);
    color: #1F6FAA;
    font-family: var(--title-font);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
    flex-shrink: 0;
    border: 1px solid rgba(45, 182, 222, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(10, 58, 104, 0.04);
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lgl-article:hover .lgl-article__toggle::before {
    background: linear-gradient(145deg, #e5f4fa 0%, #c8e3f2 100%);
    transform: rotate(-4deg) scale(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 4px 10px -2px rgba(45, 182, 222, 0.25);
}

.lgl-article[open] .lgl-article__toggle::before {
    background: linear-gradient(145deg, #7DD3EF 0%, #2DB6DE 50%, #1F6FAA 100%);
    color: #ffffff;
    border-color: transparent;
    transform: rotate(0) scale(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 0 0 4px rgba(45, 182, 222, 0.15),
        0 10px 24px -4px rgba(45, 182, 222, 0.55);
}

/* Título */
.lgl-article__toggle h2 {
    font-family: var(--title-font);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #0B1F2A;
    margin: 0;
    flex: 1;
    line-height: 1.35;
    transition: color 0.3s ease, letter-spacing 0.4s ease;
}

.lgl-article:hover .lgl-article__toggle h2 { color: #1F6FAA; }
.lgl-article[open] .lgl-article__toggle h2 {
    color: #0A3A68;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Ícone morfante: + (fechado) → × (aberto) */
.lgl-article__chevron {
    position: relative;
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    flex-shrink: 0;
    transition: background 0.35s ease,
                border-color 0.35s ease,
                transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lgl-article__chevron::before,
.lgl-article__chevron::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 2px;
    background: #8aa0b0;
    border-radius: 2px;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease;
    transform-origin: center;
}

/* Estado fechado: + (horizontal + vertical) */
.lgl-article__chevron::before { transform: translate(-50%, -50%) rotate(0deg); }
.lgl-article__chevron::after  { transform: translate(-50%, -50%) rotate(90deg); }

.lgl-article:hover .lgl-article__chevron {
    background: rgba(45, 182, 222, 0.08);
    border-color: rgba(45, 182, 222, 0.18);
}
.lgl-article:hover .lgl-article__chevron::before,
.lgl-article:hover .lgl-article__chevron::after { background: #2DB6DE; }

/* Estado aberto: × (rotação +45° e -45°) */
.lgl-article[open] .lgl-article__chevron {
    background: linear-gradient(145deg, #7DD3EF 0%, #2DB6DE 100%);
    border-color: transparent;
    transform: rotate(180deg);
    box-shadow: 0 6px 14px -4px rgba(45, 182, 222, 0.5);
}
.lgl-article[open] .lgl-article__chevron::before {
    transform: translate(-50%, -50%) rotate(45deg);
    background: #ffffff;
}
.lgl-article[open] .lgl-article__chevron::after {
    transform: translate(-50%, -50%) rotate(-45deg);
    background: #ffffff;
}

/* Corpo do accordion — animação fluida nativa de altura */
.lgl-article__body {
    position: relative;
    z-index: 2;
    padding: 0 28px 26px 96px;
}

/* Animação moderna de altura usando ::details-content (Chrome 131+) */
.lgl-article::details-content {
    block-size: 0;
    overflow: hidden;
    opacity: 0;
    transition: block-size 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                content-visibility 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease;
    transition-behavior: allow-discrete;
}

.lgl-article[open]::details-content {
    block-size: auto;
    opacity: 1;
}

/* Entrada suave na primeira renderização */
@starting-style {
    .lgl-article[open]::details-content {
        block-size: 0;
        opacity: 0;
    }
}

/* Fallback animation para browsers sem suporte a ::details-content */
@supports not selector(::details-content) {
    .lgl-article[open] .lgl-article__body {
        animation: lgl-slide-down 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@keyframes lgl-slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lgl-article h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0A3A68;
    margin: 22px 0 8px;
}

.lgl-article h3:first-child {
    margin-top: 0;
}

.lgl-article p {
    font-size: 0.96rem;
    line-height: 1.7;
    color: #384455;
    margin: 0 0 14px;
}

.lgl-article__body > p:first-child {
    margin-top: 0;
}

.lgl-article__body > *:last-child {
    margin-bottom: 0;
}

.lgl-article ul,
.lgl-article ol {
    padding-left: 22px;
    margin: 0 0 16px;
}

.lgl-article li {
    font-size: 0.96rem;
    line-height: 1.65;
    color: #384455;
    margin-bottom: 8px;
}

.lgl-article li strong {
    color: #0A3A68;
    font-weight: 700;
}

.lgl-article a {
    color: #1F6FAA;
    text-decoration: underline;
    text-decoration-color: rgba(45, 182, 222, 0.4);
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.lgl-article a:hover {
    color: #0A3A68;
    text-decoration-color: #2DB6DE;
}

/* --------------------------------------------------------------
   Tabelas modernas dentro dos artigos
   -------------------------------------------------------------- */
.lgl-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 16px 0 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(10, 58, 104, 0.1);
    box-shadow: 0 4px 14px rgba(10, 58, 104, 0.04);
    font-size: 0.9rem;
}

.lgl-table thead th {
    background: linear-gradient(135deg, #0A3A68 0%, #1F6FAA 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-align: left;
    padding: 14px 16px;
    border: none;
}

.lgl-table tbody td {
    padding: 14px 16px;
    border-top: 1px solid rgba(10, 58, 104, 0.07);
    vertical-align: top;
    color: #384455;
    line-height: 1.55;
}

.lgl-table tbody tr:first-child td {
    border-top: none;
}

.lgl-table tbody tr:hover td {
    background: rgba(45, 182, 222, 0.04);
}

/* Primeira coluna em bold/escura quando usada como rótulo */
.lgl-table--labels tbody th,
.lgl-table--labels tbody td:first-child {
    font-weight: 700;
    color: #0A3A68;
    background: rgba(45, 182, 222, 0.04);
    border-right: 1px solid rgba(10, 58, 104, 0.07);
    width: 32%;
}

.lgl-table strong { color: #0A3A68; font-weight: 700; }
.lgl-table em { color: #6b7a82; font-style: italic; font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; }

/* Responsivo: empilha tabelas em mobile */
@media (max-width: 639.98px) {
    .lgl-table { font-size: 0.85rem; }
    .lgl-table thead th,
    .lgl-table tbody td { padding: 10px 12px; }
    .lgl-table--labels tbody td:first-child { width: 40%; }
}

/* Bloco de contato / DPO */
.lgl-contact {
    margin-top: 24px;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid #e7ecf3;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(10, 58, 104, 0.05);
}

.lgl-contact__title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0A3A68;
    margin: 0 0 10px;
}

.lgl-contact__item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.9rem;
    color: #384455;
    margin-bottom: 6px;
}

.lgl-contact__item i {
    color: #2DB6DE;
    width: 16px;
    flex-shrink: 0;
}

/* Meta (vigência / última atualização) */
.lgl-meta {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(10, 58, 104, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 0.82rem;
    color: #6b7a82;
}

.lgl-meta strong {
    color: #0A3A68;
    font-weight: 600;
}

/* Responsivo */
@media (max-width: 991.98px) {
    .lgl-grid { grid-template-columns: 1fr; gap: 32px; }
    .lgl-toc { position: static; }
}

@media (max-width: 575.98px) {
    .lgl-section { padding: 60px 0 80px; }
    .lgl-intro { padding: 20px 22px 20px 26px; }
    .lgl-article { border-radius: 16px; }
    .lgl-article__toggle { padding: 18px 20px; gap: 14px; }
    .lgl-article__toggle::before {
        width: 40px; height: 40px;
        font-size: 13px;
        border-radius: 12px;
    }
    .lgl-article__toggle h2 { font-size: 0.98rem; }
    .lgl-article__body { padding: 0 20px 22px 74px; }
    .lgl-article__chevron { width: 32px; height: 32px; border-radius: 10px; }
    .lgl-article__chevron::before,
    .lgl-article__chevron::after { width: 11px; }
}

@media (max-width: 420px) {
    .lgl-article__body { padding-left: 20px; }
}
