/*
 * Soft scroll-in + hover effects (child theme 1.6.0). Pairs with bhg-motion.js.
 *
 * Classes you can add in Elementor → Advanced → CSS Classes:
 *   bhg-tile     Photo tile with words on top (container with a background photo).
 *                The photo zooms slowly on hover and a short line grows under the title.
 *   bhg-card     Clickable card (guide cards etc.). Lifts slightly on hover.
 *   bhg-zoom     On an Image widget, a Loop Grid, or a container: its photos
 *                zoom slowly on hover.
 *   bhg-band     Full-width photo band: the page slides over a still photo (style.css).
 *   bhg-no-reveal  On any section: no scroll-in motion inside it.
 */

:root {
	--bhg-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html {
	scroll-behavior: smooth;
}

/* ---------- Scroll-in ---------- */
.bhg-reveal {
	opacity: 0;
	transform: translate3d(0, 26px, 0);
	transition:
		opacity 1s var(--bhg-ease),
		transform 1.1s var(--bhg-ease);
}
.bhg-reveal.is-in {
	opacity: 1;
	transform: none;
}
/* Photos also settle from a slight zoom as they arrive. */
.bhg-reveal--photo img,
.bhg-reveal--photo .bhg-tile__photo {
	transform: scale(1.06);
	transition: transform 1.8s var(--bhg-ease);
}
.bhg-reveal--photo.is-in img,
.bhg-reveal--photo.is-in .bhg-tile__photo {
	transform: none;
}

/* ---------- Photo tiles ---------- */
.e-con.bhg-tile {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.e-con.bhg-tile--layered {
	background-image: none !important;
}
.bhg-tile__photo {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-size: cover;
	background-repeat: no-repeat;
	transition: transform 1.4s var(--bhg-ease);
}
/* A soft shade rises from the bottom on hover so the title stands out. */
.bhg-tile__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 62%);
	opacity: 0;
	transition: opacity 0.8s var(--bhg-ease);
}
.bhg-tile .elementor-heading-title {
	transition: transform 0.7s var(--bhg-ease);
}
.bhg-tile .elementor-widget-heading:last-child .elementor-heading-title::after {
	content: "";
	display: block;
	width: 0;
	height: 1px;
	margin-top: 10px;
	background: currentColor;
	transition: width 0.7s var(--bhg-ease);
}
.bhg-tile:hover .bhg-tile__photo,
.bhg-tile:focus-visible .bhg-tile__photo {
	transform: scale(1.07);
}
.bhg-tile:hover .bhg-tile__photo::after,
.bhg-tile:focus-visible .bhg-tile__photo::after {
	opacity: 1;
}
.bhg-tile:hover .elementor-heading-title,
.bhg-tile:focus-visible .elementor-heading-title {
	transform: translateY(-4px);
}
.bhg-tile:hover .elementor-widget-heading:last-child .elementor-heading-title::after,
.bhg-tile:focus-visible .elementor-widget-heading:last-child .elementor-heading-title::after {
	width: 44px;
}

/* ---------- Cards that lift ---------- */
.e-con.bhg-card {
	transition:
		transform 0.6s var(--bhg-ease),
		box-shadow 0.6s var(--bhg-ease);
}
.e-con.bhg-card:hover,
.e-con.bhg-card:focus-visible {
	transform: translateY(-6px);
	box-shadow: 0 22px 44px -26px rgba(20, 20, 20, 0.35);
}
.bhg-card .bhg-underline {
	transition: transform 0.6s var(--bhg-ease);
}
.bhg-card:hover .bhg-underline,
.bhg-card:focus-visible .bhg-underline {
	transform: translateX(6px);
}

/* ---------- Photos that zoom on hover ---------- */
.bhg-zoom .elementor-widget-image,
.bhg-zoom .elementor-widget-theme-post-featured-image,
.elementor-widget-image.bhg-zoom {
	overflow: hidden;
}
.bhg-zoom img {
	transition: transform 1.2s var(--bhg-ease);
}
.bhg-zoom .e-loop-item:hover img,
.bhg-zoom .e-loop-item:focus-within img,
.elementor-widget-image.bhg-zoom:hover img,
.e-con.bhg-zoom:hover img {
	transform: scale(1.05);
}

/* ---------- No motion for people who ask for none ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.bhg-reveal,
	.bhg-reveal--photo img,
	.bhg-reveal--photo .bhg-tile__photo {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.bhg-tile__photo,
	.bhg-tile .elementor-heading-title,
	.e-con.bhg-card,
	.bhg-card .bhg-underline,
	.bhg-zoom img {
		transition: none !important;
		transform: none !important;
	}
}
