.gallery-wrapper {
	display: block;
	/* width: 100%; */
	height: auto;
	margin-top: var(--gorizontal-field);
}
.gallery-wrapper.gallery-wrapper-no-margin {
	width: calc(100% + 2 * var(--gorizontal-field));
	margin-left: calc(-1 * var(--gorizontal-field));
	margin-right: calc(-1 * var(--gorizontal-field));
	margin-top: 0;	
}
.gallery {
	position: relative;
	max-width: 100%;
	hyphens: auto;
	overflow: hidden;
	background-color: var(--page-fg-color);
	--y-item-ratio: 100;
	--margin-block: 8;
}
.gallery:has(.slider-item-over) {
	pointer-events: none;
}
.gallery .gallery-author {
	position: absolute;
    z-index: 3;
	font-size: 0.8em;
	font-weight: normal;
    color: var(--page-darkfg-color);
    opacity: 0.6;
    top: calc( var(--margin-block) * 1px );
    left: calc(var(--gorizontal-field) / 2);
	max-width: 40%;
}
.gallery .gallery-author a {
	color: var(--page-darkfg-color);
    opacity: 0.6;
	text-decoration: underline;
}
.gallery .gallery-author a:hover {
	color: var(--page-darkfg-color);
    opacity: 0.6;
}
.gallery .gallery-author a:visited {
	color: var(--page-darkfg-color);
    opacity: 0.6;
}
.gallery .slider-item {
	display: flex;
	justify-content: center;
	position: absolute;
	z-index: 1;
	top: 0;
	width: 100%;
	height: 100%;
	transition: all 0.5s;
	overflow: hidden;
}

.gallery .slider-item::before {
	position: absolute;
	content: "";
    left: 0;
    top: 0;
	right: 0;
	bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
	z-index: 2;
}

.gallery .slider-background-img {
	position: absolute;
	filter: blur(25px);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
	object-fit: cover;
    z-index: 1;
	user-select: none;
}
.gallery .slider-item {
	color: #ccc;
}
.expand-wrapper .gallery .slider-item {
	pointer-events: none;
}
.expand-wrapper .slider-img-wrapper {
	align-items: center;
}
.gallery .slider-item:not(.slider-item-active):not(.slider-item-over):not(.slider-item-out) {
	display: none;
}
.gallery .slider-item-active, .gallery .slider-item-over, .gallery .slider-item-out {
	display: flex;
}
.gallery .slider-item-active {
	/* will-change: transform; */
	transform: translateX(0);
	z-index: 3;
}
.gallery.slider-forward .slider-item.slider-item-over:not(.slider-item-active) {
	transform: translateX(100%);
}
.gallery.slider-backward .slider-item.slider-item-over:not(.slider-item-active) {
	transform: translateX(-100%);
}
.gallery.slider-forward .slider-item.slider-item-out {
	transform: translateX(-100%);
}
.gallery.slider-backward .slider-item.slider-item-out {
	transform: translateX(100%);
}
.gallery .gallery-img {
	position: absolute;
	user-select: none;
}
.gallery > .gallery-img {
	position: static;
}
/* .gallery .slider-item-active .gallery-img { 
	will-change: transform;
}
.expand-wrapper .gallery .slider-item-active .gallery-img {
	will-change: auto;
}  */
.gallery .gallery-img.no-cut {
	
}
.gallery .gallery-img.cover {
	
}
.gallery .slider-img-wrapper {
	display: flex;
	position: absolute;
    top: calc(var(--margin-block) * 1px);
	justify-content: center;
	align-items: center;
	z-index: 3;
	width: 100%;
	height: calc(1% * var(--y-item-ratio) - (var(--margin-block) * 1px) * 2);
	overflow: hidden;
	-webkit-overflow-scrolling: touch;
}
.expand-wrapper .gallery .slider-img-wrapper {
	justify-content: center !important;
	align-items: center !important;
}
.gallery .slider-markers {
	position: absolute;
	height: 40px;
	width: 100%;
	bottom: 0;
	left: 0;
	display: flex;
	justify-content: right;
	padding: 0 10px;
	z-index: 3;
}
.expand-wrapper { 
	display: flex;
	justify-content: center;
	align-items: flex-end;
	position: fixed;
	inset: 0;
	z-index: 110;
	background-color: var(--page-fg-color);
}
.expand-wrapper-none {
	display: none;
}
.expand-close-btn {
	position: absolute;
	content: "";
	top: calc(var(--gorizontal-field) / 4);
	right: calc(var(--gorizontal-field) / 4);
	height: 5%;
	color: var(--page-bg-color);
	cursor: pointer;
	opacity: 0.5;
	transition: opacity .1s;
	z-index: 5;
}
.expand-close-btn:hover {
	opacity: 1;
}
.gallery .slider-thumbnails {
	display: flex;
	flex-wrap: nowrap;
	gap: 15px;
	padding-inline: 15px;
	position: absolute;
	z-index: 4;
	bottom: 0;
	left: 0;
	background-color: transparent; 
	height: calc(1% * (100 - var(--y-item-ratio )));
	width: 100%;
	padding-bottom: calc(var(--margin-block) * 1px);
	overflow-x: auto;
	user-select: none;
}
.gallery > img {
	max-width: 100%;
}
.gallery {
	overflow: auto;
}
.gallery:has(:not(img)) {
    overflow: hidden;
}
.gallery .slider-thumbnails::-webkit-scrollbar {
	display: none;
}
.gallery .slider-item-thumbnail {
	height: 100%;
	border-radius: 5px;
	user-select: none;
	cursor: pointer;
}
.gallery .slider-item-thumbnail.loading {
	min-width: 80px;
}
.gallery .slider-thumbnails.slider-thumbnails-movable .slider-item-thumbnail {
	cursor: grab;
}
.gallery .slider-thumbnails.slider-thumbnails-moving .slider-item-thumbnail {
	cursor: grabbing;
}
.gallery .slider-thumbnails.slider-thumbnails-movable {
	cursor: grab;
}
.gallery .slider-thumbnails.slider-thumbnails-moving {
	cursor: grabbing;
}
.gallery .gallery-item-thumbnail-wrapper {
	display: flex;
	justify-content: center;
	position: relative;
    background: rgba(255, 255, 255, 0.3);
}
.gallery .gallery-item-thumbnail-wrapper:first-child { /* justify content на родителе не даёт работать overflow, поэтому так */
	margin-left: auto;
}
.gallery .gallery-item-thumbnail-wrapper:last-child { /* justify content на родителе не даёт работать overflow, поэтому так */
	margin-right: auto;
}

.gallery .slider-thumbnails .pointer-none {
	pointer-events: none;
}

/* .gallery .slider-item-thumbnail-active {
	transition: all .5s linear;
    -webkit-box-shadow: 0px 0px 33px 15px rgba(255, 255, 255, 0.9);
    -moz-box-shadow: 0px 0px 33px 15px rgba(255, 255, 255, 0.9);
    box-shadow: 0px 0px 33px 15px rgba(255, 255, 255, 0.9);
} */
.gallery .slider-item-marker {
	position: relative;
	flex-grow: 1;
	align-items: center;
	max-width: 30px;
	height: 30px;
	cursor: pointer;
	margin: 0px 5px;
	position: relative;
}
.gallery .gallery-item-marker {
	position: absolute;
    z-index: -1;
    width: 100%;
    bottom: -6px;
	visibility: hidden;
}
.gallery .slider-markers .slider-item-marker-active {
	max-width: 60px;
}
.gallery .slider-item-marker-active {
	visibility: visible;
}
.gallery .slider-item-marker::after, .gallery .slider-item-marker::before {
	position: absolute;
	content: '';
	display: block;
	bottom: 50%;
	height: 3px;
	border-radius: 3px;
	background-color: var(--page-bg-color);
}
.gallery .gallery-item-marker::after, .gallery .gallery-item-marker::before {
	position: absolute;
	content: '';
	display: block;
	bottom: 50%;
	height: 4px;
	border-radius: 3px;
	background-color: var(--page-main-kit-bg2);
}
.gallery .slider-item-marker::before, .gallery .gallery-item-marker::before {
	opacity: 0.3;
	width: 100%;
}
.gallery .slider-item-marker::after, .gallery .gallery-item-marker::after {
	right: 0;
	opacity: 0.7;
}
.gallery .gallery-item-thumbnail-wrapper .slider-item-marker-active {
	z-index: 1;
}
.gallery .slider-item-marker-active:after, .gallery .gallery-item-marker-active:after {
	animation: slider_marker linear;
	animation-duration: inherit;
}
.gallery .slider-item-marker-active.paused:after, .gallery .gallery-item-marker-active.paused:after {
	animation-play-state: paused;
}
.gallery .slider-item-marker.stay-active::before, .gallery .gallery-item-marker.stay-active::before {
	opacity: 1;
}
@keyframes slider_marker {
	0% {
		width: 100%;
	}
	100% {
		width: 0%;
	}
}
.gallery .slider-arrow-wrapper {
	position: absolute;
	display: flex;
	justify-content: center;
	align-items: center;
	top: calc(50% - 1.5em);
	width: 3em;
	height: 3em;
	border-radius: 51%;
	opacity: 0.5;
	cursor: pointer;
	z-index: 5;
	transition: opacity 0.1s;
	-webkit-tap-highlight-color: transparent;
}
.gallery .slider-arrow-wrapper:hover {
	opacity: 1;
}
.expand-wrapper .gallery .slider-arrow-wrapper {
	--slider-arrow-height: 35;
	height: calc(1% * var(--slider-arrow-height));
    width: 15%;
    top: calc(1% * ((var(--y-item-ratio)) - var(--slider-arrow-height)) / 2);
}

.gallery .slider-arrow-right-wrapper {
	right: calc(var(--gorizontal-field) / 4);
	padding-right: 0.1em;
}
.gallery .slider-arrow-left-wrapper {
	left: calc(var(--gorizontal-field) / 4);
}
.gallery .slider-arrow {
	position: absolute;
	color: var(--page-bg-color);	
	width: 2em;
	height: 2em;
	user-select: none;
}
.gallery .slider-arrow-right {
	right: calc(var(--gorizontal-field) / 4);
}
.gallery .slider-arrow-left {
	transform: rotate(180deg);
	left: calc(var(--gorizontal-field) / 4);
}

.gallery .slider-item-text {
	position: absolute;
    width: 100%;
    text-align: center;
    z-index: 4;
    bottom: 0;
    padding-top: 25px;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gallery .bg-none {
	background: none;
}
.paused {
	animation-play-state: paused;
}
.gallery.events-none {
	pointer-events: none;
}
.page-view-image-1 .gallery {
	filter: grayscale(100%);
}