/* Variáveis globais */
:root {
    --primary-color: #C5A572;
    --secondary-color: #2C3E50;
    --accent-color: #E5B97F;
    --text-color: #333333;
    --light-bg: #F8F9FA;
    --dark-bg: #1A1A1A;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-image {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.main-nav ul {
    gap: 30px;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: rgb(38 31 26);
    padding: 120px 0;
    position: relative;
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/5259223.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.09;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(38, 31, 26, 0.8),
        rgba(38, 31, 26, 0.6)
    );
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta-button,
.about-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    background-color: #2fa84f;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button i,
.about-button i {
    font-size: 1.2em;
}

.cta-button:hover,
.about-button:hover {
    background-color: #258a41;
    transform: translateY(-2px);
    color: white;
    border-color: transparent;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    text-align: center;
    white-space: nowrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 15// Animação suave do scroll
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
    anchor.addEventListener('click', function (e) {
        e.preventDefault();
        const target = document.querySelector(this.getAttribute('href'));
        if (target) {
            target.scrollIntoView({
                behavior: 'smooth',
                block: 'start'
            });
        }
    });
});

// Contador de estatísticas
const counters = document.querySelectorAll('.counter-number');
const speed = 200;

const startCounting = (counter) => {
    const target = +counter.getAttribute('data-target');
    const count = +counter.innerText;
    const increment = target / speed;

    if (count < target) {
        counter.innerText = Math.ceil(count + increment);
        setTimeout(() => startCounting(counter), 1);
    } else {
        counter.innerText = target;
    }
};

// Observador de interseção para iniciar contagem quando visível
const observer = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            startCounting(entry.target);
            observer.unobserve(entry.target);
        }
    });
}, {
    threshold: 0.5
});

counters.forEach(counter => {
    counter.innerText = '0';
    observer.observe(counter);
});

// Header fixo com mudança de estilo no scroll
const header = document.querySelector('.header-section');
let lastScroll = 0;

window.addEventListener('scroll', () => {
    const currentScroll = window.pageYOffset;

    if (currentScroll <= 0) {
        header.classList.remove('scroll-up');
        return;
    }

    if (currentScroll > lastScroll && !header.classList.contains('scroll-down')) {
        // Scroll Down
        header.classList.remove('scroll-up');
        header.classList.add('scroll-down');
    } else if (currentScroll < lastScroll && header.classList.contains('scroll-down')) {
        // Scroll Up
        header.classList.remove('scroll-down');
        header.classList.add('scroll-up');
    }
    lastScroll = currentScroll;
});

// Animação de fade in dos elementos
const fadeElements = document.querySelectorAll('.fade-in');

const fadeObserver = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('visible');
            fadeObserver.unobserve(entry.target);
        }
    });
}, {
    threshold: 0.1
});

fadeElements.forEach(element => {
    fadeObserver.observe(element);
});

// Validação do formulário de contato
const contactForm = document.querySelector('#contact-form');

if (contactForm) {
    contactForm.addEventListener('submit', (e) => {
        e.preventDefault();
        
        // Validação básica
        const name = document.querySelector('#name').value;
        const email = document.querySelector('#email').value;
        const message = document.querySelector('#message').value;
        
        if (!name || !email || !message) {
            alert('Por favor, preencha todos os campos.');
            return;
        }
        
        if (!isValidEmail(email)) {
            alert('Por favor, insira um email válido.');
            return;
        }
        
        // Aqui você pode adicionar o código para enviar o formulário
        console.log('Formulário enviado:', { name, email, message });
        contactForm.reset();
        alert('Mensagem enviada com sucesso!');
    });
}

function isValidEmail(email) {
    const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(String(email).toLowerCase());
}

// Menu Mobile
const menuToggle = document.querySelector('.menu-toggle');
const mainNav = document.querySelector('.main-nav');
const navLinks = document.querySelectorAll('.main-nav a');

if (menuToggle && mainNav) {
    menuToggle.addEventListener('click', () => {
        menuToggle.classList.toggle('active');
        mainNav.classList.toggle('active');
    });

    // Fechar menu ao clicar em um link
    navLinks.forEach(link => {
        link.addEventListener('click', () => {
            menuToggle.classList.remove('active');
            mainNav.classList.remove('active');
        });
    });
}

// Mobile Menu Toggle
const mobileMenuButton = document.querySelector('.mobile-menu-button');
const mainNavMobile = document.querySelector('.main-nav');

if (mobileMenuButton && mainNavMobile) {
    mobileMenuButton.addEventListener('click', () => {
        mobileMenuButton.classList.toggle('active');
        mainNavMobile.classList.toggle('active');
        document.body.style.overflow = mainNavMobile.classList.contains('active') ? 'hidden' : '';
    });

    // Fechar menu ao clicar em um link
    const navLinksMobile = mainNavMobile.querySelectorAll('a');
    navLinksMobile.forEach(link => {
        link.addEventListener('click', () => {
            mobileMenuButton.classList.remove('active');
            mainNavMobile.classList.remove('active');
            document.body.style.overflow = '';
        });
    });

    // Fechar menu ao clicar fora
    document.addEventListener('click', (e) => {
        if (!mainNavMobile.contains(e.target) && !mobileMenuButton.contains(e.target)) {
            mobileMenuButton.classList.remove('active');
            mainNavMobile.classList.remove('active');
            document.body.style.overflow = '';
        }
    });
}

// Lazy Loading Images
const lazyImages = document.querySelectorAll('img[data-src]');
const imageObserver = new IntersectionObserver((entries, observer) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            const img = entry.target;
            img.src = img.dataset.src;
            img.removeAttribute('data-src');
            observer.unobserve(img);
        }
    });
});

lazyImages.forEach(img => imageObserver.observe(img));

// Fade-in Animation
const fadeElementsMobile = document.querySelectorAll('.fade-in');
const fadeObserverMobile = new IntersectionObserver((entries, observer) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('visible');
            observer.unobserve(entry.target);
        }
    });
}, {
    threshold: 0.1
});

fadeElementsMobile.forEach(element => fadeObserverMobile.observe(element));

// Header Scroll Effect
const headerMobile = document.querySelector('.header-section');
let lastScrollMobile = 0;

window.addEventListener('scroll', () => {
    const currentScrollMobile = window.pageYOffset;
    
    if (currentScrollMobile <= 0) {
        headerMobile.classList.remove('scroll-up');
        return;
    }
    
    if (currentScrollMobile > lastScrollMobile && !headerMobile.classList.contains('scroll-down')) {
        headerMobile.classList.remove('scroll-up');
        headerMobile.classList.add('scroll-down');
    } else if (currentScrollMobile < lastScrollMobile && headerMobile.classList.contains('scroll-down')) {
        headerMobile.classList.remove('scroll-down');
        headerMobile.classList.add('scroll-up');
    }
    
    lastScrollMobile = currentScrollMobile;
});

// Animação de fade in para elementos quando entram na viewport
const observerOptions = {
    root: null,
    rootMargin: '0px',
    threshold: 0.1
};

const observerMobile = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('fade-in');
            observerMobile.unobserve(entry.target);
        }
    });
}, observerOptions);

// Elementos para animar
const animateElementsMobile = document.querySelectorAll('.benefit-card, .app-content, .phone-mockup');
animateElementsMobile.forEach(element => {
    element.style.opacity = '0';
    element.style.transform = 'translateY(20px)';
    element.style.transition = 'opacity 0.6s ease-out, transform 0.6s ease-out';
    observerMobile.observe(element);
});

// Classe para animação
document.head.insertAdjacentHTML('beforeend', `
    <style>
        .fade-in {
            opacity: 1 !important;
            transform: translateY(0) !important;
        }
    </style>
`);

// Adicionar estilos para animação do header
document.head.insertAdjacentHTML('beforeend', `
    <style>
        .header {
            transition: transform 0.3s ease;
        }
        
        .header.scroll-down {
            transform: translateY(-100%);
        }
        
        .header.scroll-up {
            transform: translateY(0);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
    </style>
`);

// Simulação de carregamento do mockup do app
const phoneMockup = document.querySelector('.phone-mockup');
if (phoneMockup) {
    // Adiciona gradiente animado ao mockup
    phoneMockup.innerHTML = `
        <div class="mockup-screen">
            <div class="mockup-header"></div>
            <div class="mockup-content">
                <div class="mockup-item"></div>
                <div class="mockup-item"></div>
                <div class="mockup-item"></div>
            </div>
        </div>
    `;
    
    // Estilos para o mockup
    document.head.insertAdjacentHTML('beforeend', `
        <style>
            .mockup-screen {
                height: 100%;
                padding: 20px;
                background: linear-gradient(45deg, var(--color-emerald), var(--color-gold));
            }
            
            .mockup-header {
                height: 60px;
                background: rgba(255, 255, 255, 0.1);
                border-radius: 10px;
                margin-bottom: 20px;
            }
            
            .mockup-content {
                display: flex;
                flex-direction: column;
                gap: 15px;
            }
            
            .mockup-item {
                height: 100px;
                background: rgba(255, 255, 255, 0.1);
                border-radius: 10px;
                animation: pulse 2s infinite;
            }
            
            @keyframes pulse {
                0% { opacity: 0.6; }
                50% { opacity: 0.8; }
                100% { opacity: 0.6; }
            }
        </style>
    `);
}

// Botões CTA com efeito de hover
document.querySelectorAll('.cta-button').forEach(button => {
    button.addEventListener('mouseover', function() {
        this.style.transform = 'translateY(-2px)';
        this.style.boxShadow = '0 4px 15px rgba(80, 200, 120, 0.3)';
    });
    
    button.addEventListener('mouseout', function() {
        this.style.transform = 'translateY(0)';
        this.style.boxShadow = 'none';
    });
});

// Service Cards Animation
const serviceCards = document.querySelectorAll('.service-card');
const serviceObserver = new IntersectionObserver((entries, observer) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('animate');
            observer.unobserve(entry.target);
        }
    });
}, {
    threshold: 0.2
});

serviceCards.forEach(card => serviceObserver.observe(card));

// Form Validation
const forms = document.querySelectorAll('form');
forms.forEach(form => {
    form.addEventListener('submit', (e) => {
        e.preventDefault();
        const inputs = form.querySelectorAll('input, textarea');
        let isValid = true;
        
        inputs.forEach(input => {
            if (!input.value.trim()) {
                isValid = false;
                input.classList.add('error');
            } else {
                input.classList.remove('error');
            }
        });
        
        if (isValid) {
            // Aqui você pode adicionar o código para enviar o formulário
            console.log('Formulário válido, pronto para enviar');
        }
    });
}); 0%;
    height: 15// Animação suave do scroll
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
    anchor.addEventListener('click', function (e) {
        e.preventDefault();
        const target = document.querySelector(this.getAttribute('href'));
        if (target) {
            target.scrollIntoView({
                behavior: 'smooth',
                block: 'start'
            });
        }
    });
});

// Contador de estatísticas
const counters = document.querySelectorAll('.counter-number');
const speed = 200;

const startCounting = (counter) => {
    const target = +counter.getAttribute('data-target');
    const count = +counter.innerText;
    const increment = target / speed;

    if (count < target) {
        counter.innerText = Math.ceil(count + increment);
        setTimeout(() => startCounting(counter), 1);
    } else {
        counter.innerText = target;
    }
};

// Observador de interseção para iniciar contagem quando visível
const observer = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            startCounting(entry.target);
            observer.unobserve(entry.target);
        }
    });
}, {
    threshold: 0.5
});

counters.forEach(counter => {
    counter.innerText = '0';
    observer.observe(counter);
});

// Header fixo com mudança de estilo no scroll
const header = document.querySelector('.header-section');
let lastScroll = 0;

window.addEventListener('scroll', () => {
    const currentScroll = window.pageYOffset;

    if (currentScroll <= 0) {
        header.classList.remove('scroll-up');
        return;
    }

    if (currentScroll > lastScroll && !header.classList.contains('scroll-down')) {
        // Scroll Down
        header.classList.remove('scroll-up');
        header.classList.add('scroll-down');
    } else if (currentScroll < lastScroll && header.classList.contains('scroll-down')) {
        // Scroll Up
        header.classList.remove('scroll-down');
        header.classList.add('scroll-up');
    }
    lastScroll = currentScroll;
});

// Animação de fade in dos elementos
const fadeElements = document.querySelectorAll('.fade-in');

const fadeObserver = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('visible');
            fadeObserver.unobserve(entry.target);
        }
    });
}, {
    threshold: 0.1
});

fadeElements.forEach(element => {
    fadeObserver.observe(element);
});

// Validação do formulário de contato
const contactForm = document.querySelector('#contact-form');

if (contactForm) {
    contactForm.addEventListener('submit', (e) => {
        e.preventDefault();
        
        // Validação básica
        const name = document.querySelector('#name').value;
        const email = document.querySelector('#email').value;
        const message = document.querySelector('#message').value;
        
        if (!name || !email || !message) {
            alert('Por favor, preencha todos os campos.');
            return;
        }
        
        if (!isValidEmail(email)) {
            alert('Por favor, insira um email válido.');
            return;
        }
        
        // Aqui você pode adicionar o código para enviar o formulário
        console.log('Formulário enviado:', { name, email, message });
        contactForm.reset();
        alert('Mensagem enviada com sucesso!');
    });
}

function isValidEmail(email) {
    const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(String(email).toLowerCase());
}

// Menu Mobile
const menuToggle = document.querySelector('.menu-toggle');
const mainNav = document.querySelector('.main-nav');
const navLinks = document.querySelectorAll('.main-nav a');

if (menuToggle && mainNav) {
    menuToggle.addEventListener('click', () => {
        menuToggle.classList.toggle('active');
        mainNav.classList.toggle('active');
    });

    // Fechar menu ao clicar em um link
    navLinks.forEach(link => {
        link.addEventListener('click', () => {
            menuToggle.classList.remove('active');
            mainNav.classList.remove('active');
        });
    });
}

// Mobile Menu Toggle
const mobileMenuButton = document.querySelector('.mobile-menu-button');
const mainNavMobile = document.querySelector('.main-nav');

if (mobileMenuButton && mainNavMobile) {
    mobileMenuButton.addEventListener('click', () => {
        mobileMenuButton.classList.toggle('active');
        mainNavMobile.classList.toggle('active');
        document.body.style.overflow = mainNavMobile.classList.contains('active') ? 'hidden' : '';
    });

    // Fechar menu ao clicar em um link
    const navLinksMobile = mainNavMobile.querySelectorAll('a');
    navLinksMobile.forEach(link => {
        link.addEventListener('click', () => {
            mobileMenuButton.classList.remove('active');
            mainNavMobile.classList.remove('active');
            document.body.style.overflow = '';
        });
    });

    // Fechar menu ao clicar fora
    document.addEventListener('click', (e) => {
        if (!mainNavMobile.contains(e.target) && !mobileMenuButton.contains(e.target)) {
            mobileMenuButton.classList.remove('active');
            mainNavMobile.classList.remove('active');
            document.body.style.overflow = '';
        }
    });
}

// Lazy Loading Images
const lazyImages = document.querySelectorAll('img[data-src]');
const imageObserver = new IntersectionObserver((entries, observer) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            const img = entry.target;
            img.src = img.dataset.src;
            img.removeAttribute('data-src');
            observer.unobserve(img);
        }
    });
});

lazyImages.forEach(img => imageObserver.observe(img));

// Fade-in Animation
const fadeElementsMobile = document.querySelectorAll('.fade-in');
const fadeObserverMobile = new IntersectionObserver((entries, observer) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('visible');
            observer.unobserve(entry.target);
        }
    });
}, {
    threshold: 0.1
});

fadeElementsMobile.forEach(element => fadeObserverMobile.observe(element));

// Header Scroll Effect
const headerMobile = document.querySelector('.header-section');
let lastScrollMobile = 0;

window.addEventListener('scroll', () => {
    const currentScrollMobile = window.pageYOffset;
    
    if (currentScrollMobile <= 0) {
        headerMobile.classList.remove('scroll-up');
        return;
    }
    
    if (currentScrollMobile > lastScrollMobile && !headerMobile.classList.contains('scroll-down')) {
        headerMobile.classList.remove('scroll-up');
        headerMobile.classList.add('scroll-down');
    } else if (currentScrollMobile < lastScrollMobile && headerMobile.classList.contains('scroll-down')) {
        headerMobile.classList.remove('scroll-down');
        headerMobile.classList.add('scroll-up');
    }
    
    lastScrollMobile = currentScrollMobile;
});

// Animação de fade in para elementos quando entram na viewport
const observerOptions = {
    root: null,
    rootMargin: '0px',
    threshold: 0.1
};

const observerMobile = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('fade-in');
            observerMobile.unobserve(entry.target);
        }
    });
}, observerOptions);

// Elementos para animar
const animateElementsMobile = document.querySelectorAll('.benefit-card, .app-content, .phone-mockup');
animateElementsMobile.forEach(element => {
    element.style.opacity = '0';
    element.style.transform = 'translateY(20px)';
    element.style.transition = 'opacity 0.6s ease-out, transform 0.6s ease-out';
    observerMobile.observe(element);
});

// Classe para animação
document.head.insertAdjacentHTML('beforeend', `
    <style>
        .fade-in {
            opacity: 1 !important;
            transform: translateY(0) !important;
        }
    </style>
`);

// Adicionar estilos para animação do header
document.head.insertAdjacentHTML('beforeend', `
    <style>
        .header {
            transition: transform 0.3s ease;
        }
        
        .header.scroll-down {
            transform: translateY(-100%);
        }
        
        .header.scroll-up {
            transform: translateY(0);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
    </style>
`);

// Simulação de carregamento do mockup do app
const phoneMockup = document.querySelector('.phone-mockup');
if (phoneMockup) {
    // Adiciona gradiente animado ao mockup
    phoneMockup.innerHTML = `
        <div class="mockup-screen">
            <div class="mockup-header"></div>
            <div class="mockup-content">
                <div class="mockup-item"></div>
                <div class="mockup-item"></div>
                <div class="mockup-item"></div>
            </div>
        </div>
    `;
    
    // Estilos para o mockup
    document.head.insertAdjacentHTML('beforeend', `
        <style>
            .mockup-screen {
                height: 100%;
                padding: 20px;
                background: linear-gradient(45deg, var(--color-emerald), var(--color-gold));
            }
            
            .mockup-header {
                height: 60px;
                background: rgba(255, 255, 255, 0.1);
                border-radius: 10px;
                margin-bottom: 20px;
            }
            
            .mockup-content {
                display: flex;
                flex-direction: column;
                gap: 15px;
            }
            
            .mockup-item {
                height: 100px;
                background: rgba(255, 255, 255, 0.1);
                border-radius: 10px;
                animation: pulse 2s infinite;
            }
            
            @keyframes pulse {
                0% { opacity: 0.6; }
                50% { opacity: 0.8; }
                100% { opacity: 0.6; }
            }
        </style>
    `);
}

// Botões CTA com efeito de hover
document.querySelectorAll('.cta-button').forEach(button => {
    button.addEventListener('mouseover', function() {
        this.style.transform = 'translateY(-2px)';
        this.style.boxShadow = '0 4px 15px rgba(80, 200, 120, 0.3)';
    });
    
    button.addEventListener('mouseout', function() {
        this.style.transform = 'translateY(0)';
        this.style.boxShadow = 'none';
    });
});

// Service Cards Animation
const serviceCards = document.querySelectorAll('.service-card');
const serviceObserver = new IntersectionObserver((entries, observer) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('animate');
            observer.unobserve(entry.target);
        }
    });
}, {
    threshold: 0.2
});

serviceCards.forEach(card => serviceObserver.observe(card));

// Form Validation
const forms = document.querySelectorAll('form');
forms.forEach(form => {
    form.addEventListener('submit', (e) => {
        e.preventDefault();
        const inputs = form.querySelectorAll('input, textarea');
        let isValid = true;
        
        inputs.forEach(input => {
            if (!input.value.trim()) {
                isValid = false;
                input.classList.add('error');
            } else {
                input.classList.remove('error');
            }
        });
        
        if (isValid) {
            // Aqui você pode adicionar o código para enviar o formulário
            console.log('Formulário válido, pronto para enviar');
        }
    });
}); 0%;
    background: radial-gradient(
        circle at center,
        rgba(197, 165, 114, 0.3) 0%,
        rgba(197, 165, 114, 0.1) 50%,
        transparent 70%
    );
    filter: blur(60px);
    z-index: 0;
    animation: glowPulse 4s ease-in-out infinite alternate;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    animation: rotateAndZoom 8s ease-in-out infinite alternate;
    transform-origin: center center;
    position: relative;
    z-index: 1;
}

@keyframes glowPulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes rotateAndZoom {
    0% {
        transform: rotate(0deg) scale(1);
    }
    100% {
        transform: rotate(30deg) scale(1.1);
    }
}

/* Services Section */
.services-section {
    padding: 80px 0;
    position: relative;
    background: url('../img/fundo_servicos.jpg') no-repeat center center;
    background-size: cover;
}

.services-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(248, 249, 250, 0.85);
    z-index: 0;
}

.services-container {
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px;
}

.service-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* About Section */
.about-section {
    padding: 100px 0;
    position: relative;
    background: url('../img/5259223.jpg') no-repeat center center;
    background-size: cover;
    color: white;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(38, 31, 26, 0.95),
        rgba(38, 31, 26, 0.85)
    );
}

.about-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
}

.about-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.about-button:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* App Download Section */
.app-download-section {
    padding: 80px 0;
    background-color: white;
    text-align: center;
}

.app-stores {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.store-button img {
    height: 50px;
    transition: transform 0.3s ease;
}

.store-button:hover img {
    transform: scale(1.05);
}

.app-landscape {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
    border-radius: 0;
}

/* Footer */
.footer-section {
    background-color: var(--dark-bg);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
    background-color: white;
    padding: 8px;
    border-radius: 9px;
}

.footer-info p {
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: white;
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-social a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.footer-links a:hover,
.footer-social a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.footer-links h5,
.footer-social h5 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Responsividade */
@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-image::before {
        width: 120%;
        height: 120%;
        filter: blur(40px);
    }
    
    .hero-image img {
        max-height: 400px;
        animation: rotateAndZoom 10s ease-in-out infinite alternate;
    }

    .stats {
        justify-content: center;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 140px 0 80px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-image::before {
        width: 100%;
        height: 100%;
        filter: blur(30px);
    }
    
    .hero-image img {
        max-height: 300px;
        animation: rotateAndZoom 12s ease-in-out infinite alternate;
    }

    .stats {
        flex-direction: row;
        gap: 20px;
        justify-content: space-around;
        width: 100%;
    }

    .stat {
        min-width: auto;
        flex: 0 1 auto;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .about-section {
        padding: 60px 0;
    }

    .about-content h2 {
        font-size: 2rem;
    }

    .about-content p {
        font-size: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .app-stores {
        flex-direction: column;
        align-items: center;
    }

    .stats {
        padding: 0 10px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}

/* Mobile Menu */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1000;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 991px) {
    .mobile-menu-button {
        display: block;
        position: relative;
        width: 30px;
        height: 30px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--light-bg);
        padding: 80px 20px;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav a {
        display: block;
        padding: 10px 0;
        font-size: 1.1rem;
    }

    /* Animação do botão hamburger */
    .mobile-menu-button.active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-button.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-button.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
} 