/**
 * Review Gallery - front end styles.
 * Every selector is namespaced with .rg- to avoid theme and plugin conflicts.
 */

.rg-wrap {
	--rg-gap: 24px;
	--rg-columns: 4;
	--rg-row-gap: 24px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	position: relative;
}

.rg-wrap *,
.rg-wrap *::before,
.rg-wrap *::after {
	box-sizing: border-box;
}

/* -------------------------------------------------- Title */

.rg-title {
	margin: 0 0 32px;
	padding: 0;
	text-align: center;
	font-size: 38px;
	font-weight: 500;
	line-height: 1.3;
	color: #1a1a1a;
	letter-spacing: -0.01em;
}

/* -------------------------------------------------- Layout shell */

.rg-inner {
	position: relative;
	width: 100%;
}

.rg-viewport {
	overflow: hidden;
	width: 100%;
	position: relative;
}

.rg-track {
	display: flex;
	align-items: stretch;
	gap: var(--rg-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	will-change: transform;
	touch-action: pan-y;
}

.rg-track.rg-is-dragging {
	cursor: grabbing;
	cursor: -webkit-grabbing;
}

.rg-wrap--carousel .rg-item {
	flex: 0 0 auto;
	width: calc((100% - (var(--rg-gap) * 3)) / 4);
	min-width: 0;
}

.rg-grid {
	display: grid;
	grid-template-columns: repeat(var(--rg-columns), minmax(0, 1fr));
	column-gap: var(--rg-gap);
	row-gap: var(--rg-row-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.rg-item {
	min-width: 0;
	display: flex;
}

.rg-item.rg-hidden {
	display: none;
}

/* -------------------------------------------------- Card */

.rg-card {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 10px;
	background-color: #ffffff;
	border: 1px solid #ececec;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
	overflow: hidden;
}

.rg-media {
	display: block;
	width: 100%;
	line-height: 0;
	text-decoration: none;
	border: 0;
}

a.rg-media {
	cursor: zoom-in;
}

.rg-image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: center;
	border-radius: 6px;
	margin: 0;
	vertical-align: middle;
}

/* -------------------------------------------------- Arrows */

.rg-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	margin: 0;
	color: #2b2b2b;
	background-color: #ffffff;
	border: 1px solid #e4e4e4;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.rg-arrow--prev {
	left: -10px;
}

.rg-arrow--next {
	right: -10px;
}

.rg-arrow svg {
	width: 18px;
	height: 18px;
	display: block;
}

.rg-arrow:hover {
	color: #ffffff;
	background-color: #2b2b2b;
}

.rg-arrow:focus-visible {
	outline: 2px solid #2b2b2b;
	outline-offset: 2px;
}

.rg-arrow.rg-is-disabled {
	opacity: 0.35;
	pointer-events: none;
}

/* -------------------------------------------------- Pagination */

.rg-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 36px;
	width: 100%;
}

.rg-pagination:empty {
	display: none;
}

.rg-pagination-top .rg-pagination {
	margin-top: 0;
	margin-bottom: 24px;
}

.rg-bullet {
	display: block;
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: #d5d5d5;
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.25s ease;
	-webkit-appearance: none;
	appearance: none;
}

.rg-bullet.is-active {
	width: 30px;
	background-color: #2b2b2b;
}

.rg-bullet:focus-visible {
	outline: 2px solid #2b2b2b;
	outline-offset: 3px;
}

.rg-fraction {
	font-size: 14px;
	line-height: 1;
	color: #2b2b2b;
	font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------- Lightbox */

.rg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background-color: rgba(12, 12, 12, 0.92);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.rg-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.rg-lightbox__figure {
	margin: 0;
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}

.rg-lightbox__image {
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	background-color: #ffffff;
	user-select: none;
	-webkit-user-drag: none;
}

.rg-lightbox__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: #ffffff;
	background-color: rgba(255, 255, 255, 0.14);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.rg-lightbox__btn:hover,
.rg-lightbox__btn:focus-visible {
	background-color: rgba(255, 255, 255, 0.3);
	outline: none;
}

.rg-lightbox__btn svg {
	width: 20px;
	height: 20px;
}

.rg-lightbox__close {
	top: 18px;
	right: 18px;
}

.rg-lightbox__prev {
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
}

.rg-lightbox__next {
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
}

.rg-lightbox__counter {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	letter-spacing: 0.02em;
}

body.rg-lightbox-open {
	overflow: hidden;
}

/* -------------------------------------------------- Editor placeholder */

.rg-editor-notice {
	padding: 22px;
	border: 1px dashed #c6c6c6;
	border-radius: 8px;
	background-color: #fafafa;
	color: #6a6a6a;
	font-size: 14px;
	text-align: center;
}

/* -------------------------------------------------- Responsive fallbacks
   These only apply until the JS engine measures the widget; the engine then
   writes exact widths so the Elementor breakpoints stay authoritative. */

@media (max-width: 1024px) {
	.rg-wrap--carousel .rg-item {
		width: calc((100% - (var(--rg-gap) * 2)) / 3);
	}

	.rg-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rg-title {
		font-size: 30px;
	}
}

@media (max-width: 767px) {
	.rg-wrap--carousel .rg-item {
		width: 100%;
	}

	.rg-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.rg-title {
		font-size: 26px;
		margin-bottom: 24px;
	}

	.rg-arrow {
		width: 36px;
		height: 36px;
	}

	.rg-arrow--prev {
		left: 2px;
	}

	.rg-arrow--next {
		right: 2px;
	}

	.rg-lightbox__prev {
		left: 8px;
	}

	.rg-lightbox__next {
		right: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rg-track,
	.rg-bullet,
	.rg-arrow,
	.rg-lightbox {
		transition-duration: 0.01ms !important;
	}
}
