/**
 * Shortcode [diensten] — diensten-carousel
 */

.tb-diensten {
	--tb-diensten-max: 80rem;
	--tb-diensten-pad: 24px;
	--tb-diensten-content-inset: max(var(--tb-diensten-pad), calc((100% - var(--tb-diensten-max)) / 2 + var(--tb-diensten-pad)));
	--tb-diensten-card-width: 380px;
	--tb-diensten-slide-gap: 24px;
	box-sizing: border-box;
	width: 100%;
	padding-top: 96px;
	padding-bottom: 40px;
	padding-inline: 0;
	background: var(--tb-background, #fff);
	color: var(--tb-foreground, #0f172a);
	overflow: visible;
}

@media (max-width: 1023px) {
	.tb-diensten {
		padding-top: 72px;
		padding-bottom: 32px;
	}
}

@media (max-width: 639px) {
	.tb-diensten {
		padding-top: 56px;
		padding-bottom: 24px;
	}

	.tb-diensten__header {
		margin-bottom: 32px;
	}
}

.tb-diensten__inner {
	max-width: var(--tb-diensten-max);
	margin-inline: auto;
	padding-inline: var(--tb-diensten-pad);
}

.tb-diensten__header {
	display: grid;
	gap: 24px;
	margin-bottom: 48px;
}

@media (min-width: 1024px) {
	.tb-diensten__header {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		align-items: start;
		gap: 48px;
	}
}

.tb-diensten__header-left {
	min-width: 0;
}

.tb-diensten__header-right {
	min-width: 0;
}

@media (min-width: 1024px) {
	.tb-diensten__header-right {
		padding-top: 36px;
	}
}

.tb-diensten__eyebrow {
	margin: 0 0 12px;
	padding: 0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tb-primary, #001397);
}

.tb-diensten__title {
	margin: 0;
	padding: 0;
	font-family: var(--tb-font-heading);
	font-size: clamp(2.25rem, 4.8vw, 3.5rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--tb-foreground, #0f172a);
}

.tb-diensten__title mark {
	background: none;
	color: var(--tb-primary, #001397);
	font-family: Inter, system-ui, sans-serif;
	font-size: 48px;
	font-style: italic;
	font-weight: 300;
	padding: 0;
	border-radius: 0;
}

.tb-diensten__text {
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--tb-muted-foreground, #64748b);
}

/* Carousel: links uitgelijnd met header, rechts door tot schermrand (breedte via JS) */
.tb-diensten__carousel {
	position: relative;
	width: 100%;
	max-width: none;
	margin-right: 0;
	overflow: hidden;
}

.tb-diensten__carousel::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	width: min(140px, 22vw);
	pointer-events: none;
	background: linear-gradient(
		to right,
		rgb(255 255 255 / 0) 0%,
		rgb(255 255 255 / 0.65) 45%,
		var(--tb-background, #fff) 100%
	);
	transition: opacity 0.35s ease;
}

.tb-diensten__carousel.is-at-end::after {
	opacity: 0;
}

.tb-diensten__swiper {
	width: 100%;
	overflow: hidden;
}

.tb-diensten__swiper .swiper-wrapper {
	display: flex;
	align-items: stretch;
	transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

.tb-diensten__swiper .swiper-slide {
	flex-shrink: 0;
	width: var(--tb-diensten-card-width);
	height: auto;
}

/* Fallback zonder Swiper */
.tb-diensten__swiper.tb-diensten__track {
	overflow-x: auto;
	overflow-y: hidden;
	cursor: grab;
	scrollbar-width: none;
	-ms-overflow-style: none;
	touch-action: pan-x;
}

.tb-diensten__swiper.tb-diensten__track::-webkit-scrollbar {
	display: none;
}

.tb-diensten__swiper.tb-diensten__track.is-dragging {
	cursor: grabbing;
	user-select: none;
}

.tb-diensten__swiper.tb-diensten__track.is-dragging * {
	pointer-events: none;
	user-select: none;
}

.tb-diensten__track-inner {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--tb-diensten-slide-gap);
	padding-right: var(--tb-diensten-end-offset, 80px);
}

.tb-diensten__card {
	flex-shrink: 0;
	width: var(--tb-diensten-card-width);
	min-width: var(--tb-diensten-card-width);
	max-width: var(--tb-diensten-card-width);
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--tb-background, #fff);
	border: 1px solid var(--tb-border, #e5e7eb);
	border-radius: 24px;
	overflow: hidden;
	box-shadow: var(--tb-shadow-sm, 0 1px 2px rgb(0 0 0 / 0.05));
	transition: box-shadow 0.3s ease;
}

.tb-diensten__card:hover {
	box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.tb-diensten__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.tb-diensten__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
	-webkit-user-drag: none;
	user-drag: none;
}

.tb-diensten__card:hover .tb-diensten__img {
	transform: scale(1.05);
}

.tb-diensten__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.1) 50%, transparent);
	pointer-events: none;
}

.tb-diensten__chip {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgb(255 255 255 / 0.95);
	backdrop-filter: blur(6px);
	padding: 6px 12px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 600;
	color: #111;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
}

.tb-diensten__usp {
	position: absolute;
	bottom: 16px;
	left: 16px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-shadow: 0 1px 2px rgb(0 0 0 / 0.4);
}

.tb-diensten__icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.tb-diensten__icon svg {
	display: block;
	width: 14px;
	height: 14px;
}

.tb-diensten__icon--primary {
	color: var(--tb-primary, #001397);
}

.tb-diensten__icon--white {
	color: #fff;
}

.tb-diensten__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px;
}

.tb-diensten__card-title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #111;
}

.tb-diensten__desc {
	flex: 1;
	margin: 0 0 32px;
	padding: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #6b7280;
}

.tb-diensten__actions {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-top: auto;
	padding-top: 4px;
}

.tb-diensten__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tb-diensten__btn--primary {
	flex: 0 0 auto;
	width: auto;
	max-width: 100%;
	background: var(--tb-primary, #001397);
	color: #fff;
	white-space: nowrap;
}

.tb-diensten__btn--primary:hover {
	background: var(--tb-primary-hover, #0018b8);
	color: #fff;
}

.tb-diensten__btn--wa,
.tb-diensten__btn--tel {
	width: 40px;
	padding: 0;
	flex-shrink: 0;
	color: #fff;
}

.tb-diensten__btn--wa {
	background: var(--tb-whatsapp, #25d366);
}

.tb-diensten__btn--wa:hover {
	background: var(--tb-whatsapp-hover, rgb(37 211 102 / 0.9));
	color: #fff;
}

.tb-diensten__btn--tel {
	background: var(--tb-primary, #001397);
}

.tb-diensten__btn--tel:hover {
	background: var(--tb-primary-hover, #0018b8);
	color: #fff;
}

.tb-diensten__btn-icon {
	width: 18px;
	height: 18px;
}

.tb-diensten__btn-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.tb-diensten__nav-wrap {
	margin-top: 12px;
}

.tb-diensten__nav-bar {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.tb-diensten__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--tb-border, #e2e8f0);
	border-radius: 9999px;
	background: var(--tb-background, #fff);
	color: var(--tb-foreground, #0f172a);
	box-shadow: var(--tb-shadow-sm, 0 1px 2px rgb(15 23 42 / 0.06));
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.tb-diensten__nav:hover:not(:disabled) {
	background: var(--tb-muted, #f1f5f9);
}

.tb-diensten__nav:disabled {
	opacity: 0.35;
	cursor: default;
}

.tb-diensten__nav[hidden] {
	display: none;
}

.tb-diensten__nav-icon {
	width: 18px;
	height: 18px;
}

.tb-diensten__nav-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* Avada/Fusion: laat carousel rechts uitlopen */
.fusion-flex-container:has(.tb-diensten),
.fusion-layout-column:has(.tb-diensten),
.fusion-column-wrapper:has(.tb-diensten),
.fusion-text:has(.tb-diensten),
.fusion-builder-column:has(.tb-diensten),
.fusion-builder-row:has(.tb-diensten),
.fusion-fullwidth:has(.tb-diensten),
.fusion-builder-container:has(.tb-diensten) {
	overflow: visible !important;
}

/* Avada/Fusion resets */
.fusion-flex-container .tb-diensten,
.fusion-layout-column .tb-diensten,
.fusion-column-wrapper .tb-diensten,
.fusion-text .tb-diensten,
.fusion-builder-column .tb-diensten {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.fusion-text .tb-diensten h2.tb-diensten__title,
.fusion-column-wrapper .tb-diensten h2.tb-diensten__title,
.fusion-builder-column .tb-diensten h2.tb-diensten__title {
	margin: 0;
	padding: 0;
	font-weight: 700;
	line-height: 1.1;
	font-size: clamp(2.25rem, 4.8vw, 3.5rem);
	color: var(--tb-foreground, #0f172a);
}

.fusion-text .tb-diensten h2.tb-diensten__title mark,
.fusion-column-wrapper .tb-diensten h2.tb-diensten__title mark,
.fusion-builder-column .tb-diensten h2.tb-diensten__title mark {
	background: none;
	color: var(--tb-primary, #001397);
	font-family: Inter, system-ui, sans-serif;
	font-size: 48px;
	font-style: italic;
	font-weight: 300;
}

.fusion-text .tb-diensten h3.tb-diensten__card-title,
.fusion-column-wrapper .tb-diensten h3.tb-diensten__card-title,
.fusion-builder-column .tb-diensten h3.tb-diensten__card-title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #111;
}

.fusion-text .tb-diensten p.tb-diensten__text,
.fusion-column-wrapper .tb-diensten p.tb-diensten__text,
.fusion-builder-column .tb-diensten p.tb-diensten__text,
.fusion-text .tb-diensten p.tb-diensten__desc,
.fusion-column-wrapper .tb-diensten p.tb-diensten__desc,
.fusion-builder-column .tb-diensten p.tb-diensten__desc {
	margin: 0;
	padding: 0;
}

.fusion-text .tb-diensten .tb-diensten__carousel,
.fusion-column-wrapper .tb-diensten .tb-diensten__carousel,
.fusion-builder-column .tb-diensten .tb-diensten__carousel {
	display: block;
	position: relative;
	width: 100%;
	max-width: none;
	margin-right: 0;
	overflow: hidden;
}

.fusion-text .tb-diensten .tb-diensten__swiper,
.fusion-column-wrapper .tb-diensten .tb-diensten__swiper,
.fusion-builder-column .tb-diensten .tb-diensten__swiper {
	display: block;
	width: 100%;
	max-width: none;
	overflow: hidden;
}

.fusion-text .tb-diensten .tb-diensten__swiper .swiper-slide,
.fusion-column-wrapper .tb-diensten .tb-diensten__swiper .swiper-slide,
.fusion-builder-column .tb-diensten .tb-diensten__swiper .swiper-slide,
.fusion-text .tb-diensten .tb-diensten__card,
.fusion-column-wrapper .tb-diensten .tb-diensten__card,
.fusion-builder-column .tb-diensten .tb-diensten__card {
	flex-shrink: 0;
	width: var(--tb-diensten-card-width);
	min-width: var(--tb-diensten-card-width);
	max-width: var(--tb-diensten-card-width);
}

.fusion-text .tb-diensten .tb-diensten__nav-bar,
.fusion-column-wrapper .tb-diensten .tb-diensten__nav-bar,
.fusion-builder-column .tb-diensten .tb-diensten__nav-bar {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
