/* hikayeler.css — Banner ÜZERİNE binen yatay "hikaye" şeridi (transparan arka plan) */

/* Banner + şerit sarmalayıcısı: şeridin absolute konumlanması için referans */
.banner-wrap {
    position: relative;
}

.hikayeler {
    /* Banner'ın en üstüne, içeriğinin üzerine bindir */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: var(--mh-max, 1280px);
    margin: 0 auto;
    padding: 14px 0px;
    background: transparent;
    pointer-events: none; /* boş alan banner tıklamalarını engellemesin */
    border-bottom: 1px solid #f1f1f14d;
}

/* Sadece gerçek etkileşimli öğeler tıklanabilir olsun */
.hikayeler .hikaye,
.hikayeler__next {
    pointer-events: auto;
}

/* Sol başlık — iki satır */
.hikayeler__title {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-weight: 800;
    font-size: 20px;
}

/* Banner (koyu) üzerinde okunur olsun diye açık renk + hafif gölge */
.hikayeler__title { text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.hikayeler__title-red {
    color: #898d8f;
}
.hikayeler__title-dark { color: #fff; }

/* ---------------------------------------------------------------------------
   AÇIK ZEMİNLİ BANNER (Banner 2) — .banner-wrap--acik
   Şerit koyu video banner'ı için tasarlandı; açık zeminde beyaz yazı ve
   #ff3333 kırmızısı okunmuyordu. Burada metin koyuya, kırmızı da açık zeminde
   kontrast veren tona (#C81C1C) çekilir, karartma gölgesi kaldırılır.
   Kontrast (WCAG): #14171A ~14:1, #C81C1C ~4.6:1 — ikisi de AA'yı geçer.
   Sınıf Anasayfa.cshtml'de yalnızca banner=2 iken basılır.
   --------------------------------------------------------------------------- */
.banner-wrap--acik .hikayeler { border-bottom-color: rgba(20, 23, 26, .12); }
.banner-wrap--acik .hikayeler__title { text-shadow: none; }
.banner-wrap--acik .hikayeler__title-red { color: #C81C1C; }
.banner-wrap--acik .hikayeler__title-dark { color: var(--ink, #14171A); }

/* Yatay kayan şerit */
.hikayeler__scroll {
    flex: 1 1 auto;
    display: flex;
    gap: 0px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px 2px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    justify-content:end;
}

.hikayeler__scroll::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* Tek hikaye (yuvarlak) — <button> reset */
.hikaye {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 74px;
    padding: 0px;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

/* Kırmızı halka + beyaz boşluk */
.hikaye__ring {
    display: block;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    padding: 3px;
    background: #fff;                 /* halka ile görsel arasındaki ince beyaz boşluk */
    box-shadow: 0 0 0 3px var(--gri, #e11d2a); /* dış kırmızı halka */
    transition: transform .2s ease, box-shadow .2s ease;
}

/* Hover: halkayı büyüt + kalınlaştır (öne çık) */
.hikaye:hover .hikaye__ring,
.hikaye:focus-visible .hikaye__ring {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px var(--gri, #e11d2a), 0 6px 16px rgba(0, 0, 0, .35);
}

/* Hover: yuvarlağın altında "Gör" pili */
.hikaye__gor {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translate(-50%, 6px);
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--gri, #e11d2a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.hikaye:hover .hikaye__gor,
.hikaye:focus-visible .hikaye__gor {
    opacity: 1;
    transform: translate(-50%, 10px);
}

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

/* Yuvarlak altı etiket (opsiyonel) */
.hikaye__ad {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    max-width: 74px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sağdaki "sonraki" oku */
.hikayeler__next {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line, #e5e7eb);
    background: #d0d0d0;
    color: var(--ink, #0b1e3a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(11, 30, 58, .12);
    transition: background .2s, color .2s, transform .2s;
}

    .hikayeler__next:hover {
        background: var(--gri, #e11d2a);
        border-color: var(--gri, #e11d2a);
        color: #fff;
        transform: scale(1.05);
    }

/* ============================================================================
   STORY VIEWER POPUP (.hmodal) — Instagram tarzı hikaye görüntüleyici
   ============================================================================ */
.hmodal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .88);
    backdrop-filter: blur(4px);
}

.hmodal.is-open { display: flex; }

/* Dikey story çerçevesi (9:16) */
.hmodal__stage {
    position: relative;
    width: min(420px, 92vw);
    aspect-ratio: 9 / 16;
    max-height: 92vh;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.hmodal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* İlerleme çubukları (üst) */
.hmodal__bars {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    gap: 4px;
}

.hmodal__bar {
    flex: 1 1 0;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .35);
    overflow: hidden;
}

.hmodal__bar > i {
    display: block;
    width: 0;
    height: 100%;
    background: #fff;
    border-radius: 2px;
}

/* Profil başlığı (üst sol) */
.hmodal__head {
    position: absolute;
    top: 22px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.hmodal__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background: #333;
}

.hmodal__name {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

/* Alt açıklama + "Gör" butonu */
.hmodal__cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 64px;
    z-index: 3;
    padding: 0 16px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}

.hmodal__gor {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 3;
    padding: 9px 30px;
    border-radius: 999px;
    background: var(--gri, #e11d2a);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
    transition: transform .15s ease, filter .15s ease;
}

.hmodal__gor:hover { transform: translateX(-50%) scale(1.05); filter: brightness(1.05); }

/* Kapat (X) — sağ üst */
.hmodal__close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}

.hmodal__close:hover { background: rgba(255, 255, 255, .28); }

/* Sol / sağ gezinme okları */
.hmodal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}

.hmodal__nav:hover { background: rgba(255, 255, 255, .3); }
.hmodal__prev { left: max(16px, calc(50% - 300px)); }
.hmodal__next { right: max(16px, calc(50% - 300px)); }

/* --- Tablet / Mobil --- */
@media (max-width: 720px) {
    /* Şerit banner üzerinden ayrılır; banner ALTINDA normal, okunur bir bölüm olur */
    .hikayeler {
        position: static;
        max-width: 100%;
        margin: 0;
        padding: 16px 0 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        pointer-events: auto;
        border-bottom: 1px solid var(--line, #e7eaed);
    }

    /* Açık zemine geçtiği için başlık koyu renk (gölge kalkar) */
    .hikayeler__title {
        flex: 0 0 auto;
        font-size: 17px;
        text-shadow: none;
    }

    .hikayeler__title-dark { color: var(--ink, #14171a); }

    /* Şerit sola hizalı, parmakla kaydırılır, kenardan kenara akar */
    .hikayeler__scroll {
        justify-content: flex-start;
        gap: 16px;
        padding: 2px 0 4px;
        scroll-snap-type: x proximity;
    }

    .hikaye {
        width: 72px;
        scroll-snap-align: start;
    }

    .hikaye__ring { width: 64px; height: 64px; }
    .hikaye__ad { max-width: 72px; font-size: 11.5px; }

    /* Mobilde sağ ok gerekmez — parmakla kaydırma */
    .hikayeler__next { display: none; }

    /* Mobilde story tam ekran, oklar köşelerde */
    .hmodal__stage {
        width: 100vw;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        aspect-ratio: auto;
    }

    .hmodal__prev { left: 8px; }
    .hmodal__next { right: 8px; }
    .hmodal__nav { width: 40px; height: 40px; background: rgba(255, 255, 255, .18); }
}
