/* ==========================================================================
   Stories — embedded homepage widget (NOT a modal)
   Matches live kolkatatoday.com sidebar stories box.
   ========================================================================== */

.kt-stories-widget {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 720px;
  min-height: 600px;
  border-radius: 8px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* Desktop only: shrink the stories widget so the right column doesn't tower
   over the GLOBAL NEWS column and create a gap before LATEST NEWS. Mobile
   keeps the tall 9:16 vertical-story look. */
@media (min-width: 961px) {
  .kt-stories-widget {
    aspect-ratio: 4 / 5;
    min-height: 360px;
    max-height: 480px;
  }
}

.kt-stories-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Individual story slide — full-bleed */
.kt-story-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s;
  overflow: hidden;
}
.kt-story-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Full-bleed image */
.kt-story-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

/* Progress bars at very top */
.kt-story-progress {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex;
  gap: 3px;
  z-index: 10;
}
.kt-progress-bar {
  flex: 1;
  height: 2.5px;
  background: rgba(255,255,255,.35);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.kt-progress-bar > ::before,
.kt-progress-bar::before {
  content: '';
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 2px;
  transition: width .2s linear;
}
.kt-progress-bar.completed::before { width: 100%; }
.kt-progress-bar.active::before { animation: kt-fill 5s linear forwards; }
@keyframes kt-fill { from { width: 0; } to { width: 100%; } }

/* Header overlay — emoji avatar + title + time */
.kt-story-head {
  position: absolute;
  top: 20px; left: 12px; right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  padding: 4px 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0));
  border-radius: 0;
}
.kt-story-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.8);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.kt-story-avatar span {
  font-size: 16px;
  line-height: 1;
}
.kt-story-meta {
  flex: 1;
  min-width: 0;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.kt-story-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.kt-story-meta small {
  font-size: 11px;
  opacity: .9;
}

/* Navigation arrows — dark round buttons at sides */
.kt-story-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .15s;
}
.kt-story-nav:hover { background: rgba(0,0,0,.7); }
.kt-story-nav.prev { left: 8px; }
.kt-story-nav.next { right: 8px; }

/* Caption overlay at bottom — bold text on gradient */
.kt-story-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 30px 14px 14px;
  z-index: 10;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  background: linear-gradient(transparent, rgba(0,0,0,.85));
}
