/* ============================================================
   Glimpses — JioHotstar-style spotlight + thumbnail switcher
   ============================================================ */
.glimpses-section {
  padding: 90px 0 0;
  background: var(--color-dark);
  color: #fff;
  overflow: hidden;
}

.gl-head {
  margin-bottom: 26px;
}

/* ---------- Stage ---------- */
.gl-stage {
  position: relative;
  width: 100%;
  /* cinematic wide spotlight */
  aspect-ratio: 21 / 9;
  min-height: 460px;
  max-height: 78vh;
}

/* ---------- Slides ---------- */
.gl-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}

.gl-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.gl-slide__media {
  position: absolute;
  inset: 0;
}

.gl-slide__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Left-to-right + bottom scrim so overlay text stays readable */
.gl-slide__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 8, 20, 0.92) 0%, rgba(2, 8, 20, 0.55) 40%, rgba(2, 8, 20, 0) 70%),
    linear-gradient(0deg, rgba(2, 8, 20, 0.7) 0%, rgba(2, 8, 20, 0) 45%);
}

.gl-slide__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.gl-slide__content {
  position: relative;
  z-index: 2;
  max-width: 540px;
  padding: 40px 0;
}

.gl-slide__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.gl-slide__badge {
  display: inline-block;
  margin-top: 16px;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gl-slide__meta {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 600;
}

.gl-slide__desc {
  margin: 14px 0 0;
  max-width: 480px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gl-slide__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 14px 34px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(90deg, #2a6df4 0%, #7a3ff2 50%, #e0399b 100%);
  box-shadow: 0 12px 30px rgba(122, 63, 242, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.gl-slide__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 40px rgba(122, 63, 242, 0.45);
}

.gl-slide__btn svg { flex-shrink: 0; }

/* ---------- Thumbnail switcher ---------- */
.gl-thumbs {
  position: absolute;
  right: clamp(16px, 4vw, 56px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 3;
  display: flex;
  gap: 10px;
  max-width: min(560px, 60%);
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.gl-thumbs::-webkit-scrollbar { display: none; }

.gl-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 108px;
  height: 66px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  opacity: 0.7;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.gl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gl-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.gl-thumb.is-active {
  opacity: 1;
  border-color: #fff;
}

.gl-thumb__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
}

.gl-thumb__play svg {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

/* ============================================================
   Responsive — on tablet/phone the overlay layout gets cramped, so we
   switch to a clean STACKED card: image on top, a solid content panel
   below, then the thumbnail strip in normal flow.
   ============================================================ */
@media (max-width: 991px) {
  .gl-stage {
    /* height is driven by the active slide's content, not a fixed ratio */
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
  }

  /* The active slide defines the section height; others are removed from flow */
  .gl-slide {
    position: absolute;
    inset: 0;
    height: 100%;
    transition: opacity 0.4s ease;
  }

  .gl-slide.is-active {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
  }

  /* Image: contained 16:9 block on top instead of a full-bleed crop */
  .gl-slide__media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    flex: none;
  }

  /* Only a soft bottom fade so the image blends into the panel below */
  .gl-slide__scrim {
    background: linear-gradient(0deg, var(--color-dark) 0%, rgba(2, 8, 20, 0) 30%);
  }

  /* Content sits BELOW the image on a solid dark panel */
  .gl-slide__inner {
    position: relative;
    height: auto;
    display: block;
    background: var(--color-dark);
  }

  .gl-slide__content {
    max-width: 100%;
    padding: 22px 0 8px;
  }

  .gl-slide__title {
    font-size: clamp(24px, 6vw, 34px);
    text-shadow: none;
  }

  .gl-slide__desc {
    -webkit-line-clamp: 3;
  }

  .gl-slide__btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    margin-top: 20px;
  }

  /* Thumbnail strip: normal flow under the content, not floating */
  .gl-thumbs {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    max-width: none;
    margin-top: 20px;
    padding: 4px 0 2px;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .glimpses-section {
    padding-top: 56px;
  }

  .gl-thumb {
    width: 92px;
    height: 56px;
  }

  .gl-slide__content {
    padding-top: 18px;
  }
}
