:root {
    --azul: #1D3557;
    --azul2: #457B9D;
    --cinza: #f5f6f8;
    --texto: #273043;
    --vermelho: #C1121F;

    /* Nova variável para opacidade do overlay das seções (ajuste aqui: 0.0 = transparente, 1.0 = opaco) */
    --section-bg-opacity: 0.7;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
    color: var(--texto);
    line-height: 1.6;
    background: #fff;
    overflow-x: hidden
}

a {
    color: inherit
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px
}

/* Header - Desktop e Mobile */
header.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fffcc;
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid #e6e8ee;
    transition: background-color 0.3s ease
}

header.scrolled {
    background: #fff
}

header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease
}

.brand:hover {
    transform: scale(1.05)
}

.logo {
    max-width: 60px;
    height: auto;
    transition: transform 0.3s ease;
    display: block
}

.logo:hover {
    transform: scale(1.05)
}

/* Alinhamento perfeito: menu e botão na mesma linha de base */
nav.desktop {
    display: flex;
    gap: 28px;
    align-items: center;           /* <-- essencial */
    height: 100%;
}

nav.desktop a:not(.btn) {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 0;                /* dá espaço vertical consistente */
    position: relative;
}

nav.desktop a:not(.btn):hover {
    color: var(--azul);
}

/* Hover com linha inferior sutil */
nav.desktop a:not(.btn):after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 2px;
    left: 50%;
    background: var(--azul);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav.desktop a:not(.btn):hover:after {
    width: 70%;
}

/* Nav Mobile (Hamburger) */
.nav-mobile {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e6e8ee;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px 0
}

.nav-mobile.active {
    display: flex
}

.nav-mobile a {
    margin: 10px 20px;
    text-decoration: none;
    color: #475569;
    display: block;
    padding: 10px 0;
    transition: color 0.3s ease
}

.nav-mobile a:hover {
    color: var(--azul)
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    gap: 4px;
    display: none
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--azul);
    transition: 0.3s ease;
    border-radius: 2px
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px)
}

.hamburger.active span:nth-child(2) {
    opacity: 0
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px)
}

.sub-brand {
    font-size: 12px;
    color: #64748b;
    letter-spacing: .04em
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: var(--azul);
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    font-size: 14px
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 53, 87, 0.3)
}

.btn.sec {
    background: #fff;
    color: var(--azul);
    border-color: var(--azul)
}

.btn.sec:hover {
    background: var(--azul2);
    color: #fff
}

.btn.mobile-full {
    width: 100%;
    text-align: center;
    color: #fff;
    margin: 10px 0
}

/* Hero - Desktop e Mobile */
.hero {
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
}

.hero .container {
    padding: 70px 20px;
    position: relative;
    z-index: 1;
    text-align: center
}

.hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.15;
    margin: 0 0 8px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.5s
}

.hero p {
    max-width: 700px;
    margin: 8px auto 20px;
    color: #e5e7eb;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.7s
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.9s;
    justify-content: center
}

.stack .btn {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(0.1s * var(--i, 0))
}

/* Hero Slideshow */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.1) translateX(50px);
    transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
    z-index: -1;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1) translateX(0);
}

/* Indicadores (dots) */
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.indicator.active,
.indicator:hover {
    background: #fff;
}

/* Setas de navegação */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 2;
    display: none;
    /* Escondido por padrão no mobile */
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.hero-nav.prev {
    left: 20px;
}

.hero-nav.next {
    right: 20px;
}

/* Responsivo: Setas visíveis apenas em desktop */
@media (min-width: 769px) {
    .hero-nav {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-indicators {
        bottom: 10px;
    }

    .hero-nav {
        display: none !important;
        /* Força esconder no mobile */
    }
}

/* Sections - Geral */
section {
    padding: 48px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease
}

section.animate {
    opacity: 1;
    transform: translateY(0)
}

h2 {
    color: var(--azul);
    margin: 0 0 16px;
    font-size: clamp(24px, 3vw, 32px);
    position: relative;
    text-align: center
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--azul);
    margin: 8px auto 0;
    border-radius: 2px
}

/* Fundo para Quem Somos */
#quem-somos {
    background:
        /* Overlay semi-transparente */
        linear-gradient(rgba(255, 255, 255, var(--section-bg-opacity)), rgba(255, 255, 255, var(--section-bg-opacity))),
        /* Imagem de fundo */
        url('https://xsolidy.com.br/projetos/evandroadvocacia/imagens/quemsomos.webp') center/cover no-repeat fixed;
    position: relative;
    overflow: hidden;
}

/* Fundo para Áreas de Atuação (Como Podemos Te Ajudar) */
#areas {
    background:
        /* Overlay semi-transparente */
        linear-gradient(rgba(255, 255, 255, var(--section-bg-opacity)), rgba(255, 255, 255, var(--section-bg-opacity))),
        /* Imagem de fundo */
        url('https://xsolidy.com.br/projetos/evandroadvocacia/imagens/ajuda.webp') center/cover no-repeat fixed;
    position: relative;
    overflow: hidden;
    border-block: none;
    /* Remove a borda cinza existente para melhor integração */
}

/* Fundo para Contato */
#contato {
    background:
        /* Overlay semi-transparente */
        linear-gradient(rgba(255, 255, 255, var(--section-bg-opacity)), rgba(255, 255, 255, var(--section-bg-opacity))),
        /* Imagem de fundo */
        url('https://xsolidy.com.br/projetos/evandroadvocacia/imagens/contato.webp') center/cover no-repeat fixed;
    position: relative;
    overflow: hidden;
}

/* Ajuste para imagens internas das seções (para não conflitar com o fundo) */
#quem-somos .section-image,
#areas .card-image,
#contato .section-image {
    position: relative;
    z-index: 2;
    /* Garante que fiquem acima do fundo */
}

/* Responsivo: Fundo fixo apenas em desktop para evitar problemas de performance no mobile */
@media (max-width: 768px) {

    #quem-somos,
    #areas,
    #contato {
        background-attachment: scroll;
        /* Muda para scroll no mobile */
    }
}

/* Imagens em seções */
.section-image {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease
}

section.animate .section-image {
    opacity: 1;
    transform: translateY(0)
}

.card-image {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    margin: -24px -24px 16px -24px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.3s
}

/* Grid - Responsive */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 24px
    }
}

.card {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    perspective: 1000px;
    overflow: hidden
}

.card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1)
}

.card ul {
    margin: 0;
    padding-left: 20px
}

.card li {
    margin-bottom: 8px;
    list-style-type: none;
    position: relative;
    padding-left: 20px;
    transition: opacity 0.3s ease
}

.card li:hover {
    opacity: 0.8
}

.card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--azul2);
    font-weight: bold
}

.muted {
    color: #64748b;
    text-align: center
}

/* Áreas Section */
.areas {
    background: var(--cinza);
    border-block: 1px solid #e6e8ee
}

/* Contato - Mobile */
#contato .container>p {
    margin-bottom: 16px
}

@media (max-width: 768px) {
    #contato .container>p {
        font-size: 16px
    }
}

/* Footer */
footer {
    border-top: 1px solid #e6e8ee;
    padding: 26px 0;
    color: #6b7280;
    font-size: 14px;
    text-align: center
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px
}

::-webkit-scrollbar-track {
    background: #f1f1f1
}

::-webkit-scrollbar-thumb {
    background: var(--azul2);
    border-radius: 4px
}

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

/* Media Queries para Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 15px
    }

    header .wrap {
        padding: 10px 0
    }

    .hamburger {
        display: flex
    }

    nav.desktop {
        display: none
    }

    .nav-mobile a {
        font-size: 16px
    }

    .hero .container {
        padding: 50px 15px
    }

    .hero h1 {
        margin-bottom: 16px
    }

    .stack {
        flex-direction: column;
        align-items: center
    }

    .stack .btn {
        width: 100%;
        max-width: 280px
    }

    section {
        padding: 40px 0
    }

    .card {
        padding: 20px
    }

    .card h3 {
        font-size: 20px
    }

    .card li {
        font-size: 15px;
        padding-left: 16px;
        margin-bottom: 12px
    }

    .section-image {
        height: 250px
    }

    .card-image {
        height: 180px;
        margin: -20px -20px 16px -20px
    }

    footer {
        padding: 20px 0;
        font-size: 13px
    }

    .logo {
        max-width: 50px
    }
}

@media (max-width: 480px) {
    .hero .container {
        padding: 40px 15px
    }

    h2 {
        font-size: 22px
    }

    .grid {
        gap: 20px
    }

    .card {
        padding: 18px
    }

    .section-image {
        height: 200px
    }

    .card-image {
        height: 150px
    }

    .logo {
        max-width: 45px
    }
}
.whatsapp-btn-flutuante {
    /* Posicionamento Fixo */
    position: fixed;
    bottom: 20px;   /* Distância do rodapé */
    right: 20px;    /* Distância da direita */
    z-index: 9999;  /* Garante que fique sempre por cima de tudo */

    /* Estilo do Círculo */
    width: 60px;    /* Largura do botão */
    height: 60px;   /* Altura do botão */
    background-color: #25d366; /* Cor verde oficial do WhatsApp */
    border-radius: 50%; /* Deixa o botão perfeitamente redondo */
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2); /* Sombra suave para dar destaque */

    /* Centralizar o Ícone SVG */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Transição suave para o efeito de passar o mouse */
    transition: all 0.3s ease;
    text-decoration: none; /* Remove sublinhado de link padrão */
}

/* Efeito opcional ao passar o mouse em cima */
.whatsapp-btn-flutuante:hover {
    background-color: #20b358; /* Um verde ligeiramente mais escuro */
    transform: scale(1.1);     /* Aumenta o botão em 10% */
    box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3);
}