/* =========================================================
   1. MENU FIXO APÓS O HERO
   ========================================================= */

:root {
    --heag-navbar-height: 82px;
}


/* Menu em seu estado original */
.heag-navbar {
    width: 100%;
}


/* Menu fixo após sair do hero */
.heag-navbar.heag-navbar-fixed {
    position: fixed !important;

    top: 0;
    left: 0;
    right: 0;

    width: 100%;
    z-index: 9999;

    background-color: #ffffff !important;

    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.14);

    animation:
        heagNavbarEntrada 0.3s ease forwards;
}


/* Garante que o nav interno continue branco */
.heag-navbar.heag-navbar-fixed .navbar {
    background-color: #ffffff !important;
}


/* Impede que a página salte quando o menu fica fixo */
.heag-navbar-placeholder {
    display: none;

    width: 100%;
    height: var(--heag-navbar-height);
}


.heag-navbar-placeholder.heag-navbar-placeholder-active {
    display: block;
}


/* Entrada suave do menu */
@keyframes heagNavbarEntrada {

    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }

}


/* Impede que o menu cubra as seções ao clicar nos links */
section[id],
header[id],
footer[id] {
    scroll-margin-top:
        calc(var(--heag-navbar-height) + 20px);
}


/* Ajustes para celular e tablet */
@media (max-width: 991.98px) {

    .heag-navbar.heag-navbar-fixed {
        max-height: 100vh;
        overflow-y: auto;
    }

}


/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {

    .heag-navbar.heag-navbar-fixed {
        animation: none;
    }

}


/* =========================================================
   2. VÍDEO DE FUNDO DO HERO
   ========================================================= */

.heag-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;

    /* Cor exibida caso o vídeo ainda esteja carregando */
    background-color: #9b9b9b;
}


/* Vídeo ocupando todo o fundo */
.heag-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 100%;
    height: 100%;

    min-width: 100%;
    min-height: 100%;

    object-fit: cover;
    object-position: center;

    transform: translate(-50%, -50%);

    z-index: 0;
    pointer-events: none;
}


/* Camada sobre o vídeo para melhorar a leitura */
.heag-hero-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(220, 220, 220, 0.96) 0%,
        rgba(255, 244, 244, 0.86) 38%,
        rgba(184, 166, 150, 0.29) 68%,
        rgba(202, 160, 87, 0.351) 100%
    );

    z-index: 1;
    pointer-events: none;
}


/* Mantém os textos e botões acima do vídeo */
.heag-hero-content {
    position: relative;
    width: 100%;
    z-index: 2;
}


/* Limita a largura do texto para manter a composição original */
.heag-hero-content p {
    max-width: 650px;
}


/* Tablets e celulares */
@media (max-width: 991.98px) {

    .heag-hero {
        min-height: 580px;
    }

    .heag-hero-overlay {
        background: rgba(255, 251, 246, 0.632);
    }

}


/* Celulares menores */
@media (max-width: 575.98px) {

    .heag-hero {
        min-height: 560px;
    }

    .heag-hero-content {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .heag-hero .display-2 br {
        display: none;
    }

}


/* Não exibe o vídeo na impressão */
@media print {

    .heag-hero-video {
        display: none;
    }

}


/* =========================================================
   3. GALERIA DE FOTOS
   ========================================================= */

.heag-gallery-item {
    height: 100%;
}


/* Mantém todas as imagens com o mesmo tamanho */
.heag-gallery-item > div {
    aspect-ratio: 4 / 3;
    background-color: #eeeeee;
}


.heag-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}


/* Legenda abaixo da fotografia */
.heag-gallery-caption {
    padding-top: 10px;

    font-size: 0.82rem;
    line-height: 1.45;

    color: #777777;
}


/* Efeito ao passar o mouse */
.heag-gallery-item:hover .heag-gallery-image {
    transform: scale(1.04);
}


/* Camada clicável sobre a foto */
.heag-gallery .portfolio-btn {
    position: absolute;

    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    opacity: 0;

    background-color: rgba(0, 0, 0, 0.48);

    transition: opacity 0.3s ease;
}


.heag-gallery-item:hover .portfolio-btn {
    opacity: 1;
}


/* Faz toda a área da foto abrir o modal */
.heag-gallery .portfolio-btn a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    text-decoration: none;
}


/* Ajusta a legenda exibida no Lightbox */
.lb-data .lb-caption {
    display: block;

    padding-top: 5px;

    font-size: 0.9rem;
    line-height: 1.5;

    font-weight: 400;
}


/* Tablet */
@media (max-width: 991.98px) {

    .heag-gallery-caption {
        font-size: 0.85rem;
    }

}


/* Celular */
@media (max-width: 575.98px) {

    .heag-gallery .portfolio-item {
        margin-bottom: 28px !important;
    }

    .heag-gallery-caption {
        font-size: 0.9rem;
    }

}