/* Stories index (resources/views/client/stories.blade.php). Shared parts live in kw.css. */

.kw-stories { padding: 40px 0 0; }

/* minmax(0, 1fr): without it the track grows to the strip's full width and pushes the page off-centre */
.kw-story { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }

/* 16:9 banner covers carry baked-in titles: shown whole, never cropped */
.kw-story__cover {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--se-stone) center / cover no-repeat;
}
.kw-story__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--se-ease); }

.kw-story__text { padding: 0 var(--se-gutter); text-align: center; }
.kw-story__meta { margin: 0; font-family: var(--se-serif); font-size: 14px; font-style: normal; color: var(--se-ink-soft); }
.kw-story__title {
    margin: 6px auto 0;
    max-width: 20ch;
    font-family: var(--se-serif);
    font-size: 15px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.12;
    text-wrap: balance;
    letter-spacing: .012em;
    color: var(--se-title-ink);
}
.kw-story__credit {
    margin: 10px 0 0;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--se-ink-soft);
}

/* Featured frames: a swipeable strip (replaces the old Sly carousel) */
.kw-story__strip {
    display: flex; gap: 6px;
    padding: 0 var(--se-gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--se-gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.kw-story__strip::-webkit-scrollbar { display: none; }
.kw-story__frame {
    flex: 0 0 auto;
    height: 150px;
    scroll-snap-align: start;
    background: var(--se-stone);
    overflow: hidden;
}
.kw-story__frame img { height: 100%; width: auto; max-width: none; }

.kw-story__more { justify-self: center; }

.kw-stories__separator {
    width: 44px;
    height: auto;
    margin: 56px auto;
    opacity: .7;
}

@media (min-width: 768px) {
    .kw-stories { padding-top: 56px; }
    .kw-story { gap: 22px; }
    .kw-story__cover { margin: 0 var(--se-gutter); }
    .kw-story__title { font-size: 15px; }
    /* Keep the strip inside the cover's column instead of bleeding to the window edge */
    .kw-story__strip { gap: 10px; margin: 0 var(--se-gutter); padding: 0; scroll-padding: 0; }
    .kw-story__frame { height: 200px; }
    .kw-stories__separator { width: 54px; margin: 80px auto; }
}

@media (min-width: 1100px) {
    .kw-story__cover:hover img { transform: scale(1.015); }
    .kw-story__title { font-size: 16px; }
    .kw-story__title a { transition: color .2s; }
    .kw-story__title a:hover { color: var(--se-accent); }
    .kw-story__frame { height: 230px; }
    .kw-story__frame img { transition: opacity .3s; }
    .kw-story__frame:hover img { opacity: .85; }
    .kw-stories__separator { margin: 104px auto; }
}
