/* ==========================================================================
   ZIO TECH LIMITED — Festival Greeting Popup
   Shown site-wide (see layout.ejs). Content is dynamic — comes from
   whichever row in festival_popups the admin has marked active
   (see /admin/festival).
   ========================================================================== */

.festival-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 15, 30, .62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.festival-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.festival-popup {
    position: relative;
    max-width: 560px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    transform: scale(.9) translateY(10px);
    transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.festival-popup-overlay.is-visible .festival-popup {
    transform: scale(1) translateY(0);
}

.festival-popup__link {
    display: block;
    background: #f1f5f9;
    line-height: 0;
}

/* No forced crop — the image keeps its own aspect ratio (landscape,
   portrait, or square) and simply scales to fit, so nothing important
   in the poster ever gets cut off, on desktop or mobile. */
.festival-popup__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
}

.festival-popup__caption {
    padding: 18px 22px 22px;
    text-align: center;
}

.festival-popup__caption h3 {
    margin: 0 0 6px;
    font-size: 19px;
    color: #0f172a;
    font-weight: 700;
}

.festival-popup__caption p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.festival-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #0f172a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
    transition: background .2s ease, transform .2s ease;
    z-index: 2;
}

.festival-popup__close:hover {
    background: #fff;
    transform: scale(1.08);
}

@media (max-width: 480px) {
    .festival-popup { max-width: 94vw; max-height: 88vh; }
    .festival-popup__image { max-height: 68vh; }
    .festival-popup__caption { padding: 14px 18px 18px; }
}
