﻿/* Hidden by default */
.event-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

/* Overlay */
.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    transition: opacity 0.75s ease;
    opacity: 0;
}

/* Popup container */
.popup-content {
    position: relative;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    margin: auto;
    top: 50%;
    transform: translateY(-50%) scale(0.8); /* start smaller */
    background: #fff;
    border-radius: 14px;
    overflow: visible;
    box-shadow: 0 25px 60px rgba(0,0,0,.45);
    opacity: 0;
    /*  SLOWER ANIMATION */
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.75s ease;
}


    .popup-content img {
        width: 100%;
        height: auto; /* 🔑 keeps aspect ratio */
        max-height: 90vh; /* 🔑 fits screen */
        object-fit: contain; /* 🔑 no crop */
        display: block;
    }


@media (max-width: 767px) {
    .popup-content {
        width: 95%;
        max-height: 95vh;
    }

        .popup-content img {
            max-height: 95vh;
        }
}


/* ACTIVE STATE (zoom-in) */
.event-popup.show .popup-content {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}



/* Close button */
.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 32px;
}
