import { ThemeListener } from './components/layout/ThemeListener';
import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { ScrollToTop } from './components/ScrollToTop';
import { Navbar } from './components/layout/Navbar';
import { Footer } from './components/layout/Footer';
import { WhatsAppButton } from './components/layout/WhatsAppButton';
import { CookieBanner } from './components/layout/CookieBanner';
import { Analytics } from './components/layout/Analytics';
import { Home } from './pages/Home';
import { Sobre } from './pages/Sobre';
import { Areas } from './pages/Areas';
import { ComoFunciona } from './pages/ComoFunciona';
import { Blog } from './pages/Blog';
import { BlogPost } from './pages/BlogPost';
import { Contact } from './pages/Contact';

export default function App() {
  return (
    <Router>
      <ThemeListener />
      <ScrollToTop />
      <Analytics />
      <div className="overflow-x-hidden flex min-h-screen flex-col font-sans text-gray-800 antialiased selection:bg-brand-gold selection:text-white">
        <Navbar />
        <div className="flex-1">
          <Routes>
            <Route path="/" element={<Home />} />
            <Route path="/sobre" element={<Sobre />} />
            <Route path="/areas" element={<Areas />} />
            <Route path="/funcionamento" element={<ComoFunciona />} />
            <Route path="/blog" element={<Blog />} />
            <Route path="/blog/:id" element={<BlogPost />} />
            <Route path="/contato" element={<Contact />} />
          </Routes>
        </div>
        <Footer />
        <WhatsAppButton />
        <CookieBanner />
      </div>
    </Router>
  );
}

