/* "Nastavi gledanje" — prati stil .genres-section (isti razmak, radijus, crveni akcenat) */

.cw-section {
    max-width: none;
    margin: 0 0 40px 0;
}

.cw-title {
    font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: clamp(10px, 1.2vw, 20px);
    letter-spacing: 1px;
    text-shadow: 0 2px 12px #000a;
}

/* Rail: horizontalni scroll umesto grida. Wrapper nosi edge-fade maske i strelice. */
.cw-rail-wrap {
    position: relative;
}

.cw-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 6px 2px 14px;
    cursor: grab;
    user-select: none;   /* da drag ne selektuje tekst kartica */
    /* sakrij scrollbar, scroll ostaje */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* bez ovoga, drag na ivici raila "iscuri" u horizontalni scroll cele stranice na mobilnom (iOS Safari).
       touch-action mora dozvoliti i pan-y, inace vertikalni swipe (skrol cele stranice) prestaje da radi
       cim prst krene preko ovog raila - "pan-x" sam je bio prestrog i to je lomio. */
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

/* Slike se ne smeju "podići" native dragom dok se vuče karusel */
.cw-thumb img {
    -webkit-user-drag: none;
    user-select: none;
}

.cw-rail::-webkit-scrollbar { display: none; }

/* Drag mišem hvata kursor grab; dok se vuče, gasimo snap i biramo grabbing. */
.cw-rail.is-dragging {
    scroll-snap-type: none;
    scroll-behavior: auto;
    cursor: grabbing;
}

.cw-rail.is-dragging a { pointer-events: none; }   /* da drag ne okine klik na karticu */

.cw-card {
    flex: 0 0 clamp(230px, 16vw, 300px);   /* fiksna širina — nosi horizontalni scroll. Skalira glatko od FullHD (~300px, 6ish kartica) naniže. */
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: rgba(30, 30, 40, 0.92);
    border: 2px solid #991b1e33;
    border-radius: 22px;
    box-shadow: 0 6px 32px #0007;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: background 0.22s, transform 0.16s, box-shadow 0.16s, border-color 0.22s;
}

.cw-card:hover,
.cw-card:focus-visible {
    background: rgba(45, 45, 58, 0.96);
    border-color: #991b1e;
    transform: translateY(-4px);
    box-shadow: 0 10px 38px #000a;
}

/* Senka-traka na ivici: tamni gradijent preko cele visine rail-a, sa strelicom
   u sredini. Bez okvira i pozadinskog dugmeta. Pojavljuje se na hover sekcije,
   i to samo strana koja ima kuda da vodi (klasa is-on). */
.cw-nav {
    position: absolute;
    top: 0;
    bottom: 14px;              /* poravnato sa padding-bottom rail-a */
    width: 84px;
    display: flex;
    align-items: center;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
}

.cw-nav svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 2px 6px #000c);
    transition: transform 0.18s;
}

.cw-nav-prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 10px;
    background: linear-gradient(90deg, #0e0e0eef 0%, #0e0e0e00 100%);
}

.cw-nav-next {
    right: 0;
    justify-content: flex-end;
    padding-right: 10px;
    background: linear-gradient(270deg, #0e0e0eef 0%, #0e0e0e00 100%);
}

.cw-rail-wrap:hover .cw-nav.is-on {
    opacity: 1;
    pointer-events: auto;
}

.cw-nav-prev:hover svg { transform: translateX(-3px); }
.cw-nav-next:hover svg { transform: translateX(3px); }

.cw-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0e0e0e;
    overflow: hidden;
}

.cw-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.cw-card:hover .cw-thumb img {
    transform: scale(1.06);
}

/* Play dugme — pojačava se na hover */
.cw-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(153, 27, 30, 0.85);
    border: 2px solid #ffffff26;
    color: #fff;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.22s, transform 0.22s, background 0.22s;
    pointer-events: none;
}

.cw-play svg { width: 26px; height: 26px; margin-left: 3px; }

.cw-card:hover .cw-play,
.cw-card:focus-visible .cw-play {
    opacity: 1;
    transform: scale(1);
    background: #991b1e;
}

/* Traka napretka na dnu slike */
.cw-bar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 5px;
    background: #000000a6;
}

.cw-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #991b1e, #e11d48);
}

.cw-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px 16px;
    min-width: 0;
}

.cw-name {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cw-ep {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e11d48;
    letter-spacing: 0.3px;
}

/* Laptop/manji desktop — klasa se i dalje oslanja na hover strelice, samo malo gušće.
   .cw-title se ne mora ponovo podešavati po tier-u — clamp() iznad već pokriva ceo opseg. */
@media (max-width: 1300px) {
    .cw-card { flex: 0 0 clamp(210px, 20vw, 280px); }
}

/* Tablet — 3ish kartice vidljivo, strelice se smanjuju ali ostaju (još ima hover-a mišem). */
@media (max-width: 1000px) {
    .cw-rail { gap: 16px; }
    .cw-card { flex: 0 0 clamp(190px, 28vw, 260px); }
    .cw-nav { width: 64px; }
    .cw-nav svg { width: 26px; height: 26px; }
}

/* Prelaz ka dodirnim ekranima — 2 kartice + peek trećeg, strelice se gase (nema hover-a na touch-u). */
@media (max-width: 760px) {
    .cw-rail { gap: 12px; }
    .cw-card { flex-basis: 42vw; }
    .cw-play { width: 44px; height: 44px; }
    .cw-play svg { width: 20px; height: 20px; }
    .cw-nav { display: none; }
}

/* Telefon — 2 kartice vidljive + peek, ne ivica do ivice. */
@media (max-width: 560px) {
    .cw-rail { gap: 10px; }
    .cw-card { flex-basis: 54vw; }
    .cw-name { font-size: 0.95rem; }
    .cw-meta { padding: 11px 12px 13px; }
}

@media (max-width: 400px) {
    .cw-card { flex-basis: 60vw; }
    .cw-name { font-size: 0.88rem; }
    .cw-meta { padding: 10px 11px 12px; }
}
