/* Front-end only: layout and motion that would get in the way while editing. */

/* ---------- Header overlays the first section ---------- */

.wp-site-blocks > header.wp-block-template-part {
	position: relative;
	z-index: 20;
	margin-bottom: -110px;
}

.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

/* ---------- Group: hero slideshow ---------- */

.wp-block-group.is-style-lgp-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	isolation: isolate;
}

/* Semi-transparent dark luxury overlay to ensure text readability */
.wp-block-group.is-style-lgp-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.75) 100%);
	pointer-events: none;
}

/* Gallery container holds the background slides */
.wp-block-group.is-style-lgp-hero .wp-block-gallery.wp-block-gallery {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
}

/* Each slide figure */
.wp-block-group.is-style-lgp-hero .wp-block-gallery figure.wp-block-image {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	z-index: 0;
	transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}

/* Fallback for first slide before JS loads and active slide */
.wp-block-group.is-style-lgp-hero .wp-block-gallery:not(.is-ready) figure.wp-block-image:first-child,
.wp-block-group.is-style-lgp-hero .wp-block-gallery figure.wp-block-image.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

/* Image zoom & Ken Burns */
.wp-block-group.is-style-lgp-hero .wp-block-gallery figure.wp-block-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	transform: scale(1);
	transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}

.wp-block-group.is-style-lgp-hero .wp-block-gallery figure.wp-block-image.is-active img {
	transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-group.is-style-lgp-hero .wp-block-gallery figure.wp-block-image img {
		transform: none !important;
		transition: none !important;
	}
}

/* Content inside hero (Text & Heading) */
.wp-block-group.is-style-lgp-hero > *:not(.wp-block-gallery):not(.lgp-hero-indicators):not(.lgp-hero-nav) {
	position: relative;
	z-index: 2;
}

/* Hero Slideshow Indicators (Pagination Bars) */
.lgp-hero-indicators {
	position: absolute;
	bottom: 36px;
	right: 50px;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 10px;
	pointer-events: auto;
}

.lgp-hero-dot {
	width: 32px;
	height: 4px;
	border: none;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	padding: 0;
	transition: all 0.35s ease;
	outline: none;
}

.lgp-hero-dot:hover {
	background: rgba(255, 255, 255, 0.7);
}

.lgp-hero-dot.is-active {
	width: 52px;
	background: var(--wp--preset--color--sand, #d1c8bb);
	box-shadow: 0 0 12px rgba(209, 200, 187, 0.5);
}

/* Hero Slideshow Navigation Buttons (Arrows) */
.lgp-hero-nav {
	position: absolute;
	bottom: 30px;
	left: 50px;
	z-index: 3;
	display: flex;
	gap: 12px;
	pointer-events: auto;
}

.lgp-hero-nav-btn {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(25, 25, 25, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	color: #ffffff;
	cursor: pointer;
	transition: all 0.25s ease;
	outline: none;
}

.lgp-hero-nav-btn:hover {
	background: rgba(209, 200, 187, 0.25);
	border-color: var(--wp--preset--color--sand, #d1c8bb);
	color: var(--wp--preset--color--sand, #d1c8bb);
	transform: scale(1.08);
}

@media (max-width: 767px) {
	.wp-block-group.is-style-lgp-hero {
		min-height: 80vh !important;
		padding-top: 130px !important;
		padding-bottom: 90px !important;
	}
	.is-style-lgp-hero h1.wp-block-heading {
		font-size: clamp(26px, 7vw, 42px) !important;
		word-break: break-word;
		overflow-wrap: break-word;
	}
	.lgp-hero-indicators {
		bottom: 24px;
		right: 20px;
	}
	.lgp-hero-nav {
		bottom: 20px;
		left: 20px;
	}
	.lgp-hero-nav-btn {
		width: 36px;
		height: 36px;
	}
}

/* ---------- Group: gallery tabs ---------- */

.is-style-lgp-tabs.is-ready > .wp-block-gallery[hidden] {
	display: none !important;
}

.is-style-lgp-tabs.is-ready > .wp-block-gallery > figure {
	animation: lgp-pop 0.35s ease both;
}

@keyframes lgp-pop {
	from {
		opacity: 0;
		transform: scale(0.6);
	}
}

/* ---------- Cover parallax only on large screens ---------- */

@media (max-width: 1024px) {
	.wp-block-cover.has-parallax .wp-block-cover__image-background.has-parallax {
		background-attachment: scroll;
	}
}

/* ---------- Scroll reveal (html.lgp-js is set in wp_head) ---------- */

.lgp-js [class*="is-style-lgp-reveal-"]:not(.is-revealed) {
	opacity: 0;
}

.lgp-js .is-style-lgp-reveal-left.is-revealed {
	animation: lgp-fade-in-left 2s both;
}

.lgp-js .is-style-lgp-reveal-right.is-revealed {
	animation: lgp-fade-in-right 2s both;
}

.lgp-js .is-style-lgp-reveal-up.is-revealed {
	animation: lgp-fade-in-up 2s both;
}

.lgp-js .is-style-lgp-reveal-fade.is-revealed {
	animation: lgp-fade-in 2s both;
}

@keyframes lgp-fade-in-left {
	from {
		opacity: 0;
		transform: translate3d(-100%, 0, 0);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes lgp-fade-in-right {
	from {
		opacity: 0;
		transform: translate3d(100%, 0, 0);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes lgp-fade-in-up {
	from {
		opacity: 0;
		transform: translate3d(0, 100%, 0);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes lgp-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-group.is-style-lgp-hero > .wp-block-gallery > figure.wp-block-image img {
		transform: none !important;
		transition: none;
	}

	.is-style-lgp-tabs.is-ready > .wp-block-gallery > figure {
		animation: none;
	}
}
