/* ===========================
   RESET & BASE
=========================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Cores principais */
    --navy: #032446;
    /* azul institucional — header, títulos, fundo navy */
    --navy-md: #0d3a6e;
    /* azul médio — hover de botões navy */
    --dark: #010e1a;
    /* quase preto — fundo do footer */

    /* Cores de destaque */
    --gold: #c98d23;
    /* dourado — botões, labels, destaques */
    --gold-lt: #e0a830;
    /* dourado claro — hover, destaques em fundo escuro */

    /* Cores neutras */
    --white: #ffffff;
    --gray-lt: #f4f6f9;
    /* cinza claro — fundo de seções alternadas */
    --gray: #6b7280;
    /* cinza — texto secundário, parágrafos */

    /* Tipografia */
    --font-title: 'Montserrat', sans-serif;
    /* títulos e headings */
    --font: 'Inter', sans-serif;
    /* corpo e parágrafos */

    /* Utilitários */
    --radius: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, .10);

    /* JN Advocacia */
    --jna-dark: #010e1a;
    --jna-gold: #d49c37;
    --jna-gold-lt: #e8b54a;

    /* NACEF Contabilidade */
    --nc-blue: #14466d;
    --nc-orange: #ff9c36;
    --nc-orange-lt: #ffb055;
}

@supports (overflow-x: clip) {
    html {
        overflow-x: clip;
    }

    /* clip não vira scroll container; hidden quebraria ScrollTrigger */
}

body {
    overflow-x: hidden;
    font-family: var(--font-title); /* Montserrat — fonte padrão do projeto */
    font-size: 16px;
    color: #1f2937;
    line-height: 1.6;
    background: var(--white);
}

/* Inter — parágrafos, textos institucionais, descrições, cards, rodapé e blog */
p,
li,
.site-footer,
.blog-card__excerpt,
.blog-hero__sub,
.single-post__body,
input,
textarea,
select {
    font-family: var(--font); /* Inter */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-title);
    overflow-wrap: break-word;
    word-break: break-word;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
}

.highlight {
    color: var(--gold);
}

/* Section label */
.section-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 12px;
}

/* ===========================
   SCROLLBAR CUSTOMIZADA
=========================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-lt);
}

::-webkit-scrollbar-thumb {
    background: var(--navy);
    border-radius: 5px;
    border: 2px solid var(--gray-lt);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--navy) var(--gray-lt);
}

/* ===========================
   SCROLL REVEAL ANIMATIONS
=========================== */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Barra de progresso no topo */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(to right, var(--gold), var(--gold-lt));
    z-index: 9999;
    transition: width .1s linear;
}

/* Float suave nos ícones do "por que" */
@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.porque-card:hover .porque-icone img {
    animation: float-icon .9s ease-in-out infinite;
}



/* Glow no botão CTA ao hover */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .25) 50%, rgba(255, 255, 255, 0) 70%);
    transform: translateX(-100%);
    transition: transform .5s ease;
}

.btn-primary:hover::after {
    transform: translateX(100%);
}

/* Pulse no botão WhatsApp flutuante */
@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, .5);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-float {
    animation: wa-pulse 2.5s ease-out infinite;
}

/* Slide reveal nos itens de footer */
.footer-col li {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity .4s ease, transform .4s ease;
}

.footer-col.visible li {
    opacity: 1;
    transform: translateX(0);
}

.footer-col.visible li:nth-child(1) {
    transition-delay: .05s;
}

.footer-col.visible li:nth-child(2) {
    transition-delay: .12s;
}

.footer-col.visible li:nth-child(3) {
    transition-delay: .19s;
}

.footer-col.visible li:nth-child(4) {
    transition-delay: .26s;
}

/* ── ANIMAÇÕES EXTRAS ── */

/* Icones dos números giram ao entrar */
@keyframes spin-in {
    from {
        transform: rotate(-90deg) scale(0);
        opacity: 0;
    }

    to {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

.numero-item.visible .numero-icone img {
    animation: spin-in .7s cubic-bezier(.34, 1.56, .64, 1) both;
}


/* Section labels — animação só ativa se GSAP não carregou */
@keyframes label-pop {
    from {
        opacity: 0;
        transform: scaleX(0);
    }

    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.section-label {
    display: inline-block;
    transform-origin: left;
}

body:not(.gsap-ready) .section-label {
    animation: label-pop .5s ease both;
}

/* Hover nos cards do "Por que": ícone cresce */
.porque-icone {
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.porque-card:hover .porque-icone {
    transform: scale(1.18);
}


/* ===========================
   BUTTONS
=========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    transition: all .2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.btn-primary:hover {
    background: var(--gold-lt);
    border-color: var(--gold-lt);
    color: var(--white);
}

.btn-navy {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.btn-navy:hover {
    background: var(--navy-md);
    border-color: var(--navy-md);
    color: var(--white);
}


.btn-lg {
    padding: 16px 44px;
    font-size: 17px;
}

/* ===========================
   HEADER
=========================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg, var(--navy));
    box-shadow: 0 2px 16px rgba(0, 0, 0, .20);
    transition: box-shadow .3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.site-logo img {
    height: 116px;
    width: auto;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: .5px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-list>li {
    position: relative;
}

.nav-list a {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    transition: color .2s, background .2s;
    display: block;
}

.nav-list a:hover {
    color: var(--gold-lt);
}

/* Dropdown submenu — funciona tanto com o fallback (.submenu/.has-submenu)
   quanto com o menu WordPress (.sub-menu/.menu-item-has-children) */
.submenu,
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .15);
    min-width: 200px;
    padding: 8px 0;
    margin-top: 0;
    z-index: 200;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

/* pseudo-elemento que cobre o gap e não deixa o hover escapar */
.has-submenu::after,
.menu-item-has-children::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 8px;
}

.submenu li a,
.sub-menu li a {
    color: var(--navy);
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0;
}

.submenu li a:hover,
.sub-menu li a:hover {
    background: var(--gray-lt);
    color: var(--gold);
}

.has-submenu:hover .submenu,
.has-submenu:hover .sub-menu,
.menu-item-has-children:hover .submenu,
.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(8px);
}

/* Botão de toggle do submenu no fallback — aparência igual ao link do nav */
.nav-list .submenu-toggle {
    display: block;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color .2s, background .2s;
    width: 100%;
    text-align: left;
}

.nav-list .submenu-toggle:hover {
    color: var(--gold-lt);
}

.nav-list .btn-header {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--gold);
    padding: 8px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: all .2s;
}

.nav-list .btn-header:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all .3s;
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, .8);
}

.footer-top {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 64px;
    padding: 64px 0 48px;
}

.footer-brand p {
    margin-top: 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .09);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .6);
    transition: background .2s, color .2s, transform .2s;
}

.footer-social a:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-lt);
    margin-bottom: 18px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    transition: color .2s;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.footer-col a svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 24px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, .35);
}

/* ===========================
   WHATSAPP FLOATING BUTTON
=========================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: var(--white);
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    box-shadow: 0 4px 20px rgba(37, 211, 102, .45);
    transition: transform .25s, box-shadow .25s;
}

.whatsapp-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(37, 211, 102, .55);
    color: var(--white);
}

/* ===========================
   RESPONSIVO — GLOBAL
=========================== */

/* ─── Large Desktop (≥1400px) ─── */
@media (min-width: 1400px) {
    .container {
        max-width: 1360px;
    }

    .section-header h2 {
        font-size: 2.6rem;
    }
}

/* ─── Ultra-wide (≥1920px) ─── */
@media (min-width: 1920px) {
    .container {
        max-width: 1700px;
    }

    .section-header h2 {
        font-size: 3rem;
    }

    .site-logo img {
        height: 140px;
    }

    body {
        font-size: 17px;
    }
}

/* ─── Tablet Landscape (≤1024px) ─── */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── Tablet Portrait / Mobile (≤768px) ─── */
@media (max-width: 768px) {

    /* Header */
    .menu-toggle {
        display: flex;
    }

    .site-logo img {
        height: 52px;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--navy);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
        padding: 16px;
        z-index: 100;
    }

    .site-nav.open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .nav-list a {
        display: block;
        width: 100%;
        padding: 12px 16px;
    }

    .submenu,
    .sub-menu {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, .05);
        display: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .has-submenu.open .submenu,
    .has-submenu.open .sub-menu,
    .menu-item-has-children.open .sub-menu {
        display: block;
    }

    .nav-list .submenu-toggle {
        padding: 12px 16px;
        width: 100%;
    }

    .submenu li a,
    .sub-menu li a {
        color: rgba(255, 255, 255, .7);
    }

    /* Tipografia mobile */
    .section-header h2 {
        font-size: clamp(1.35rem, 5.5vw, 1.75rem);
    }

    .section-header {
        margin-bottom: 36px;
    }

    /* Footer */
    .footer-top {
        gap: 32px;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

    /* WhatsApp — esconde texto, mostra só ícone */
    .whatsapp-float {
        padding: 10px 14px;
        font-size: 13px;
        gap: 0;
    }

    .whatsapp-float span {
        display: none;
    }
}

/* ─── Mobile Pequeno (≤480px) ─── */
@media (max-width: 480px) {

    /* Container mais apertado */
    .container {
        padding: 0 16px;
    }

    /* Footer */
    .footer-links {
        grid-template-columns: 1fr;
    }
}
