/**
 * Generic section pieces.
 *
 * Section head (text block, Extra class "b3d-section-head"):
 *   <p><span class="b3d-tag">label</span></p>
 *   <h2 class="b3d-title b3d-title--center">Title <span class="b3d-accent-pink">&amp;</span> more</h2>
 *   <p class="b3d-section-lead">Lead text</p>
 *
 * Rehabilitation row with the skeleton (Extra class "b3d-rehab").
 */

/* ---------- Section head ---------- */

#main .b3d-section-head {
	max-width: 720px;
	margin: 0 auto 36px !important;
	text-align: center;
}

#main .b3d-section-head p:first-child {
	margin: 0 0 16px !important;
}

#main .b3d-section-head h2 {
	margin: 0 0 20px;
	color: var(--b3d-ink);
	font-size: clamp(30px, 3vw, 44px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.02em;
}

#main .b3d-section-lead {
	margin: 0 !important;
	color: var(--b3d-muted) !important;
	font-size: 17px;
	line-height: 1.7;
}

.b3d-accent-pink {
	color: var(--b3d-pink);
}

/* Centered title accent: see brand.css ("Centered headings stay centered") */

/* ---------- Rehabilitation row (skeleton) ---------- */

#main .vc_row.b3d-rehab {
	display: flow-root; /* contains floated columns; ::before/::after are used for decoration */
	position: relative;
	isolation: isolate;
	padding-top: clamp(64px, 7vw, 110px) !important;
	padding-bottom: clamp(48px, 5vw, 80px) !important;
	background: linear-gradient(180deg, var(--b3d-logo-cyan-50) 0%, #fff 100%);
	overflow: hidden;
}

/* Network texture, as in the hero video, kept soft */
#main .vc_row.b3d-rehab::before {
	content: "";
	display: block;
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url("/wp-content/uploads/2025/01/bio3Dvet-network-bg3.webp") center / cover no-repeat;
	opacity: .4;
	-webkit-mask: radial-gradient(120% 90% at 50% 60%, #000 30%, transparent 85%);
	mask: radial-gradient(120% 90% at 50% 60%, #000 30%, transparent 85%);
}

/* Faint logo "b" on the right, never mirrored */
#main .vc_row.b3d-rehab::after {
	content: "";
	display: block;
	position: absolute;
	z-index: -1;
	right: -60px;
	bottom: -80px;
	width: 260px;
	aspect-ratio: 249 / 482;
	background: url("../../img/brand-mark-light.svg") center / contain no-repeat;
	opacity: .9;
}

@media (max-width: 767px) {
	#main .vc_row.b3d-rehab::after {
		display: none;
	}
}

/* ---------- Shop promo (row Extra class "b3d-shop") ----------
 * One rounded card (#e5e5e5, the original banner gray) with the text on top
 * and an HTML banner at the bottom.
 */

#main .vc_row.b3d-shop {
	margin: 0 !important;
	padding: clamp(40px, 6vw, 90px) 24px !important;
	background: #fff !important;
}

#main .b3d-shop > .wpb_column > .vc_column-inner {
	position: relative;
	isolation: isolate;
	max-width: 1170px;
	margin: 0 auto;
	padding: clamp(48px, 5vw, 76px) 0 0 !important;
	border-radius: 28px;
	background: #e5e5e5;
	overflow: hidden;
	text-align: center;
	box-shadow: 0 1px 0 rgba(15, 35, 45, .04);
	transition: transform var(--b3d-dur-slow) var(--b3d-ease-out), box-shadow var(--b3d-dur-slow) var(--b3d-ease-out);
}

#main .b3d-shop > .wpb_column > .vc_column-inner:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 60px rgba(15, 35, 45, .12);
}

/* White logo "b" in the corner, echoing the white lettering of the banner */
#main .b3d-shop > .wpb_column > .vc_column-inner::before {
	content: "";
	display: block;
	position: absolute;
	z-index: -1;
	left: clamp(-60px, -3vw, -20px);
	top: -40px;
	width: clamp(140px, 16vw, 230px);
	aspect-ratio: 249 / 482;
	background: #fff;
	-webkit-mask: var(--b3d-mark) center / contain no-repeat;
	mask: var(--b3d-mark) center / contain no-repeat;
	opacity: .75;
	transition: transform 1.2s var(--b3d-ease-out);
}

#main .b3d-shop > .wpb_column > .vc_column-inner:hover::before {
	transform: translateY(10px);
}

/* Text sits in a centered column; the banner stays full card width */
#main .b3d-shop .b3d-shop__tag,
#main .b3d-shop .b3d-shop__text,
#main .b3d-shop .vc_btn3-container {
	max-width: 760px;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 24px;
	padding-right: 24px;
}

#main .b3d-shop .b3d-shop__tag {
	margin-bottom: 18px !important;
}

#main .b3d-shop .b3d-shop__tag p {
	margin: 0 !important;
}

/* "NOW NEW!" */
#main .b3d-shop h3.b3d-shop__title {
	margin: 0 0 22px;
	color: var(--b3d-pink);
	font-size: clamp(34px, 4vw, 56px);
	font-weight: 800;
	letter-spacing: -.02em;
}

#main .b3d-shop .b3d-shop__text {
	margin-bottom: 20px !important;
	color: var(--b3d-body) !important;
	font-size: 17px;
}

#main .b3d-shop .vc_btn3-container {
	margin-top: 10px;
	margin-bottom: clamp(32px, 4vw, 48px) !important;
}

#main .b3d-shop .vc_btn3-container .vc_btn3 {
	margin-bottom: 0 !important;
}

/* ---------- Shop banner (HTML, replaces the old raster banner) ----------
 * <a class="b3d-shop-banner"> word | title | tags | skeleton image
 */

#main .b3d-shop .b3d-shop-banner-wrap {
	margin: 0 !important;
}

#main .b3d-shop .b3d-shop-banner-wrap p {
	margin: 0 !important;
}

.b3d-shop-banner {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(220px, 25vw, 310px);
	padding: 0 clamp(24px, 5vw, 72px);
	overflow: hidden;
	text-align: left;
	text-decoration: none !important;
	background: none !important;
}

/* Huge white wordmark, as on the original banner */
.b3d-shop-banner__word {
	position: absolute;
	left: 50%;
	bottom: -.2em;
	z-index: 0;
	color: #fff;
	font-size: clamp(96px, 19vw, 270px);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -.055em;
	white-space: nowrap;
	transform: translateX(-50%);
	transition: transform 1.4s var(--b3d-ease-out);
	pointer-events: none;
}

.b3d-shop-banner__title {
	position: relative;
	z-index: 1;
	max-width: 15ch;
	color: var(--b3d-ink);
	font-size: clamp(22px, 2.5vw, 36px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.02em;
}

/* Two labels in a stair step, like the two blades of the logo */
.b3d-shop-banner__tags {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	margin-left: clamp(28px, 7vw, 120px);
	transform: rotate(-3deg);
}

.b3d-shop-banner__tags .b3d-tag {
	font-weight: 700;
	font-size: clamp(14px, 1.3vw, 18px);
	padding: 7px 14px 8px;
	transition: transform var(--b3d-dur) var(--b3d-ease);
}

.b3d-shop-banner__tags .b3d-tag + .b3d-tag {
	margin-left: 26px;
}

.b3d-shop-banner__img {
	position: absolute;
	z-index: 1;
	right: clamp(-30px, -1vw, 0px);
	bottom: -8%;
	width: auto !important;
	height: 112%;
	max-width: none !important;
	filter: drop-shadow(0 20px 24px rgba(15, 35, 45, .18));
	transform-origin: 70% 100%;
	transition: transform 1.2s var(--b3d-ease-out);
}

/* Hover (whole card) */
#main .b3d-shop > .wpb_column > .vc_column-inner:hover .b3d-shop-banner__word {
	transform: translateX(-52%);
}

#main .b3d-shop > .wpb_column > .vc_column-inner:hover .b3d-shop-banner__img {
	transform: translateX(-10px) rotate(-2deg);
}

#main .b3d-shop > .wpb_column > .vc_column-inner:hover .b3d-shop-banner__tags .b3d-tag + .b3d-tag {
	transform: translateX(8px);
}

.b3d-shop-banner:focus-visible {
	outline: 3px solid rgba(0, 171, 214, .5);
	outline-offset: -3px;
}

@media (max-width: 767px) {
	#main .b3d-shop > .wpb_column > .vc_column-inner {
		border-radius: var(--b3d-radius-xl);
	}

	#main .b3d-shop .b3d-shop__text {
		font-size: 16px;
	}

	.b3d-shop-banner {
		flex-direction: column;
		align-items: flex-start;
		min-height: 0;
		padding: 28px 24px 0;
	}

	.b3d-shop-banner__word {
		bottom: -.17em;
		font-size: 17.5vw;
	}

	.b3d-shop-banner__tags {
		margin: 16px 0 0 4px;
	}

	.b3d-shop-banner__img {
		position: relative;
		right: auto;
		bottom: auto;
		align-self: flex-end;
		height: 180px;
		margin: 8px -24px -10px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	#main .b3d-shop > .wpb_column > .vc_column-inner,
	#main .b3d-shop > .wpb_column > .vc_column-inner::before,
	.b3d-shop-banner__word,
	.b3d-shop-banner__img {
		transition: none;
		transform: none !important;
	}
}

/* ---------- News (row Extra class "b3d-news") ---------- */

#main .vc_row.b3d-news {
	padding-top: clamp(64px, 7vw, 110px) !important;
	padding-bottom: clamp(64px, 7vw, 110px) !important;
}

/* Equal-height cards in one row */
#main .b3d-news .vc_pageable-slide-wrapper {
	display: flex;
	flex-wrap: wrap;
}

#main .b3d-news .vc_pageable-slide-wrapper::before,
#main .b3d-news .vc_pageable-slide-wrapper::after {
	display: none;
}

#main .b3d-news .vc_grid-item {
	display: flex;
	float: none;
}

#main .b3d-news .vc_grid-item > .vc_grid-item-mini {
	width: 100%;
}

/* Stem + bowl blades slide in along the top edge on hover.
 * Same slope and left-to-right draw as every blade bar (see brand.css). */
#main .b3d-news .vc_grid-item-mini {
	position: relative;
}

#main .b3d-news .vc_grid-item-mini:hover .vc_gitem-post-data-source-post_title h4 {
	color: var(--b3d-ink);
}

/* "Read more": dark text, logo-cyan arrow */
#page .b3d-news .vc_grid-item .vc_general.vc_btn3 {
	color: var(--b3d-ink) !important;
	font-weight: 700 !important;
}

#page .b3d-news .vc_grid-item .vc_general.vc_btn3::after {
	color: var(--b3d-logo-cyan);
}

#page .b3d-news .vc_grid-item .vc_general.vc_btn3:hover {
	color: var(--b3d-ink) !important;
}

/* "Read more" pinned to the bottom of equal-height cards */
#main .b3d-news .vc_gitem-zone-c,
#main .b3d-news .vc_gitem-zone-c > .vc_gitem-zone-mini,
#main .b3d-news .vc_gitem-zone-c .vc_gitem_row,
#main .b3d-news .vc_gitem-zone-c .vc_gitem-col {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
}

#main .b3d-news .vc_gitem-zone-c .vc_gitem_row::before,
#main .b3d-news .vc_gitem-zone-c .vc_gitem_row::after {
	display: none;
}

#main .b3d-news .vc_gitem-zone-c .vc_btn3-container {
	margin-top: auto;
	padding-top: 8px;
}

/* Excerpt: first 3 lines, then an ellipsis. The excerpt is split into several
 * <p>, so they are made inline to flow as one text block before clamping. */
#main .b3d-news .vc_gitem-post-data-source-post_excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	margin-bottom: 18px;
}

#main .b3d-news .vc_gitem-post-data-source-post_excerpt p {
	display: inline;
	margin: 0 !important;
}

#main .b3d-news .vc_gitem-post-data-source-post_excerpt p + p::before {
	content: " ";
}

/* "All news" under the cards: outlined secondary button */
#main .b3d-news .vc_btn3-container.b3d-news__all {
	margin: 44px 0 0 !important;
	text-align: center;
}

#page .b3d-news .b3d-news__all .vc_general.vc_btn3 {
	background: #fff !important;
	color: var(--b3d-ink) !important;
	box-shadow: inset 0 0 0 2px var(--b3d-logo-cyan);
}

#page .b3d-news .b3d-news__all .vc_general.vc_btn3::before {
	background: var(--b3d-logo-cyan);
}

#page .b3d-news .b3d-news__all .vc_general.vc_btn3:hover {
	box-shadow: inset 0 0 0 2px var(--b3d-logo-cyan), 0 12px 26px rgba(0, 171, 214, .28);
}
