/* JBC Services Shortcode */

.jbc-services-wrap {
	background: #ffffff;
	border-radius: 12px;
	padding: 6px;
	overflow: hidden;
	position: relative;
}

.jbc-services-wrap::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 6px;
	background: #ffffff;
	border-radius: 0 0 12px 12px;
	z-index: 10;
	pointer-events: none;
}

.jbc-services {
	display: flex;
	background: var(--client-section-brand2-bg, #007ec6);
	border-radius: 8px;
	position: relative;
}

/* Cards */
.jbc-service-card {
	flex: 1;
	position: relative;
	perspective: 800px;
	min-height: 200px;
	text-decoration: none;
	cursor: pointer;
	clip-path: inset(0 0 0 0);
}

.jbc-service-card + .jbc-service-card {
	border-left: 3px solid rgba(255, 255, 255, 0.4);
}

/* Flip inner — rotates on hover */
.jbc-service-card__inner {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transition: transform 0.55s ease;
}

.jbc-service-card:hover .jbc-service-card__inner {
	transform: rotateY(180deg);
}

/* Front and back shared */
.jbc-service-card__front,
.jbc-service-card__back {
	position: absolute;
	inset: 0;
	padding: 20px 16px 80px;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

/* Back face */
.jbc-service-card__back {
	transform: rotateY(180deg);
	background-color: var(--client-accent-hover, #ff6f61);
	justify-content: center;
	opacity: 1;
	line-height: 1;
}

/* Descriptor (eyebrow) */
.jbc-service__descriptor {
	display: block;
	font-family: var(--client-font-script, 'Open Sans', sans-serif);
	font-style: italic;
	font-weight: 600;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 6px;
}

/* Title */
.jbc-service-card .jbc-service__title {
	color: #ffffff !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	font-family: var(--client-font-primary, sans-serif);
	margin: 0 0 30px;
	line-height: 1;
}

/* SEO text (back face) */
.jbc-service__seo {
	color: #003e72 !important;
	font-style: italic;
	font-weight: 700;
	font-size: 0.875rem;
	line-height: 1;
	margin: 0;
	font-family: var(--client-font-primary, sans-serif);
}

/* Learn More label on back face */
.jbc-service__learn-more {
	display: block;
	font-family: var(--client-font-primary, sans-serif);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #003e72 !important;
	text-decoration: underline;
	margin-top: 10px;
}

/* Mountain graphic — slight bleed to eliminate corner gap */
.jbc-services__mountains {
	position: absolute;
	bottom: -4px;
	left: -4px;
	right: -4px;
	height: 86px;
	background-size: cover;
	background-position: center bottom;
	background-repeat: no-repeat;
	z-index: 0;
	pointer-events: none;
}

/* Desktop: hide 6th card */
@media (min-width: 768px) {
	.jbc-service--desktop-hidden {
		display: none;
	}
}

/* Mobile: 2-col grid, show all */
@media (max-width: 767px) {
	.simply-section.is-home-hero .simply-section__inner {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.jbc-services-wrap {
		background: transparent;
		padding: 0;
		border-radius: 0;
		margin: 0;
		border-top: 5px solid #ffffff;
		border-bottom: 5px solid #ffffff;
	}

	.jbc-services {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 6px;
		border-radius: 0;
	}

	.jbc-service-card {
		border-left: none !important;
		border-bottom: none !important;
		border-radius: 0;
		min-height: 90px;
	}

	.jbc-service-card:nth-child(odd) .jbc-service-card__front,
	.jbc-service-card:nth-child(odd) .jbc-service-card__back {
		text-align: right;
		align-items: flex-end;
	}

	.jbc-service-card:hover .jbc-service-card__inner {
		transform: none;
	}

	.jbc-service-card:hover {
		opacity: 0.8;
	}

	.jbc-service--desktop-hidden {
		display: block;
	}

	.jbc-services__mountains {
		height: 200px;
		bottom: -10px;
		background-size: 300%;
		border-radius: 0;
	}

	.jbc-services {
		padding-bottom: 50px;
	}

	.jbc-services-wrap::after {
		display: none;
	}
}
