/* ===================================================
 * Arquivo: index.css
 * Descrição: Estilos para a página pública (index.html)
=================================================== */

/* VARIÁVEIS CSS para cores */
:root {
    --color-primary: #e3b505;
    --color-accent: #cf9f03;
    --color-background-dark: #0a0a0a;
    --color-header-bg: rgba(0, 0, 0, 0.7);
    --color-hero-overlay: rgba(0, 0, 0, 0.6);
    --color-text-dark: #111;
    --color-text-light: #f0f0f0;
    --color-text-footer: #888;
    --color-white: #fff;
}

/* RESET BÁSICO (Público) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--color-background-dark);
    color: var(--color-text-light);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: hidden; /* evita rolagem vertical */
}

/* EFEITO LUMINOSO - PARTÍCULAS */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-radial-gradient(circle at random, rgba(255, 255, 255, 0.05) 0px, transparent 2px);
    pointer-events: none;
    animation: sparkle 10s infinite linear;
    z-index: 0;
}

@keyframes sparkle {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100vw 100vh;
    }
}

/* Media query para acessibilidade, desabilita a animação para quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
    .particles {
        animation: none;
        background: none;
    }
}


/* HEADER (Público) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px; /* altura fixa */
    padding: 0 2rem;
    background-color: var(--color-header-bg);
    position: fixed;
    width: 100%;
    z-index: 10;
    top: 0;
}

.header .logo { /* Especifiquei .header .logo para evitar conflito com .logo do admin */
    width: 60px;
    height: auto;
}

/* AQUI ESTÁ A CORREÇÃO COM FLEXBOX */
.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav a {
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: var(--color-primary);
}

.btn-header {
    background-color: var(--color-primary);
    color: var(--color-text-dark);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
}

/* HERO (Público) */
.hero {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px); /* altura da viewport menos o header */
    /* Caminho da imagem de fundo usando a URL do Supabase */
    background-image: url('https://qrtywghupjaljhxblpcd.supabase.co/storage/v1/object/public/documents/fundoprincipal.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--color-white);
    text-align: center;
    padding: 2rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    z-index: 1;
    box-sizing: border-box;
    overflow: hidden; /* evita scroll interno */
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-hero-overlay);
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.logo-central {
    width: 140px;
    height: auto;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
}

/* BOTÃO PRINCIPAL (Público) */
.btn-main {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background-color: var(--color-primary);
    color: var(--color-text-dark);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-main:hover {
    background-color: var(--color-accent);
}

/* FOOTER (Público) */
.footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    background-color: var(--color-background-dark);
    color: var(--color-text-footer);
    position: relative;
    z-index: 1;
}

/* Estilos para o Modal (NOVO) */
.modal-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal {
    background-color: var(--color-background-dark);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #555;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.modal-header h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    color: var(--color-text-light);
}

.modal-body p {
    margin-bottom: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 15px;
        height: auto; /* Ajusta a altura automaticamente em telas pequenas */
    }
    .header .logo {
        margin-bottom: 10px;
    }
    .nav {
        margin-top: 10px;
    }
    .nav a {
        margin: 0 8px;
        font-size: 1em;
    }
    .hero h1 {
        font-size: 2em;
    }
    .hero p {
        font-size: 0.9em;
    }
    .btn-main {
        padding: 0.8rem 1.5rem;
        font-size: 1em;
    }
}