:root {
    --ef-bg: var(--ef-white);
    --ef-surface: var(--ef-black);
    --ef-text: var(--ef-black);
    --ef-text-muted: var(--ef-color-muted-on-dark);
    /* Compatibilidade: aliases antigos apontam para o unico efeito dourado oficial. */
    --gold-gradient: var(--ef-gold-effect);
    --gold-grad-rich: var(--ef-gold-effect);
    --gold-gradient-button: var(--ef-gold-effect);
    --btn-dark: var(--ef-black);
    --global-padding: 190px;
    --global-background: #000;
    --ef-container-wide: min(1224px, calc(100% - 48px));
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #000;
    color: #fff;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    text-decoration: none;
}

.container {
    margin-inline: auto;
}

/* ========================================
   GLOBAL - TITULOS HOME
======================================== */

.ef-title-gold {
    background: var(--gold-gradient-button);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.ef-home-title {
    margin: 0;
    color: #fff;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 2.5rem;
    letter-spacing: -0.025em;
    font-family: "Open Sans", sans-serif;
}

.ef-home-title::first-letter {
    text-transform: uppercase;
}

/* ========================================
   GLOBAL - HEADINGS HOME
======================================== */

.ef-home-heading {
    margin: 0 auto 50px;
}

.ef-home-heading--center {
    max-width: 860px;
    text-align: center;
}

.ef-home-heading--center .ef-home-title-divider {
    margin: 24px auto 0;
}

.ef-home-heading p {
    margin: 20px auto 0;
    color: rgba(255, 255, 255, .95);
    letter-spacing: .01em;
    line-height: 1.625;
    font-weight: 300;
    font-size: 1rem;
    max-width: 38rem;
}

/* ========================================
   GLOBAL - SEÇÕES HOME
======================================== */


.ef-home-shell {
    width: var(--ef-container-wide);
    margin: 0 auto;
}

.global-padding {
    padding-bottom: var(--global-padding);
}

.global-background {
    background: var(--global-background);
}

/* ========================================
   GLOBAL - LINKS / LISTAS FOOTER
======================================== */

.ef-home-footer a {
    text-decoration: none;
    color: inherit;
}

.ef-home-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ========================================
   GLOBAL - DIVIDER GOLD
======================================== */

.ef-divider-gold {
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 13px;
    border-radius: 999px;
    background: var(--gold-gradient);
}

/* centralizado */
.ef-divider-gold--center {
    margin-left: auto;
    margin-right: auto;
}

/* esquerda */
.ef-divider-gold--left {
    margin-left: 0;
    margin-right: auto;
}

/* direita */
.ef-divider-gold--right {
    margin-left: auto;
    margin-right: 0;
}

/* Remove os tracos decorativos do site sem afetar divisores funcionais. */
.ef-divider-gold,
.ef-home-title-divider,
.ef-home-reason-card__divider,
.ef-consultoria-offshore-page__divider,
.rule,
.ef-parceria-page__eyebrow-line,
.ef-home-testimonial-card::before,
.ef-404-card::before,
.ef-leia-directory__eyebrow::after,
.ef-kicker::after,
.leia-post__content h2::after,
.leia-post__content .wp-block-heading::after {
    display: none !important;
    background: none !important;
    content: none !important;
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ========================================
   ANTI LAYOUT SHIFT / ANTI PISCADA
======================================== */

.ef-reference-page img,
.ef-reference-page svg {
    display: block;
}

.ef-reference-page a,
.ef-reference-page button {
    line-height: 1;
    box-sizing: border-box;
}

/* trava todos os botões da página */
.ef-reference-page .ef-btn,
.ef-reference-page .ef-reference-heading__button,
.ef-reference-page .ef-reference-row__price,
.ef-reference-page .ef-reference-row__secondary,
.ef-reference-page .ef-reference-helper__button,
.ef-reference-page .ef-reference-consultation-card__button {
    min-height: 52px;
    height: 52px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
    transform: none;
    transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}

/* botão full dentro de card */
.ef-reference-page .ef-reference-consultation-card__button {
    width: 100%;
}

/* evita salto enquanto a fonte Open Sans carrega */
.ef-reference-page {
    font-synthesis: none;
    text-rendering: geometricPrecision;
}

/* desliga animações só no primeiro load se tiver classe no body */
body.is-loading .ef-reference-page *,
body.is-loading .ef-reference-page *::before,
body.is-loading .ef-reference-page *::after {
    transition: none !important;
    animation: none !important;
}

@media (max-width: 767px) {

    /* Leia Sobre segue a mesma moldura fluida da home no mobile. */
    body main.leia-post,
    body main.leia-post .leia-post__article,
    body main.leia-post .leia-post__article > section,
    body main.ef-leia-directory {
        width: 100% !important;
        max-width: none !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    body main.leia-post .leia-post__hero-container,
    body main.leia-post .leia-post__content-container {
        width: 100% !important;
        max-width: none !important;
        padding-right: 16px !important;
        padding-left: 16px !important;
    }

    .ef-home-shell {
        /* Mantem apenas 16px de respiro lateral no mobile para aproveitar melhor a tela. */
        width: min(100%, calc(100% - 32px)) !important;
        margin: 0 auto;
    }

    .ef-home-title {
        font-size: 1.5rem;
    }


    .global-padding {
        padding-bottom: calc(var(--global-padding) - 40px);
    }
}

/* ========================================
   MOLDURAS DESKTOP
   O fundo externo fica branco no desktop; os blocos
   preservam suas cores e se unem quando são consecutivos.
======================================== */

@media (min-width: 768px) {
    :root {
        --ef-site-section-radius: clamp(20px, 2vw, 34px);
        /* Padrao global da moldura desktop; o mobile permanece fora desta regra. */
        --ef-site-section-width: min(calc(100% - clamp(8px, 1.2vw, 19px)), 1760px);
        --ef-site-section-gap: clamp(6px, 0.72vw, 11px);
    }

    html:has(body:not(.ef-form-page-body)),
    body:not(.ef-form-page-body) {
        background: #fff !important;
    }

    body:not(.ef-form-page-body) .ef-header {
        width: var(--ef-site-section-width);
        margin: var(--ef-site-section-gap) auto 0;
        border-radius: var(--ef-site-section-radius) var(--ef-site-section-radius) 0 0;
        overflow: visible;
        background: #000 !important;
    }

    body:not(.home):not(.ef-form-page-body) main:is(
        .ef-reference-page,
        .ef-offer-page,
        .ef-story-page,
        .leia-post
    ) {
        background: #fff !important;
    }

    body:not(.home):not(.ef-form-page-body) main > section,
    body:not(.home):not(.ef-form-page-body) .leia-post__article > section {
        width: var(--ef-site-section-width);
        margin-right: auto;
        margin-left: auto;
        margin-top: var(--ef-site-section-gap);
        border-radius: var(--ef-site-section-radius);
        overflow: hidden;
    }

    body:not(.home):not(.ef-form-page-body) :is(.ef-home-footer, .site-footer) {
        width: var(--ef-site-section-width);
        margin: var(--ef-site-section-gap) auto;
        border-radius: var(--ef-site-section-radius);
        overflow: hidden;
    }

    /* Sequencias escuras consecutivas formam um unico bloco. */
    body:not(.home):not(.ef-form-page-body) main > section:is(
        .ef-offer-hero,
        .ef-story-hero,
        .ef-reference-intro,
        .ef-reference-rows,
        .ef-reference-consultations,
        .ef-leia-directory__hero,
        .ef-operation,
        .ef-home-section.global-background,
        .tax-calculator-section.global-background,
        .ef-consultoria-offshore-page__hero,
        .ef-consultoria-offshore-page__stack,
        .ef-parceria-page__section
    ):has(+ section:is(
        .ef-offer-hero,
        .ef-story-hero,
        .ef-reference-intro,
        .ef-reference-rows,
        .ef-reference-consultations,
        .ef-leia-directory__hero,
        .ef-operation,
        .ef-home-section.global-background,
        .tax-calculator-section.global-background,
        .ef-consultoria-offshore-page__hero,
        .ef-consultoria-offshore-page__stack,
        .ef-parceria-page__section
    )),
    body:not(.home):not(.ef-form-page-body) .leia-post__article > section.leia-post__hero:has(+ section.leia-post__content-section) {
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    body:not(.home):not(.ef-form-page-body) main > section:is(
        .ef-offer-hero,
        .ef-story-hero,
        .ef-reference-intro,
        .ef-reference-rows,
        .ef-reference-consultations,
        .ef-leia-directory__hero,
        .ef-operation,
        .ef-home-section.global-background,
        .tax-calculator-section.global-background,
        .ef-consultoria-offshore-page__hero,
        .ef-consultoria-offshore-page__stack,
        .ef-parceria-page__section
    ) + section:is(
        .ef-offer-hero,
        .ef-story-hero,
        .ef-reference-intro,
        .ef-reference-rows,
        .ef-reference-consultations,
        .ef-leia-directory__hero,
        .ef-operation,
        .ef-home-section.global-background,
        .tax-calculator-section.global-background,
        .ef-consultoria-offshore-page__hero,
        .ef-consultoria-offshore-page__stack,
        .ef-parceria-page__section
    ),
    body:not(.home):not(.ef-form-page-body) .leia-post__article > section.leia-post__hero + section.leia-post__content-section {
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /* Sequencias claras consecutivas tambem permanecem sem uma faixa branca. */
    body:not(.home):not(.ef-form-page-body) main > section:is(
        .ef-offer-feature-section,
        .ef-offer-cta-split-section,
        .ef-reference-helper,
        .ef-story-content,
        .ef-legal,
        .ef-benefits,
        .ef-first-step,
        .leia-post__content-section
    ):has(+ section:is(
        .ef-offer-feature-section,
        .ef-offer-cta-split-section,
        .ef-reference-helper,
        .ef-story-content,
        .ef-legal,
        .ef-benefits,
        .ef-first-step,
        .leia-post__content-section
    )),
    body:not(.home):not(.ef-form-page-body) .leia-post__article > section.leia-post__content-section:has(+ section.leia-post__content-section) {
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    body:not(.home):not(.ef-form-page-body) main > section:is(
        .ef-offer-feature-section,
        .ef-offer-cta-split-section,
        .ef-reference-helper,
        .ef-story-content,
        .ef-legal,
        .ef-benefits,
        .ef-first-step,
        .leia-post__content-section
    ) + section:is(
        .ef-offer-feature-section,
        .ef-offer-cta-split-section,
        .ef-reference-helper,
        .ef-story-content,
        .ef-legal,
        .ef-benefits,
        .ef-first-step,
        .leia-post__content-section
    ),
    body:not(.home):not(.ef-form-page-body) .leia-post__article > section.leia-post__content-section + section.leia-post__content-section {
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /* A primeira secao escura se junta ao cabecalho. */
    body:not(.home):not(.ef-form-page-body):has(main > section:first-child:is(
        .ef-offer-hero,
        .ef-story-hero,
        .ef-reference-intro,
        .ef-reference-rows,
        .ef-reference-consultations,
        .ef-leia-directory__hero,
        .ef-home-section.global-background,
        .tax-calculator-section.global-background
    )) .ef-header {
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    body:not(.home):not(.ef-form-page-body) main > section:first-child:is(
        .ef-offer-hero,
        .ef-story-hero,
        .ef-reference-intro,
        .ef-reference-rows,
        .ef-reference-consultations,
        .ef-leia-directory__hero,
        .ef-home-section.global-background,
        .tax-calculator-section.global-background
    ) {
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /* A ultima secao escura se junta ao rodape escuro. */
    body:not(.home):not(.ef-form-page-body):has(:is(.ef-home-footer, .site-footer)) main > section:last-of-type:is(
        .ef-offer-hero,
        .ef-story-hero,
        .ef-reference-intro,
        .ef-reference-rows,
        .ef-reference-consultations,
        .ef-leia-directory__hero,
        .ef-operation,
        .ef-home-section.global-background,
        .tax-calculator-section.global-background,
        .ef-consultoria-offshore-page__hero,
        .ef-consultoria-offshore-page__stack,
        .ef-parceria-page__section
    ),
    body:not(.home):not(.ef-form-page-body):has(:is(.ef-home-footer, .site-footer)) .leia-post__article > section:last-child.leia-post__hero {
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    body:not(.home):not(.ef-form-page-body):has(main > section:last-of-type:is(
        .ef-offer-hero,
        .ef-story-hero,
        .ef-reference-intro,
        .ef-reference-rows,
        .ef-reference-consultations,
        .ef-leia-directory__hero,
        .ef-operation,
        .ef-home-section.global-background,
        .tax-calculator-section.global-background,
        .ef-consultoria-offshore-page__hero,
        .ef-consultoria-offshore-page__stack,
        .ef-parceria-page__section
    )) :is(.ef-home-footer, .site-footer) {
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /* Paginas que usam um unico fundo escuro interno. */
    body:not(.home):not(.ef-form-page-body) main:is(.ef-parceria-page, .ef-consultoria-offshore-page, .ef-leia-directory) {
        width: var(--ef-site-section-width);
        margin: 0 auto;
        border-radius: 0 0 var(--ef-site-section-radius) var(--ef-site-section-radius);
        overflow: hidden;
    }

    body:not(.home):not(.ef-form-page-body) main:is(.ef-parceria-page, .ef-consultoria-offshore-page, .ef-leia-directory) > section {
        width: 100%;
        margin-top: 0;
        border-radius: 0;
        overflow: visible;
    }

    body:not(.home):not(.ef-form-page-body):has(main:is(.ef-parceria-page, .ef-leia-directory)) .ef-header {
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    body:not(.home):not(.ef-form-page-body):has(main:is(.ef-parceria-page, .ef-leia-directory)) .ef-home-footer {
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /* A home e um unico bloco preto entre cabecalho e rodape. */
    body.home .ef-home {
        width: var(--ef-site-section-width);
        margin: 0 auto;
        background: #000;
        overflow: hidden;
    }

    body.home .ef-home > section {
        width: 100%;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    body.home .ef-home-footer {
        width: var(--ef-site-section-width);
        margin: 0 auto var(--ef-site-section-gap);
        border-radius: 0 0 var(--ef-site-section-radius) var(--ef-site-section-radius);
        overflow: hidden;
    }

    body.home .ef-header,
    body:not(.home):not(.ef-form-page-body):has(main:is(.ef-parceria-page, .ef-leia-directory)) .ef-header {
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    /* Mantem a moldura externa visivel mesmo quando header.css fixa o cabecalho. */
    body.home .ef-home {
        margin-top: var(--ef-site-section-gap) !important;
        border-top-left-radius: var(--ef-site-section-radius) !important;
        border-top-right-radius: var(--ef-site-section-radius) !important;
    }

    body.home .ef-header {
        border-top-left-radius: var(--ef-site-section-radius) !important;
        border-top-right-radius: var(--ef-site-section-radius) !important;
        top: calc(var(--ef-site-section-gap) + 12px) !important;
    }

    body:not(.home):not(.ef-form-page-body) .ef-header {
        top: calc(var(--ef-site-section-gap) + 12px) !important;
    }

    /* Todos os contêineres desktop começam com o mesmo respiro da home. */
    body:not(.home):not(.ef-form-page-body) main {
        margin-top: var(--ef-site-section-gap) !important;
    }

    body:not(.ef-form-page-body) .ef-header {
        border-top-left-radius: var(--ef-site-section-radius) !important;
        border-top-right-radius: var(--ef-site-section-radius) !important;
    }

    body:not(.home):not(.ef-form-page-body) main > section:first-of-type {
        margin: 0 auto !important;
        border-top-left-radius: var(--ef-site-section-radius) !important;
        border-top-right-radius: var(--ef-site-section-radius) !important;
    }

    body[class]:not(.home):not(.ef-form-page-body) main[class] > section:first-of-type {
        margin: 0 auto !important;
    }

    body:not(.home):not(.ef-form-page-body) .leia-post__article > section:first-of-type {
        margin: 0 !important;
        border-top-left-radius: var(--ef-site-section-radius) !important;
        border-top-right-radius: var(--ef-site-section-radius) !important;
    }

    body[class]:not(.home):not(.ef-form-page-body) main.leia-post .leia-post__article[class] > section:first-of-type {
        margin: 0 !important;
    }

    /* O artigo interno usa a mesma largura da moldura externa da pagina. */
    body:not(.home):not(.ef-form-page-body) main.leia-post {
        margin: var(--ef-site-section-gap) auto 0 !important;
        overflow: hidden;
    }

    body:not(.home):not(.ef-form-page-body) main.leia-post .leia-post__article > section {
        width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    /* Paginas de fundo unico recebem a mesma borda externa em todos os lados. */
    body:not(.home):not(.ef-form-page-body) main:is(.ef-parceria-page, .ef-consultoria-offshore-page, .ef-leia-directory) {
        border-radius: var(--ef-site-section-radius) !important;
    }
}

/* Mantem a folga dourada simetrica em torno da bolinha deslizante. */
.hero-empresafora__cta::before {
    width: min(100%, calc(var(--slide-fill-width) + 9px)) !important;
}

/* Desce o conteudo da hero inicial de forma proporcional apenas no mobile. */
@media (max-width: 767px) {
    body.home .ef-home-hero {
        padding-top: clamp(68px, 11vh, 104px) !important;
    }

    body.home .ef-home-hero .hero-empresafora__description {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.home .ef-home-hero .ef-home-stats--hero {
        margin-top: clamp(110px, 18vh, 160px) !important;
    }
}

/* Centraliza a logo no cabecalho mobile e preserva o menu a direita. */
@media (max-width: 767px) {
    body .ef-header .ef-header__container {
        position: relative !important;
        min-height: 56px !important;
    }

    body .ef-header .ef-header__logo {
        position: absolute !important;
        left: 50% !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
    }

    body .ef-header .block-header__hamburger-menu {
        position: absolute !important;
        left: auto !important;
        right: 16px !important;
    }
}

/* Mantem o menu como tres barras horizontais em qualquer viewport. */
.ef-header .ef-header__hamburger span,
.ef-header .block-header__hamburger-menu span {
    display: block !important;
    width: 28px !important;
    height: 3px !important;
    border-radius: 2px !important;
}

/* O cabeçalho faz parte visualmente do bloco escuro inicial. */
@media (min-width: 993px) {
    body.home .ef-header,
    body:not(.home):not(.ef-form-page-body):has(main.leia-post) .ef-header {
        position: absolute !important;
        top: var(--ef-site-section-gap) !important;
        left: 50% !important;
        z-index: 2000 !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        background: transparent !important;
        border: 0 !important;
    }

    body.home .ef-home,
    body:not(.home):not(.ef-form-page-body):has(main.leia-post) main.leia-post {
        margin-top: var(--ef-site-section-gap) !important;
    }

    body.home .ef-home-hero,
    body:not(.home):not(.ef-form-page-body):has(main.leia-post) .leia-post__article > section:first-of-type {
        border-top-left-radius: var(--ef-site-section-radius) !important;
        border-top-right-radius: var(--ef-site-section-radius) !important;
    }
}
