/*
 * Static-site layer for the PhIMO landing page.
 * The Elementor stylesheets above are the originals from the WordPress site; this file only
 * adds what Elementor/Elementor Pro normally do with JavaScript (SmartMenus, Swiper, E-Gallery,
 * sticky, lightbox) plus the language flags that GTranslate rendered.
 */

/* ---------- Nav menu (SmartMenus replacement) ---------- */
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:hover > ul,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:focus-within > ul {
	display: block;
}
.elementor-nav-menu--main .elementor-nav-menu ul {
	top: 100%;
	left: 0;
	width: auto;
	min-width: 12em;
	z-index: 20;
}
.elementor-nav-menu--main .elementor-nav-menu ul a {
	white-space: nowrap;
}
.elementor-nav-menu--dropdown .elementor-nav-menu li.is-open > ul {
	display: block;
}
.elementor-nav-menu--dropdown .elementor-nav-menu ul {
	position: static;
	width: auto;
}
.elementor-nav-menu--dropdown .sub-arrow {
	transition: transform .2s;
}
.elementor-nav-menu--dropdown li.is-open > a .sub-arrow {
	transform: rotate(180deg);
}

/* ---------- Banner: fill the viewport on screens wider than the image's natural 1958px ---------- */
.elementor-element-4e1b9c2 img {
	width: 100%;
}

/* ---------- Sticky header bar (Elementor Pro "sticky: top" on e782118, inside the absolute header) ---------- */
.elementor-1046 .elementor-element.elementor-element-3d20f40 {
	--position: fixed;
}
html {
	scroll-padding-top: var(--phimo-header-height, 0px);
}

/* ---------- Sticky bottom registration bar (Elementor Pro "sticky: bottom") ---------- */
.elementor-1046 .elementor-element.elementor-element-6dd6f12 {
	--position: sticky;
	--z-index: 99;
	bottom: 0;
}

/* ---------- Image carousel (Swiper replacement) ---------- */
.elementor-element-8feb80e .elementor-image-carousel-wrapper {
	overflow: hidden;
}
.elementor-element-8feb80e .elementor-image-carousel-wrapper .swiper-slide {
	--gap: 20px;
	width: calc((100% - var(--gap) * (var(--e-image-carousel-slides-to-show) - 1)) / var(--e-image-carousel-slides-to-show));
	max-width: none;
	margin-right: var(--gap);
}
.elementor-element-8feb80e .swiper-wrapper.is-animating {
	transition: transform 5s ease;
}

/* ---------- Gallery (E-Gallery grid layout: 4 / 2 / 1 columns, 3:2, 10px gap) ---------- */
.elementor-element-04b8807 .e-gallery-grid {
	--hgap: 10px;
	--vgap: 10px;
	--columns: 4;
	--aspect-ratio: 66.6667%;
	--animation-duration: 350ms;
}
@media (max-width: 1024px) {
	.elementor-element-04b8807 .e-gallery-grid { --columns: 2; }
}
@media (max-width: 767px) {
	.elementor-element-04b8807 .e-gallery-grid { --columns: 1; }
}
.elementor-element-04b8807 .e-gallery-image:not(.e-gallery-image-loaded) {
	background-color: rgba(0, 35, 121, .06);
}

/* ---------- Language flags (GTranslate 3.0.9 "flags" widget CSS) ---------- */
a.glink {
	text-decoration: none;
}
a.glink img {
	vertical-align: middle;
	display: inline;
	border: 0;
	padding: 0;
	margin: 0;
	opacity: 0.8;
	margin-right: 2px;
}
a.glink:hover img {
	opacity: 1;
}
/* Google Translate UI that GTranslate hides */
#google_translate_element2,
.skiptranslate iframe,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
	display: none !important;
}
body {
	top: 0 !important;
}
.goog-text-highlight {
	background: none !important;
	box-shadow: none !important;
}

/* ---------- Lightbox (Elementor lightbox look) ---------- */
.phimo-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .87);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s, visibility .3s;
}
.phimo-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}
.phimo-lightbox figure {
	margin: 0;
	max-width: 85vw;
	text-align: center;
}
.phimo-lightbox img {
	display: block;
	max-width: 85vw;
	max-height: 80vh;
	margin: 0 auto;
	border-radius: 4px;
	box-shadow: 0 0 30px rgba(0, 0, 0, .3), 0 0 8px -5px rgba(0, 0, 0, .3);
}
.phimo-lightbox figcaption {
	margin-top: 12px;
	color: hsla(0, 0%, 100%, .9);
	font-size: 14px;
}
.phimo-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	background: none;
	color: hsla(0, 0%, 100%, .9);
	cursor: pointer;
}
.phimo-lightbox button:hover,
.phimo-lightbox button:focus-visible {
	color: #fff;
	background: none;
}
.phimo-lightbox button svg {
	width: 25px;
	height: 25px;
	fill: currentColor;
}
.phimo-lightbox__close {
	top: 10px;
	right: 10px;
}
.phimo-lightbox__prev {
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
}
.phimo-lightbox__next {
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
}
@media (max-width: 767px) {
	.phimo-lightbox__prev,
	.phimo-lightbox__next {
		top: auto;
		bottom: 16px;
		transform: none;
	}
}
