@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

/* =====================================
   Overlay
   ===================================== */
.zkm-pb-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: var(--zkm-pb-overlay-bg, rgba(0,0,0,0.75));
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overscroll-behavior: contain;
    padding: 20px;
    box-sizing: border-box;
}
.zkm-pb-overlay.zkm-pb-active {
    display: flex;
    opacity: 1;
}

/* =====================================
   Stage (perspective wrapper za 3D rotate)
   ===================================== */
.zkm-pb-stage {
    position: relative;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1500px;
}

/* =====================================
   Modal (pravi popup container - animira se)
   ===================================== */
.zkm-pb-modal {
    position: relative;
    background: var(--zkm-pb-bg, #ffffff);
    color: var(--zkm-pb-color, #000000);
    width: 100%;
    max-width: var(--zkm-pb-max-width, 800px);
    max-height: 90vh;
    border-radius: var(--zkm-pb-radius, 8px);
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
    overflow: hidden;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, opacity;
    font-family: 'Rubik', sans-serif;
}

.zkm-pb-inner {
    display: block;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: inherit;
    text-decoration: none;
}
.zkm-pb-inner.zkm-pb-link { cursor: pointer; }

/* Image */
.zkm-pb-image { line-height: 0; }
.zkm-pb-image img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

/* Text */
.zkm-pb-text {
    padding: 28px 32px;
}
.zkm-pb-title {
    margin: 0 0 14px 0;
    font-family: 'Rubik', sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
}
.zkm-pb-content {
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: inherit;
}
.zkm-pb-content p { margin: 0 0 12px 0; }
.zkm-pb-content p:last-child { margin: 0; }
.zkm-pb-content a { color: inherit; text-decoration: underline; }

/* Slika + tekst kombinacija - tekst ide ispod slike */

/* =====================================
   Close button - identican plakat overlayu
   ===================================== */
.zkm-pb-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 46px;
    height: 46px;
    background: rgba(0,0,0,0.55);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.zkm-pb-close svg {
    width: 18px;
    height: 18px;
    display: block;
}
.zkm-pb-close:hover {
    background: rgba(0,0,0,0.85);
    border-color: rgba(255,255,255,0.6);
    transform: scale(1.1);
}

/* Inside vs outside (default je vec outside-style jer X je na overlay roditelju) */
.zkm-pb-close-inside .zkm-pb-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: rgba(0,0,0,0.5);
    border-width: 1px;
}
.zkm-pb-close-inside .zkm-pb-close svg { width: 14px; height: 14px; }

/* =====================================
   Rotate animacija - identicna plakat rotate
   ===================================== */
.zkm-pb-modal.zkm-pb-anim-in,
.zkm-pb-modal.zkm-pb-anim-out {
    animation-duration: 800ms;
    animation-fill-mode: both;
}
.zkm-pb-modal.zkm-pb-anim-in {
    animation-name: zkm-pb-rotate-in;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.zkm-pb-modal.zkm-pb-anim-out {
    animation-name: zkm-pb-rotate-out;
    animation-timing-function: cubic-bezier(0.64, 0, 0.78, 0);
}
@keyframes zkm-pb-rotate-in {
    from { opacity: 0; transform: rotate(-180deg) scale(0.4); }
    to   { opacity: 1; transform: rotate(0deg) scale(1); }
}
@keyframes zkm-pb-rotate-out {
    from { opacity: 1; transform: rotate(0deg) scale(1); }
    to   { opacity: 0; transform: rotate(180deg) scale(0.4); }
}

/* =====================================
   Scroll lock body classa
   ===================================== */
html.zkm-pb-scroll-locked,
body.zkm-pb-scroll-locked {
    position: fixed !important;
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

/* =====================================
   Responsive - tablet
   ===================================== */
@media (max-width: 1100px) {
    .zkm-pb-text { padding: 24px 26px; }
    .zkm-pb-title { font-size: 24px; }
    .zkm-pb-content { font-size: 15px; }
}

/* =====================================
   Responsive - mobitel
   ===================================== */
@media (max-width: 690px) {
    .zkm-pb-overlay { padding: 12px; }

    .zkm-pb-modal {
        max-width: 100%;
        max-height: 92vh;
    }

    .zkm-pb-inner { max-height: 92vh; }

    .zkm-pb-text { padding: 20px 22px; }
    .zkm-pb-title { font-size: 22px; }
    .zkm-pb-content { font-size: 15px; }

    .zkm-pb-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    .zkm-pb-close svg { width: 16px; height: 16px; }

    .zkm-pb-close-inside .zkm-pb-close {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
    }
}
