/* No topo do style.css */
:root {
    /* Tipografia e Tamanhos Amplos e Imponentes no Desktop */
    --font-size-title-main: clamp(2.3rem, 4.5vw, 3rem);
    --font-size-title-sec: clamp(1.9rem, 3.5vw, 2.5rem);
    --font-size-body: 1.5rem;
    --font-size-small: 1.18rem;
    
    /* Espaçamentos e Cards */
    --padding-card-desktop: 60px 80px;
    --padding-card-mobile: 30px 20px;
    --card-radius: 26px;
    
    /* Cores Globais */
    --primary-green: #2c301d;
    --text-dark: #2c301d;
    --border-color: rgba(51, 63, 52, 0.15);
    --color-paper: #fdfbf7;

    /* Largura máxima expandida horizontalmente no desktop (1400px) */
    --container-max-width: min(94vw, 1400px); 

    /* Cor de destaque para botões e outros elementos */
    --accent-gold: #b59a6a;
}

body {
    font-family: 'EB Garamond', serif;
    margin: 0;
    background-color: #f4f4f4;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    max-width: 100%;

    /* === ESTRUTURA DE LAYOUT === */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centraliza #app-content na horizontal */
    min-height: 100vh;   /* Garante que o body ocupe a altura toda */
}

* {
    box-sizing: border-box;
}

/* === CONTENTOR PRINCIPAL DA PÁGINA === */
#app-content {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Em iPads, Tablets e Desktops (>= 769px): 
   Garante um respiro visual (margem) de 25px a 30px entre o menu lateral e o conteúdo central */
@media (min-width: 769px) {
    #app-content {
        margin-left: clamp(285px, 25vw, 340px);
        width: calc(100% - clamp(285px, 25vw, 340px));
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'EB Garamond', serif;
    font-weight: 600;
}

.section-wrapper {
    width: 100%;
    padding: 50px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: visible;
}

#birdCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    pointer-events: none;
    display: block;
}

.paper-panel {
    position: relative;
    width: 100%;
    max-width: var(--container-max-width); 
    min-width: 0;
    margin: 0 auto; 
    padding: var(--padding-card-desktop);
    text-align: center;
    border-radius: var(--card-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    isolation: isolate;
    background: transparent;
    border: none;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .paper-panel {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .paper-panel {
        padding: var(--padding-card-mobile);
    }
}

.paper-panel.solid {
    background: var(--color-paper);
    border: 1px solid var(--border-color);
}

.paper-panel-blur::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at center, rgb(255 255 255 / 98%) 0%, rgb(255 255 255 / 85%) 60%, rgba(253, 251, 247, 0.4) 75%, transparent 100%);;
    filter: blur(40px);
    -webkit-filter: blur(40px);
    z-index: -1;
    border-radius: calc(var(--card-radius) + 10px);
    transform: translate3d(0,0,0);
}

.title { 
    font-size: var(--font-size-title-main); 
    font-weight: 500; 
    margin-bottom: 20px; 
    color: var(--text-dark); 
    line-height: 1.1; 
}

.title.secondary {
    font-size: var(--font-size-title-sec);
}

.paragraph { 
    font-size: var(--font-size-body); 
    line-height: 1.4; 
    margin-bottom: 20px; 
    color: #333; 
    text-align: center; 
    margin-left: auto;
    margin-right: auto;
    max-width: 850px; 
}

/* === LAYOUT VERTICAL PADRONIZADO PARA AS SECÇÕES === */
.sections-container {
    display: flex;
    flex-direction: column; /* Força os painéis a ficarem um embaixo do outro */
    align-items: center; /* Centraliza perfeitamente no eixo da página */
    gap: 50px; /* Espaço vertical respirável entre uma seção e outra */
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 20px 0;
    box-sizing: border-box;
}

/* O wrapper invisível de cada seção */
.sections-container > div {
    width: 100%;
    display: flex;
    justify-content: center; /* Garante que o paper-panel dentro dele fique no meio */
}


/* =================================== */
/* === ESTILOS RESPONSIVOS/MOBILE === */
/* =================================== */

@media (max-width: 768px) {
    body {
        line-height: 1.6; /* Melhora a legibilidade geral */
    }

    /* Ajuste no wrapper para funcionar com o novo layout do body */
    .section-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0; /* Zeramos o padding aqui porque o paper-panel já cuida disso */
        width: 100%;
        text-align: center;
    }

    /* Aplica o estilo de "card flutuante" de forma responsiva */
    .paper-panel {
        width: 90vw !important; /* Todos os painéis ocuparão 90% da tela mobile */
        max-width: var(--container-max-width) !important;
        margin: 0 auto;
        padding: 30px 20px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        box-sizing: border-box;
    }

    .paper-panel.paper-panel-blur {
        background: transparent !important;
        overflow: visible !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none !important;
        box-shadow: none !important;
        padding: 40px 25px;
    }

    .paragraph {
        font-size: var(--font-size-small);
    }

    /* Estilos para a nuvem de tags/botões */
    .tag-cloud-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-top: 20px;
    }

    .tag-item {
        padding: 8px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
        white-space: nowrap;
    }

    /* Estilos para a navegação de categorias com scroll */
    .category-nav-scroll {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding: 5px 0 15px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .category-nav-scroll::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    /* Estilos para o grid de imagens do acervo */
    .acervo-preview-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        width: 100%;
        margin-top: 20px;
    }

    .acervo-thumb {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 12px;
    }
}
