.rcesd-gallery-list {
	--rcesd-gl-accent: #1f9d4a;
	--rcesd-gl-soft: #e8f6ee;
	--rcesd-gl-ink: #1b1f1c;
	--rcesd-gl-muted: #6b7280;
	--rcesd-gl-line: #e5e7eb;
	direction: rtl;
	font-family: "Yekan Bakh", Tahoma, sans-serif;
	color: var(--rcesd-gl-ink);
}

.rcesd-gallery-list *,
.rcesd-gallery-list *::before,
.rcesd-gallery-list *::after {
	box-sizing: border-box;
}

.rcesd-gallery-list a:hover,
.rcesd-gallery-list a:focus,
.rcesd-gallery-list button:hover,
.rcesd-gallery-list button:focus {
	color: var(--rcesd-gl-accent) !important;
}

.rcesd-gallery-list__items {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.rcesd-gallery-list__card {
	display: grid;
	grid-template-columns: minmax(200px, 0.85fr) minmax(360px, 1.35fr) 168px;
	gap: 16px 20px;
	align-items: center;
	padding: 16px 18px;
	border: 1px solid var(--rcesd-gl-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(16, 40, 24, 0.03);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rcesd-gallery-list__card:hover {
	border-color: #cfe8d8;
	box-shadow: 0 10px 24px rgba(16, 40, 24, 0.06);
}

.rcesd-gallery-list__info {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.rcesd-gallery-list__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--rcesd-gl-soft);
	color: var(--rcesd-gl-accent);
}

.rcesd-gallery-list__text {
	min-width: 0;
}

.rcesd-gallery-list__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--rcesd-gl-ink);
	font-size: 15.5px;
	font-weight: 800;
	line-height: 1.6;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.rcesd-gallery-list__desc {
	display: -webkit-box;
	margin: 6px 0 0;
	overflow: hidden;
	color: var(--rcesd-gl-muted);
	font-size: 12.5px;
	font-weight: 550;
	line-height: 1.7;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.rcesd-gallery-list__previews {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	min-width: 0;
	max-width: 460px;
}

.rcesd-gallery-list__thumb {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 1;
	border-radius: 12px;
	background: #eef2ef;
}

.rcesd-gallery-list__thumb img,
.rcesd-gallery-list__thumb--empty {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rcesd-gallery-list__thumb--empty {
	background: linear-gradient(135deg, #e8f0ea, #d9e5dc);
}

.rcesd-gallery-list__more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 40, 24, 0.55);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
}

.rcesd-gallery-list__aside {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	gap: 10px;
	width: 168px;
	justify-self: end;
}

.rcesd-gallery-list__count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 999px;
	background: #f3f4f6;
	color: var(--rcesd-gl-muted);
	font-size: 12.5px;
	font-weight: 700;
}

.rcesd-gallery-list__count svg {
	color: var(--rcesd-gl-muted);
}

.rcesd-gallery-list__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid var(--rcesd-gl-accent);
	border-radius: 12px;
	background: #fff;
	color: var(--rcesd-gl-accent);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 750;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.rcesd-gallery-list__btn svg {
	flex: none;
}

.rcesd-gallery-list__btn:hover:not(:disabled) {
	background: var(--rcesd-gl-accent);
	color: #fff !important;
	transform: translateY(-1px);
}

.rcesd-gallery-list__btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.rcesd-gallery-list__empty {
	margin: 0;
	padding: 24px;
	border: 1px dashed var(--rcesd-gl-line);
	border-radius: 14px;
	color: var(--rcesd-gl-muted);
	text-align: center;
}

.rcesd-gallery-list__pagination {
	margin-top: 24px;
}

.rcesd-gallery-list__pages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rcesd-gallery-list__pages a,
.rcesd-gallery-list__pages span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--rcesd-gl-line);
	border-radius: 999px;
	background: #fff;
	color: var(--rcesd-gl-ink);
	font-size: 13.5px;
	font-weight: 750;
	text-decoration: none;
	box-shadow: none;
}

.rcesd-gallery-list__pages a::before,
.rcesd-gallery-list__pages a::after,
.rcesd-gallery-list__pages span::before,
.rcesd-gallery-list__pages span::after {
	content: none !important;
	display: none !important;
}

.rcesd-gallery-list__pages .current {
	border-color: var(--rcesd-gl-accent);
	background: var(--rcesd-gl-accent);
	color: #fff !important;
}

.rcesd-gallery-list__pages a:hover {
	border-color: var(--rcesd-gl-accent);
	color: var(--rcesd-gl-accent) !important;
}

.rcesd-gallery-list__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.rcesd-gallery-list__arrow svg {
	display: block;
}

/* Lightbox */
.rcesd-gl-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(10, 18, 12, 0.78);
}

.rcesd-gl-lightbox.is-open {
	display: flex;
}

.rcesd-gl-lightbox__dialog {
	position: relative;
	width: min(920px, 100%);
	padding: 22px 22px 16px;
	border-radius: 18px;
	background: #fff;
}

.rcesd-gl-lightbox__title {
	margin: 0 36px 14px 0;
	color: var(--rcesd-gl-ink, #1b1f1c);
	font-family: "Yekan Bakh", Tahoma, sans-serif;
	font-size: 18px;
	font-weight: 800;
}

.rcesd-gl-lightbox__stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 280px;
	background: #0f1411;
	border-radius: 14px;
	overflow: hidden;
}

.rcesd-gl-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 70vh;
	object-fit: contain;
}

.rcesd-gl-lightbox__nav {
	position: absolute;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #1b1f1c;
	transform: translateY(-50%);
	cursor: pointer;
}

.rcesd-gl-lightbox__nav--prev {
	right: 12px;
}

.rcesd-gl-lightbox__nav--next {
	left: 12px;
}

.rcesd-gl-lightbox__close {
	position: absolute;
	top: 12px;
	left: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 999px;
	background: #f3f4f6;
	color: #111;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.rcesd-gl-lightbox__counter {
	margin-top: 12px;
	color: #6b7280;
	font-family: "Yekan Bakh", Tahoma, sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

body.rcesd-gl-lock {
	overflow: hidden;
}

@media (max-width: 980px) {
	.rcesd-gallery-list__card {
		grid-template-columns: 1fr;
		align-items: stretch;
	}

	.rcesd-gallery-list__previews {
		max-width: none;
	}

	.rcesd-gallery-list__aside {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		justify-self: stretch;
	}

	.rcesd-gallery-list__btn {
		width: auto;
		min-width: 148px;
	}
}

@media (max-width: 640px) {
	.rcesd-gallery-list__previews {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rcesd-gallery-list__aside {
		flex-direction: column;
		align-items: stretch;
	}

	.rcesd-gallery-list__btn {
		width: 100%;
	}
}
