/**
 * Glue between the carried-over Elementor CSS (base.css, docs/*.css) and core block markup,
 * plus the pieces Elementor used to do in JS (sticky header, popups, mega menu, video lightbox).
 */

/* ---------- Page frame ---------- */
body {
	background: #fff;
}
.wp-site-blocks > * + * {
	margin-block-start: 0;
}
/* Slide-in-from-the-side entrance animations must not create a horizontal scrollbar (clip keeps sticky working). */
.wp-site-blocks {
	overflow-x: clip;
}
.v-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 99;
}
[id] {
	scroll-margin-top: 110px;
}
.v-site-main > .wp-block-post-content {
	margin: 0;
}

/* ---------- Core block defaults that would fight the carried-over layout ---------- */
.v-doc .v-widget-heading .wp-block-heading,
.v-doc .v-widget-theme-post-title .wp-block-post-title {
	margin: 0;
}
.v-doc p.v-raw {
	margin: 0;
}
.v-doc .wp-block-image {
	margin: 0;
}
.v-doc .v-widget-image .wp-block-image img {
	display: inline-block;
	vertical-align: middle;
	height: auto;
}
.v-doc .v-widget-image .wp-block-image,
.v-doc .v-widget-image .wp-block-image a {
	display: inline-block;
	max-width: 100%;
}
.v-doc .v-widget-image figure.wp-block-image {
	display: block;
}

/* Buttons: Elementor aligns with text-align on the wrapper, not flexbox. */
.v-doc .v-button-wrapper.wp-block-buttons {
	display: block;
	gap: 0;
	margin: 0;
}
.v-doc .v-button-wrapper .wp-block-button {
	display: inline-block;
	margin: 0;
}
.v-doc .v-align-justify .v-button-wrapper .wp-block-button {
	display: block;
}
.v-doc .wp-block-button__link {
	display: inline-block;
	text-decoration: none;
	word-break: normal;
	box-sizing: border-box;
}

/* Post loop (was Elementor Loop Grid). */
.v-doc .wp-block-post-template.v-loop-container {
	display: grid;
	grid-template-columns: repeat(var(--grid-columns, 1), minmax(0, 1fr));
	gap: var(--grid-row-gap, 20px) var(--grid-column-gap, 20px);
	list-style: none;
	margin: 0;
	padding: 0;
}
.v-doc .wp-block-post-template.v-loop-container > li {
	margin: 0;
	display: flex;
	flex-direction: column;
}
/* Elementor's loop item was the grid cell itself; with core's <li> in between, pass the row height on. */
.v-doc .wp-block-post-template.v-loop-container > li > .e-loop-item {
	flex: 1 1 auto;
}
.v-doc .wp-block-query-pagination-next,
.v-doc .wp-block-query-pagination-previous {
	color: var(--e-global-color-secondary);
}
.v-doc .wp-block-query-pagination-next:hover,
.v-doc .wp-block-query-pagination-previous:hover {
	color: var(--e-global-color-primary);
}
/* Elementor Pro's search widget measured its icon in JS to pad the input. */
.v-doc .v-widget-search {
	--e-search-icon-label-absolute-width: var(--e-search-icon-label-size, 24px);
	--e-search-icon-clear-absolute-width: 0px;
}
.v-doc .wp-block-query-pagination.v-pagination {
	display: block; /* Elementor spaced the numbers with margins and aligned with text-align. */
}
.v-doc .wp-block-query-pagination.v-pagination > * {
	display: inline;
}
/* Elementor's pagination had whitespace between the links on top of its 5px margins. */
.v-doc .v-pagination .page-numbers + .page-numbers,
.v-doc .v-pagination > * + * {
	margin-left: calc(5px + 0.25em);
}
.v-doc .wp-block-post-featured-image {
	margin: 0;
}
.v-doc .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.v-doc .wp-block-post-excerpt__excerpt,
.v-doc .wp-block-post-excerpt {
	margin: 0;
}
.v-doc .wp-block-post-title a {
	color: inherit;
}

/* Blog post body (was Elementor Post Content inside the Single template). */
.v-post-content img {
	max-width: 100%;
	height: auto;
}

/* ---------- Header navigation (was Elementor Mega Menu) ---------- */
.v-doc .v-widget-n-menu {
	position: static;
}
.v-doc .v-mega-nav.wp-block-navigation {
	width: 100%;
	font-family: "Poppins", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}
.v-doc .v-mega-nav .wp-block-navigation__container {
	width: 100%;
	justify-content: space-between;
	gap: 32px;
}
.v-doc .v-mega-nav .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	padding: 16px 0;
	color: #292929;
	text-decoration: none;
	transition: color .3s;
}
.v-doc .v-mega-nav .wp-block-navigation-item__content:hover,
.v-doc .v-mega-nav .wp-block-navigation-item__content:focus,
.v-doc .v-mega-nav .is-open > .wp-block-navigation-item__content,
.v-doc .v-mega-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--e-global-color-primary);
}
.v-doc .v-mega-toggle > .wp-block-navigation-item__content::after {
	content: "";
	width: 15px;
	height: 14px;
	margin-left: 5px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 14'%3E%3Cpath d='M12.94 4.79a.66.66 0 0 1 0 .93L8.56 10.1a.66.66 0 0 1-.93 0L3.26 5.72a.66.66 0 1 1 .93-.93L8.1 8.7l3.91-3.91a.66.66 0 0 1 .93 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 14'%3E%3Cpath d='M12.94 4.79a.66.66 0 0 1 0 .93L8.56 10.1a.66.66 0 0 1-.93 0L3.26 5.72a.66.66 0 1 1 .93-.93L8.1 8.7l3.91-3.91a.66.66 0 0 1 .93 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .3s;
}
.v-doc .v-mega-toggle.is-open > .wp-block-navigation-item__content::after {
	transform: rotate(180deg);
}
.v-doc .v-mega-panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 10;
	display: none;
}
.v-doc .v-mega-panel.is-open {
	display: block;
	animation: v-fadeIn .3s both;
}
.v-doc .v-mega-panel > .v-con {
	--display: flex;
	width: 100%;
	max-width: none;
}

/* ---------- Popups (mobile menu, thank-you messages) ---------- */
.v-popup-modal:not(.is-open) {
	display: none !important;
}
.v-popup-modal.is-open {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 9999;
	width: 100%;
	height: 100%;
}
.v-popup-modal .dialog-widget-content {
	position: relative;
	display: flex;
	max-height: 100%;
}
.v-popup-modal .dialog-message {
	box-sizing: border-box;
}
.v-popup-modal .dialog-message > .v-doc {
	width: 100%;
}
.v-popup-modal .dialog-close-button {
	position: absolute;
	cursor: pointer;
	line-height: 1;
	text-decoration: none;
	z-index: 2;
}
.v-popup-modal .dialog-close-button svg {
	width: 1em;
	height: 1em;
}
.v-popup-modal .dialog-widget-content.v-animated {
	animation-fill-mode: both;
}

/* ---------- Video overlay + lightbox ---------- */
.v-doc [data-v-video] {
	cursor: pointer;
}
.v-video-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .85);
	animation: v-fadeIn .3s both;
}
.v-video-lightbox__frame {
	width: min(90vw, 160vh);
	aspect-ratio: 16 / 9;
}
.v-video-lightbox__frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
}
.v-video-lightbox__close {
	position: absolute;
	top: 16px;
	right: 24px;
	font-size: 40px;
	line-height: 1;
	color: #fff;
	background: none;
	border: 0;
	cursor: pointer;
}
.v-doc .v-wrapper iframe.v-video {
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- 404 ---------- */
.v-404 {
	max-width: 1200px;
	margin: 0 auto;
	padding: 10rem 20px 6rem;
	text-align: center;
	font-family: "Poppins", sans-serif;
}
.v-404__title {
	color: var(--e-global-color-primary);
	font-size: 2.5rem;
	font-weight: 600;
}
.v-404 .wp-block-button__link {
	background-color: var(--e-global-color-primary);
	font-family: "Poppins", sans-serif;
	font-weight: 600;
	border-radius: 8px;
	padding: 16px 40px;
}
