:root {
    --background-color: #121212;
    --primary-color: #9D4EDD;
    --text-color: #F5F5F5;
    --card-background: #1E1E1E;
    --border-color: #333;
    --swiper-theme-color: var(--primary-color);
    --swiper-pagination-bullet-inactive-color: #555;
}

/* --- RESET BÁSICO E ESTILOS GERAIS --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background-color: var(--background-color); color: var(--text-color); line-height: 1.6; }

/* --- UTILITÁRIOS E COMPONENTES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 100px 0; }
.section-title { font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 60px; color: var(--text-color); }
.section-title span { color: var(--primary-color); }
.cta-button { display: inline-block; background-color: var(--primary-color); color: white; padding: 15px 35px; font-size: 1.1rem; font-weight: 600; text-decoration: none; border-radius: 50px; transition: transform 0.3s ease, background-color 0.3s ease; cursor: pointer; }
.cta-button:hover, .cta-button:active { transform: scale(1.05); background-color: #b166f1; }


/* --- 1. SEÇÃO DE CAPA (HERO) - AJUSTADO PARA ANIMAÇÃO --- */
#hero {
    position: relative; /* Essencial para posicionar a animação dentro dele */
    overflow: hidden; /* Garante que a animação não vaze para fora */
    height: 90vh; 
    min-height: 700px; /* Aumentei um pouco para dar mais espaço à animação */
    display: flex;
    align-items: center;
    justify-content: center; /* Centraliza o .hero-content horizontalmente */
    background-color: var(--background-color); /* Fallback para caso o JS falhe */
}

/* Container da Animação (Fundo) */
#brain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Coloca o canvas na camada de trás */
}

/* Container do Conteúdo (Frente) */
.hero-content {
    position: relative;
    z-index: 2; /* Coloca o texto e botão na camada da frente */
    max-width: 1200px; /* Herda o limite do container */
    padding: 0 20px; /* Herda o espaçamento do container */
    width: 100%;
    text-align: left;
}

.hero-content h1 { 
    font-size: clamp(2.8rem, 6vw, 4rem); /* Fonte responsiva */
    font-weight: 700; 
    line-height: 1.2; 
    margin-bottom: 20px; 
    text-shadow: 0 0 20px rgba(0,0,0,0.7); /* Sombra para melhorar a legibilidade sobre a animação */
}

.hero-content h1 span { 
    color: var(--primary-color); 
}

.hero-content h2 { 
    font-size: clamp(1.1rem, 3vw, 1.5rem); /* Fonte responsiva */
    font-weight: 400; 
    max-width: 700px; 
    margin-bottom: 40px; 
    opacity: 0.9; 
    text-shadow: 0 0 15px rgba(0,0,0,0.5); /* Sombra para melhorar a legibilidade */
}

/* --- 2. SEÇÃO DE BENEFÍCIOS --- */
#beneficios {
    background-color: #1e1e1e;
}
#beneficios .section-title {
    text-align: center;
}
.benefits-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}
.benefit-card { 
    background-color: #080808;
    padding: 30px; 
    border-radius: 10px; 
    border-left: 4px solid var(--primary-color); 
    transition: transform 0.3s ease; 
    min-height: 220px; 
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.15); 
    cursor: pointer; 
}
.benefit-card:hover, .benefit-card:active { 
    transform: translateY(-10px); 
}
.benefit-card h3 { 
    font-size: 1.4rem; 
    margin-bottom: 10px; 
    color: var(--primary-color); 
}
.benefit-card p {
    color: #b3b3b3;
}


/* --- 3. SEÇÃO DE SERVIÇOS (CARROSSÉIS) --- */
#nossos-servicos {
    background-color: #080808;
}
#nossos-servicos .section-title { text-align: center; }
.service-category { margin-bottom: 80px; }
.service-category:last-child { margin-bottom: 0; } /* Remove a margem do último carrossel */

/* Título da categoria modificado */
.category-title { 
    font-size: 2rem; 
    color: var(--text-color); 
    text-align: center; 
    margin-bottom: 40px; 
    font-weight: 600; 
}

/* Regra para colorir a parte dentro do <span> */
.category-title span {
    color: var(--primary-color);
}

.service-slider { width: 100%; padding-bottom: 50px !important; }
.service-slider .swiper-slide { display: flex; justify-content: center; align-items: center; }
.portfolio-card { width: 100%; background-color: var(--card-background); border-radius: 12px; overflow: hidden; transition: transform 0.3s ease; box-shadow: 0 0 15px rgba(0,0,0,0.2); }
.portfolio-card img { width: 100%; height: auto; display: block; aspect-ratio: 4 / 5; object-fit: cover; }
.swiper-pagination-bullet { background: var(--swiper-pagination-bullet-inactive-color); width: 10px; height: 10px; opacity: 0.8; }
.swiper-pagination-bullet-active { background: var(--swiper-theme-color); }

/* Estrutura do slide para alinhar o link abaixo */
.service-slider .swiper-slide {
    display: flex;
    flex-direction: column; /* Empilha o card e o link verticalmente */
    align-items: center;
    justify-content: flex-start; /* Alinha no topo */
}

/* Estilo para o link abaixo do card */
.project-view-link {
    display: inline-block;
    margin-top: 20px; /* Espaço entre o card e o link */
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-view-link:hover {
    color: #ffffff; /* Muda para branco no hover */
    text-decoration: underline;
}


/* --- 4. SEÇÃO DE PLANOS FOCADA NOS SERVIÇOS --- */
#planos { 
    background-color: var(--card-background); 
}
.service-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px; 
    margin: 0 auto;
}
.service-plan-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}
.service-plan-card:hover, .service-plan-card:active {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.2);
}
.service-icon { width: 70px; height: 70px; margin: 0 auto 30px auto; background-color: var(--primary-color); color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.8rem; font-weight: 700; }
.service-plan-card h3 { font-size: 1.8rem; margin-bottom: 15px; color: var(--text-color); }
.service-plan-card p { color: #b3b3b3; min-height: 80px; }
.service-plan-card ul { list-style: none; margin: 30px 0 40px 0; text-align: left; flex-grow: 1; }
.service-plan-card ul li { margin-bottom: 12px; padding-left: 10px; }
.service-plan-card .cta-button { width: 100%; }

/* --- 5. SEÇÃO DE DEPOIMENTOS --- */
#depoimentos { 
    background-color: #1e1e1e;
}
.testimonial-carousel { max-width: 850px; margin: 0 auto; padding-bottom: 50px !important; overflow: hidden; }
.testimonial-carousel .swiper-slide { display: flex; justify-content: center; align-items: center; padding: 10px; }
.testimonial-card { background-color: #080808; padding: 40px; border-radius: 12px; border-top: 4px solid var(--primary-color); width: 100%; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2); text-align: left; }
.testimonial-card blockquote { font-size: 1.2rem; font-style: italic; color: #e0e0e0; line-height: 1.6; border-left: 3px solid var(--primary-color); padding-left: 20px; margin-bottom: 30px; position: relative; }
.testimonial-card blockquote::before { content: '“'; font-family: Georgia, serif; font-size: 4rem; color: var(--primary-color); opacity: 0.2; position: absolute; left: -15px; top: -15px; }
.testimonial-author { font-weight: 600; font-size: 1.1rem; color: var(--text-color); }
.testimonial-author span { display: block; font-weight: 400; font-size: 0.9rem; color: #aaa; margin-top: 5px; }

/* --- SEÇÃO DE FAQ --- */
#faq { background-color: var(--background-color); }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-color); padding: 20px 0; }
.faq-question { font-size: 1.2rem; font-weight: 600; cursor: pointer; position: relative; padding-right: 40px; }
.faq-question::after { content: '+'; color: var(--primary-color); font-size: 2rem; font-weight: 400; position: absolute; right: 0; top: 50%; transform: translateY(-50%); transition: transform 0.3s ease; }
.faq-item.active .faq-question::after { transform: translateY(-50%) rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding-top 0.5s ease; }
.faq-item.active .faq-answer { max-height: 300px; padding-top: 15px; }
.faq-answer p { color: #b3b3b3; }

/* --- RODAPÉ --- */
#footer { background-color:#080808; padding-top: 80px; border-top: 2px solid var(--primary-color); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 60px; }
.footer-about h3 { font-size: 1.8rem; margin-bottom: 15px; color: var(--text-color); }
.footer-links h4, .footer-contact h4 { font-size: 1.4rem; margin-bottom: 20px; color: var(--text-color); }
.footer-links ul { list-style: none; }
.footer-links ul li a { color: #b3b3b3; text-decoration: none; transition: color 0.3s ease; display: block; margin-bottom: 10px; }
.footer-links ul li a:hover { color: var(--primary-color); }
.footer-contact p { margin-bottom: 15px; }
.social-icons {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.social-icons a {
    color: var(--primary-color);
    font-size: 2rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: #ffffff;
}
.footer-bottom { text-align: center; padding: 20px 0; border-top: 1px solid var(--border-color); }

/* --- BOTÃO FLUTUANTE DO WHATSAPP COM EFEITO SONAR --- */
.floating-whatsapp-button {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    left: 25px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease;
    
    display: flex;
    justify-content: center;
    align-items: center;

    /* AQUI COMEÇA A MÁGICA DA ANIMAÇÃO */
    animation: sonar-effect 1.5s infinite;
}

.floating-whatsapp-button:hover {
    transform: scale(1.1);
    animation-play-state: paused; /* Pausa a animação quando o mouse está em cima */
}

.floating-whatsapp-button svg {
    width: 32px;
    height: 32px;
}

/* --- BOTÃO "VOLTAR AO TOPO" --- */
#back-to-top-button {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 25px;
    right: 25px; /* Posição no canto inferior direito */
    background-color: var(--primary-color);
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 999; /* Garante que fique acima de quase tudo, mas abaixo do WhatsApp se necessário */
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    opacity: 0; /* Começa invisível */
    visibility: hidden; /* Começa escondido */
    transform: translateY(20px); /* Começa um pouco para baixo */
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
}

#back-to-top-button.show {
    opacity: 1; /* Fica visível */
    visibility: visible; /* Fica "clicável" */
    transform: translateY(0); /* Sobe para a posição final */
}

#back-to-top-button svg {
    width: 20px;
    height: 20px;
}

/* Animação que simula o scroll do mouse */
@keyframes scroll-animation {
    0% {
        opacity: 1;
        top: 10px;
    }
    15% {
        opacity: 1;
        top: 15px;
    }
    50% {
        opacity: 0;
        top: 25px;
    }
    100% {
        opacity: 0;
        top: 10px;
    }
}

/* Definição da animação "sonar-effect" */
@keyframes sonar-effect {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* --- RESPONSIVIDADE --- */
@media (min-width: 992px) {
    .service-pricing-grid { grid-template-columns: repeat(4, 1fr); } /* <<<< MUDANÇA APLICADA AQUI */
}
@media (min-width: 768px) and (max-width: 991px) {
    .service-pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    section { padding: 80px 0; }
    #hero h1 { font-size: 2.8rem; }
    #hero h2 { font-size: 1.2rem; }
    .section-title, .category-title { font-size: 1.8rem; }
}