/* =========================================================
   BARRA DE GALERIAS
   ========================================================= */
.barra-galerias {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px 0;
}

/* SETAS */
.seta {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(241, 92, 5, 0.5);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 32px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    color: #fff;
    transition: 0.3s;
    z-index: 50;
    font-weight: bold;
    line-height: 1;
}
.seta:hover { background: rgba(255, 140, 0, 0.35); }

/* MINIATURAS */
.galerias-container {
    display: flex;
    gap: 20px;
    width: 650px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 0;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.galerias-container::-webkit-scrollbar { display: none; }

.galeria-item {
    width: 120px;
    height: 160px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    border: 2px solid rgba(255, 140, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
    cursor: pointer;
    transition: 0.3s ease;
    text-align: center;
    padding: 10px;
}
.galeria-item img.mini {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

.galeria-item:hover,
.galeria-item.selecionada {
    background: rgba(255, 140, 0, 0.75);
    box-shadow: 0 0 15px rgba(255, 140, 0, 1);
}

/* =========================================================
   GALERIA DE FOTOS
   ========================================================= */
.foto-item {
    width: 240px;
    height: 180px;
    margin: 10px;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid rgba(255, 140, 0, 0.45);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}


.galeria-fotos {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 20px 0;
    justify-items: center;
}

/* =============================
   MODAL ANIMADO
   ============================= */

.modal {
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 999;
}

.modal-box {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 95vw;
    max-height: 95vh;
}

.modal-conteudo {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.8);
    object-fit: contain;
    opacity: 0;
    transform: scaleY(0.1) scaleX(0.1);
    animation: expandir 0.55s ease forwards;
}

/* ETAPA 1 — abre vertical */
@keyframes expandir {
    0% {
        opacity: 0;
        transform: scaleY(0.1) scaleX(0.1);
    }
    40% {
        opacity: 1;
        transform: scaleY(1) scaleX(0.2);
    }
    100% {
        opacity: 1;
        transform: scaleY(1) scaleX(1);
    }
}



/* =============================
   ANIMAÇÃO DE FECHAR (REVERSA)
   ============================= */

@keyframes fecharAnimacao {
    0% {
        opacity: 1;
        transform: scaleY(1) scaleX(1);
    }
    40% {
        opacity: 1;
        transform: scaleY(1) scaleX(0.2);
    }
    100% {
        opacity: 0;
        transform: scaleY(0.1) scaleX(0.1);
    }
}

.modal-conteudo.fechar-animacao {
    animation: fecharAnimacao 0.45s ease forwards;
}

.fecharGlobal {
    position: fixed !important;
    top: 50%;
    right: 25px; /* ajuste a distância da borda */
    transform: translateY(-50%);
    font-size: 42px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    transition: 0.25s;
    z-index: 999999 !important;
}

.fecharGlobal:hover {
    background: rgba(255, 80, 80, 0.8);
}

/* ============================
   AJUSTE DO X PARA CELULAR (versão perfeita)
============================ */
@media (max-width: 600px) {
    .fecharGlobal {
        position: absolute !important;
        top: 100px !important;     /* sobe o X acima da imagem */
        right: 10px !important;    /* encosta à direita */
        transform: none !important;

        font-size: 32px !important;
        padding: 6px 10px !important;

        background: rgba(255, 136, 0, 0.65) !important;
        border-radius: 8px !important;
        color: #fff !important;

        z-index: 9999 !important;  /* suficiente, sem competir com o menu */
    }

    /* Faz a caixa da imagem criar espaço superior */
    .modal-box {
        margin-top: 40px !important;  /* empurra a imagem para baixo */
    }
}
