/* --- GERAL E VARIÁVEIS --- */
:root {
    /* Tema Claro (Padrão) */
    --primary-color: #3a7bd5;
    --secondary-color: #00d2ff;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #34495e;
    --white-color: #ffffff;
    --background-color: #ffffff;
    --card-background: #ffffff;
    --header-background: #ffffff;
    --section-background: #f9f9f9;
    --text-color-secondary: #7f8c8d;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-light: rgba(0, 0, 0, 0.05);

    --success-color: #27ae60;
    --header-height: 70px;
}

[data-theme="dark"] {
    /* Tema Escuro */
    --primary-color: #4a90e2; /* Um pouco mais claro para contraste */
    --secondary-color: #00d2ff;
    --dark-color: #ecf0f1; /* Invertido: texto principal (claro) */
    --light-color: #3b4b5c; /* Invertido: fundo de card/input */
    --text-color: #bdc3c7; /* Texto secundário (cinza claro) */
    --white-color: #2c3e50; /* Invertido: fundo principal (escuro) */
    --background-color: #2c3e50;
    --card-background: #34495e;
    --header-background: #34495e;
    --section-background: #2c3e50;
    --text-color-secondary: #95a5a6;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-color-light: rgba(0, 0, 0, 0.15);
}


* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { 
    font-family: 'Poppins', sans-serif; 
    line-height: 1.6; 
    color: var(--text-color); 
    background-color: var(--background-color); 
    /* Adiciona transição suave para mudança de cores */
    transition: background-color 0.3s ease, color 0.3s ease;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* --- CABEÇALHO E NAVEGAÇÃO --- */
.header { 
    background-color: var(--header-background); 
    box-shadow: 0 2px 10px var(--shadow-color); 
    position: fixed; 
    width: 100%; 
    top: 0; 
    left: 0; 
    z-index: 1000; 
    height: var(--header-height);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header .container { 
    display: flex; 
    justify-content: flex-start; /* Alinhamento padrão à esquerda */
    align-items: center; 
    height: 100%; 
    gap: 0; /* Remove gaps padrões do flex */
    
    /* IMPORTANTE: Necessário para a centralização absoluta do menu funcionar */
    position: relative; 
}

.logo img { height: 45px; vertical-align: middle; }

/* O menu agora empurra tudo que está à direita dele para o final */
.nav-menu { 
    display: flex; 
    gap: 25px; 
    /* Margens automáticas removidas aqui pois a posição será absoluta no desktop ou column no mobile */
}

.nav-link { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.3s ease; }
.nav-link:hover { color: var(--primary-color); }

/* --- BOTÃO TEMA (Dark/Light) --- */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem; /* Tamanho do ícone */
    cursor: pointer;
    padding: 5px; /* Padding padrão */
    
    /* MODIFICAÇÃO: Margem ajustada pois agora o Login vem antes dele */
    margin-left: 10px; 
    margin-right: 0;
    
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    color: var(--primary-color);
}
/* Esconde o ícone que NÃO deve aparecer */
[data-theme="light"] .theme-toggle .fa-sun {
    display: none; /* Esconde o sol no tema claro */
}
[data-theme="dark"] .theme-toggle .fa-moon {
    display: none; /* Esconde a lua no tema escuro */
}

/* --- BOTÃO DE LOGIN (Unificado Desktop/Tablet/Mobile) --- */
.btn-login { 
    background-color: transparent; /* Fundo transparente igual ao tema */
    color: var(--text-color); /* Cor do texto/ícone do tema */
    padding: 5px; 
    border-radius: 5px; 
    text-decoration: none; 
    font-weight: 500; 
    transition: color 0.3s ease; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* Tamanho do ícone */
    
    /* MODIFICAÇÃO: margin-left: auto força o grupo de ícones (Login e Tema) para a direita */
    margin-left: auto; 
    margin-right: 5px; /* Espaço entre Login e Tema */
    
    gap: 0;
}

/* Oculta o texto "Entrar" em TODAS as resoluções */
.btn-login span {
    display: none;
}

/* Mostra o ícone de usuário em TODAS as resoluções */
.btn-login .fa-user {
    display: block;
}

/* Hover simples mudando apenas a cor */
.btn-login:hover { 
    background-color: transparent;
    color: var(--primary-color); 
}

/* Ajuste para o botão de login no tema escuro (redundância de segurança) */
[data-theme="dark"] .btn-login {
    color: var(--text-color); 
}

.menu-toggle { display: none; font-size: 1.5rem; background: none; border: none; color: var(--dark-color); cursor: pointer; }

/* --- CENTRALIZAÇÃO DO MENU (DESKTOP) --- */
/* Regra aplicada apenas para telas maiores que tablet (Landscape/Desktop) */
@media (min-width: 1025px) {
    .nav-menu {
        position: absolute;       /* Tira o menu do fluxo normal */
        left: 50%;                /* Move para 50% da largura do pai */
        transform: translateX(-50%); /* Ajusta o centro exato do elemento */
        margin: 0;                /* Remove margens para não interferir no cálculo */
        width: max-content;       /* Largura baseada no conteúdo */
    }
}

/* --- BOTÕES E UTILITÁRIOS --- */
.btn { display: inline-block; padding: 12px 28px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-primary { background-image: linear-gradient(to right, var(--primary-color), #7053f1); color: #ffffff; } /* Cor do texto do botão primário fixada em branco */
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 4px 15px rgba(58, 123, 213, 0.4); }
.btn-secondary { background-color: var(--light-color); color: var(--dark-color); border: 2px solid #15b3f0; }
.btn-secondary:hover { background-color: #6c50e9; color: #ffffff; } /* Cor do texto fixada em branco no hover */
.section-title { font-size: 2.5rem; color: var(--dark-color); text-align: center; margin-bottom: 10px; transition: color 0.3s ease; }
.section-subtitle { text-align: center; font-size: 1.1rem; color: var(--text-color-secondary); max-width: 600px; margin: 0 auto 50px auto; transition: color 0.3s ease; }

/* --- SEÇÃO HERÓI COM CARROSSEL --- */
.hero {
    position: relative;
    overflow: hidden;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff; /* Texto do herói fixado em branco */
}
.carousel-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.carousel-slide { width: 100%; height: 100%; background-size: cover; background-position: center; position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 1s ease-in-out; z-index: 1; }
.carousel-slide.active { opacity: 1; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(44, 62, 80, 0.7); }
.hero-content-wrapper { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; height: 100%; }
.hero-text-content { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 290px; width: 100%; position: relative; padding-bottom: 120px; }
.hero-text-slide { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: max-content; max-width: 90vw; opacity: 0; transition: opacity 1s ease-in-out; }
.hero-text-slide.active { opacity: 1; }
.hero-text-slide h1 { font-size: 2.8rem; margin-bottom: 10px; }
.hero-text-slide p { font-size: 1.3rem; margin-bottom: 30px; }
.hero .btn { margin-top: 120px; }

/* --- SEÇÃO DE FUNCIONALIDADES --- */
.features { 
    padding: 80px 0; 
    background-color: var(--section-background);
    transition: background-color 0.3s ease;
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature-card { 
    background-color: var(--card-background); 
    padding: 30px; 
    border-radius: 10px; 
    box-shadow: 0 5px 20px var(--shadow-color-light); 
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; 
}
.feature-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 10px 30px var(--shadow-color); 
}
.feature-card h3 { font-size: 1.4rem; color: var(--dark-color); margin-bottom: 15px; display: flex; align-items: center; gap: 10px; transition: color 0.3s ease; }
.feature-card h3 i { color: var(--primary-color); }

/* --- SEÇÃO COMO ACESSAR --- */
.how-to-login { padding: 80px 0; }
.steps-container { display: flex; justify-content: space-around; align-items: flex-start; gap: 20px; margin-bottom: 40px; }
.step { text-align: center; max-width: 250px; }
.step-icon { 
    font-size: 3rem; 
    color: #6c50e9; 
    margin-bottom: 15px; 
    background-color: #eaf2ff; 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    transition: background-color 0.3s ease;
}
[data-theme="dark"] .step-icon {
    background-color: var(--light-color); /* Fundo mais escuro para o ícone no dark mode */
}
.step h3 { margin-bottom: 10px; color: var(--dark-color); transition: color 0.3s ease; }
.step-arrow { font-size: 2rem; color: #bdc3c7; margin-top: 30px; }
.how-to-login .btn { display: block; width: fit-content; margin: 0 auto; }

/* --- SEÇÃO DEPOIMENTOS CARROSSEL --- */
.testimonials-carousel { padding: 60px 0; text-align: center; position: relative; background: url('../../assets/img/background-depoimentos.jpg') no-repeat center center/cover; color: var(--white-color); }
.testimonials-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(44, 62, 80, 0.85); z-index: 1; }
.testimonials-carousel .container { position: relative; z-index: 2; }
.testimonial-slider { position: relative; min-height: 200px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.testimonial-slide { display: flex; flex-direction: column; align-items: center; text-align: center; position: absolute; top: 50%; left: 0; transform: translateY(-50%); width: 100%; opacity: 0; transition: opacity 0.8s ease-in-out; }
.testimonial-slide.active { opacity: 1; }
.testimonial-slide cite { font-weight: 700; font-size: 1.2rem; display: block; margin-bottom: 5px; }
.testimonial-slide span { font-size: 0.9rem; color: var(--secondary-color); margin-bottom: 10px; }
.testimonial-slide .stars { color: #f1c40f; margin-bottom: 15px; }
.testimonial-slide blockquote { max-width: 700px; margin: 0 auto; font-style: italic; font-size: 1.1rem; margin-bottom: 20px; }
.testimonial-dots { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.testimonial-dot { width: 12px; height: 12px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); cursor: pointer; transition: background-color 0.3s ease; }
.testimonial-dot.active { background-color: var(--white-color); }

/* --- SEÇÃO CTA --- */
.cta { padding: 80px 0; text-align: center; background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color)); color: var(--white-color); }
.cta h2 { font-size: 2.5rem; margin-bottom: 20px; }
.cta p { font-size: 1.2rem; margin-bottom: 30px; max-width: 700px; margin-left: auto; margin-right: auto; }
.cta .btn-primary { background: var(--white-color); color: var(--primary-color); }
.cta .btn-primary:hover { box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3); }

/* CORREÇÃO: Força o texto do botão CTA a ser branco no modo escuro */
[data-theme="dark"] .cta .btn-primary {
    color: #ffffff;
}

/* --- RODAPÉ --- */
.footer { 
    background-color: var(--dark-color); /* No tema claro, é escuro */
    color: var(--light-color); /* No tema claro, é claro */
    text-align: center; 
    padding: 20px 0; 
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Ajuste para o rodapé no dark mode ficar escuro */
[data-theme="dark"] .footer {
    background-color: #233140; /* Um tom um pouco diferente do body */
    color: var(--text-color); /* Texto cinza claro */
}


/* ================================================= */
/* IMAGENS DO CARROSSEL (PADRÃO/DESKTOP)    */
/* ================================================= */
.carousel-slide.slide-1 { background-image: url('../../assets/site/tema_1.jpg'); }
.carousel-slide.slide-2 { background-image: url('../../assets/site/tema_2.jpg'); }

/* --- FORMULÁRIO NA SEÇÃO CTA --- */
.cta-form { max-width: 600px; margin: 40px auto 0 auto; display: grid; gap: 15px; }
.cta-form .form-group { width: 100%; }
.cta-form input[type="text"],
.cta-form input[type="email"],
.cta-form textarea { 
    width: 100%; 
    padding: 15px; 
    border-radius: 5px; 
    border: 1px solid var(--light-color); 
    font-family: 'Poppins', sans-serif; 
    font-size: 1rem; 
    color: var(--text-color); 
    background-color: var(--light-color); /* Usando variável */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
/* Cor original do light mode (f8faff) */
[data-theme="light"] .cta-form input[type="text"],
[data-theme="light"] .cta-form input[type="email"],
[data-theme="light"] .cta-form textarea {
    background-color: #f8faff; 
}
.cta-form input[type="text"]::placeholder,
.cta-form input[type="email"]::placeholder,
.cta-form textarea::placeholder { 
    color: var(--text-color-secondary); 
}
.cta-form textarea { min-height: 120px; resize: vertical; }
.cta .cta-form .btn-primary:hover { background-color: var(--light-color); }

/* --- BOTÃO FLUTUANTE WHATSAPP --- */
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 40px; right: 40px; background-color: #25d366; color: var(--white-color); border-radius: 50px; text-align: center; font-size: 30px; box-shadow: 2px 2px 3px #999; z-index: 100; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: transform 0.3s ease; }
.whatsapp-float:hover { transform: scale(1.1); }

/* --- ANIMAÇÃO PARA DESTAQUE DO BOTÃO WHATSAPP --- */
@keyframes pulse-animation {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); }
}
.highlight-whatsapp { animation: pulse-animation 1.5s 2; }

/* --- RESPONSIVIDADE --- */

/* REGRA: TABLET E MOBILE (Até 1024px) 
   Aqui definimos o Menu Hamburguer e ajustes de margem.
*/
@media (max-width: 1024px) {
    /* 1. Transforma o menu horizontal em Menu Hamburguer Lateral/Vertical */
    .nav-menu { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: var(--header-height); 
        left: 0; 
        width: 100%; 
        background-color: var(--header-background); /* Usando variável */
        padding: 20px 0; 
        text-align: center; 
        box-shadow: 0 5px 10px var(--shadow-color); /* Usando variável */
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
        
        /* IMPORTANTE: Garante que o menu hambúrguer NÃO seja afetado pela centralização absoluta do desktop */
        transform: none; 
    }
    .nav-menu.active { display: flex; }
    .nav-link { 
        padding: 15px 0; 
        display: block;  
        font-size: 1.1rem; 
    }
    .menu-toggle { display: block; }
    
    /* Quando o menu é mobile, ele não deve empurrar o resto (reset da margem auto) */
    .nav-menu {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Login continua empurrando os ícones para a direita no mobile */
    .btn-login {
        margin-left: auto; 
        margin-right: 5px; /* Pequeno espaço entre Login e Tema */
    }

    /* Ajusta posição do botão de tema */
    .theme-toggle {
        margin-left: 0; 
        margin-right: 15px; /* Espaço para separar do Menu Hambúrguer */
    }
}

/* AJUSTES ESPECÍFICOS PARA CELULARES (Até 768px) */
@media (max-width: 768px) {
    .btn-login {
        /* Reduzi a margem direita para aproximar ainda mais no celular */
        margin-right: 5px; 
    }

    .hero-text-slide h1 { font-size: 1.6rem; line-height: 1.3; }
    .hero-text-slide p { font-size: 0.9rem; margin-bottom: 25px; }
    
    .testimonials-carousel { padding: 40px 0; }
    
    .steps-container { flex-direction: column; align-items: center; }
    .step-arrow { transform: rotate(90deg); margin: 10px 0; }
    
    .hero .btn { margin-top: 110px; padding: 10px 22px; font-size: 0.9rem; }
    
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; font-size: 24px; }
    
    /* IMAGENS DO CARROSSEL (CELULAR) */
    .carousel-slide.slide-1 { background-image: url('../../assets/site/mob_1.jpg'); }
    .carousel-slide.slide-2 { background-image: url('../../assets/site/mob_2.jpg'); }
}

@media (min-width: 769px) {
    #funcionalidades .section-subtitle { max-width: none; white-space: nowrap; }
}