/* Instagram Stories with Horizontal Scroll */
.stories-container {
padding: 8px 0 0px 0px;

  border-radius: 14px;
  margin-bottom: 10px;

}

/* Sticky mode — wp_body_open ile auto-render edildiğinde uygulanır
   `top` değeri JS tarafından header yüksekliğine göre dinamik olarak set edilir */
.stories-container.stories-sticky {
  position: sticky;
  top: 0;
  z-index: 9;
  background: #ffffff;
  border-radius: 0;
  margin-bottom: 20px;

  transition: padding 0.25s ease;
}

/* Header satırı — title default akışında. Toggle gizli. */
.stories-header-row {
  position: relative;
}

/* Mobil menu toggle — varsayılan gizli, sadece mobil + sticky-ufalmış halde gösterilir */
.stories-mobile-menu-toggle {
  display: none !important;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  color: #262626;
}

/* ============================================================
   UFALMIŞ HAL AYARLARI — Scroll ile sticky aktif olduğunda
   Burayı düzenleyerek küçülme oranını değiştirebilirsin:
   - story-item width      → daire arası mesafe (kart genişliği)
   - story-avatar w/h      → daire boyutu
   - story-title font-size → başlık fontu
   ============================================================ */

/* Konteyner: ufalınca padding daralır, içerik ortalanır */
.stories-container.stories-sticky.is-shrunk {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 0;
  padding-right: 0;
}

/* Animasyonlar — tüm bileşenler için yumuşak geçiş (ease-in-out daha doğal his verir) */
.stories-container.stories-sticky,
.stories-container.stories-sticky .stories-scroll-wrapper,
.stories-container.stories-sticky .story-item,
.stories-container.stories-sticky .story-avatar,
.stories-container.stories-sticky .story-avatar img,
.stories-container.stories-sticky .story-title,
.stories-container.stories-sticky .stories-title {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* "Öne çıkanlar" başlığı: ufalınca küçülür, ortalanır */
.stories-container.stories-sticky.is-shrunk .stories-title {
  font-size: 12px;
  margin-bottom: 6px;
  text-align: center;
  padding-left: 0;
}

/* Kart (her bir story'nin dış çerçevesi) — DESKTOP */
.stories-container.stories-sticky.is-shrunk .story-item {
  width: 85px;
  min-width: 80px;
}

/* Daire (avatar) — DESKTOP */
.stories-container.stories-sticky.is-shrunk .story-avatar {
  width: 62px;
  height: 62px;
  padding: 2px;
}

.stories-container.stories-sticky.is-shrunk .story-avatar img {
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-width: 2px;
  top: 2px;
  left: 2px;
}

/* Daire altındaki yazı — DESKTOP */
.stories-container.stories-sticky.is-shrunk .story-title {
  font-size: 11px;
  margin-top: 6px;
  max-width: 80px;
}

/* MOBİL ufalmış değerleri */
@media (max-width: 768px) {
  /* Mobilde ufalmış container padding-top'unu sıfırla */
  .stories-container.stories-sticky.is-shrunk {
    padding-top: 0 !important;
  }
  /* Mobilde ortalama kapalı — soldan başlasın */
  .stories-container.stories-sticky.is-shrunk .stories-scroll-wrapper {
    justify-content: flex-start;
  }
  /* Header satırı flex; toggle solda akışta, title absolute olarak satırın TAM ORTASINA */
  .stories-container.stories-sticky.is-shrunk .stories-header-row {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding-top: 0;
  }

  .stories-container.stories-sticky.is-shrunk .stories-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    margin: 0;
    padding: 0;
    pointer-events: none;
  }

  /* Toggle akışta, ikon + yazı yan yana — sadece ufalmış halde görünür */
  .stories-container.stories-sticky.is-shrunk .stories-mobile-menu-toggle {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
    background: transparent;
    border: none;
    padding: 0;
    color: #262626;
    z-index: 2;
    min-height: 40px !important;
  }

  .stories-container.stories-sticky.is-shrunk .stories-mobile-menu-toggle .stories-menu-icon {
    display: inline-flex;
    line-height: 0;
  }

  .stories-container.stories-sticky.is-shrunk .stories-mobile-menu-toggle .stories-menu-text {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
  }

  .stories-container.stories-sticky.is-shrunk .stories-mobile-menu-toggle:active {
    opacity: 0.5;
  }
  .stories-container.stories-sticky.is-shrunk .story-item {
    width: 64px;
    min-width: 64px;
  }
  .stories-container.stories-sticky.is-shrunk .story-avatar {
    width: 52px;
    height: 52px;
  }
  .stories-container.stories-sticky.is-shrunk .story-title {
    font-size: 10px;
    max-width: 64px;
  }
}
/* ============================================================
   UFALMIŞ HAL AYARLARI SONU
   ============================================================ */
.wd-rs-69fbbc5dbcfd3{  -webkit-mask-image: linear-gradient(to right, 
      transparent 0%, 
      black 5%, 
      black 95%, 
      transparent 100%
  );
  mask-image: linear-gradient(to right, 
      transparent 0%, 
      black 5%, 
      black 95%, 
      transparent 100%
  );
  background: linear-gradient(180deg, rgba(247, 206, 70, 0.14) 0%, #ffffff 100%);
}

.stories-title {
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  padding-left: 10px;
}

.stories-scroll-wrapper {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

/* Drag aktifken cursor değişir, scroll-behavior smooth kapalı (anlık takip için) */
.stories-scroll-wrapper.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* Resimler her zaman pointer geçirgen — tarayıcının native image drag'ı tetiklenmesin,
   pointerdown doğrudan wrapper'a gitsin. Click parent .story-item'a bubble eder. */
.stories-scroll-wrapper img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  user-drag: none;
  pointer-events: none;
  -webkit-touch-callout: none;
}

.stories-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

/* Story Item Styling */
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 107px;
  min-width: 107px;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.story-avatar {
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  padding: 3px;
  /*background: linear-gradient(45deg, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);*/
  background: radial-gradient(circle at 20% 20%, #fdf497 0%, #ffcc01 30%, #2b562f 80%);
  transition: all 0.2s ease;
  box-shadow: none;
  margin: 0;
  position: relative;
}

/* Öne çıkanlar (yönlendirme linkleri) — Klasik Instagram hikaye gradient'i */
.story-item.is-highlight .story-avatar {
  background: linear-gradient(45deg, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.story-avatar img {
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  position: absolute;
  top: 3px;
  left: 3px;
}

.story-title {
  margin-top: 8px;
  text-align: center;
  font-size: 12.5px;
  color: #262626;
  font-weight: 400;
  margin: 8px 0 0 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* Story başlığı altındaki açıklama (alt yazı) — masaüstü 10px, mobil 7px */
.story-subtitle {
  font-size: 10px;
  color: #2c562f !important;
  font-weight: bold;
  margin-top: 2px;
}

/* Modal içinde alt yazı beyaz olsun (yeşil değil) */
.stories-slider .story-subtitle {
  color: #fff !important;
}

/* İlk 4 (directLink olan öne çıkanlar) başlık kalın */
.story-item.is-highlight .story-title {
  font-weight: bold;
}

/* Video yükleme overlay'i — zuck.js'in default spinner'ı ilk açılışta tetiklenmiyor,
   bu yüzden videolar için kendi overlay'ımızı koyuyoruz */

/* Zuck Modal Customization */

/* Mobile responsive */
@media (max-width: 768px) {
  .wd-rs-69fbbc5dbcfd3{background: linear-gradient(319deg, rgba(247, 206, 70, 0.14) 0%, #ffffff 100%);}

  .stories-scroll-wrapper {
    gap: 10px;
  }

  .story-subtitle {
    font-size: 7px;
  }

  .story-item {
    width: 85px;
    min-width: 85px;
  }

  .story-avatar {
    width: 66px;
    height: 66px;
    padding: 2px;
  }

  .story-avatar img {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 2px solid #fff;
    top: 2px;
    left: 2px;
  }

  .story-title {
    font-size: 12px;
    max-width: 90px;
  }
}

/* ============================================================
   STORIES SLIDER MODAL — Tam ekran overlay olarak gösterilir
   Default'ta gizli (scale 0, opacity 0). Story bubble tıklanınca
   stories-slider-in class ile animasyonlu açılır.
   ============================================================ */
.stories-slider {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  transform: translate3d(0, 0, 0) scale(0.5);
  opacity: 0;
  background: #000;
  pointer-events: none;
}

/* Desktop ve büyük ekranlarda arka plan daha açık ton */
@media (min-width: 415px), (min-height: 897px) {
  .stories-slider {
    background: #292831;
  }
}

/* Modal'ın asıl swiper'ı ekran boyutuna 9:16 oranını koruyarak fit eder
   PC'de yükseklik baskın → genişlik ondan hesaplanır
   Mobile'da genişlik baskın → yükseklik ondan hesaplanır
   Siyah kenarlar minimize edilir */
.stories-slider > .swiper {
  z-index: 2;
  width: min(100vw, calc(100vh * 9 / 16));
  height: min(100vh, calc(100vw * 16 / 9));
  max-width: none;
  max-height: none;
}

/* Resim ve videoyu içerik kutusuna oranlı sığdır (kırpma yok) */
.stories-slider .stories-slider-content > img,
.stories-slider .stories-slider-content > video {
  object-fit: contain !important;
  background: #000;
}

/* Close button — tema CSS'i ile çakışmaması için tüm property'lere !important */
.stories-slider .stories-slider-close-button {
  margin-left: 18px !important;
  width: 22px !important;
  height: 22px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  border: none !important;
  outline: 0 !important;
  box-shadow: none !important;
  display: block !important;
  position: relative !important;
  cursor: pointer !important;
  padding: 0 !important;
  background: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.stories-slider .stories-slider-close-button::before,
.stories-slider .stories-slider-close-button::after {
  content: "" !important;
  width: 125% !important;
  height: 2px !important;
  background: #fff !important;
  border-radius: 999px !important;
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.35) !important;
}

.stories-slider .stories-slider-close-button::before {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

.stories-slider .stories-slider-close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.stories-slider .stories-slider-close-button:active {
  opacity: 0.55 !important;
}

/* === Loading overlay — video yüklenirken modal üstünde gösterilir === */
.tag-stories-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100001; /* stories-slider z-index 100000'in üstü */
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.tag-stories-loading-overlay.is-visible {
  display: flex;
  pointer-events: auto;
}

.tag-stories-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tag-stories-loading-spin 0.8s linear infinite;
}

@keyframes tag-stories-loading-spin {
  to { transform: rotate(360deg); }
}

/* Modal gizliyken click-through */
.stories-slider:not(.stories-slider-in) * {
  pointer-events: none !important;
}

/* Açılış animasyonu */
.stories-slider-in {
  animation: tag-stories-in 400ms forwards;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

/* Kapanış animasyonu */
.stories-slider-out {
  pointer-events: none;
  animation: tag-stories-out 400ms forwards !important;
}

@keyframes tag-stories-in {
  0%   { transform: translate3d(0, 0, 0) scale(0.5); opacity: 0; }
  50%  { transform: translate3d(0, 0, 0) scale(1.05); opacity: 1; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
}

@keyframes tag-stories-out {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  50%  { transform: translate3d(0, 0, 0) scale(0.5); opacity: 0; }
  100% { transform: translate3d(0, 0, 0) scale(0.5); opacity: 0; }
}

/* Story link butonu — sticky overlay olarak alt kısımda */
.tag-story-link-button {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFD42A;
  color: #0F2210;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 14px;
  z-index: 20;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.tag-story-link-button:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 212, 42, 0.4);
}