/* ==========================================================================
   Oomnitza Hover Cards — frontend
   ========================================================================== */

.ohc-set {
	display: flex;
	width: 100%;
	gap: 20px;
	box-sizing: border-box;
}

.ohc-set *,
.ohc-set *::before,
.ohc-set *::after {
	box-sizing: border-box;
}

.ohc-card {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	height: 435px;
	min-height: 435px;
	border-radius: 0 6px 6px 6px;
	overflow: hidden;
	background-color: #fff;
	transition: flex-basis 0.5s ease, flex-grow 0.5s ease, min-height 0.5s ease;
	box-shadow: -3px 13px 27px 0 rgba(0, 0, 0, 0.06);
}

.ohc-card-link {
	display: block;
	position: relative;
	height: 100%;
	min-height: inherit;
	text-decoration: none;
	color: inherit;
	padding: 30px 30px 0;
	overflow: hidden;
}

/* Dual background layers — swap without showing through transparent SVGs */
.ohc-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-color: #fff;
}

.ohc-bg-layer {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	transition: opacity 0.5s ease;
}

.ohc-bg-default {
	background-image: var(--ohc-bg, none);
	opacity: 1;
	z-index: 1;
}

.ohc-bg-active {
	background-image: var(--ohc-bg-hover, var(--ohc-bg, none));
	opacity: 0;
	z-index: 2;
	background-color: #fff;
}

.ohc-card.is-active .ohc-bg-default {
	opacity: 0;
}

.ohc-card.is-active .ohc-bg-active {
	opacity: 1;
}

.ohc-inner {
	/* Above .ohc-bg; art is a sibling so it can still pin to .ohc-card-link. */
	position: relative;
	z-index: 2;
	height: calc(100% - 18px);
	min-height: calc(100% - 18px);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.ohc-title {
	display: block;
	margin: 0 0 15px !important;
	padding: 0;
	line-height: 0;
	position: relative;
	z-index: 2;
}

/* Beat theme `.row .col img { margin: 15px }` on title images too */
.ohc-set .ohc-title-img {
	display: block;
	height: 96px;
	width: auto;
	max-width: 100% !important;
	margin: 0 !important;
	object-fit: contain;
	object-position: left center;
}

.ohc-title-text {
	display: block;
	font-family: Montserrat, sans-serif;
	font-size: 23px;
	font-weight: 700;
	line-height: 28px;
	color: #ff154f;
}

.ohc-subtitle {
	margin: 0 0 24px !important;
	padding: 0;
	font-family: Montserrat, sans-serif;
	font-size: 20px;
	font-weight: 500;
	line-height: 30px;
	color: #1a1a1a;
	transition: color 0.5s ease, opacity 0.5s ease;
	/* Match original two-line wrap (~“for every” / “position for”) */
	max-width: 320px;
	position: relative;
	z-index: 2;
}

.ohc-body {
	display: none;
	margin: 0 0 16px;
	max-width: 400px;
	font-size: 12px;
	line-height: 20px;
	color: #1a1a1a;
	transition: color 0.5s ease;
	position: relative;
	z-index: 2;
}

.ohc-body p {
	margin: 0;
}

/* CTA hidden at rest — shown when the set is interacting (like original .pos-abs) */
.ohc-cta {
	display: none;
	margin: 0;
	margin-top: auto;
	padding-top: 0;
	padding-bottom: 0;
	font-size: 16px;
	line-height: 25px;
	color: #1a1a1a;
	transition: color 0.5s ease;
	position: relative;
	z-index: 2;
}

.ohc-cta strong {
	font-weight: 600;
}

.ohc-set.ohc-has-active .ohc-cta {
	display: block;
}

/* Match original: <i class="fas fa-chevron-right" style="padding-left: 4px; font-size: 8px;"> */
.ohc-cta-arrow {
	display: inline-block;
	padding-left: 4px;
	font-size: 8px;
	font-style: normal;
	line-height: 25px;
	vertical-align: middle;
}

/* Beat theme `.row .col img { margin: 15px; max-width: 100% }` — pin bottom-right like original. */
.ohc-set .ohc-card .ohc-art,
.ohc-set .ohc-art {
	position: absolute !important;
	right: 0 !important;
	bottom: 0 !important;
	left: auto !important;
	top: auto !important;
	margin: 0 !important;
	height: auto !important;
	width: 400px !important;
	max-width: 400px !important;
	max-height: none !important;
	object-fit: contain !important;
	object-position: right bottom !important;
	pointer-events: none;
	transition: width 0.5s ease, max-width 0.5s ease, opacity 0.5s ease;
	z-index: 1;
}

/* Active shared styles — !important beats theme h4 color rules */
.ohc-card.is-active .ohc-subtitle,
.ohc-card.is-active .ohc-body,
.ohc-card.is-active .ohc-cta,
.ohc-card.is-active .ohc-title-text {
	color: #fff !important;
}

.ohc-card.is-active .ohc-body {
	display: block;
}

.ohc-set .ohc-card.is-active .ohc-art {
	width: 400px !important;
	max-width: 400px !important;
}

/* --------------------------------------------------------------------------
   Layout 2 — side-by-side expand
   -------------------------------------------------------------------------- */

.ohc-layout-2 .ohc-card {
	flex: 1 1 50%;
}

.ohc-layout-2 .ohc-card.is-active {
	flex: 1 1 70%;
}

.ohc-layout-2 .ohc-card.is-inactive {
	flex: 1 1 30%;
}

.ohc-layout-2 .ohc-card.is-inactive .ohc-subtitle,
.ohc-layout-2 .ohc-card.is-inactive .ohc-body,
.ohc-layout-2 .ohc-card.is-inactive .ohc-art {
	display: none;
}

.ohc-layout-2 .ohc-card.is-inactive .ohc-cta {
	position: absolute;
	left: 30px;
	bottom: 24px;
	margin-top: 0;
	line-height: 1.35;
}

/* Soft break after first two words — only when the 2-card is collapsed */
.ohc-cta-break {
	display: none;
}

.ohc-layout-2 .ohc-card.is-inactive .ohc-cta-break {
	display: block;
}

.ohc-layout-2:not(.ohc-has-active) .ohc-body {
	display: none;
}

.ohc-layout-2 .ohc-card.is-active .ohc-body {
	display: block;
}

/* --------------------------------------------------------------------------
   Layout 4 — 2 columns, expand within column
   -------------------------------------------------------------------------- */

.ohc-layout-4 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: stretch;
	min-height: 780px;
	height: 780px;
}

.ohc-layout-4 .ohc-col {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-height: 0;
	height: 100%;
}

.ohc-layout-4 .ohc-card {
	flex: 1 1 0;
	height: auto;
	min-height: 0;
	align-self: stretch;
	transition: flex-grow 0.5s ease, flex-basis 0.5s ease, min-height 0.5s ease, max-height 0.5s ease;
}

.ohc-layout-4 .ohc-card.is-active {
	flex: 3 1 0;
	min-height: 0;
	max-height: none;
}

.ohc-layout-4 .ohc-card.is-compact {
	flex: 0 0 150px;
	min-height: 150px;
	max-height: 160px;
}

.ohc-layout-4 .ohc-card.is-compact .ohc-title-img {
	height: 56px;
}

.ohc-layout-4 .ohc-card.is-compact .ohc-subtitle,
.ohc-layout-4 .ohc-card.is-compact .ohc-body,
.ohc-layout-4 .ohc-card.is-compact .ohc-art,
.ohc-layout-4 .ohc-card.is-compact .ohc-cta {
	display: none !important;
}

/* Layout-4 CTA: only on active card, in flow above the illustration */
.ohc-layout-4 .ohc-cta {
	display: none;
	margin-top: 16px;
	margin-bottom: 0;
	padding-top: 0;
}

.ohc-layout-4.ohc-has-active .ohc-cta {
	display: none;
}

.ohc-layout-4 .ohc-card.is-active .ohc-cta {
	display: block;
}

.ohc-layout-4 .ohc-card.is-active .ohc-inner {
	/* Clear absolute art so CTA sits above it with Figma-like gap */
	padding-bottom: 220px;
	height: auto;
	min-height: 100%;
}

.ohc-layout-4:not(.ohc-has-active) .ohc-body {
	display: none;
}

.ohc-layout-4 .ohc-card.is-active .ohc-body {
	display: block;
}

.ohc-layout-4 .ohc-art {
	width: 55% !important;
	max-width: 380px !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
	.ohc-layout-2,
	.ohc-layout-4 {
		display: flex;
		flex-direction: column;
		height: auto;
		min-height: 0;
	}

	.ohc-layout-4 .ohc-col {
		display: flex;
		flex-direction: column;
		height: auto;
		gap: 20px;
	}

	.ohc-layout-2 .ohc-card,
	.ohc-layout-2 .ohc-card.is-active,
	.ohc-layout-2 .ohc-card.is-inactive,
	.ohc-layout-4 .ohc-card,
	.ohc-layout-4 .ohc-card.is-active,
	.ohc-layout-4 .ohc-card.is-compact {
		flex: 1 1 auto;
		width: 100%;
		height: auto;
		min-height: 320px;
		max-height: none;
	}

	.ohc-layout-2 .ohc-card.is-inactive .ohc-subtitle,
	.ohc-layout-2 .ohc-card.is-inactive .ohc-art,
	.ohc-layout-4 .ohc-card.is-compact .ohc-subtitle,
	.ohc-layout-4 .ohc-card.is-compact .ohc-art {
		display: block !important;
		opacity: 1;
		visibility: visible;
		height: auto;
	}

	.ohc-layout-4 .ohc-card.is-active .ohc-inner {
		padding-bottom: 160px;
	}

	.ohc-card.is-active {
		min-height: 420px;
	}

	.ohc-cta {
		display: block;
	}

	.ohc-layout-4 .ohc-cta,
	.ohc-layout-4.ohc-has-active .ohc-cta,
	.ohc-layout-4 .ohc-card.is-active .ohc-cta {
		display: block;
	}

	.ohc-set .ohc-card .ohc-art,
	.ohc-set .ohc-art {
		width: 70% !important;
		max-width: 320px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ohc-card,
	.ohc-bg-layer,
	.ohc-art,
	.ohc-subtitle,
	.ohc-body,
	.ohc-cta {
		transition: none !important;
	}
}
