* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #000;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #000;
}

body.preloader-active {
    overflow: hidden;
}


#glCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: block;
    transition: opacity 0.4s ease;
}

@keyframes heroMovimento {
    0% {
        background-size: 125%;
        background-position: center center;
    }

    20% {
        background-size: 140%;
        background-position: right top;
    }

    60% {
        background-size: 140%;
        background-position: left top;
    }

    80% {
        background-size: 140%;
        background-position: right bottom;
    }

    100% {
        background-size: 140%;
        background-position: center bottom;
    }
}

/* ==========================================================================
   Seção Hero e Título (Camada de Conteúdo)
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}

.hero-title {
    position: absolute;
    top: 54%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    font-family: 'Roboto Condensed', Georgia, serif;
    font-weight: 600;
    font-size: clamp(3rem, 5.5vw, 6.5rem);
    letter-spacing: 0.015em;
    color: #F1E4C6;
    text-shadow:
        0 0 30px rgba(255, 240, 200, 0.6),
        /* brilho suave */
        0 0 60px rgba(255, 240, 200, 0.4),
        /* luz mais espalhada */
        0 0 100px rgba(255, 240, 200, 0.2);
    /* halo distante */
    white-space: nowrap;
    text-align: center;
    line-height: 1;
    pointer-events: auto;
    opacity: 0;
    z-index: 2;
    will-change: opacity, transform;
}

@media (min-width: 1024px) {
    .hero-title {
        width: 42.5vw;
        max-width: 45vw;
        min-width: 40vw;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.page-content {
    position: relative;
    width: 100%;
    z-index: 10;
}

.spacer-section,
.hero-mobile-spacer {
    display: none;
    height: 0;
    min-height: 0;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

/* ==========================================================================
   Seção Últimos Eventos
   Fundo sólido opaco e isolamento estrutural completo em relação à Hero
   ========================================================================== */
#ultimos-eventos,
#eventos,
.eventos-section {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    background-color: #2b170c;
    background-image: url('../obts/casa.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#eventosCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.eventos-title {
    font-family: 'Roboto Condensed', Georgia, serif;
    font-weight: 600;
    letter-spacing: var(--eventos-title-letter-spacing, 0.015em);
    color: #F1E4C6;
    text-align: center;
    text-shadow: var(--eventos-title-text-shadow,
        0 0 50px rgba(255,255,255,1),
        0 0 100px rgba(255,240,200,1),
        0 0 150px rgba(255,240,200,0.9),
        0 0 250px rgba(255,240,200,0.8),
        0 0 350px rgba(255,240,200,0.7));
}

/* ==========================================================================
   Controle de Navegação Mobile (Hero Lock, Minimal Scroll & Reveal)
   Bloqueio e liberação exclusiva para dispositivos móveis com Hero fixa em 100vh
   ========================================================================== */
body.is-mobile-locked {
    /* Permite rolagem vertical sutil ao longo do spacer no mobile */
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100%;
}

body.is-mobile-locked #ultimos-eventos,
body.is-mobile-locked .eventos-section {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* No mobile: Hero e canvas rigorosamente fixos em 100vh / 100dvh */
@media (max-width: 1024px) {
    .hero-section {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        z-index: 5;
        overflow: hidden;
        pointer-events: none;
    }

    #glCanvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
    }

    .hero-title {
        top: 54%;
        pointer-events: auto;
    }

    /* Container de rolagem sutil no mobile (115vh - 120vh) */
    .hero-mobile-spacer,
    .spacer-section {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        position: relative;
        z-index: 25;
        width: 100%;
        height: var(--mobile-spacer-height, 118vh);
        min-height: var(--mobile-spacer-height, 118vh);
        pointer-events: none;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 20px));
        box-sizing: border-box;
    }
}

/* Botão Seta para Baixo (Exclusivo Mobile) */
.hero-scroll-btn {
    display: none; /* Desktop sempre oculto */
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0.85rem;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--hero-btn-fade-duration, 0.4s) ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    z-index: 35;
}

body.is-mobile-device .hero-scroll-btn,
body.is-mobile-locked .hero-scroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: heroArrowBounce 2s ease-in-out infinite;
}

.hero-scroll-btn.no-bounce {
    animation: none !important;
}

.hero-scroll-btn.is-hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    animation: none !important;
}

.hero-scroll-btn img,
.hero-scroll-btn svg {
    width: 42px;
    height: 42px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(241, 228, 198, 0.6)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8));
    transition: transform 0.2s ease;
}

.hero-scroll-btn:active img,
.hero-scroll-btn:active svg {
    transform: scale(0.88);
}

@keyframes heroArrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* Proteção estrita do Desktop: nunca aplica travas nem exibe elementos mobile */
@media (min-width: 1025px) {
    .hero-section {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: 100vh !important;
        min-height: 100vh !important;
    }
    #glCanvas {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    .hero-title {
        top: 54% !important;
    }
    .hero-mobile-spacer,
    .spacer-section {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
    }
    .hero-scroll-btn {
        display: none !important;
    }
    body.is-mobile-locked {
        overflow: auto !important;
        height: auto !important;
    }
    body.is-mobile-locked #ultimos-eventos,
    body.is-mobile-locked .eventos-section {
        display: flex !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}



