/* ═══════════════════════════════════════════════════════════════
   ARCHIVE CAROUSEL  [property_gallery_carousel]
   ═══════════════════════════════════════════════════════════════ */

.jg-property-gallery {
	position: relative;
	width: 100%;
	overflow: hidden;
	line-height: 0;
}

.jg-property-gallery__viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.jg-property-gallery__track {
	display: flex;
	width: 100%;
	will-change: transform;
}

.jg-property-gallery__slide {
	flex: 0 0 100%;
	width: 100%;
}

img.jg-property-gallery__image {
	width: 100%;
	height: 360px;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	display: block;
	object-fit: cover;
}

/* Arrows */
.jg-property-gallery .jg-property-gallery__arrow {
	position: absolute !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	z-index: 50 !important;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #ffffff !important;
	color: transparent !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-decoration: none !important;
	outline: none !important;
	transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease !important;
}

.jg-property-gallery .jg-property-gallery__arrow:hover {
	transform: translateY(-50%) scale(1.04) !important;
	background: #ffffff !important;
}

.jg-property-gallery .jg-property-gallery__arrow:focus,
.jg-property-gallery .jg-property-gallery__arrow:active {
	outline: none !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
	background: #ffffff !important;
}

.jg-property-gallery .jg-property-gallery__arrow--prev {
	left: 16px !important;
	right: auto !important;
}

.jg-property-gallery .jg-property-gallery__arrow--next {
	right: 16px !important;
	left: auto !important;
}

.jg-property-gallery .jg-property-gallery__arrow span {
	display: block !important;
	width: 10px !important;
	height: 10px !important;
	min-width: 10px !important;
	min-height: 10px !important;
	border-top: 2px solid #111 !important;
	border-right: 2px solid #111 !important;
	background: transparent !important;
	margin: 0 !important;
	padding: 0 !important;
}

.jg-property-gallery .jg-property-gallery__arrow--prev span {
	transform: rotate(-135deg) !important;
	margin-left: 3px !important;
}

.jg-property-gallery .jg-property-gallery__arrow--next span {
	transform: rotate(45deg) !important;
	margin-right: 3px !important;
}

.jg-property-gallery,
.jg-property-gallery * {
	pointer-events: auto;
}

@media (max-width: 767px) {
	.jg-property-gallery__image {
		height: 300px;
	}

	.jg-property-gallery .jg-property-gallery__arrow {
		width: 40px !important;
		height: 40px !important;
		min-width: 40px !important;
		min-height: 40px !important;
	}

	.jg-property-gallery .jg-property-gallery__arrow--prev {
		left: 12px !important;
	}

	.jg-property-gallery .jg-property-gallery__arrow--next {
		right: 12px !important;
	}
}


/* ═══════════════════════════════════════════════════════════════
   SINGLE POST GALLERY  [property_gallery_single]
   ═══════════════════════════════════════════════════════════════ */

/*
   HOW TO CONTROL THE HEIGHT FROM ELEMENTOR:
   In the Shortcode widget's Advanced tab → Custom CSS, add:
   selector .jg-single-gallery__hero-image { height: 80vh; }
   Or set --jg-gallery-hero-height on the widget/section.
*/

.jg-single-gallery {
	width: 100%;
	line-height: 0;
	user-select: none;
	-webkit-user-select: none;
}

/* ── Hero ── */
.jg-single-gallery__hero {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: transparent;
	border-radius: 12px !important;
}

.jg-single-gallery__hero-track {
	position: relative;
	width: 100%;
}

.jg-single-gallery__hero-slide {
	display: none;
	width: 100%;
	border-radius: 16px !important;
}


@media (min-width: 600px) {
.jg-single-gallery__hero-slide.is-active {
	min-height: calc(100vh - 406px) !important;
	display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    align-items: center;
}
	
.jg-single-gallery__hero-image {
	width: 50vw;
	height: var(--jg-gallery-hero-height, 50vh);
	max-height: calc(100vh - 406px); /* CHANGED: caps height so layout doesn't break */
	/* CHANGED: object-fit replaces background-size now that this is a real <img> */
	object-fit: cover;
	background-color: transparent; /* fills letterbox gaps left by object-fit: contain */
	display: block;
	transition: opacity 0.3s ease;
	border-radius: 16px !important; /* now correctly rounds the actual photo */
}
}

@media (max-width: 600px) {
.jg-single-gallery__hero-slide.is-active {
	display: flex;
	min-height: 20vh !important;
}
	
.jg-single-gallery__hero-image {
	width: 100%;
	height: 100%;
	max-height: calc(100vh - 256px); /* CHANGED: caps height so layout doesn't break */
	/* CHANGED: object-fit replaces background-size now that this is a real <img> */
	object-fit: contain;
	background-color: transparent; /* fills letterbox gaps left by object-fit: contain */
	display: block;
	transition: opacity 0.3s ease;
	border-radius: 16px !important; /* now correctly rounds the actual photo */
}
}



.jg-single-gallery__hero-image img {
	border-radius: 16px !important; /* now correctly rounds the actual photo */
}

/* ── Thumbnail strip wrapper ── */
/* ── Thumbnail strip wrapper — full width black bar ── */
.jg-single-gallery__thumbs-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	padding: 0;
	line-height: 0;
	width: 100%;
}

/* ── Inner constraint — centers content to 1400px ── */
.jg-single-gallery__thumbs-inner {
	gap: 16px !important;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 1400px;
	padding: 0 16px;
}

/* ── Thumbnail strip arrows — circular white buttons ── */
.jg-single-gallery__thumb-arrow {
	padding: 0px !important;
	flex-shrink: 0 !important;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #ffffff !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	outline: none !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
	transition: transform 0.2s ease, opacity 0.2s ease !important;
	pointer-events: auto !important;
}

.jg-single-gallery__thumb-arrow:hover {
	transform: scale(1.06);
}

.jg-single-gallery__thumb-arrow span {
	display: block !important;
	width: 10px !important;
	height: 10px !important;
	border-top: 2px solid #111111 !important;
	border-right: 2px solid #111111 !important;
	background: transparent !important;
}

.jg-single-gallery__thumb-arrow--prev span {
	transform: rotate(-135deg);
	margin-left: 3px;
}

.jg-single-gallery__thumb-arrow--next span {
	transform: rotate(45deg);
	margin-right: 3px;
}

/* ── Thumbnail viewport (clips overflow) ── */
.jg-single-gallery__thumbs-viewport {
	flex: 1;
	overflow: hidden;
	position: relative;
}

/* ── Thumbnail track (scrolls horizontally) ── */
.jg-single-gallery__thumbs-track {
	display: flex;
	gap: 8px !important;
	padding: 12px 0;
	transition: transform 0.35s ease;
	will-change: transform;
}

/* ── Individual thumbnail button ── */
.jg-single-gallery__thumb {
	flex-shrink: 0 !important;;
	width: 180px !important;;
	height: 128px !important;;
	border: 0px solid #ffffff !important;
	border-radius: 8px !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	cursor: pointer !important;
	overflow: hidden !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	outline: none !important;
	transition: border-color 0.2s ease, opacity 0.2s ease !important;
	opacity: 0.25 !important;
	pointer-events: auto !important;
	line-height: 0;
}

.jg-single-gallery__thumb:hover {
	opacity: 0.85;
}

.jg-single-gallery__thumb.is-active {
	border-color: #ffffff !important;
	opacity: 1 !important;
}

.jg-single-gallery__thumb-image {
	width: 100% !important;
	height: 100% !important;
	/* CHANGED: object-fit replaces background-size now that this is a real <img> */
	object-fit: cover !important;
}

/* ── Touch / swipe on hero ── */
.jg-single-gallery__hero {
	touch-action: pan-y;
}

@media (max-width: 767px) {
	.jg-single-gallery__hero-image {
		height: 100% !important;
	}

	/* Thumbnails sized for 16:9 landscape images */
	.jg-single-gallery__thumb {
		width: calc((100vw - 80px) / 3) !important;
		height: calc(((100vw - 80px) / 3) * 9 / 16) !important;
	}

	.jg-single-gallery__thumb-arrow {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px !important;
		min-height: 32px !important;
	}

	.jg-single-gallery__thumbs-inner {
		padding: 0 8px !important;
	}
}

/* ═══════════════════════════════════════════════════════════════
   HERO LIGHTBOX (Individual Post Template)
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero Lightbox ── */
.jg-lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
	touch-action: pan-y;
}

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

.jg-lightbox-image {
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
}

.jg-lightbox-close {
	position: absolute;
	top: 24px;
	right: 32px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	color: #111;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.jg-lightbox-close:hover {
	background: #ffffff;
}

.jg-lightbox-arrow {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	min-width: 52px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background 0.2s ease, transform 0.2s ease;
}

.jg-lightbox-arrow:hover {
	background: #ffffff;
}

.jg-lightbox-arrow--prev {
	left: 24px;
}

.jg-lightbox-arrow--next {
	right: 24px;
}

.jg-lightbox-arrow span {
	display: block;
	width: 12px;
	height: 12px;
	border-top: 2px solid #111;
	border-right: 2px solid #111;
}

.jg-lightbox-arrow--prev span {
	transform: rotate(-135deg);
	margin-left: 4px;
}

.jg-lightbox-arrow--next span {
	transform: rotate(45deg);
	margin-right: 4px;
}

.jg-lightbox-arrow.is-hidden {
	display: none !important;
}

@media (min-width: 1024px) {
	.jg-lightbox-arrow {
		display: flex;
	}
}

@media (max-width: 767px) {
	.jg-lightbox-close {
		top: 16px;
		right: 16px;
		width: 36px;
		height: 36px;
		font-size: 22px;
	}
}