/* =====================================================================
   styleLegalPages.css
   Estilo compartilhado das páginas institucionais (mock) do rodapé:
   Terms of Use, Privacy Policy e Community.
   Layout de documento editorial, responsivo (mobile-first) e alinhado
   à identidade visual do RentMTM (azul #004aad / #0b93f2, fonte Inter).
   ===================================================================== */

.legal {
    --legal-blue: #004aad;
    --legal-blue-light: #0b93f2;
    --legal-ink: #1f2a37;
    --legal-body: #404b5a;
    --legal-muted: #6b7686;
    --legal-line: #e6e9ef;
    --legal-bg-soft: #f6f8fc;
    --legal-max: 1180px;

    color: var(--legal-body);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    scroll-behavior: smooth;
}

.legal *,
.legal *::before,
.legal *::after {
    box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.legal__hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 400px at 85% -20%, rgba(11, 147, 242, .55), transparent 60%),
        linear-gradient(135deg, #003a8c 0%, #004aad 45%, #0b6fd6 100%);
    color: #ffffff;
    padding: clamp(3rem, 8vw, 6rem) 1.25rem clamp(3.5rem, 9vw, 6.5rem);
}

.legal__hero::after {
    /* faixa decorativa diagonal suave */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(115deg, transparent 60%, rgba(255, 255, 255, .06) 60%, rgba(255, 255, 255, .06) 68%, transparent 68%);
    pointer-events: none;
}

.legal__hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--legal-max);
    margin: 0 auto;
}

.legal__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .4rem .85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(4px);
    margin-bottom: 1.1rem;
}

.legal__title {
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 .9rem;
    color: #ffffff;
    max-width: 18ch;
}

.legal__lead {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, .9);
    max-width: 60ch;
    margin: 0 0 1.5rem;
}

.legal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem .9rem;
    align-items: center;
    font-size: .85rem;
    color: rgba(255, 255, 255, .82);
}

.legal__badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
}

.legal__badge i {
    font-size: .9rem;
}

.legal__disclaimer {
    max-width: var(--legal-max);
    margin: -1.75rem auto 0;
    position: relative;
    z-index: 2;
    padding: 0 1.25rem;
}

.legal__disclaimer-inner {
    background: #fff7e6;
    border: 1px solid #f6d98a;
    color: #7a5a11;
    border-radius: 14px;
    padding: .9rem 1.15rem;
    font-size: .88rem;
    line-height: 1.5;
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    box-shadow: 0 12px 30px rgba(16, 42, 90, .08);
}

.legal__disclaimer-inner i {
    color: #d99a1a;
    margin-top: .1rem;
}

/* ------------------------------------------------------------------ */
/* Layout: TOC + conteúdo                                              */
/* ------------------------------------------------------------------ */
.legal__layout {
    max-width: var(--legal-max);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem) 1.25rem clamp(3rem, 7vw, 5rem);
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

/* Sumário lateral */
.legal__toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    background: var(--legal-bg-soft);
    border: 1px solid var(--legal-line);
    border-radius: 16px;
    padding: 1.25rem 1.1rem;
}

.legal__toc-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--legal-muted);
    margin: 0 0 .85rem;
}

.legal__toc ol {
    list-style: none;
    counter-reset: toc;
    margin: 0;
    padding: 0;
}

.legal__toc li {
    counter-increment: toc;
    margin: 0;
}

.legal__toc a {
    display: flex;
    gap: .6rem;
    align-items: baseline;
    padding: .5rem .55rem;
    border-radius: 9px;
    font-size: .9rem;
    color: var(--legal-body);
    text-decoration: none;
    line-height: 1.35;
    transition: background-color .18s ease, color .18s ease;
}

.legal__toc a::before {
    content: counter(toc, decimal-leading-zero);
    font-size: .72rem;
    font-weight: 700;
    color: var(--legal-blue-light);
    min-width: 1.6em;
}

.legal__toc a:hover {
    background: #eaf1fb;
    color: var(--legal-blue);
}

/* Conteúdo */
.legal__content {
    max-width: 760px;
}

.legal__section {
    scroll-margin-top: 1.5rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--legal-line);
}

.legal__section:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}

.legal__section > h2 {
    display: flex;
    align-items: baseline;
    gap: .7rem;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 700;
    color: var(--legal-ink);
    letter-spacing: -.01em;
    margin: 0 0 1rem;
    scroll-margin-top: 1.5rem;
}

.legal__section > h2 .legal__num {
    font-size: .95rem;
    font-weight: 700;
    color: var(--legal-blue-light);
    font-variant-numeric: tabular-nums;
}

.legal__section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--legal-ink);
    margin: 1.5rem 0 .6rem;
}

.legal__section p {
    font-size: 1rem;
    line-height: 1.72;
    margin: 0 0 1rem;
}

.legal__section ul,
.legal__section ol.legal__list {
    margin: 0 0 1.15rem;
    padding-left: 0;
    list-style: none;
}

.legal__section ul li,
.legal__section ol.legal__list li {
    position: relative;
    padding-left: 1.6rem;
    line-height: 1.68;
    margin-bottom: .6rem;
    font-size: 1rem;
}

.legal__section ul li::before {
    content: "";
    position: absolute;
    left: .1rem;
    top: .62em;
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--legal-blue-light);
}

.legal__section ol.legal__list {
    counter-reset: item;
}

.legal__section ol.legal__list li {
    counter-increment: item;
}

.legal__section ol.legal__list li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: .1em;
    width: 1.25rem;
    height: 1.25rem;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    background: var(--legal-blue);
    border-radius: 6px;
    display: grid;
    place-items: center;
}

.legal__section a {
    color: var(--legal-blue);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal__callout {
    background: var(--legal-bg-soft);
    border-left: 4px solid var(--legal-blue-light);
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.2rem;
    margin: 1.25rem 0;
    font-size: .95rem;
    line-height: 1.6;
    color: var(--legal-ink);
}

/* ------------------------------------------------------------------ */
/* Community: cards de valores / guidelines                            */
/* ------------------------------------------------------------------ */
.legal__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
    margin: 0 0 1rem;
}

.legal__card {
    background: #fff;
    border: 1px solid var(--legal-line);
    border-radius: 16px;
    padding: 1.5rem 1.35rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.legal__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(16, 42, 90, .1);
    border-color: #cfe0f7;
}

.legal__card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--legal-blue) 0%, var(--legal-blue-light) 100%);
    margin-bottom: 1rem;
}

.legal__card h3 {
    margin: 0 0 .5rem;
    font-size: 1.1rem;
    color: var(--legal-ink);
    font-weight: 700;
}

.legal__card p {
    margin: 0;
    font-size: .93rem;
    line-height: 1.6;
    color: var(--legal-body);
}

/* Do / Don't */
.legal__rules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.legal__rule {
    border-radius: 16px;
    padding: 1.35rem 1.4rem;
    border: 1px solid var(--legal-line);
}

.legal__rule--do {
    background: #ecfdf3;
    border-color: #bbf0d0;
}

.legal__rule--dont {
    background: #fef2f2;
    border-color: #fbcfcf;
}

.legal__rule h3 {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .85rem;
    font-size: 1.05rem;
}

.legal__rule--do h3 {
    color: #067a4a;
}

.legal__rule--dont h3 {
    color: #b42318;
}

.legal__rule ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.legal__rule li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: .55rem;
    line-height: 1.55;
    font-size: .95rem;
}

.legal__rule--do li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #12a15e;
    font-weight: 700;
}

.legal__rule--dont li::before {
    content: "\2715";
    position: absolute;
    left: 0;
    color: #e5533c;
    font-weight: 700;
}

/* CTA final */
.legal__cta {
    max-width: var(--legal-max);
    margin: 0 auto clamp(3rem, 7vw, 5rem);
    padding: 0 1.25rem;
}

.legal__cta-inner {
    background: linear-gradient(135deg, #003a8c 0%, #004aad 55%, #0b6fd6 100%);
    border-radius: 22px;
    padding: clamp(2rem, 5vw, 3rem);
    color: #fff;
    text-align: center;
}

.legal__cta-inner h2 {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    margin: 0 0 .6rem;
    color: #fff;
    font-weight: 700;
}

.legal__cta-inner p {
    margin: 0 auto 1.5rem;
    max-width: 52ch;
    color: rgba(255, 255, 255, .9);
    line-height: 1.6;
}

.legal__btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    color: var(--legal-blue);
    font-weight: 600;
    font-size: .95rem;
    padding: .8rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.legal__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
    color: var(--legal-blue);
    text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Responsivo                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
    .legal__layout {
        grid-template-columns: 1fr;
    }

    .legal__toc {
        position: static;
        top: auto;
    }

    /* Sumário vira barra horizontal rolável no mobile */
    .legal__toc ol {
        display: flex;
        gap: .4rem;
        overflow-x: auto;
        padding-bottom: .35rem;
        -webkit-overflow-scrolling: touch;
    }

    .legal__toc li {
        flex: 0 0 auto;
    }

    .legal__toc a {
        white-space: nowrap;
        background: #fff;
        border: 1px solid var(--legal-line);
    }
}

@media (max-width: 520px) {
    .legal__disclaimer-inner {
        flex-direction: row;
    }

    .legal__section > h2 {
        flex-direction: column;
        gap: .15rem;
    }
}
