/* Overlay do popup */
.popup {
    display: none;
    position: fixed;
    z-index: 9999;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.6);

    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;
}

/* Quando o popup estiver aberto */
.popup.ativo {
    display: flex;
}

/* Container do popup */
.popup-content {
    position: relative;

    width: 90%;
    max-width: 700px;
    max-height: 90vh;

    background: #fff;
    border-radius: 12px;

    overflow: hidden;

    margin: auto;

    box-shadow: 0 15px 40px rgba(0,0,0,0.4);

    animation: popupFade 0.35s ease;
}

/* Imagem */
.popup-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* Botão fechar */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;

    font-size: 38px;
    font-weight: bold;

    color: white;
    cursor: pointer;

    z-index: 10;

    transition: transform 0.2s ease, opacity 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.15);
    opacity: 0.8;
}

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

/* Tablet */
@media (max-width: 768px) {
    .popup-content {
        max-width: 95%;
    }

    .close-btn {
        font-size: 34px;
    }
}

/* Mobile */
@media (max-width: 480px) {

    .popup {
        padding: 10px;
    }

    .close-btn {
        font-size: 30px;
        top: 5px;
        right: 10px;
    }
}
