/**
 * IO Widget - Gallery v1.1.9
 */

.io-gal {
	--io-gal-main-h: 420px;
	--io-gal-thumb-w: 80px;
	--io-gal-thumb-gap: 10px;
	--io-gal-gap: 12px;
	width: 100%;
	direction: rtl;
	box-sizing: border-box;
}

.io-gal *,
.io-gal *::before,
.io-gal *::after {
	box-sizing: border-box;
}


/* Hard-reset native buttons so Elementor/theme primary (red) never shows behind images */
.io-gal button,
.elementor-widget-io-gallery button,
.elementor-element .io-gal button {
	appearance: none !important;
	-webkit-appearance: none !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: inherit !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-weight: inherit !important;
}

.io-gal-main {
	overflow: hidden;
	background: transparent !important;
	background-color: transparent !important;
}

.io-gal-main-btn,
.elementor-widget-io-gallery .io-gal-main-btn,
.io-gal button.io-gal-main-btn {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: inherit;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	cursor: zoom-in !important;
	line-height: 0 !important;
	font: inherit !important;
	overflow: hidden;
	box-shadow: none !important;
}

.io-gal-main-btn img,
.io-gal-main > img {
	display: block;
	width: 100%;
	height: var(--io-gal-main-h);
	object-fit: cover;
	border-radius: inherit;
	/* neutral placeholder only while loading — not accent */
	background-color: #E5E7EB;
}

.io-gal-thumb,
.elementor-widget-io-gallery .io-gal-thumb,
.io-gal button.io-gal-thumb {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: block !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 2px solid transparent !important;
	border-radius: 8px;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	cursor: pointer !important;
	overflow: hidden !important;
	line-height: 0 !important;
	flex: 1 1 0;
	min-height: 0;
	box-shadow: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.io-gal-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #E5E7EB;
}

.io-gal-thumb.is-active,
.io-gal button.io-gal-thumb.is-active {
	border-color: #3B82F6 !important;
	box-shadow: 0 0 0 2px #3B82F6 !important;
	background: transparent !important;
	background-color: transparent !important;
}

.io-gal-more,
.elementor-widget-io-gallery .io-gal-more,
.io-gal button.io-gal-more {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	flex: 1 1 0;
	min-height: 48px;
	padding: 8px 4px !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 8px;
	background: #F3F4F6 !important;
	background-color: #F3F4F6 !important;
	background-image: none !important;
	color: #1A1A2E !important;
	cursor: pointer !important;
	font-family: inherit !important;
	box-shadow: none !important;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.io-gal-more:hover,
.io-gal button.io-gal-more:hover {
	background: #E5E7EB !important;
	background-color: #E5E7EB !important;
	color: #1A1A2E !important;
	transform: scale(1.02);
	box-shadow: none !important;
}

.io-gal-lb-close,
.io-gal-lb-prev,
.io-gal-lb-next,
.io-gal button.io-gal-lb-close,
.io-gal button.io-gal-lb-prev,
.io-gal button.io-gal-lb-next {
	background: rgba(0, 0, 0, 0.55) !important;
	background-color: rgba(0, 0, 0, 0.55) !important;
	background-image: none !important;
	color: #fff !important;
	border: none !important;
	box-shadow: none !important;
}


.io-gal-layout {
	display: flex;
	align-items: stretch;
	gap: var(--io-gal-gap);
	width: 100%;
}

/* thumbs on the right (default RTL start side of flex with row-reverse or order) */
.io-gal-thumbs-right .io-gal-layout {
	flex-direction: row;
}

.io-gal-thumbs-left .io-gal-layout {
	flex-direction: row-reverse;
}

.io-gal-main {
	flex: 1 1 auto;
	min-width: 0;
	position: relative;
}

.io-gal-main-btn {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	cursor: zoom-in;
	line-height: 0;
	font: inherit;
}

.io-gal-main img,
.io-gal-main-placeholder {
	display: block;
	width: 100%;
	height: var(--io-gal-main-h);
	object-fit: cover;
	border-radius: 12px;
	background: #E5E7EB;
}

.io-gal-main-placeholder {
	min-height: var(--io-gal-main-h);
}

.io-gal-thumbs {
	flex: 0 0 var(--io-gal-thumb-w);
	width: var(--io-gal-thumb-w);
	display: flex;
	flex-direction: column;
	gap: var(--io-gal-thumb-gap);
	max-height: var(--io-gal-main-h);
}

.io-gal-thumb {
	appearance: none;
	-webkit-appearance: none;
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	overflow: hidden;
	line-height: 0;
	flex: 1 1 0;
	min-height: 0;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.io-gal-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.io-gal-thumb.is-active {
	border-color: #3B82F6;
	box-shadow: 0 0 0 2px #3B82F6;
}

.io-gal-thumb:hover {
	opacity: 0.92;
}

/* More dots button */
.io-gal-more {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	flex: 1 1 0;
	min-height: 48px;
	padding: 8px 4px;
	margin: 0;
	border: none;
	border-radius: 8px;
	background: #F3F4F6;
	color: #1A1A2E;
	cursor: pointer;
	font-family: inherit;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.io-gal-more:hover {
	background: #E5E7EB;
	transform: scale(1.02);
}

.io-gal-more-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.io-gal-more-dots span {
	display: block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
}

.io-gal-more-label {
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
}

.io-gal-more-count {
	font-size: 11px;
	font-weight: 700;
	opacity: 0.7;
}

/* Lightbox */
.io-gal-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	padding: 48px 16px 80px;
	direction: rtl;
}

.io-gal-lb[hidden] {
	display: none !important;
}

.io-gal-lb-stage {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 1100px;
	min-height: 0;
}

.io-gal-lb-img {
	max-width: 100%;
	max-height: calc(100vh - 160px);
	object-fit: contain;
	border-radius: 8px;
	user-select: none;
}

.io-gal-lb-close,
.io-gal-lb-prev,
.io-gal-lb-next {
	appearance: none;
	border: none;
	background: transparent;
	color: #fff;
	cursor: pointer;
	padding: 8px;
	line-height: 0;
	z-index: 2;
}

.io-gal-lb-close {
	position: absolute;
	top: 12px;
	left: 12px;
}

.io-gal-lb-prev,
.io-gal-lb-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.io-gal-lb-prev {
	right: 8px;
}

.io-gal-lb-next {
	left: 8px;
}

.io-gal-lb-counter {
	position: absolute;
	top: 18px;
	right: 16px;
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	font-weight: 600;
	direction: ltr;
}

.io-gal-lb-strip {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	max-width: 90vw;
	overflow-x: auto;
	padding: 4px;
	-webkit-overflow-scrolling: touch;
}

.io-gal-lb-strip button {
	appearance: none;
	border: 2px solid transparent;
	padding: 0;
	margin: 0;
	width: 56px;
	height: 56px;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	background: #333;
	flex: 0 0 auto;
	line-height: 0;
	opacity: 0.65;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.io-gal-lb-strip button.is-active {
	opacity: 1;
	border-color: #fff;
}

.io-gal-lb-strip img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.io-gal-empty {
	padding: 24px;
	text-align: center;
	color: #6B7280;
	font-size: 14px;
}

/* Mobile: thumbs below main */
@media (max-width: 767px) {
	.io-gal-layout,
	.io-gal-thumbs-right .io-gal-layout,
	.io-gal-thumbs-left .io-gal-layout {
		flex-direction: column;
	}

	.io-gal-thumbs {
		flex: 0 0 auto;
		width: 100%;
		max-height: none;
		flex-direction: row;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.io-gal-thumb,
	.io-gal-more {
		flex: 0 0 auto;
		width: 72px;
		height: 72px;
		min-height: 72px;
	}

	.io-gal {
		--io-gal-main-h: 280px;
	}

	.io-gal-lb-prev {
		right: 4px;
	}

	.io-gal-lb-next {
		left: 4px;
	}
}

body.io-gal-lb-open {
	overflow: hidden;
}

/* ========== 1.3.10: kill theme/Elementor button accent behind images ========== */
.elementor-widget-io-gallery .io-gal button.io-gal-main-btn,
.elementor-element .io-gal button.io-gal-main-btn,
.io-gal button.io-gal-main-btn {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	overflow: hidden !important;
	line-height: 0 !important;
	color: transparent !important;
}

.elementor-widget-io-gallery .io-gal button.io-gal-thumb,
.elementor-element .io-gal button.io-gal-thumb,
.io-gal button.io-gal-thumb {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	overflow: hidden !important;
	line-height: 0 !important;
}

.elementor-widget-io-gallery .io-gal button.io-gal-thumb.is-active,
.io-gal button.io-gal-thumb.is-active {
	background: transparent !important;
	background-color: transparent !important;
}

.elementor-widget-io-gallery .io-gal button.io-gal-more,
.io-gal button.io-gal-more {
	background: #F3F4F6 !important;
	background-color: #F3F4F6 !important;
	background-image: none !important;
	color: #1A1A2E !important;
	box-shadow: none !important;
}

.elementor-widget-io-gallery .io-gal-main,
.io-gal-main {
	background: transparent !important;
	background-color: transparent !important;
}

/* Image itself: no accent bleed when border-radius / border applied */
.elementor-widget-io-gallery .io-gal-main img,
.elementor-widget-io-gallery .io-gal-thumb img,
.io-gal-main img,
.io-gal-thumb img {
	background-color: transparent;
}
