﻿
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: #f5f5f5;
}

/* =========================
           گالری استوری
        ========================= */

.stories {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    justify-content: center;
    gap: 20px;
    direction: rtl;
}

.story {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    border: 4px solid #d49a32;
    box-shadow: 0 4px 15px rgba(0,0,0,.20);
    transition: .3s;
}

    .story:hover {
        transform: scale(1.08);
        box-shadow: 0 8px 25px rgba(0,0,0,.30);
    }

    .story img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 50%;
    }

/* =========================
           Story Viewer
        ========================= */

.story-viewer {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.story-container {
    position: relative;
    width: 420px;
    height: 90vh;
    max-height: 800px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,.7);
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}

/* =========================
           Progress Bar
        ========================= */

.story-progress {
    position: absolute;
    top: 12px;
    right: 10px;
    left: 10px;
    height: 5px;
    display: flex;
    flex-direction: row;
    direction: rtl;
    gap: 5px;
    z-index: 100;
}

.progress-item {
    position: relative;
    flex: 1;
    height: 5px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(0,0,0,.60);
    box-shadow: 0 1px 5px rgba(0,0,0,.7);
}

.progress-fill {
    position: absolute;
    top: 0;
    right: 0;
    width: 0%;
    height: 100%;
    background: #d49a32;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0,0,0,.7);
}

/* =========================
           Close Button
        ========================= */

.story-close {
    position: absolute;
    top: 25px;
    left: 15px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 25px;
    line-height: 35px;
    cursor: pointer;
    z-index: 200;
    transition: .2s;
}

    .story-close:hover {
        background: rgba(0,0,0,.85);
    }

/* =========================
           Navigation Buttons
        ========================= */

.story-next,
.story-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 65px;
    border: none;
    border-radius: 10px;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 40px;
    line-height: 60px;
    cursor: pointer;
    z-index: 150;
    transition: .2s;
}

    .story-next:hover,
    .story-prev:hover {
        background: rgba(0,0,0,.7);
    }

/* فلش سمت راست */
.story-next {
    right: 10px;
}

/* فلش سمت چپ */
.story-prev {
    left: 10px;
}

/* =========================
           Mobile
        ========================= */

@media (max-width: 768px) {

    .stories {
        gap: 12px;
        padding: 0 10px;
    }

    .story {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .story-container {
        width: 95%;
        height: 90vh;
        border-radius: 8px;
    }

    .story-next,
    .story-prev {
        width: 38px;
        height: 55px;
        font-size: 32px;
    }

    .story-next {
        right: 5px;
    }

    .story-prev {
        left: 5px;
    }
}

@media (max-width: 480px) {

    .story {
        height: 110px;
    }

    .story-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}

