/* /src/css/global.css */

/* 1. VARIÁVEIS GLOBAIS E RESET */
/* =================================== */
:root {
    /* Paleta de Cores [cite: 44] */
    --cor-principal-azul-noturno: #0A1C3C !important;
    --cor-secundaria-ametista: #6B5B95 !important;
    --cor-destaque-ocre-dourado: #D4AF37 !important;
    --cor-fundo-branco-gelo: #F4F4F4 !important;
    --cor-texto-grafite: #3D3D3D !important;
    --cor-branco-puro: #FFFFFF !important;

    /* Tipografia [cite: 45] */
    --fonte-titulos: 'Lato', sans-serif !important;
    --fonte-corpo: 'Lato', sans-serif !important;

    /* Outras Variavéis */
    --header-height: 80px;
    --transition-speed: 0.3s;
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fonte-corpo);
    background-color: var(--cor-fundo-branco-gelo);
    color: var(--cor-texto-grafite);
    line-height: 1.6;
}

a {
    color: var(--cor-secundaria-ametista);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--cor-destaque-ocre-dourado);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hierarquia de Texto [cite: 45] */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--fonte-titulos);
    color: var(--cor-principal-azul-noturno);
    margin-bottom: 0.75em;
    line-height: 1.2;
}

/* 2. LOADER */
/* =================================== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--cor-fundo-branco-gelo);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity var(--transition-speed) ease-out, visibility var(--transition-speed) ease-out;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    border: 5px solid rgba(10, 28, 60, 0.2);
    border-top: 5px solid var(--cor-principal-azul-noturno);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* 3. COMPONENTES GLOBAIS */
/* =================================== */

/* --- Header --- */
.site-header {
    background-color: var(--cor-branco-puro);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .logo {
    height: 50px;
    width: auto;
}

.nav-menu {
    list-style: none;
    display: none; /* Escondido em mobile */
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--cor-branco-puro);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.nav-menu.active {
    display: flex; /* Exibido quando ativo */
}

.nav-menu li {
    width: 100%;
    text-align: center;
    border-top: 1px solid #eee;
}

.nav-menu a {
    display: block;
    padding: 15px;
    font-weight: 700;
    color: var(--cor-principal-azul-noturno);
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: var(--cor-principal-azul-noturno);
    transition: all var(--transition-speed) ease-in-out;
}

/* Animação do Hamburger */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--cor-principal-azul-noturno);
    color: var(--cor-fundo-branco-gelo);
    padding: 40px 20px 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-section h4 {
    font-family: var(--fonte-titulos);
    color: var(--cor-destaque-ocre-dourado);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a, .footer-section p {
    color: #ccc;
}
.footer-section a:hover {
    color: var(--cor-branco-puro);
}

.footer-copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9em;
    color: #aaa;
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--cor-destaque-ocre-dourado);
    color: var(--cor-principal-azul-noturno);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    display: none; /* Inicialmente oculto */
    opacity: 0;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
    transform: translateY(10px);
}

#back-to-top.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}


/* 4. MEDIA QUERIES PARA RESPONSIVIDADE */
/* =================================== */

/* Tablets e Desktops pequenos */
@media (min-width: 768px) {
    .hamburger-menu {
        display: none; /* Esconde o hamburger em telas maiores [cite: 18] */
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        background-color: transparent;
        box-shadow: none;
    }

    .nav-menu li {
        width: auto;
        border-top: none;
        margin-left: 20px;
    }
    
    .nav-menu a {
        padding: 5px 10px;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .footer-section {
        flex: 1;
        min-width: 200px;
        margin-right: 20px;
    }
}