/* ============================================================
   VIDEO KLUB — [mtel_video_klub]
   Slider (tri kvadratne kartice, srednja istaknuta) + redovi postera + prozor naslova
   ============================================================ */

.vk-sec {
    --vk-navy-900: var(--navy-900, #050F20);
    --vk-navy-800: var(--navy-800, #0A1F3D);
    --vk-navy-700: var(--navy-700, #102949);
    --vk-red: var(--red, #C80815);
    --vk-paper: var(--paper, #F4F6F9);
    --vk-grey-300: var(--grey-300, #B9C4D4);
    --vk-grey-500: var(--grey-500, #6B7A91);
    --vk-white: var(--white, #FFFFFF);
    --vk-ease: var(--ease, cubic-bezier(.22,.61,.36,1));

    /* probijanje van WP "constrained" layout kontejnera */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    padding: 56px 0 72px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--vk-navy-900) 0%, var(--vk-navy-800) 100%);
    color: var(--vk-white);
}

.vk-head {
    margin-bottom: 32px;
}
.vk-head h1 {
    margin: 0;
    color: var(--vk-white);
}
.vk-head .eyebrow {
    color: var(--vk-grey-300);
}

.vk-admin-hint {
    padding: 18px 20px;
    border: 1.5px dashed rgba(255,255,255,.3);
    border-radius: 14px;
    color: var(--vk-grey-300);
    font-size: 14px;
}
.vk-admin-hint a { color: var(--vk-white); text-decoration: underline; }

/* ── Slider ── */
.vk-slider {
    --vk-size: min(78vw, 440px);
    --vk-gap: 14px;
    position: relative;
}

/* bez JavaScripta: običan vodoravni niz koji se prevlači */
.vk-stage {
    display: flex;
    gap: var(--vk-gap);
    padding: 0 calc(50% - var(--vk-size) / 2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.vk-stage::-webkit-scrollbar { display: none; }

.vk-slide {
    position: relative;
    flex: none;
    width: var(--vk-size);
    height: var(--vk-size);
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: var(--vk-navy-700);
    color: var(--vk-white);
    cursor: pointer;
    scroll-snap-align: center;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

/* sa JavaScriptom: kartice se ređaju oko sredine, beskonačno u krug */
.vk-stage.is-ready {
    display: block;
    height: var(--vk-size);
    padding: 0;
    overflow: visible;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}
.vk-stage.is-ready .vk-slide {
    --o: 0;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(calc(-50% + var(--o) * (100% + var(--vk-gap)))) scale(.86);
    opacity: .45;
    transition: transform .55s var(--vk-ease), opacity .55s var(--vk-ease), box-shadow .55s var(--vk-ease);
}
.vk-stage.is-ready .vk-slide.is-active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    z-index: 2;
    box-shadow: 0 40px 70px -34px rgba(0,0,0,.85);
}
.vk-stage.is-ready .vk-slide.is-far {
    opacity: 0;
    pointer-events: none;
}
.vk-stage.is-ready .vk-slide.no-anim {
    transition: none;
}
.vk-slide:focus-visible {
    outline: 2px solid var(--orange, #FFB347);
    outline-offset: 4px;
    border-radius: 18px;
}

.vk-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
}
.vk-slide-noimg {
    position: absolute;
    inset: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1.5px dashed rgba(255,255,255,.3);
    border-radius: 12px;
    font-family: "Pero", sans-serif;
    font-size: clamp(20px, 5vw, 30px);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.vk-slide-fade {
    position: absolute;
    inset: auto 0 0 0;
    height: 58%;
    background: linear-gradient(180deg, rgba(5,15,32,0) 0%, rgba(5,15,32,.6) 45%, rgba(5,15,32,.92) 100%);
    pointer-events: none;
}
.vk-slide-meta {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    pointer-events: none;
}
.vk-slide-name {
    margin-bottom: 4px;
    font-family: "Pero", sans-serif;
    font-size: clamp(22px, 6vw, 34px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.01em;
    text-wrap: balance;
    text-shadow: 0 2px 14px rgba(5,15,32,.7);
}
.vk-slide-kind,
.vk-slide-sub {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.vk-slide-kind {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.vk-slide-sub {
    font-size: 13px;
    color: var(--vk-grey-300);
}
.vk-slide-kind i,
.vk-slide-sub i {
    width: 2px;
    height: 12px;
    border-radius: 2px;
    background: var(--vk-red);
}
.vk-slide-sub i { background: rgba(255,255,255,.35); }

/* ── Strelice (samo na širim ekranima) ── */
.vk-nav {
    position: absolute;
    top: calc(var(--vk-size) / 2);
    z-index: 3;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border-radius: 50%;
    background: rgba(255,255,255,.96);
    color: var(--vk-navy-800);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px -12px rgba(0,0,0,.7);
    transition: transform .2s var(--vk-ease), background .2s var(--vk-ease);
}
.vk-nav:hover { transform: scale(1.08); background: var(--vk-white); }
/* strelice stoje uz ivice sadržaja stranice, ne uz srednju karticu */
.vk-nav-prev { left: max(16px, calc((100vw - var(--max, 1240px)) / 2 - 24px)); }
.vk-nav-next { right: max(16px, calc((100vw - var(--max, 1240px)) / 2 - 24px)); }

/* ── Tačkice ── */
.vk-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-top: 18px;
    min-height: 24px;
}
.vk-dot {
    width: 20px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vk-dot::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 7px;
    background: rgba(255,255,255,.4);
    transition: width .3s var(--vk-ease), background .3s var(--vk-ease);
}
.vk-dot.is-active { width: 34px; }
.vk-dot.is-active::before {
    width: 24px;
    background: var(--vk-white);
}

@media (min-width: 720px) {
    .vk-sec { padding: 72px 0 88px; }
    .vk-slider { --vk-gap: 20px; }
    .vk-nav:not([hidden]) { display: flex; }
    .vk-dots { margin-top: 24px; }
}
@media (min-width: 1024px) {
    .vk-slider { --vk-size: clamp(380px, 32vw, 500px); }
    .vk-slide-kind { font-size: 14px; }
}

/* ── Redovi naslova (posteri) ── */
.vk-group-head {
    margin-top: 56px;
}
.vk-group-title {
    margin: 0;
    font-size: clamp(26px, 6vw, 38px);
    line-height: 1.1;
    color: var(--vk-white);
}
.vk-group-head + .vk-rail-sec {
    margin-top: 24px;
}
.vk-rail-sec {
    margin-top: 48px;
}
.vk-rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.vk-rail-title {
    margin: 0;
    font-size: clamp(20px, 4.6vw, 26px);
    line-height: 1.15;
    color: var(--vk-white);
}
.vk-rail-count {
    margin-left: 6px;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--vk-grey-500);
    vertical-align: middle;
}
.vk-rail-nav {
    display: none;
    gap: 8px;
}
.vk-rail-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: transparent;
    color: var(--vk-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s var(--vk-ease), color .2s var(--vk-ease), border-color .2s var(--vk-ease);
}
.vk-rail-btn:hover {
    background: var(--vk-white);
    border-color: var(--vk-white);
    color: var(--vk-navy-800);
}

.vk-rail {
    --vk-card: 42vw;
    --vk-edge: max(var(--gut, 20px), calc((100vw - var(--max, 1200px)) / 2 + var(--gut, 20px)));
    display: flex;
    gap: 12px;
    padding: 4px var(--vk-edge) 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-left: var(--vk-edge);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.vk-rail::-webkit-scrollbar { display: none; }
.vk-rail.is-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
    -webkit-user-select: none;
    user-select: none;
}
.vk-rail.is-dragging .vk-card { cursor: grabbing; }

.vk-card {
    flex: none;
    width: var(--vk-card);
    max-width: 200px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--vk-white);
    cursor: pointer;
    text-align: left;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
}
.vk-card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--vk-navy-700);
    transition: transform .25s var(--vk-ease), box-shadow .25s var(--vk-ease);
}
.vk-card-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    pointer-events: none;
}
.vk-card-noimg {
    position: absolute;
    inset: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1.5px dashed rgba(255,255,255,.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}
.vk-card-name {
    display: -webkit-box;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.vk-card:hover .vk-card-poster {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px -22px rgba(0,0,0,.9);
}
.vk-card:focus-visible {
    outline: 2px solid var(--orange, #FFB347);
    outline-offset: 4px;
    border-radius: 12px;
}

@media (min-width: 720px) {
    .vk-group-head { margin-top: 80px; }
    .vk-rail-sec { margin-top: 56px; }
    .vk-rail { --vk-card: 180px; gap: 16px; }
    .vk-rail-nav { display: flex; }
    .vk-card-name { font-size: 15px; }
}
@media (min-width: 1024px) {
    .vk-rail { --vk-card: 200px; gap: 18px; }
}

/* ── Prozor naslova (<dialog>) — po uzoru na prozor kanala ── */
.vk-modal {
    border: 0;
    padding: 0;
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    border-radius: 20px;
    background: var(--vk-white);
    color: var(--vk-navy-800);
    box-shadow: 0 40px 80px -30px rgba(5,15,32,.7);
}
.vk-modal[open] {
    animation: vk-modal-in .28s var(--vk-ease);
}
.vk-modal::backdrop {
    background: rgba(5,15,32,.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.vk-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--vk-white);
    color: var(--vk-navy-800);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px -8px rgba(10,31,61,.45);
    transition: background .2s var(--vk-ease), color .2s var(--vk-ease);
}
.vk-modal-close:hover {
    background: var(--vk-navy-800);
    color: var(--vk-white);
}
.vk-modal-close:focus-visible {
    outline: 2px solid var(--vk-red);
    outline-offset: 2px;
}

.vk-modal-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--vk-navy-900);
    overflow: hidden;
}
.vk-modal-media[hidden] { display: none; }
.vk-modal-media img,
.vk-modal-media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
}
.vk-modal-media img { object-fit: cover; }

/* dugme koje tek na klik učitava YouTube */
.vk-yt {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    cursor: pointer;
}
.vk-yt::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(5,15,32,.35);
    transition: background .2s var(--vk-ease);
}
.vk-yt:hover::after { background: rgba(5,15,32,.2); }
.vk-yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
    border-radius: 50%;
    background: var(--spectar, linear-gradient(45deg,#C80815 0%,#C72C48 46%,#FFB347 100%));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 34px -10px rgba(200,8,21,.9);
    transition: transform .2s var(--vk-ease);
}
.vk-yt:hover .vk-yt-play { transform: scale(1.08); }
.vk-yt-play svg { margin-left: 4px; }
.vk-yt-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 1;
    color: var(--vk-white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-align: center;
}

.vk-modal-body {
    padding: 24px 28px 30px;
}
.vk-modal-name {
    margin: 0;
    padding-right: 36px;
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--vk-navy-800);
}
.vk-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.vk-modal-tags:empty { display: none; }
.vk-modal-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--vk-paper);
    color: var(--vk-grey-500);
}
.vk-modal-tag.is-type {
    background: var(--vk-navy-800);
    color: var(--vk-white);
}
.vk-modal-desc {
    margin: 16px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--vk-navy-700);
    white-space: pre-line;
}
.vk-modal-desc[hidden] { display: none; }
.vk-modal-cta {
    margin-top: 22px;
}

@keyframes vk-modal-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
@keyframes vk-sheet-in {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

/* na telefonu prozor izlazi odozdo */
@media (max-width: 719px) {
    .vk-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 90dvh;
        margin: auto 0 0;
        border-radius: 20px 20px 0 0;
    }
    .vk-modal[open] { animation-name: vk-sheet-in; }
    .vk-modal-body { padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); }
    .vk-modal-name { font-size: 22px; }
    .vk-yt-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}

@media (prefers-reduced-motion: reduce) {
    .vk-stage.is-ready .vk-slide { transition: none; }
    .vk-card-poster { transition: none; }
    .vk-modal[open] { animation: none; }
}
