.sv-gallery-carousel {
	--sv-gallery-cols: 3;
	--sv-gallery-gap: 16px;
	margin: 40px 0 8px;
}
.sv-gallery-carousel__title {
	font-size: 22px;
	margin: 0 0 16px;
	color: var(--sv-primary, #122855);
}
.sv-gallery-carousel[data-columns="2"] { --sv-gallery-cols: 2; }
.sv-gallery-carousel[data-columns="3"] { --sv-gallery-cols: 3; }
.sv-gallery-carousel[data-columns="4"] { --sv-gallery-cols: 4; }

.sv-gallery-carousel__viewport {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.sv-gallery-carousel__track {
	flex: 1 1 auto;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--sv-gallery-cols) - 1) * var(--sv-gallery-gap)) / var(--sv-gallery-cols));
	gap: var(--sv-gallery-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	margin: 0;
	padding: 4px 0 12px;
	list-style: none;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.sv-gallery-carousel__track::-webkit-scrollbar { display: none; }

.sv-gallery-carousel__slide {
	scroll-snap-align: start;
	border-radius: var(--sv-radius-md, 18px);
	overflow: hidden;
	background: var(--sv-bg, #f5f8fa);
	aspect-ratio: 4 / 3;
}
.sv-gallery-carousel__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sv-gallery-carousel__arrow {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid var(--sv-line, #dfe7ec);
	background: var(--sv-card, #ffffff);
	box-shadow: var(--sv-shadow-sm, 0 8px 24px rgba(18, 40, 85, .08));
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background var(--sv-transition, 220ms ease), transform var(--sv-transition, 220ms ease);
}
.sv-gallery-carousel__arrow::before {
	content: "";
	width: 16px;
	height: 16px;
	background-color: #212677;
	-webkit-mask: url("../images/forward.svg") no-repeat center / contain;
	mask: url("../images/forward.svg") no-repeat center / contain;
}
.sv-gallery-carousel__arrow--prev::before { transform: scaleX(-1); }
.sv-gallery-carousel__arrow:hover { background: var(--sv-secondary-100, #eef7fa); }
.sv-gallery-carousel__arrow:active { transform: scale(0.94); }
.sv-gallery-carousel__arrow[disabled] { opacity: .35; cursor: default; }
.sv-gallery-carousel__arrow[disabled]:hover { background: var(--sv-card, #ffffff); }

@media (max-width: 900px) {
	.sv-gallery-carousel { --sv-gallery-gap: 12px; }
	.sv-gallery-carousel[data-columns="3"],
	.sv-gallery-carousel[data-columns="4"] { --sv-gallery-cols: 2; }
}

@media (max-width: 560px) {
	.sv-gallery-carousel { --sv-gallery-cols: 1 !important; --sv-gallery-gap: 10px; }
	.sv-gallery-carousel__arrow { width: 38px; height: 38px; }
	.sv-gallery-carousel__arrow::before { width: 13px; height: 13px; }
}

.sv-article__body a[data-sv-lightbox-item] { cursor: zoom-in; }
body.sv-lightbox-open { overflow: hidden; }
.sv-lightbox[hidden] { display: none; }
.sv-lightbox { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 64px 80px; background: rgba(6,10,26,.92); direction: rtl; }
.sv-lightbox figure { display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; margin: 0; }
.sv-lightbox__image { display: block; max-width: min(1200px,88vw); max-height: calc(100vh - 130px); width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.sv-lightbox__caption { margin-top: 12px; color: #fff; text-align: center; }
.sv-lightbox__close,.sv-lightbox__arrow { position: absolute; border: 0; color: #212677; background: #fff; cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.25); }
.sv-lightbox__close { inset-block-start: 18px; inset-inline-end: 20px; width: 44px; height: 44px; border-radius: 50%; font-size: 32px; line-height: 40px; }
.sv-lightbox__arrow { top: 50%; width: 50px; height: 50px; border-radius: 14px; transform: translateY(-50%); }
.sv-lightbox__arrow--prev { right: 20px; } .sv-lightbox__arrow--next { left: 20px; }
.sv-lightbox__arrow::before { content: ""; position: absolute; top: 50%; left: 50%; width: 15px; height: 15px; border-top: 3px solid currentColor; border-left: 3px solid currentColor; transform: translate(-35%,-50%) rotate(-45deg); }
.sv-lightbox__arrow--next::before { transform: translate(-65%,-50%) rotate(135deg); }
.sv-lightbox button:focus-visible { outline: 3px solid #9dd8ff; outline-offset: 3px; }
@media (max-width: 640px) {
	.sv-lightbox { padding: 58px 12px 74px; }
	.sv-lightbox__image { max-width: calc(100vw - 24px); max-height: calc(100vh - 150px); }
	.sv-lightbox__arrow { top: auto; bottom: 14px; transform: none; }
	.sv-lightbox__arrow--prev { right: calc(50% - 60px); } .sv-lightbox__arrow--next { left: calc(50% - 60px); }
}
