.sam-stories__slider .swiper-button-next,
.sam-stories__slider .swiper-button-prev { width: 100px; height: 100%; padding: 0; border: 0; top: 0; margin-top: 0; border-radius: 0; box-shadow: none; outline: none; }

.sam-stories__slider .swiper-button-next svg,
.sam-stories__slider .swiper-button-prev svg { width: 30px; height: 30px; }

.sam-stories__slider .swiper-button-next:hover svg path,
.sam-stories__slider .swiper-button-prev:hover svg path,
.sam-stories__modal-slider .swiper-button-next:hover svg path,
.sam-stories__modal-slider .swiper-button-prev:hover svg path { fill: #8C57FC; }

.swiper-button-disabled { display: none !important; }

.sam-stories__slider .swiper-button-next { right: 0; background: linear-gradient(90deg, rgba(51, 51, 51, 0) 0%, #333333 100%); justify-content: flex-end; }
.sam-stories__slider .swiper-button-prev { left: 0; background: linear-gradient(90deg, #333333 0%, rgba(51, 51, 51, 0) 100%); justify-content: flex-start; }

.sam-stories__slider .swiper-button-next.swiper-button-disabled,
.sam-stories__slider .swiper-button-prev.swiper-button-disabled { opacity: 0; }
.sam-stories__slider .swiper-button-next:after,
.sam-stories__slider .swiper-rtl .swiper-button-prev:after,
.sam-stories__slider .swiper-button-prev:after,
.sam-stories__slider .swiper-rtl .swiper-button-next:after { display: none; }

.sam-stories__modal .logo-image { position: absolute; left: 40px; top: 18px; }

.sam-stories {
    --swiper-theme-color: #8C57FC; background: rgba(0, 0, 0, 0.8); padding: 20px 0;
}
.sam-stories__slider {
    overflow: hidden;
}
.sam-stories__slider:not(.swiper-initialized) {
    opacity: 0.66;
}
.sam-stories__slider .swiper-wrapper {
    display: flex;
}
.sam-stories__slide.swiper-slide {
    width: auto;
}
.sam-stories__slide.swiper-slide button {
    position: relative;
    display: block;
    background: none;
    border: none;
    margin: 0;
    padding: 4px;
    cursor: pointer;
	width: auto;
}
.sam-stories__slide.swiper-slide button picture:after { content: ''; position: absolute; bottom: 0; top: 0; left: 0; right: 0; z-index: 5; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%); }

.sam-stories__slide.swiper-slide button:hover {
    opacity: 0.9;
    transition: opacity 0.2s ease;
}
.sam-stories__slide.swiper-slide button::before,
.sam-stories__slide.swiper-slide button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 90px;
}
.sam-stories__slide.swiper-slide button::before {
   background: rgba(0, 0, 0, 0.8);
    inset: 2px;
    z-index: 2;
}
.sam-stories__slide.swiper-slide button::after {
   background: #8C57FC;
   /*background: linear-gradient(0deg, #f9e24b, #fcc521);*/
    /*animation: rotate-bg 1s infinite linear;*/
}
.sam-stories__slide.swiper-slide button img,
.sam-stories__slide.swiper-slide button picture {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    width: 90px;
    overflow: hidden;
    object-fit: cover;
    object-position: center center;
    border-radius: 90px;
    z-index: 3;
}
.sam-stories img {
    vertical-align: middle;
    max-width: 100%;
    border: 0;
}

@keyframes rotate-bg {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

.sam-stories__slide button .icon { position: absolute; bottom: 5px; left: 50%; margin-left: -15px; width: 30px; height: 30px; background-repeat: no-repeat; background-position: 50% 50%; z-index: 10; }
.sam-stories__slide button .icon.creative-schools { background-image: url(img/creative-schools.svg); }
.sam-stories__slide button .icon.action { background-image: url(img/action.svg); }
.sam-stories__slide button .icon.art { background-image: url(img/art.svg); }
.sam-stories__slide button .icon.film { background-image: url(img/film.svg); }
.sam-stories__slide button .icon.literature { background-image: url(img/literature.svg); }
.sam-stories__slide button .icon.music { background-image: url(img/music.svg); }
.sam-stories__slide button .icon.theater { background-image: url(img/theater.svg); }
.sam-stories__slide button .icon.local-culture { background-image: url(img/local-culture.svg); }
.sam-stories__slide button .icon.architecture { background-image: url(img/architecture.svg); }

.sam-stories__modal {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    width: 0;
    height: 0;
	background: #2e2e2e;
    /*backdrop-filter: blur(8px);*/
    opacity: 0;
    z-index: 2147483648;
    transition: opacity 0.2s ease, width 0.2s step-end, height 0.2s step-end;
    overflow: clip;
}
.sam-stories__modal.opened {
    opacity: 1;
    width: 100%;
    height: 100%;
    transition: opacity 0.2s ease;
}
.sam-stories__close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
	width: 40px; height: 40px;
}
button.sam-stories__close svg { margin-right: 0; }
.sam-stories__close:hover { background: none; }
.sam-stories__close:hover svg path { fill: #8C57FC; }

.sam-stories__modal-slider {
    margin: auto 0;
    height: 86dvh;
    width: 100%;
}
.sam-stories__modal-slider .swiper-slide {
    display: flex;
	flex-direction: column; width: auto;
}
.sam-stories__modal-slider .stories__item-prev.swiper-button-prev,
.sam-stories__modal-slider .stories__item-next.swiper-button-next { display: none; }

.sam-stories__modal-slider .swiper-slide-active .stories__item-prev.swiper-button-prev,
.sam-stories__modal-slider .swiper-slide-active .stories__item-next.swiper-button-next { display: block; }

/*.swiper-slide-active .stories__item-prev.swiper-button-prev { left: -50px; }
.swiper-slide-active .stories__item-next.swiper-button-next { right: -50px; }*/

.sam-stories__modal .swiper-button-prev,
.sam-stories__modal .swiper-button-next {
    width: 40px; height: 40px; border: 0; border-radius: 0; padding: 0; box-shadow: none; margin-top: -20px;
}
.sam-stories__modal .swiper-button-prev::after,
.sam-stories__modal .swiper-button-next::after {
    content: '';
    display: none;
}
.sam-stories__modal-slider .swiper-slide picture,
.sam-stories__modal-slider .swiper-slide img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.swiper-button-next.sam-stories__modal-next,
.swiper-button-prev.sam-stories__modal-prev {
    margin: 0;
    top: 0;
    left: 0;
    height: 100%;
    width: calc((100vw - 90vh / 16 * 9) / 2 - 60px);
    opacity: 0;
	padding: 0;
	border: 0;
}
.swiper-button-next.sam-stories__modal-next {
    left: auto;
    right: 0;
}

.sam-stories__item {
    position: relative;
    aspect-ratio: 9 / 16;
    height: 100%;
    width: auto;
    max-width: 100vw;
    margin: auto;
    border-radius: 10px;
    overflow: hidden;
    transform: scale(.75);
    transition: transform 0.4s ease;
	opacity: 0.2;
}

.swiper-slide-active .sam-stories__item {
    transform: scale(1); opacity: 1;
}
.sam-stories__item-slider {
    height: 100%;
}
.sam-stories__item-slider .swiper-progressbar {
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 3px;
    z-index: 20;
}
.sam-stories__item-slider .swiper-progressbar span {
position: relative;
height: 2px;
flex: 1 1 auto;
background: rgba(255, 255, 255, 0.4);
}
.sam-stories__item-slider .swiper-progressbar span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    max-width: 100%;
    background: #fff;
}
.sam-stories__item-slider .swiper-progressbar.active span:has(~ .active)::after {
    width: 100%;
}
.sam-stories__item-slider .swiper-progressbar.active span.active::after {
    width: calc(100% * var(--progress));
}
.sam-stories__controls {
    position: absolute;
    top: 22px;
    right: 20px;
    max-width: calc(100% - 16px);
    display: flex;
    /*flex-wrap: wrap;*/
    gap: 0;
    opacity: 0;
}
.sam-stories__controls button { outline: none; }
.sam-stories__controls button:active,
.sam-stories__controls button:focus { background: none; }
.swiper-slide-active .sam-stories__item .sam-stories__controls {
    opacity: 1;
}
.sam-stories__controls svg {
    pointer-events: none;
}
.sam-stories__btn {
    display: block;
    position: absolute;
}
.sam-stories__btn.--top {
    top: 24px;
    left: 20px;
}
.sam-stories__btn.--bottom {
    bottom: 40px;
    left: 20px;
    right: 20px;
}
.sam-stories__btn.--left {
    text-align: left;
}
.sam-stories__btn.--center {
    text-align: center;
}
.sam-stories__btn.--right {
    text-align: right;
}
.sam-stories__link {
    display: flex;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    color: #fff;
    background: #8C57FC;
    border-radius: 25px;
    justify-content: center;
    padding: 10px;
    cursor: pointer;
}
.sam-stories__link:hover { background: #7047C9; color: #fff; }
.sam-stories__item .swiper-slide:before { content: ''; position: absolute; bottom: 0; top: 0; left: 0; right: 0; z-index: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%); }


.stories-name { font-size: 24px; line-height: 40px; font-weight: 700; color: #fff;
display: -webkit-box;
-webkit-line-clamp: 6;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis; }
.stories-desc,
.stories-date { font-size: 16px; line-height: 25px;font-weight: 600; color: rgba(255, 255, 255, 0.6);  }

.stories-desc { display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis; }
.stories-desc, .stories-date { margin-top: 15px; }
.stories-name + .stories-desc { margin-top: 11px; }
.sam-stories__link { margin-top: 23px; }

.stories-price { display: inline-block; background: rgba(0, 0, 0, 0.8); border-radius: 20px; padding: 10px 15px 10px 15px;
font-size: 16px; line-height: 20px;font-weight: 500; color: #fff; }
.stories-price + .stories-name { margin-top: 16px; }
/* playpause */
.sam-stories__playpause {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    z-index: 2;
	background: none;
}
.sam-stories__playpause::after,
.sam-stories__playpause::before {
    position: absolute;
    content: "";
    display: block;
    height: 14px;
    width: 4px;
    background: #fff;
    transition: transform .2s ease;
}
.sam-stories__playpause::before {
    left: 55%
}
.sam-stories__playpause::after {
    right: 55%
}
.sam-stories__playpause:hover::after,
.sam-stories__playpause:hover::before { background: #8C57FC; }


.sam-stories__playpause svg {
    transition: transform .2s ease;
    transform: scale(0)
}
.sam-stories__playpause.paused svg {
    transform: scale(1)
}
.sam-stories__playpause.paused::after,
.sam-stories__playpause.paused::before {
    transform: scale(0);
}
/* mute */
.sam-stories__mute {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    z-index: 2;
	background: none;
}
.sam-stories__mute::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    margin-top: -1px;
    width: 80%;
    height: 1px;
    background: currentColor;
    transform: rotate(-45deg) scale(0);
    transition: transform 0.2s ease;
}
.sam-stories__mute.muted::after {
    transform: rotate(-45deg) scale(1);
}
.sam-stories__controls button svg {
    margin-right: 0px;
}
.sam-stories__mute:hover,
.sam-stories__playpause:hover { background: none; }
.sam-stories__mute:hover svg path,
.sam-stories__playpause:hover svg path { fill: #8C57FC; }

.swiper-slide .sam-stories__item .sam-stories__close { display: none; }

@media (min-width: 500px) {
	/*.sam-stories__item .swiper-slide { width: 100% !important; }
	.sam-stories__modal-slider .swiper-slide { width: 483.75px; }
	.sam-stories__item { width: 100%; }*/
}

@media (max-width: 760px) {
	.sam-stories__modal .logo-image { display: none; }
	
	.swiper.sam-stories__slider { padding-left: 20px; padding-right: 20px; }
	.sam-stories__modal-slider { height: 95dvh; }

	.sam-stories__close { display: none; }
	.swiper-slide .sam-stories__item .sam-stories__close { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; position: static; }
	.sam-stories .comm-width { padding-right: 0px; padding-left: 0px; }

	.sam-stories__slide.swiper-slide button img,
    .sam-stories__slide.swiper-slide button picture {
        width: 80px;
    }
    .sam-stories__slide.swiper-slide button::before,
    .sam-stories__slide.swiper-slide button::after {
        border-radius: 80px;
    }

	.stories-name { font-size: 19px; line-height: 30px; }
	.stories-desc, .stories-date { font-size: 14px; line-height: 20px; }
	.stories-price { padding: 5px 10px 5px 10px; font-size: 14px; }
	.sam-stories__link { font-size: 14px; padding: 5px 20px; margin-top: 25px; }
	.stories-name + .stories-desc { margin-top: 12px; }
	.stories-price + .stories-name { margin-top: 18px; }


}

@media (max-width: 480px) {
	.swiper-slide-active .stories__item-prev.swiper-button-prev,
	.swiper-slide-active .stories__item-next.swiper-button-next { display: none !important; } 
}