/* Reset, Variáveis e Estilos Base */
:root {
    --primary-color: #4a7c59;
    --primary-dark-color: #2c5530;
    --accent-color: #25D366;
    --accent-hover-color: #128C7E;

    --text-dark: #333;
    --text-light: #666;
    --text-on-dark-bg: #ccc;
    --text-on-primary-bg: #fff;

    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --white: #fff;
    --white-t-95: rgba(255, 255, 255, 0.95);
    --black-t-40: rgba(0, 0, 0, 0.4);

    --font-primary: 'Poppins', sans-serif;
    --header-height: 92px; /* Aprox. 60px logo + 2rem padding */

    --border-radius: 15px;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Melhora de acessibilidade: Respeita a preferência do usuário por movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    /* overflow-x: hidden; foi removido. É melhor encontrar e corrigir o elemento que causa o overflow horizontal do que escondê-lo. Se o problema persistir, esta linha pode ser reativada temporariamente. */
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    z-index: 1000;
    padding: 1rem 0; /* 1rem = 16px. 16+16+50(logo) = 82px */
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

/* Estilo do header quando a página é rolada (adicionar classe .scrolled via JS) */
.header.scrolled {
    background: var(--white-t-95);
    -webkit-backdrop-filter: blur(10px); /* Suporte para Safari */
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Espaço entre o emblema e o texto */
}

.logo .logo-emblem {
    height: 60px;
    width: auto;
    transition: filter 0.4s ease;
    filter: brightness(0) invert(1) drop-shadow(1px 1px 2px rgba(0,0,0,0.6));
}

.logo .logo-text {
    height: 21px; /* Altura ajustada para o texto para manter a proporção */
    width: auto;
    transition: filter 0.4s ease;
    filter: brightness(0) invert(1) drop-shadow(1px 1px 2px rgba(0,0,0,0.6));
}

.header.scrolled .logo .logo-emblem,
.header.scrolled .logo .logo-text {
    filter: none;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: color 0.4s ease, text-shadow 0.4s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.nav a:hover, .nav a:focus-visible {
    color: #ddd; /* Cor de hover mais clara para o estado transparente */
}

.header.scrolled .nav a {
    color: var(--text-dark);
    text-shadow: none;
}

.header.scrolled .nav a:hover,
.header.scrolled .nav a:focus-visible {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    z-index: 1030; /* Garante que o toggle fique acima do menu aberto */
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: all 0.3s ease-in-out;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.header.scrolled .mobile-menu-toggle span {
    background: var(--text-dark);
    box-shadow: none;
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.header.scrolled .mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh; /* Fallback para navegadores mais antigos */
    min-height: 100dvh; /* Altura dinâmica do viewport, melhor para mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black-t-40);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    /* A largura e o padding agora são controlados pelo .container interno,
       evitando regras duplicadas e simplificando o layout. */
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: var(--text-dark); /* Alterado para --text-dark para melhor contraste com --accent-color */
    /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25); /* Removido pois o texto agora é escuro */
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px; /* Mantido pois é um estilo específico do botão */
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    justify-content: center; /* Garante o alinhamento do ícone e texto */
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.cta-button:hover, .cta-button:focus-visible {
    background: var(--accent-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.cta-button i {
    font-size: 1.2em; /* Deixa o ícone um pouco maior que o texto */
    line-height: 1;
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-dark-color);
}

.section-intro {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Solutions Section */
.solutions {
    padding: 5rem 0;
    background: var(--bg-light);
}

.benefits-grid {
    display: flex; /* Alterado de grid para flex */
    flex-wrap: wrap; /* Permite que os itens quebrem para a próxima linha */
    justify-content: center; /* Centraliza os itens quando eles quebram */
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card {
    flex: 1 1 300px; /* flex-grow, flex-shrink, flex-basis: tamanho base de 300px */
    max-width: 350px; /* Largura máxima para os cards em telas maiores, para não esticarem demais */
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #6b8e23);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--white);
    font-size: 2rem;
}

.benefit-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark-color);
}

.benefit-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Specialties Section */
.specialties {
    padding: 5rem 0;
}

.specialties-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}


.specialty-card {
    flex: 1 1 350px; /* Permite que o card cresça e encolha, com base de 350px */
    max-width: 400px; /* Evita que os cards fiquem excessivamente largos em telas de tablet */
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.specialty-image {
    height: 200px;
    overflow: hidden;
}

.specialty-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.specialty-card:hover .specialty-image img {
    transform: scale(1.05);
}

.specialty-content {
    padding: 1.5rem;
}

.specialty-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark-color);
}

.specialty-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Consultoria Section */
.consultoria-content {
    display: grid;
    /* margin-top: 5rem; /* Removido pois a seção #consultoria agora tem seu próprio padding via classe .specialties */
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.consultoria-text h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark-color);
}

.consultoria-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.consultoria-list {
    list-style: none;
}

.consultoria-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.consultoria-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.consultoria-text .cta-button {
    margin-top: 1.5rem; /* Adds space between the list and the button */
}

.consultoria-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.consultoria-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Faixa Imagine seu espaço ideal */
.imagine-banner {
    position: relative;
    width: 100%;
    min-height: 400px; /* Altura ajustada para desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.imagine-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.45) saturate(1.1) contrast(1.08);
}
.imagine-banner-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 3rem 1.5rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}
.imagine-banner-content h2 {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.45);
}
.imagine-banner-content p {
    font-size: 1.25rem;
    font-weight: 400;
    text-shadow: 1px 1px 8px rgba(0,0,0,0.35);
    max-width: 700px;
    margin: 0 auto;
}

.imagine-banner-content .cta-button {
    margin-top: 2rem;
}

/* Final CTA Section */
.final-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-dark-color), var(--primary-color));
    color: var(--white);
    text-align: center;
}

.final-cta h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.final-cta .cta-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 700px;
    margin: 0 auto;
}

.final-cta .cta-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.final-cta .cta-box .cta-subtext {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

/*
.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 105px;
    width: auto;
}
*/

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--text-dark);
    color: #999;
}

/* =============================================== */
/* Responsive Design (Consolidado e Organizado) */
/* =============================================== */

/* Tablet - 992px e abaixo */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .consultoria-content {
        gap: 2rem;
    }
}

/* Mobile - 768px e abaixo */
@media (max-width: 768px) {
    /* Header & Nav */
    /* Seção de Especialidades no mobile: */
    .specialties .container {
        padding: 0 15px; /* Reduz o padding do container para os cards terem mais espaço */
    }

    .header .container {
        position: relative; /* Para o z-index do toggle funcionar corretamente */
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh; /* Usa a altura total da tela */
        background: var(--white-t-95);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center; /* Centraliza os itens verticalmente */
        align-items: center;
        gap: 1.5rem; /* Espaçamento entre os links */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        z-index: 1020;
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
    }

    .nav a {
        color: var(--text-dark); /* Cor do texto no menu aberto */
        text-shadow: none;
        font-size: 1.5rem; /* Tamanho maior para melhor toque */
        font-weight: 500;
        padding: 0.5rem 1rem;
        transition: color 0.3s ease;
    }
    .nav a:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        /* position: absolute; garante que o botão role junto com o header,
           em vez de ficar fixo na tela. */
        position: absolute;
        right: 20px;
    }

    .logo .logo-emblem {
        height: 40px; /* Reduzido mais 20% */
    }

    .logo .logo-text {
        height: 14px; /* Altura reduzida para mobile */
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* Botão CTA Geral */
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Títulos de Seção */
    .section-title {
        font-size: 2rem;
    }

    /* Grids */
    /* Ajustes específicos para a Seção de Soluções no mobile */
    .solutions .container {
        padding: 0 15px; /* Reduz o padding horizontal para dar mais largura aos cards */
    }
    .benefits-grid {
        /* Não é mais necessário grid-template-columns: 1fr; pois agora é flex e quebra automaticamente */
    }
    .benefit-card {
        max-width: none; /* Permite que os cards ocupem toda a largura disponível no mobile */
    }
    .specialty-card {
        max-width: none; /* Permite que os cards de especialidade também ocupem toda a largura */
    }
    
    .consultoria-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .consultoria-text {
        text-align: center;
    }

    .consultoria-list {
        display: inline-block; /* Para centralizar o bloco da lista */
        text-align: left; /* Para alinhar o texto dos itens à esquerda */
    }

    /* Banner "Imagine" */
    .imagine-banner {
        min-height: 350px;
    }
    .imagine-banner-content {
        padding: 0 1.5rem; 
    }
    .imagine-banner-content h2 {
        font-size: 1.8rem;
    }
    .imagine-banner-content p {
        font-size: 1.1rem;
    }

    /* CTA Final */
    .final-cta h2 {
        font-size: 2rem;
    }
    .final-cta .cta-box h3 {
        font-size: 1.5rem;
    }
    .final-cta .cta-box {
        padding: 1.5rem;
    }

    /* Botão Flutuante WhatsApp */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float i {
        font-size: 1.6rem;
    }
}

/* Mobile Pequeno - 480px e abaixo */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.25;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    /* Ajustes específicos para a Seção de Soluções em mobile muito pequeno */
    .solutions .container {
        padding: 0 10px; /* Ainda menos padding para telas muito pequenas */
    }
    .specialties .container {
        padding: 0 10px; /* E também para a seção de especialidades */
    }
    .imagine-banner-content h2 {
        font-size: 1.5rem;
    }
    .imagine-banner-content p {
        font-size: 1rem;
    }
}

/* Animações (controladas por JS com Intersection Observer) */
.animated-item,
.benefit-card,
.specialty-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animated-item.visible,
.benefit-card.visible,
.specialty-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animação do ícone do menu mobile (classe .active adicionada via JS) */
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Keyframe animation for the pulse effect */
@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    }
    10% {
        transform: scale(1.1);
        filter: drop-shadow(0 6px 20px rgba(37, 211, 102, 0.4));
    }
    20% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    z-index: 1010;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pulse 5s infinite ease-in-out;
}

.whatsapp-float i {
    font-size: 2rem;
}

.whatsapp-float:hover, .whatsapp-float:focus-visible {
    animation: none; /* Stop the animation on hover/focus */
    background-color: var(--accent-hover-color);
    transform: scale(1.1);
}
