/* Ana sayfa hikayeleri — ossi-react StoryRail / StoryViewer ile uyumlu */

.home-stories-section {
  margin-bottom: 0.25rem;
  min-height: 108px;
}

.home-stories-section[hidden] {
  display: none !important;
}

.home-stories-rail-wrap {
  padding: 10px 0 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  text-align: center;
}

.home-stories-rail-wrap::-webkit-scrollbar {
  display: none;
}

.home-stories-rail {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0;
  vertical-align: top;
  padding: 0 12px 4px 12px;
  text-align: left;
}

.home-story-item {
  flex: 0 0 auto;
  width: 78px;
  margin-right: 12px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  scroll-snap-align: start;
  text-align: center;
  font: inherit;
  color: inherit;
}

.home-story-item:last-child {
  margin-right: 20px;
}

.home-story-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto;
  padding: 3px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-story-ring--new {
  background: #d6218c;
}

.home-story-ring--seen {
  background: #d1d5db;
}

.home-story-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  box-sizing: border-box;
  overflow: hidden;
}

.home-story-cover {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}

.home-story-title {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 14px;
  color: #222;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Modal */
.home-story-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.home-story-modal[hidden] {
  display: none !important;
}

.home-story-modal__backdrop {
  position: absolute;
  inset: 0;
  background: #000;
  cursor: pointer;
}

.home-story-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: #000;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
}

.home-story-modal__progress {
  display: flex;
  flex-direction: row;
  gap: 4px;
  padding: 10px 10px 6px;
  flex-shrink: 0;
}

.home-story-modal__seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.home-story-modal__seg-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 2px;
}

.home-story-modal__seg--done .home-story-modal__seg-fill {
  width: 100% !important;
}

.home-story-modal__close {
  position: absolute;
  top: 42px;
  right: 10px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.home-story-modal__close:hover {
  background: rgba(0, 0, 0, 0.6);
}

.home-story-modal__tapzones {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 140px;
  z-index: 2;
  display: flex;
  flex-direction: row;
}

.home-story-modal__tap {
  flex: 1;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-story-modal__media {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0 0;
  position: relative;
}

.home-story-modal__media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.home-story-modal__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.home-story-modal__loading::after {
  content: "";
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: home-story-spin 0.75s linear infinite;
}

.home-story-modal__loading[hidden]::after {
  display: none;
}

@keyframes home-story-spin {
  to {
    transform: rotate(360deg);
  }
}

.home-story-modal__footer {
  flex-shrink: 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.home-story-modal__text {
  margin-bottom: 12px;
}

.home-story-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.home-story-modal__subtitle {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
}

.home-story-modal__subtitle:empty,
.home-story-modal__title:empty {
  display: none;
}

.home-story-modal__cta {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: #d6218c;
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.home-story-modal__cta:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.home-story-modal__cta.hidden {
  display: none !important;
}

body.home-story-modal-open {
  overflow: hidden;
}
