/* ==========================================================================
   ESTILOS GLOBAIS E COMPONENTES (style.css)
   ========================================================================== */

/* --- CONFIGURAÇÕES GLOBAIS E VARIÁVEIS --- */
:root {
    /* Paleta de Cores */
    --azul-escuro: #0D2C54;
    --verde-acao: #00A86B;
    --branco-puro: #FFFFFF;
    --cinza-azulado: #F0F4F8;
    --cinza-texto: #212529;
    --cinza-texto-claro: #6c757d;

    /* Tipografia */
    --font-base: 'Inter', sans-serif;
    --font-heading: 'Montserrat', sans-serif;

    /* Espaçamento */
    --section-padding: clamp(3rem, 8vw, 6rem);
    --container-width: 1200px;
    --container-padding: 1rem;
}

/* --- RESET BÁSICO E ESTILOS DE BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

::-webkit-scrollbar {
    width: 10px; /* Largura da barra de rolagem */
}

::-webkit-scrollbar-track {
    background: var(--cinza-azulado); /* Cor do fundo da barra */
}

::-webkit-scrollbar-thumb {
    background: var(--azul-escuro); /* Cor do "polegar" da barra */
    border-radius: 5px; /* Bordas arredondadas */
    border: 2px solid var(--cinza-azulado); /* Borda para dar um efeito de respiro */
}

::-webkit-scrollbar-thumb:hover {
    background: #0F3A70; /* Cor um pouco mais clara ao passar o mouse */
}


body {
    font-family: var(--font-base);
    color: var(--cinza-texto);
    background-color: var(--branco-puro);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    scrollbar-width: thin; /* ou 'auto' */
    scrollbar-color: var(--azul-escuro) var(--cinza-azulado); /* Cor do polegar e do fundo */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* --- COMPONENTES REUTILIZÁVEIS --- */

/* Cabeçalho */
.site-header {
    background-color: var(--branco-puro);
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-weight: 500;
    padding: 0.5rem 0;
    color: var(--cinza-texto);
    position: relative;
}

.main-nav a.active, .main-nav a:hover {
    color: var(--azul-escuro);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--azul-escuro);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-heading);
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-header {
    background-color: var(--verde-acao);
    color: var(--branco-puro);
}

.btn-principal {
    background-color: var(--verde-acao);
    color: var(--branco-puro);
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* Cabeçalho de Seção */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    background-color: var(--cinza-azulado);
    color: var(--cinza-texto-claro);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    color: var(--azul-escuro);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--cinza-texto-claro);
    line-height: 1.7;
}


/* Footer */
.site-footer-main {
    background-color: var(--azul-escuro);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 3rem;
    padding-bottom: 4rem;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1.5rem;
}
.footer-col-about p {
    max-width: 35ch;
    margin-bottom: 1.5rem;
}
.footer-socials {
    display: flex;
    gap: 1rem;
}
.footer-socials a {
    color: var(--branco-puro);
    transition: transform 0.2s ease;
}
.footer-socials a:hover {
    transform: scale(1.1);
    opacity: 1;
}

.footer-col-links h4, .footer-col-contact h4 {
    font-family: var(--font-heading);
    color: var(--branco-puro);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-col-links ul, .footer-col-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.footer-col-links a:hover, .footer-col-contact a:hover {
    color: var(--branco-puro);
    opacity: 1;
}

.footer-col-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.footer-col-contact svg {
    margin-top: 4px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- RESPONSIVIDADE GLOBAL --- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col-about p { margin-left: auto; margin-right: auto; }
    .footer-socials, .footer-col-links ul, .footer-col-contact ul { justify-content: center; }
    .footer-col-contact li { text-align: left; }
}

/* --- COMPONENTE: FAQ (Dúvidas Frequentes) --- */
#faq {
    background-color: var(--cinza-azulado);
    padding: var(--section-padding) 0;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.5' d='M0,160L48,176C96,192,192,224,288,218.7C384,213,480,171,576,144C672,117,768,107,864,128C960,149,1056,203,1152,213.3C1248,224,1344,192,1392,176L1440,160L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: flex-start;
}

.faq-cta-card {
    background-color: var(--branco-puro);
    border-radius: 12px;
    padding: 2rem;
    border-left: 5px solid var(--verde-acao);
    box-shadow: 0 5px 25px rgba(0, 64, 133, 0.07);
    position: sticky; /* Efeito "flutuante" ao rolar a página */
    top: 120px;
}
.faq-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background-color: #e9f7ec;
    margin-bottom: 1.5rem;
}
.faq-icon-wrapper img {
    width: 28px; height: 28px;
}
.faq-cta-card h3 {
    color: var(--cinza-texto);
    margin-bottom: 0.5rem;
}
.faq-cta-card p {
    color: var(--cinza-texto-claro);
    margin-bottom: 1.5rem;
}
.faq-cta-link {
    color: var(--verde-acao);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-content .section-header {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}
.faq-content .section-header p {
    max-width: 60ch;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    background-color: var(--branco-puro);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 64, 133, 0.05);
    border: 1px solid #e9ecef;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--azul-escuro);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.faq-icon::before, .faq-icon::after {
    content: '';
    position: absolute;
    background-color: var(--azul-escuro);
    border-radius: 2px;
    transition: transform 0.3s ease;
}
.faq-icon::before {
    width: 100%;
    height: 3px;
    top: 50%;
    transform: translateY(-50%);
}
.faq-icon::after {
    width: 3px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.faq-answer p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--cinza-texto-claro);
}
.faq-item.active .faq-answer {
    max-height: 500px; /* Um valor alto para permitir a transição */
    transition: max-height 0.5s ease-in, padding 0.4s ease-out;
}

/* Responsividade do FAQ */
@media(max-width: 992px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
    .faq-cta-card {
        position: static; /* Remove o efeito sticky */
        margin-bottom: 3rem;
    }
    .faq-content .section-header {
        text-align: center;
    }
    .faq-content .section-header p {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- COMPONENTE: CTA FINAL PERSONALIZADO --- */
#cta-final {
    background-color: var(--cinza-azulado);
    padding: var(--section-padding) 0;
}

.cta-final-card {
    background-color: var(--branco-puro);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 8px 30px rgba(0, 64, 133, 0.08);
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: 2rem;
}

.cta-final-text h2 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: var(--cinza-texto);
    margin-bottom: 1rem;
}

.cta-final-text p {
    color: var(--cinza-texto-claro);
    max-width: 50ch;
    margin-bottom: 2rem;
}

.cta-final-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.cta-final-buttons .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.cta-final-image {
    justify-self: center; /* Centraliza a imagem em sua célula */
}

.cta-final-image img {
    border-radius: 12px;
    max-width: 250px;
}

/* Responsividade do CTA Final */
@media (max-width: 768px) {
    .cta-final-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .cta-final-text p {
        margin-left: auto;
        margin-right: auto;
    }
    .cta-final-buttons {
        justify-content: center;
    }
    .cta-final-image {
        order: -1; /* Move a imagem para cima no mobile */
        margin-bottom: 2rem;
    }
}

/* --- ESTILOS DO MENU MOBILE E AJUSTES NO HEADER --- */

/* Agrupa os botões do header para melhor controle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Botão do Menu Mobile (Hambúrguer) */
.mobile-menu-btn {
    display: none; /* Escondido em telas grandes */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001; /* Garante que fique acima de outros elementos */
}

.mobile-menu-btn .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--azul-escuro);
    transition: all 0.3s ease-in-out;
}


/* --- RESPONSIVIDADE GLOBAL (Ajustes para mobile) --- */
@media (max-width: 1024px) {
    .header-container {
        /* Garante que o espaçamento funcione bem com o menu mobile */
        justify-content: space-between;
    }

    /* Esconde a navegação principal e mostra o botão hambúrguer */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Começa fora da tela */
        width: 80%;
        max-width: 320px;
        height: 100%;
        background-color: var(--azul-escuro);
        padding-top: 6rem;
        transition: right 0.4s ease-in-out;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .main-nav.active {
        right: 0; /* Move o menu para dentro da tela */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        color: var(--branco-puro);
        display: block;
        padding: 1rem 2rem;
        text-align: center;
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .main-nav a:hover,
    .main-nav a.active {
        background-color: var(--verde-acao);
        color: var(--branco-puro);
    }
    .main-nav a::after {
        display: none; /* Remove a linha de ativo no mobile */
    }

    .mobile-menu-btn {
        display: block; /* Mostra o botão hambúrguer */
    }

    /* Esconde o texto do botão "Chamar agora" */
    .btn-header-text {
        display: none;
    }

    /* Ajusta o padding do botão para ficar mais quadrado */
    .btn-header {
        padding: 0.75rem;
    }

    /* Animação do Hambúrguer para "X" quando o menu está ativo */
    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Muda a cor das barras para branco quando o menu está ativo */
    .mobile-menu-btn.active .bar {
        background-color: var(--branco-puro);
    }

    /* Overlay para escurecer o fundo quando o menu estiver aberto */
    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
    }
}

/* --- ESTILOS PARA ÍCONES SVG SPRITE --- */

/* Estilo padrão para os SVGs nos wrappers maiores */
.servico-icon-wrapper svg {
    width: 36px;
    height: 36px;
    color: var(--azul-escuro); /* Cor padrão */
}

/* Ajusta a cor para os cards verdes */
.card-green .servico-icon-wrapper svg {
    color: var(--verde-acao);
}

/* Estilo padrão para os ícones menores em listas */
.feature-item svg,
.servico-features svg,
.infra-features-list svg,
.infra-selos svg,
.bairros-lista svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Cores específicas onde necessário */
.feature-item svg {
    color: var(--verde-acao);
}

.card-green .servico-features svg {
    color: var(--verde-acao);
}
.card-blue .servico-features svg {
    color: var(--azul-escuro);
}