/* === Stories Title (Desktop Only) === */
.btc-stories-title-wrapper {
  display: none;
}

.btc-stories-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 1.5rem 0;
  padding: 0 1rem;
}

/* Show title on desktop only */
@media (min-width: 768px) {
  .btc-stories-title-wrapper {
    display: block;
  }
}

/* === Stories Grid === */
.btc-stories-grid,
.btc-story-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem;
  align-items: stretch;
  flex-wrap: nowrap;
}

.btc-story-card {
  box-sizing: border-box;
}

.btc-story-thumb {
  display: block;
}

.btc-story-thumb img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 8px;
}

.btc-story-card {
  position: relative;
  flex: 0 0 220px;
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  padding: 12px;
}

.btc-story-card:hover {
  transform: scale(1.03);
}

.btc-story-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.btc-story-card h3 {
  position: absolute;
  bottom: 15px;
  left: 15px;
  color: #fff;
  font-size: 1.2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btc-story-title {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: #222;
}

.btc-story-modal-title {
  font-family: "PPHatton", "PP Hatton", "PP Hatton Regular", "Playfair Display", Georgia, serif;
  font-weight: 600;
}

.btc-story-title__icon {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* === Modal === */

.btc-story-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 32px 16px;
  margin-bottom: 0px;
}

.btc-story-modal.hidden {
  display: none;
}

.btc-story-modal.active {
  display: flex;
}

.btc-story-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.btc-story-modal-content {
  position: relative;
  height: min(92vh, 880px);
  aspect-ratio: 9 / 16;
  width: auto;
  background: #000;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: stretch;
  justify-content: center;
  z-index: 1;
}


.btc-story-modal-media {
  position: relative;
  flex: 1 1 auto;
  background: #000;
}

.btc-story-modal-media img,
.btc-story-modal-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.btc-story-modal-progress-wrapper {
  position: absolute;
  top: 14px;
  left: 24px;
  right: 24px;
  z-index: 3;
}

.btc-story-progress-track {
  display: flex;
  gap: 6px;
  width: 100%;
  height: 4px;
}

.btc-story-progress-segment {
  flex: 1 1 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.btc-story-progress-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  transition: width 4s linear;
}

.btc-story-modal-header {
  position: absolute;
  top: 28px;
  left: 24px;
  right: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  z-index: 3;
}

.btc-story-header-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.15);
}

.btc-story-header-avatar.is-empty {
  background-image: none;
  border-style: dashed;
  opacity: 0.55;
}

.btc-story-header-title {
  font-weight: 600;
  letter-spacing: 0.4px;
}


.btc-story-modal-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 32px 40px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.65) 50%, rgba(0, 0, 0, 0.05) 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 2;
  pointer-events: none;
}


.btc-story-modal-title {
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.4px;

}


.btc-story-modal-subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  line-height: 1.6;
  margin: 0;
}

.btc-story-modal-button {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  background: #f5f5f5;
  color: #101010;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.25px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.btc-story-modal-button:hover,
.btc-story-modal-button:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(252, 211, 7, 0.35);
}

.btc-story-modal-close {
  position: absolute;
  top: 26px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: background 0.2s ease;
}

.btc-story-modal-close:hover,
.btc-story-modal-close:focus {
  background: rgba(0, 0, 0, 0.75);
}

.loading {
  color: #fff;
  text-align: center;
  padding: 60px 0;
}

/* === Responsive === */
@media (max-width: 768px) {
  .btc-stories-grid {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    padding: 0 8px;
    z-index: 40;
    justify-content: center;
  }

  .btc-story-card {
    flex: 0 0 auto;
    width: 86px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .btc-story-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  }

  .btc-story-card img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
  }

  .btc-story-modal-content {
    height: min(92vh, 720px);
  }

  .btc-story-modal-progress-wrapper {
    top: 16px;
    left: 18px;
    right: 18px;
  }

  .btc-story-modal-header {
    top: 32px;
    left: 18px;
    right: 64px;
  }

  .btc-story-header-avatar {
    width: 40px;
    height: 40px;
  }

  .btc-story-modal-meta {
    padding: 24px;
    gap: 14px;
  }

  .btc-story-title {
    margin-top: 0;
    flex-direction: column;
    gap: 4px;
  }

  .btc-story-title strong {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
  }

  .btc-story-title__icon {
    display: none;
  }
}