/* ==========================================================================
   Destination Gallery Widget Styles (v1.2.0)
   ========================================================================== */

.abx-dest-gallery-wrapper {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	clear: both;
}

.abx-dest-gallery-wrapper * {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Desktop vs Mobile Display Rules (High-Specificity)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
	html body .elementor-widget-abx_destination_gallery .abx-dest-gallery-mobile,
	html body .abx-dest-gallery-wrapper .abx-dest-gallery-mobile,
	html body .abx-dest-gallery-mobile {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		max-height: 0 !important;
		opacity: 0 !important;
		overflow: hidden !important;
		margin: 0 !important;
		padding: 0 !important;
		pointer-events: none !important;
	}

	html body .elementor-widget-abx_destination_gallery .abx-dest-gallery-desktop,
	html body .abx-dest-gallery-wrapper .abx-dest-gallery-desktop,
	html body .abx-dest-gallery-desktop {
		display: grid !important;
		grid-template-columns: 1.15fr 1fr !important;
		gap: 12px !important;
		height: 450px !important;
		width: 100% !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
}

@media (max-width: 767px) {
	html body .elementor-widget-abx_destination_gallery .abx-dest-gallery-desktop,
	html body .abx-dest-gallery-wrapper .abx-dest-gallery-desktop,
	html body .abx-dest-gallery-desktop {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		max-height: 0 !important;
		opacity: 0 !important;
		overflow: hidden !important;
		margin: 0 !important;
		padding: 0 !important;
		pointer-events: none !important;
	}

	html body .elementor-widget-abx_destination_gallery .abx-dest-gallery-mobile,
	html body .abx-dest-gallery-wrapper .abx-dest-gallery-mobile,
	html body .abx-dest-gallery-mobile {
		display: flex !important;
		flex-direction: column !important;
		gap: 12px !important;
		height: 440px !important;
		width: 100% !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
}

/* --------------------------------------------------------------------------
   Desktop Grid Layout (Default > 767px)
   -------------------------------------------------------------------------- */
.abx-dest-gallery-right-grid {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	grid-template-rows: 1fr 1fr !important;
	gap: 12px !important;
	height: 100% !important;
}

.abx-dest-gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	cursor: pointer;
	background-color: #f0f3f5;
	height: 100%;
	width: 100%;
}

.abx-dest-gallery-item img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.abx-dest-gallery-item:hover img {
	transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   Overlay & View All Photos Button
   -------------------------------------------------------------------------- */
.abx-dest-gallery-overlay {
	position: absolute;
	inset: 0;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: rgba(0, 0, 0, 0.12) !important;
	border-radius: inherit;
	transition: background-color 0.3s ease;
	z-index: 2;
	pointer-events: none;
	padding: 12px !important;
	box-sizing: border-box !important;
}

.abx-dest-gallery-item:hover .abx-dest-gallery-overlay {
	background: rgba(0, 0, 0, 0.22) !important;
}

button.abx-dest-gallery-view-all-btn,
.abx-dest-gallery-view-all-btn,
.elementor-widget-abx_destination_gallery .abx-dest-gallery-view-all-btn,
.elementor-widget-abx_destination_gallery button.abx-dest-gallery-view-all-btn {
	background-color: #044C55 !important;
	color: #ffffff !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.8px !important;
	padding: 10px 20px !important;
	border: none !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
	transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1) !important;
	z-index: 5 !important;
	outline: none !important;
	white-space: nowrap !important;
	width: auto !important;
	max-width: calc(100% - 24px) !important;
	min-width: 0 !important;
	display: inline-block !important;
	pointer-events: auto !important;
	margin: 0 auto !important;
	box-sizing: border-box !important;
	text-align: center !important;
}

button.abx-dest-gallery-view-all-btn:hover,
.abx-dest-gallery-view-all-btn:hover {
	background-color: #03363D !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}

/* --------------------------------------------------------------------------
   Responsive Overrides
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.abx-dest-gallery-desktop {
		height: 400px !important;
	}

	button.abx-dest-gallery-view-all-btn,
	.abx-dest-gallery-view-all-btn,
	.elementor-widget-abx_destination_gallery .abx-dest-gallery-view-all-btn {
		font-size: 11px !important;
		padding: 9px 16px !important;
		letter-spacing: 0.6px !important;
		border-radius: 4px !important;
		width: auto !important;
		max-width: calc(100% - 20px) !important;
		display: inline-block !important;
	}
}

@media (max-width: 767px) {
	.abx-dest-gallery-mobile-featured {
		flex: 1 1 58% !important;
		height: 100% !important;
	}

	.abx-dest-gallery-mobile-bottom-grid {
		display: grid !important;
		grid-template-columns: 1fr 1fr !important;
		gap: 12px !important;
		flex: 1 1 42% !important;
		height: 100% !important;
	}

	button.abx-dest-gallery-view-all-btn.mobile-btn,
	.abx-dest-gallery-view-all-btn.mobile-btn,
	.elementor-widget-abx_destination_gallery .abx-dest-gallery-view-all-btn.mobile-btn {
		font-size: 10px !important;
		font-weight: 700 !important;
		padding: 8px 14px !important;
		letter-spacing: 0.5px !important;
		background-color: #044C55 !important;
		color: #ffffff !important;
		border-radius: 4px !important;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
		width: auto !important;
		max-width: calc(100% - 16px) !important;
		white-space: nowrap !important;
		display: inline-block !important;
	}
}

/* --------------------------------------------------------------------------
   Lightbox Modal Styles
   -------------------------------------------------------------------------- */
.abx-dest-lightbox-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(10, 15, 20, 0.95);
	backdrop-filter: blur(12px);
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.abx-dest-lightbox-modal.abx-active {
	opacity: 1;
	visibility: visible;
}

.abx-lightbox-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 28px;
	color: #ffffff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	flex-shrink: 0;
	z-index: 20;
}

.abx-lightbox-counter {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, 0.85);
}

.abx-lightbox-close {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: transform 0.2s ease, background 0.2s ease;
}

.abx-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.08);
}

.abx-lightbox-stage {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	padding: 16px;
	overflow: hidden;
	width: 100%;
	height: 100%;
}

.abx-lightbox-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: abx-gal-spin 0.8s linear infinite;
	opacity: 0;
	visibility: hidden;
	z-index: 5;
}

.abx-lightbox-loader.abx-loading {
	opacity: 1;
	visibility: visible;
}

@keyframes abx-gal-spin {
	to { transform: translate(-50%, -50%) rotate(360deg); }
}

.abx-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.abx-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: translateY(-50%) scale(1.08);
}

.abx-lightbox-prev {
	left: 24px;
}

.abx-lightbox-next {
	right: 24px;
}

.abx-lightbox-img-wrapper {
	max-width: 90%;
	max-height: 80vh;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.abx-lightbox-main-img {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	transition: opacity 0.2s ease;
}

.abx-lightbox-thumbs {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 24px;
	overflow-x: auto;
	background: rgba(0, 0, 0, 0.4);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
	max-width: 100%;
}

.abx-lightbox-thumb-item {
	width: 60px;
	height: 44px;
	flex-shrink: 0;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	opacity: 0.5;
	border: 2px solid transparent;
	transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.abx-lightbox-thumb-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.abx-lightbox-thumb-item:hover {
	opacity: 0.85;
}

.abx-lightbox-thumb-item.abx-active {
	opacity: 1;
	border-color: #044C55;
	transform: scale(1.05);
}
