/* modal.css - VERSÃO CORRIGIDA */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.92);
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

/* Imagem dentro do modal - MAIS RESPONSIVA */
.modal-content {
    display: block;
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/* Botão fechar - GARANTINDO QUE APAREÇA */
.close-modal {
    position: fixed;
    top: 25px;
    right: 35px;
    color: #ffffff !important; /* Força branco */
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.close-modal:hover {
    color: #ffd700 !important;
    background: rgba(0,0,0,0.8);
    transform: rotate(90deg);
}

/* Legenda */
#modalCaption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 18px;
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 10px 25px;
    border-radius: 30px;
    max-width: 90%;
    backdrop-filter: blur(5px);
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Animação */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsivo - CELULAR */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 80%;
    }
    
    .close-modal {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 35px;
    }
    
    #modalCaption {
        font-size: 14px;
        padding: 8px 16px;
        bottom: 20px;
    }
}

/* Responsivo - TABLET */
@media (max-width: 1024px) {
    .modal-content {
        max-width: 90%;
        max-height: 85%;
    }
}