
/* ==========================
   Stories Top Bar
========================== */


.story-border {
    width: 72px;
    height: 72px;
    padding: 3px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient( 45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5 );
}


    .story-border img {
        width: 66px !important;
        height: 66px !important;
        max-width: none !important;
        object-fit: cover;
        border-radius: 50%;
        display: block;
    }

.stories {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    margin: 20px auto;
    overflow-x: auto;
    padding: 10px 15px;
    scrollbar-width: none;
}

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

  


.story {
    min-width: 75px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}


.story-border {
    width: 72px;
    height: 72px;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient( 45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5 );
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .3s;
}


.story:hover .story-border {
    transform: scale(1.08);
}


.story img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
}


.story span {
    display: block;
    font-size: 13px;
    margin-top: 7px;
    color: #333;
    white-space: nowrap;
}



/* ==========================
   Story Viewer
========================== */






.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
    .story-viewer.active {
        display: flex;
    }




.story-content {
    position: relative;
    width: 350px;
    height: 350px;
    overflow: visible !important;
}

#storyImage {
    width: 350px;
    height: 350px;
    object-fit: cover;
}



/* ==========================
   Progress Bar
========================== */


.progress {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    height: 4px;
    background: rgba(255,255,255,.35);
    border-radius: 10px;
    z-index: 5;
}



.progress-bar {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 10px;
}




/* ==========================
   Close Button
========================== */


.close-story {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.55);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
}


/* ==========================
   Text & Button
========================== */


.story-info {
    position: absolute;
    bottom: 25px;
    width: 100%;
    text-align: center;
    color: white;
    z-index: 5;
}



    .story-info h2 {
        font-size: 24px;
        margin-bottom: 15px;
        text-shadow: 0 2px 10px #000;
    }



.btn-story {
    display: inline-block;
    background: white;
    color: #222;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: .3s;
}



    .btn-story:hover {
        transform: scale(1.05);
    }



/* ==========================
   Click Areas
========================== */


.left-side,
.right-side {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    z-index: 3;
}



.left-side {
    left: 0;
}



.right-side {
    right: 0;
}



/* ==========================
   Mobile
========================== */


@media(max-width:600px) {


    .story-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }


    .story-border {
        width: 65px;
        height: 65px;
    }


    .story {
        min-width: 68px;
    }
}


.story-prev,
.story-next {
    line-height: 1;
    font-family: Arial, sans-serif;
    padding-bottom: 3px;


    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    z-index: 100;
}


/* دکمه قبلی بیرون سمت چپ */

/* دسکتاپ */
.story-prev {
    left: -65px;
}

.story-next {
    right: -65px;
}

@media (max-width:768px) {

    .story-viewer {
        padding: 15px;
    }

    .story-content {
        width: 90vw;
        height: 90vw;
        max-width: 350px;
        max-height: 350px;
        margin: auto;
    }

    #storyImage {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}