/*
 * Compatibility fixes for the Enfold 7 parent theme.
 */

/*
 * The uploaded icon font previously used an unversioned URL that Cloudflare
 * cached as an incomplete subset. Use a separate family and a versioned URL so
 * every custom icon is loaded from the current, complete font file.
 */
@font-face {
	font-family: "reverselogix-icons-compat";
	font-style: normal;
	font-weight: normal;
	font-display: block;
	src: url("/wp-content/uploads/avia_fonts/reverselogix-icons/reverselogix-icons.woff2?v=19.21") format("woff2");
}

#top .avia-font-reverselogix-icons,
body .avia-font-reverselogix-icons,
html body [data-av_iconfont="reverselogix-icons"]::before,
#top .ep-item-grid-icon-glyph {
	font-family: "reverselogix-icons-compat" !important;
}

/*
 * Enfold 7's portrait-video rule also targets every generic iframe wrapper,
 * overriding the earlier 16:9 rule with a 178% height. Gutenberg supplies the
 * intended aspect-ratio class, so use it to restore the correct dimensions.
 */
#top .wp-embed-aspect-16-9 .avia-iframe-wrap {
	height: 0;
	padding-bottom: 56.25%;
}

/*
 * Item-grid icons now contain a real custom-font glyph. Avoid drawing Enfold's
 * data-attribute pseudo-element on top of it.
 */
#top .ep-item-grid-icon--inline::before {
	content: none;
	display: none;
}

#top .ep-item-grid-icon-glyph {
	display: inline-block;
	color: inherit;
	font-size: inherit;
	font-style: normal;
	font-weight: normal;
	line-height: inherit;
}

/*
 * Keep the mobile-only CTA above the active-card decoration. Enfold 7 changed
 * button stacking and could leave only the button background visible.
 */
@media only screen and (max-width: 767px) {
	#top .itemgrid--white-blocks .mobile-button {
		position: relative;
		z-index: 3;
	}

	#top .itemgrid--white-blocks .mobile-button .avia-button,
	#top .itemgrid--white-blocks .mobile-button .avia_iconbox_title {
		opacity: 1;
		visibility: visible;
	}

	#top .itemgrid--white-blocks .mobile-button .avia_iconbox_title {
		position: relative;
		z-index: 2;
	}
}

#top .itemgrid--white-blocks .ep-item-grid-item-media,
#top .itemgrid--white-blocks .ep-item-title-wrapper,
#top .itemgrid--white-blocks .ep-item-title,
#top .itemgrid--white-blocks .ep-item-grid-item-content,
#top .itemgrid--white-blocks .ep-item-grid-item-content p,
#top .itemgrid--white-blocks .ep-item-grid-item-button-wrapper {
	text-align: left !important;
}

#top .itemgrid--white-blocks .ep-item-grid-item-media {
	align-self: flex-start !important;
	display: block !important;
	margin-left: 7.5vw !important;
	margin-right: 0 !important;
}

@media only screen and (min-width: 768px) {
	#top .itemgrid--white-blocks .ep-item-grid-item-media {
		margin-left: 50px !important;
	}
}
