/**
 * Front-page repairs: hero video, mobile menu, and reunion gallery.
 * Scoped to the static homepage so other Divi/DiviFlash modules stay untouched.
 */

/* -------------------------------------------------------------------------
 * Hero video
 *
 * Divi hides `.et_pb_section_video_bg` while `.et_pb_preload` is present.
 * The page already adds `.salvant-hero-video-ready` once playback starts,
 * but never removes the preload class — so the spinner stays forever.
 * ------------------------------------------------------------------------- */
.home .entry-content .et_pb_section_0.et_pb_section_video.salvant-hero-video-ready.et_pb_preload::before,
.home .entry-content .et_pb_section_0.et_pb_section_video:not(.et_pb_preload)::before {
	display: none !important;
	content: none !important;
	background: none !important;
}

.home .entry-content .et_pb_section_0.et_pb_section_video.salvant-hero-video-ready .et_pb_section_video_bg,
.home .entry-content .et_pb_section_0.et_pb_section_video.salvant-hero-video-ready .et_pb_section_video_bg video,
.home .entry-content .et_pb_section_0.et_pb_section_video:not(.et_pb_preload) .et_pb_section_video_bg,
.home .entry-content .et_pb_section_0.et_pb_section_video:not(.et_pb_preload) .et_pb_section_video_bg video {
	visibility: visible !important;
}

.home .entry-content .et_pb_section_0.et_pb_section_video .et_pb_section_video_bg video {
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto !important;
	height: auto !important;
	transform: translate(-50%, -50%);
	object-fit: cover;
}

/* -------------------------------------------------------------------------
 * Reunion gallery
 *
 * DiviFlash masonry CSS sizes tiles at ~16.7% and relies on Isotope.
 * When that script is absent, tiles stack as a skinny column. CSS grid
 * restores a readable 3/2-column layout without the missing library.
 * ------------------------------------------------------------------------- */
.home .difl_imagegallery .df_ig_gallery.grid:not(.salvant-gallery-masonry-ready) {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	width: 100% !important;
	margin-left: 0 !important;
	height: auto !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.home .difl_imagegallery .df_ig_gallery.grid:not(.salvant-gallery-masonry-ready) > .grid-item,
.home .difl_imagegallery .df_ig_gallery.grid:not(.salvant-gallery-masonry-ready) > .grid-sizer {
	width: auto !important;
	max-width: none !important;
	position: static !important;
	left: auto !important;
	top: auto !important;
	padding: 0 !important;
}

.home .difl_imagegallery .df_ig_gallery.grid:not(.salvant-gallery-masonry-ready) .ig-image {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

@media (max-width: 767px) {
	.home .difl_imagegallery .df_ig_gallery.grid:not(.salvant-gallery-masonry-ready) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
}

.home header .et_pb_menu {
	position: relative;
}

.home header .mobile_nav {
	position: static;
}

.home header .mobile_nav .mobile_menu_bar {
	cursor: pointer;
}

/*
 * Theme Builder header sections are position:fixed, so <header> is 0px tall.
 * Pin the panel to the logo row (--salvant-header-bottom), not the header box.
 */
.home header .mobile_nav .et_mobile_menu {
	display: none;
	position: fixed;
	top: var(--salvant-header-bottom, 82px);
	left: 0;
	right: 0;
	width: 100%;
	max-height: calc(100vh - var(--salvant-header-bottom, 82px));
	overflow-y: auto;
	margin: 0;
	padding: 0;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
	z-index: 1000000;
	list-style: none;
}

.home header .mobile_nav.opened .et_mobile_menu {
	display: block;
}

.home header .et_mobile_menu li {
	margin: 0;
}

.home header .et_mobile_menu a {
	display: block;
	padding: 12px 18px;
	color: #1a1a1a;
	text-decoration: none;
}

.home header .et_mobile_menu .sub-menu {
	display: none;
	padding-left: 12px;
	background: #f7f7f7;
}

.home header .et_mobile_menu .menu-item-has-children.salvant-submenu-open > .sub-menu {
	display: block;
}

.salvant-homepage-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000001;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.92);
	padding: 48px 56px;
}

.salvant-homepage-lightbox.is-open {
	display: flex;
}

.salvant-homepage-lightbox__image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.salvant-homepage-lightbox__close,
.salvant-homepage-lightbox__prev,
.salvant-homepage-lightbox__next {
	position: absolute;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
}

.salvant-homepage-lightbox__close {
	top: 12px;
	right: 16px;
}

.salvant-homepage-lightbox__prev {
	left: 12px;
}

.salvant-homepage-lightbox__next {
	right: 16px;
}
