/* Widgets — brand vars come from site.css */

/* ================= Info Box ================= */
.shfb-ib {
	--shfb-ib-gap: 16px;

	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--shfb-ib-gap);
	box-sizing: border-box;
	height: auto;
	color: inherit;
	text-decoration: none;
	transition: background .3s, border-color .3s, box-shadow .3s, transform .3s;
}
.shfb-ib--left { flex-direction: row; align-items: flex-start; text-align: left; }
.shfb-ib--right { flex-direction: row-reverse; align-items: flex-start; text-align: right; }
.shfb-ib--top { align-items: stretch; text-align: center; }
.shfb-ib--top .shfb-ib__media { align-self: var(--shfb-ib-self, center); }

/* media */
.shfb-ib__media {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-sizing: border-box;
	line-height: 1;
	color: var(--shfb-teal);
	transition: background .3s, color .3s, border-color .3s, transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .3s, filter .3s;
}
.shfb-ib__media--icon { font-size: 26px; }
.shfb-ib__media svg { width: 1em; height: 1em; fill: currentColor; }
.shfb-ib__media--number { font-size: 28px; font-weight: 700; }
.shfb-ib__media--image { overflow: hidden; }
.shfb-ib__media--image img { display: block; max-width: 100%; height: auto; transition: transform .5s cubic-bezier(.22, 1, .36, 1), filter .3s; }
.shfb-ib--framed .shfb-ib__media,
.shfb-ib--stacked .shfb-ib__media { width: 64px; height: 64px; border-radius: 50%; }
.shfb-ib--framed .shfb-ib__media { border: 1px solid var(--shfb-teal); }
.shfb-ib--stacked .shfb-ib__media { background: var(--shfb-teal); color: #fff; }
.shfb-ib--framed .shfb-ib__media--image img,
.shfb-ib--stacked .shfb-ib__media--image img { width: 100%; height: 100%; object-fit: cover; }
.shfb-ib--framed:hover .shfb-ib__media--icon,
.shfb-ib--framed:hover .shfb-ib__media--number { background: var(--shfb-teal); color: #fff; }

/* hover animations */
.shfb-ib-anim-grow .shfb-ib:hover .shfb-ib__media { transform: scale(1.1); }
.shfb-ib-anim-rotate .shfb-ib:hover .shfb-ib__media { transform: rotate(12deg); }
.shfb-ib-anim-float .shfb-ib:hover .shfb-ib__media { transform: translateY(-6px); }
.shfb-ib-anim-zoom .shfb-ib:hover .shfb-ib__media--image img { transform: scale(1.1); }

/* text */
.shfb-ib__body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.shfb-ib__sub { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.shfb-ib__title { margin: 0; font-size: 18px; line-height: 1.3; transition: color .3s; }
.shfb-ib__title a { color: inherit; text-decoration: none; }
.shfb-ib__desc { display: block; margin-top: 8px; transition: color .3s; }
.shfb-ib__desc p { margin: 0 0 .6em; }
.shfb-ib__desc p:last-child { margin-bottom: 0; }

/* button */
.shfb-ib__btn-wrap { display: block; margin-top: 18px; }
.shfb-ib__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: color .3s, background .3s, border-color .3s, transform .3s;
}
.shfb-ib-btn-pill .shfb-ib__btn {
	padding: 10px 22px;
	border-radius: 30px;
	background: linear-gradient(90deg, var(--shfb-teal), var(--shfb-navy));
}
.shfb-ib-btn-link .shfb-ib__btn { padding: 0; color: var(--shfb-teal); background: none; }
.shfb-ib-btn-link .shfb-ib:hover .shfb-ib__btn svg,
.shfb-ib-btn-link .shfb-ib:hover .shfb-ib__btn i { transform: translateX(4px); }
.shfb-ib__btn svg { width: 1em; height: 1em; fill: currentColor; transition: transform .3s; }
.shfb-ib__btn i { transition: transform .3s; }

/* equal height: fill the column, button pinned to the bottom */
.shfb-ib-fill-yes,
.shfb-ib-fill-yes > .elementor-widget-container { height: 100%; }
.shfb-ib-fill-yes .shfb-ib { height: 100%; }
.shfb-ib-fill-yes .shfb-ib__btn-wrap { margin-top: auto; padding-top: 18px; }

@media (max-width: 767px) {
	.shfb-ib--stack-mobile { flex-direction: column; text-align: center; align-items: center; }
}

/* ================= Card Slider ================= */
.shfb-cs {
	--shfb-cs-card-w: 240px;
	--shfb-cs-active-w: 300px;
	--shfb-cs-gap: 16px;
	--shfb-cs-img-h: 180px;
	--shfb-cs-pad: 20px;
	--shfb-cs-radius: 16px;
	--shfb-cs-speed: 800ms;
	--shfb-cs-ease: cubic-bezier(.22, 1, .36, 1);
	display: flex;
	align-items: center;
	gap: 40px;
}
.shfb-cs--stacked { flex-direction: column; align-items: stretch; }

.shfb-cs__intro { flex: 0 0 auto; max-width: 400px; }
.shfb-cs__heading { margin: 0 0 20px; }
.shfb-cs__arrows { display: flex; gap: 10px; }
.shfb-cs__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--shfb-teal), var(--shfb-navy));
	color: #fff;
	cursor: pointer;
	transition: transform .3s var(--shfb-cs-ease), box-shadow .3s, opacity .3s;
}
.shfb-cs__arrow:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(42, 58, 143, .35); }
.shfb-cs__arrow:active { transform: scale(.94); }
.shfb-cs__arrow:disabled { opacity: .4; cursor: default; transform: none; box-shadow: none; }
.shfb-cs__arrow svg { width: 20px; height: 20px; }

.shfb-cs__viewport {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	padding: 30px 0 40px;
	touch-action: pan-y;
}
.shfb-cs__track {
	display: flex;
	align-items: center;
	gap: var(--shfb-cs-gap);
	transition: transform var(--shfb-cs-speed) var(--shfb-cs-ease);
	will-change: transform;
}

/* The active look lives on ::before so it can fade in (gradients can't be transitioned). */
.shfb-cs__card {
	position: relative;
	isolation: isolate;
	flex: 0 0 var(--shfb-cs-card-w);
	box-sizing: border-box;
	min-height: 150px;
	padding: var(--shfb-cs-pad);
	border-radius: var(--shfb-cs-radius);
	background: var(--shfb-light);
	color: var(--shfb-dark);
	overflow: hidden;
	cursor: pointer;
	user-select: none;
	transition:
		flex-basis var(--shfb-cs-speed) var(--shfb-cs-ease),
		transform var(--shfb-cs-speed) var(--shfb-cs-ease),
		box-shadow var(--shfb-cs-speed) var(--shfb-cs-ease),
		color calc(var(--shfb-cs-speed) * .6) ease;
}
.shfb-cs__card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: linear-gradient(160deg, var(--shfb-teal) 0%, var(--shfb-navy) 100%);
	opacity: 0;
	transition: opacity calc(var(--shfb-cs-speed) * .7) ease;
}
.shfb-cs__card:not(.is-active):hover { transform: translateY(-4px); }
.shfb-cs__card.is-active {
	flex-basis: var(--shfb-cs-active-w);
	color: #fff;
	cursor: default;
	transform: translateY(-6px);
	box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
}
.shfb-cs__card.is-active::before { opacity: 1; }

.shfb-cs__num { display: block; font-size: 32px; line-height: 1; margin-bottom: 12px; }
.shfb-cs__title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: inherit; }
.shfb-cs__num,
.shfb-cs__title { transition: transform var(--shfb-cs-speed) var(--shfb-cs-ease); }
.shfb-cs__card.is-active .shfb-cs__num,
.shfb-cs__card.is-active .shfb-cs__title { transform: translateY(-2px); }
.shfb-cs__link { color: inherit; text-decoration: none; }

/* Image grows open, fades in a beat later and settles from a slight zoom */
.shfb-cs__media {
	max-height: 0;
	opacity: 0;
	margin: 0 calc(-1 * var(--shfb-cs-pad)) calc(-1 * var(--shfb-cs-pad));
	overflow: hidden;
	transition:
		max-height var(--shfb-cs-speed) var(--shfb-cs-ease),
		margin-top var(--shfb-cs-speed) var(--shfb-cs-ease),
		opacity calc(var(--shfb-cs-speed) * .5) ease;
}
.shfb-cs__card.is-active .shfb-cs__media {
	max-height: var(--shfb-cs-img-h);
	opacity: 1;
	margin-top: 16px;
	transition-delay: 0s, 0s, calc(var(--shfb-cs-speed) * .25);
}
.shfb-cs__media img {
	display: block;
	width: 100%;
	height: var(--shfb-cs-img-h);
	object-fit: cover;
	transform: scale(1.12);
	transition: transform calc(var(--shfb-cs-speed) * 1.6) var(--shfb-cs-ease);
}
.shfb-cs__card.is-active .shfb-cs__media img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
	.shfb-cs__track,
	.shfb-cs__card,
	.shfb-cs__card::before,
	.shfb-cs__media,
	.shfb-cs__media img,
	.shfb-cs__num,
	.shfb-cs__title { transition-duration: 0s !important; transition-delay: 0s !important; }
}

@media (max-width: 767px) {
	/* Phone: heading + arrows on top, cards sized to the screen (widget values still win) */
	.shfb-cs {
		--shfb-cs-card-w: 58vw;
		--shfb-cs-active-w: 72vw;
		--shfb-cs-gap: 12px;
		--shfb-cs-img-h: 160px;
		--shfb-cs-pad: 18px;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	.shfb-cs__intro { max-width: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
	.shfb-cs__heading { margin: 0; }
	.shfb-cs__viewport { padding: 20px 0 30px; }
	.shfb-cs__card { min-height: 120px; }
}

/* ================= Stack Slider ================= */
.shfb-ss {
	--shfb-ss-ratio: 4 / 3;
	--shfb-ss-peek: 72px;
	--shfb-ss-radius: 28px;
	--shfb-ss-arrow: 48px;
	--shfb-ss-arrow-gap: 30px;
	--shfb-ss-speed: 800ms;
	--shfb-ss-ease: cubic-bezier(.22, 1, .36, 1);
	display: flex;
	align-items: center;
	gap: var(--shfb-ss-arrow-gap);
}
/* stage = the front photo's box; the next photo sticks out "peek" px to its right */
.shfb-ss__stage {
	position: relative;
	flex: 1;
	min-width: 0;
	margin: 0 var(--shfb-ss-peek) 0 0;
	aspect-ratio: var(--shfb-ss-ratio);
}
.shfb-ss__slide {
	position: absolute;
	inset: 0;
	margin: 0;
	border-radius: var(--shfb-ss-radius);
	overflow: hidden;
	background: #e9e9e9;
	transform-origin: right center;
	transition:
		transform var(--shfb-ss-speed) var(--shfb-ss-ease),
		opacity var(--shfb-ss-speed) var(--shfb-ss-ease),
		box-shadow var(--shfb-ss-speed) var(--shfb-ss-ease);
}
.shfb-ss__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shfb-ss__slide.is-current { z-index: 3; transform: none; opacity: 1; }
.shfb-ss__slide.is-next {
	z-index: 2;
	transform: translateX(var(--shfb-ss-peek)) scale(.84);
	opacity: .5;
}
.shfb-ss__slide.is-back {
	z-index: 1;
	transform: translateX(calc(var(--shfb-ss-peek) * .6)) scale(.72);
	opacity: 0;
}
/* the photo leaving the front slides a little left and fades out on top */
.shfb-ss__slide.is-leaving {
	z-index: 4;
	transform: translateX(-10%) scale(.94);
	opacity: 0;
	pointer-events: none;
}
.shfb-ss-shadow-yes .shfb-ss__slide.is-current { box-shadow: 0 28px 40px -18px rgba(0, 0, 0, .45); }

.shfb-ss__arrow {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--shfb-ss-arrow);
	height: var(--shfb-ss-arrow);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--shfb-teal), var(--shfb-navy));
	color: #fff;
	cursor: pointer;
	transition: transform .3s var(--shfb-ss-ease), box-shadow .3s;
}
.shfb-ss__arrow:hover { transform: translateX(3px); box-shadow: 0 8px 18px rgba(42, 58, 143, .35); }
.shfb-ss__arrow:active { transform: scale(.94); }
.shfb-ss__arrow svg { width: 46%; height: 46%; }

@media (max-width: 767px) {
	.shfb-ss { --shfb-ss-peek: 34px; --shfb-ss-arrow: 42px; --shfb-ss-arrow-gap: 12px; --shfb-ss-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.shfb-ss__slide { transition-duration: 0s; }
}

/* ================= Post List ================= */
.shfb-pl {
	display: flex;
	flex-direction: column;
	gap: 50px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.shfb-pl__item { margin: 0; }
.shfb-pl-divider-yes .shfb-pl__item { padding-bottom: 16px; border-bottom: 1px solid rgba(0, 0, 0, .12); }
.shfb-pl__title { margin: 0; font-size: 17px; font-weight: 400; line-height: 1.3; }
.shfb-pl__title a { color: inherit; text-decoration: none; transition: color .2s; }
.shfb-pl__title a:hover { color: var(--shfb-teal); }
.shfb-pl__date { display: block; margin-bottom: 4px; font-size: 13px; opacity: .7; }
.shfb-pl__excerpt { margin: 6px 0 0; font-size: 15px; line-height: 1.4; }
.shfb-pl__empty { opacity: .7; }
