
/* =========================================
   PALILULA.INFO – LIGHTBOX
========================================= */

body.pinfo-lightbox-open {
    overflow: hidden !important;
}

.pinfo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 80px;
    background: rgba(0, 0, 0, 0.94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pinfo-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pinfo-lb-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.pinfo-lb-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 115px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    animation: pinfoLightboxZoom 0.25s ease;
}

.pinfo-lb-close,
.pinfo-lb-prev,
.pinfo-lb-next {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.pinfo-lb-close:hover,
.pinfo-lb-prev:hover,
.pinfo-lb-next:hover {
    background: #de0e3f;
    color: #fff;
}

.pinfo-lb-close {
    top: 20px;
    right: 25px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
}

.pinfo-lb-prev,
.pinfo-lb-next {
    top: 50%;
    width: 48px;
    height: 58px;
    border-radius: 6px;
    font-size: 24px;
    transform: translateY(-50%);
}

.pinfo-lb-prev {
    left: 20px;
}

.pinfo-lb-next {
    right: 20px;
}

.pinfo-lb-counter {
    margin-top: 15px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.pinfo-lightbox button:focus-visible {
    outline: 2px solid #de0e3f;
    outline-offset: 4px;
}

@keyframes pinfoLightboxZoom {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobilni uređaji */
@media (max-width: 767px) {
    .pinfo-lightbox {
        padding: 45px 12px;
    }

    .pinfo-lb-image {
        max-width: 100%;
        max-height: calc(100vh - 110px);
    }

    .pinfo-lb-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .pinfo-lb-prev,
    .pinfo-lb-next {
        width: 38px;
        height: 48px;
        font-size: 19px;
        background: rgba(0, 0, 0, 0.55);
    }

    .pinfo-lb-prev {
        left: 8px;
    }

    .pinfo-lb-next {
        right: 8px;
    }

    .pinfo-lb-counter {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pinfo-lightbox,
    .pinfo-lb-image {
        animation: none;
        transition: none;
    }
}
