/**
 * BayFirst Hero
 */

.bf-hero,
.wp-block-bayfirst-hero {
	--bf-hero-green: var(--wp--preset--color--ti-accent, #02461b);
	--bf-hero-orange: var(--wp--preset--color--ti-accent-secondary, #f68521);
	--bf-hero-panel-bg: var(--bf-hero-green);
	--bf-hero-fg: #ffffff;
	--bf-hero-heading: #ffffff;
	--bf-hero-border: var(--bf-hero-orange);

	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 800px;
	box-sizing: border-box;
	overflow: hidden;
	background: #fff;
}

/* Full-bleed */
.wp-block-bayfirst-hero.alignfull,
.bf-hero.alignfull {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	box-sizing: border-box;
}

.wp-site-blocks .wp-block-bayfirst-hero.alignfull,
.entry-content .wp-block-bayfirst-hero.alignfull,
.wp-block-post-content .wp-block-bayfirst-hero.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

/* Color variants — solid */
.bf-hero--color-green.bf-hero--opacity-solid {
	--bf-hero-panel-bg: var(--bf-hero-green);
	--bf-hero-fg: #ffffff;
	--bf-hero-heading: #ffffff;
}

.bf-hero--color-orange.bf-hero--opacity-solid {
	--bf-hero-panel-bg: var(--bf-hero-orange);
	--bf-hero-fg: #ffffff;
	--bf-hero-heading: #ffffff;
}

.bf-hero--color-white.bf-hero--opacity-solid {
	--bf-hero-panel-bg: #ffffff;
	--bf-hero-fg: #1e1e1e;
	--bf-hero-heading: var(--bf-hero-green);
}

/* Color variants — translucent */
.bf-hero--color-green.bf-hero--opacity-translucent {
	--bf-hero-panel-bg: rgba(2, 70, 27, 0.82);
	--bf-hero-fg: #ffffff;
	--bf-hero-heading: #ffffff;
}

.bf-hero--color-orange.bf-hero--opacity-translucent {
	--bf-hero-panel-bg: rgba(246, 133, 33, 0.85);
	--bf-hero-fg: #ffffff;
	--bf-hero-heading: #ffffff;
}

.bf-hero--color-white.bf-hero--opacity-translucent {
	--bf-hero-panel-bg: rgba(255, 255, 255, 0.9);
	--bf-hero-fg: #1e1e1e;
	--bf-hero-heading: var(--bf-hero-green);
}

/* Media — desktop fills the hero */
.bf-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0;
	overflow: hidden;
}

.bf-hero__media--empty {
	background: #cccccc;
}

.bf-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* Text panel — desktop overlay */
.bf-hero__panel {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: 40%;
	margin: 2.5rem 3rem;
	padding: 2.25rem 2.5rem 2.5rem;
	background: var(--bf-hero-panel-bg);
	color: var(--bf-hero-fg);
	border-left: 0 solid transparent;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (min-width: 960px) {
	.bf-hero--panel-33 .bf-hero__panel {
		width: 33%;
	}

	.bf-hero--panel-40 .bf-hero__panel {
		width: 40%;
	}

	.bf-hero--panel-50 .bf-hero__panel {
		width: 50%;
	}
}

.bf-hero--pos-left .bf-hero__panel {
	margin-right: auto;
}

.bf-hero--pos-right .bf-hero__panel {
	margin-left: auto;
}

.bf-hero--border .bf-hero__panel {
	border-left: 3px solid var(--bf-hero-border);
}

.bf-hero__content {
	min-width: 0;
}

.bf-hero__content > *:first-child {
	margin-top: 0;
}

.bf-hero__content > *:last-child {
	margin-bottom: 0;
}

.bf-hero__content h1,
.bf-hero__content h2,
.bf-hero__content h3,
.bf-hero__content h4,
.bf-hero__content .wp-block-heading {
	margin-top: 0;
	margin-bottom: 1rem;
	color: var(--bf-hero-heading);
	font-family: Metropolis, sans-serif;
	font-size: 50px;
	font-weight: 700;
	line-height: 1.15;
}

.bf-hero__content p,
.bf-hero__content .wp-block-paragraph {
	margin: 0 0 1.25rem;
	color: var(--bf-hero-fg);
	font-family: Metropolis, sans-serif;
	font-size: 20px;
	line-height: 1.45;
}

.bf-hero__content a:not(.wp-element-button):not(.wp-block-button__link) {
	color: inherit;
	text-decoration: underline;
}

/*
 * Tablet / mobile: image first, panel overlaps by -100px.
 */
@media (max-width: 959px) {
	.bf-hero,
	.wp-block-bayfirst-hero {
		display: block;
		min-height: 0;
		overflow: visible;
	}

	.bf-hero__media {
		position: relative;
		inset: auto;
		width: 100%;
		height: clamp(240px, 52vw, 420px);
	}

	.bf-hero__panel {
		position: relative;
		z-index: 1;
		width: auto;
		max-width: none;
		margin: -100px 1.25rem 0;
		padding: 1.75rem 1.5rem 2rem;
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	}

	.bf-hero--pos-left .bf-hero__panel,
	.bf-hero--pos-right .bf-hero__panel {
		margin-left: 1.25rem;
		margin-right: 1.25rem;
		margin-top: -100px;
	}

	.bf-hero__content h1,
	.bf-hero__content h2,
	.bf-hero__content h3,
	.bf-hero__content h4,
	.bf-hero__content .wp-block-heading {
		font-size: clamp(1.5rem, 5vw, 2rem);
	}

	.bf-hero__content p,
	.bf-hero__content .wp-block-paragraph {
		font-size: 1.05rem;
	}
}

@media (max-width: 480px) {
	.bf-hero__panel {
		margin-left: 0.75rem;
		margin-right: 0.75rem;
		padding: 1.5rem 1.25rem 1.75rem;
	}

	.bf-hero--pos-left .bf-hero__panel,
	.bf-hero--pos-right .bf-hero__panel {
		margin-left: 0.75rem;
		margin-right: 0.75rem;
	}
}
