/* =========================================================
   MODAL COSTELADA FLORESTA AMAZÔNICA 2025
   Arquivo CSS completo ajustado
   ========================================================= */

/* Overlay da modal (fundo escuro blur) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    display: none; /* será ativado via JS */
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 15px; /* evita encostar nas bordas no PC quando muito grande */
    box-sizing: border-box;
}

/* Caixa central */
.modal-box {
    background: #000;
    border: 2px solid #e9b454;
    padding: 15px;
    width: 90%;
    max-width: 420px;               /* ligeiramente menor para caber melhor */
    border-radius: 12px;
    position: relative;
    text-align: center;
    box-shadow: 0 0 25px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;

    /* CORREÇÃO DO ALONGAMENTO */
    max-height: 90vh;               /* nunca passa da altura da tela */
    overflow-y: auto;               /* scroll interno, se necessário */
}

/* Barra de rolagem suave (aparece somente quando necessário) */
.modal-box::-webkit-scrollbar {
    width: 6px;
}
.modal-box::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}
.modal-box::-webkit-scrollbar-thumb {
    background: #e9b454;
    border-radius: 8px;
}

/* Animação de abertura */
@keyframes zoomIn {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Botão de fechar (X) */
.modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 35px;
    height: 35px;
    border: none;
    background: #e9b454;
    color: #000;
    font-size: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    z-index: 9999;
}

/* Imagem do folder – agora sem cortes */
.modal-image {
    width: 100%;
    height: auto;                /* mantém proporção */
    object-fit: contain;         /* mostra a imagem inteira */
    max-height: 70vh;            /* garante que caiba na tela inteira */
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e9b454;
}

/* ==== MOBILE: imagem inteira também ==== */
@media (max-width: 480px) {
    .modal-image {
        max-height: 70vh !important;
        border-radius: 8px !important;
    }
}


/* Botão de compra */
.btn-ingresso {
    display: inline-block;
    background: #e9b454;
    color: #000;
    padding: 14px 20px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.2rem;
    transition: 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.btn-ingresso:hover {
    background: #fff;
}


/* =========================================================
   🔥 AJUSTES PARA CELULARES (TELAS PEQUENAS)
   ========================================================= */
@media (max-width: 480px) {

    .modal-overlay {
        padding: 10px !important;
    }

    .modal-box {
        width: 88% !important;       /* mais espaço nas bordas */
        max-width: 360px !important;
        padding: 10px !important;
        border-radius: 10px !important;
        max-height: 88vh !important; /* mais baixo no celular */
    }

    .modal-image {
        max-height: 45vh !important; /* reduz imagem no mobile */
        border-radius: 8px !important;
    }

    .btn-ingresso {
        font-size: 1rem !important;
        padding: 12px 16px !important;
    }

    .modal-close {
        top: -8px !important;
        right: -8px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 20px !important;
    }
}
