/* Hairtec Artsen widget — design tokens come from the Elementor controls
   as CSS custom properties on the widget wrapper; every var() below carries
   the approved default so the widget also renders correctly untouched. */

.ht-artsen {
	/* room for the sticky header when the section is reached via #anchor */
	scroll-margin-top: var(--ht-scroll-margin, 96px);
}

/* Elementor already resets to border-box; repeat it so the card maths
   hold when the widget is rendered outside an .elementor wrapper. */
.ht-artsen .ht-card,
.ht-artsen .ht-box,
.ht-artsen .ht-photo,
.ht-artsen .ht-pill,
.ht-artsen .ht-nav,
.ht-artsen .ht-dot {
	box-sizing: border-box;
}

.ht-artsen .ht-heading {
	color: var(--ht-primary, #223558);
	margin: 0 0 8px;
}

.ht-artsen .ht-intro {
	color: var(--ht-text, #5c5c5c);
	max-width: 640px;
	margin: 0 0 26px;
}

.ht-artsen .ht-grid {
	display: grid;
	/* Up to --ht-cols columns, but never narrower than --ht-card-min: on a
	   768px tablet two 334px cards would clip the BIG link and button, so
	   the grid drops to one column by itself until the list is at least
	   2 × card-min + gap wide (780px by default) and back to two above that.
	   auto-fill (not auto-fit) keeps the empty tracks, so a page with a
	   single doctor still gets a half-width card exactly like 1.0.x.
	   1fr tracks (not auto) so content can never widen a column. */
	grid-template-columns: repeat(
		auto-fill,
		minmax(min(100%, max(var(--ht-card-min, 380px), calc(100% / var(--ht-cols, 2) - var(--ht-gap, 20px)))), 1fr)
	);
	gap: var(--ht-gap, 20px);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Only focusable on mobile, where the script sets tabindex while it scrolls. */
.ht-artsen .ht-grid:focus-visible {
	outline: 2px solid var(--ht-primary, #223558);
	outline-offset: 4px;
	border-radius: 4px;
}

.ht-artsen .ht-card {
	display: flex;
	align-items: stretch;
	gap: var(--ht-inner-gap, 20px);
	background: var(--ht-card-bg, #ffffff);
	border: 1px solid var(--ht-card-border, #22355840);
	border-radius: var(--ht-card-radius, 20px);
	padding: var(--ht-card-padding, 20px);
	margin: 0;
	min-width: 0;
}

.ht-artsen .ht-photo {
	width: var(--ht-photo-size, 100px);
	height: var(--ht-photo-size, 100px);
	border-radius: var(--ht-photo-radius, 20px);
	object-fit: cover;
	flex-shrink: 0;
	display: block;
	/* soft placeholder while a lazy-loaded photo is still arriving */
	background: var(--ht-box-bg, #eeeff2);
}

.ht-artsen .ht-box {
	flex: 1;
	min-width: 0;
	background: var(--ht-box-bg, #eeeff2);
	border-radius: var(--ht-box-radius, 20px);
	padding: 12px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	row-gap: 12px;
}

.ht-artsen .ht-stack {
	min-width: 0;
	/* min-content basis lets the flex line wrap the pill below in narrow cards */
	flex: 1 1 min-content;
}

.ht-artsen .ht-name {
	font-size: var(--ht-name-size, 20px);
	font-weight: 700;
	color: var(--ht-primary, #223558);
	line-height: 1.2;
	margin: 0 0 6px;
	overflow-wrap: break-word; /* Safari < 15.4 */
	overflow-wrap: anywhere;
}

.ht-artsen .ht-role {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 6px;
}

.ht-artsen .ht-role span {
	font-size: 14px;
	color: var(--ht-text, #5c5c5c);
	line-height: 1.2;
	min-width: 0;
	overflow-wrap: break-word;
	overflow-wrap: anywhere;
}

.ht-artsen .ht-role .ht-rule {
	flex: 1;
	min-width: 24px;
	border-top: 1px solid var(--ht-divider, #22355866);
}

.ht-artsen .ht-big {
	font-size: 16px;
	color: var(--ht-text, #5c5c5c);
	margin: 0;
	line-height: 1.5;
	overflow-wrap: break-word;
	overflow-wrap: anywhere;
}

.ht-artsen .ht-big a {
	color: var(--ht-primary, #223558);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.01em;
	/* digits + external icon stay unbreakable; the label may wrap */
	white-space: nowrap;
	/* 32px+ touch target without moving the text: padding grows the hit
	   area, the matching negative margin keeps the line box unchanged */
	display: inline-block;
	padding: 6px 4px;
	margin: -6px -4px;
	border-radius: 6px;
}

.ht-artsen .ht-big a svg {
	width: 10px;
	height: 10px;
	fill: currentColor;
	margin-left: 4px;
	vertical-align: baseline;
}

/* An invalid BIG number (not 11 digits) is shown as plain text, never linked. */
.ht-artsen .ht-big-invalid {
	font-weight: 700;
	color: var(--ht-primary, #223558);
	font-variant-numeric: tabular-nums;
}

/* Editor-only hint next to an invalid BIG number. */
.ht-artsen .ht-warn {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.3;
	color: #b3261e;
}

/* hover and focus-visible as separate rules: Safari < 15.4 drops a whole
   selector list when it meets :focus-visible */
.ht-artsen .ht-big a:hover {
	text-decoration-thickness: 2px;
	color: var(--ht-primary, #223558);
}

.ht-artsen .ht-big a:focus-visible {
	text-decoration-thickness: 2px;
	color: var(--ht-primary, #223558);
}

.ht-artsen .ht-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex-shrink: 0;
	background: var(--ht-btn-bg, #223558);
	color: var(--ht-btn-color, #ffffff);
	border: 1px solid var(--ht-btn-bg, #223558);
	border-radius: var(--ht-btn-radius, 100px);
	padding: 10px 20px;
	font-size: var(--ht-btn-size, 12px);
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.ht-artsen .ht-pill svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

.ht-artsen .ht-pill:hover {
	background: var(--ht-btn-hover-bg, #5c5c5c);
	border-color: var(--ht-btn-hover-bg, #5c5c5c);
	color: var(--ht-btn-hover-color, #ffffff);
}

.ht-artsen .ht-pill:focus-visible {
	background: var(--ht-btn-hover-bg, #5c5c5c);
	border-color: var(--ht-btn-hover-bg, #5c5c5c);
	color: var(--ht-btn-hover-color, #ffffff);
}

.ht-artsen .ht-big a:focus-visible,
.ht-artsen .ht-pill:focus-visible,
.ht-artsen .ht-nav:focus-visible,
.ht-artsen .ht-dot:focus-visible {
	outline: 2px solid var(--ht-primary, #223558);
	outline-offset: 2px;
}

/* ---- mobile carousel controls (arrows + dots) -------------------------
   Hidden on desktop/tablet where the list is a static grid; the inline
   mobile stylesheet (hairtec-artsen-widget.php) switches them on.
   The button rules carry specificity (0,3,0)+ on purpose: Elementor kit
   CSS styles every <button>:hover/:focus (0,2,1) and would otherwise
   recolour the arrows and dots after a tap. */

.ht-artsen .ht-controls {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 14px;
}

.ht-artsen .ht-nav,
.ht-artsen .ht-dot {
	-webkit-appearance: none;
	appearance: none;
	font: inherit;
	line-height: 1;
	box-shadow: none;
	text-decoration: none;
	cursor: pointer;
}

.ht-artsen .ht-nav {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 1px solid var(--ht-card-border, #22355840);
	border-radius: 50%;
	background: var(--ht-card-bg, #ffffff);
	color: var(--ht-primary, #223558);
	transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
}

.ht-artsen .ht-nav svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.ht-artsen .ht-prev svg {
	transform: rotate(180deg);
}

/* plain focus (e.g. after a tap) keeps the resting look; only hover and
   keyboard focus invert the colours */
.ht-artsen .ht-nav:focus {
	background: var(--ht-card-bg, #ffffff);
	border-color: var(--ht-card-border, #22355840);
	color: var(--ht-primary, #223558);
	border-radius: 50%;
}

.ht-artsen .ht-nav:hover:not([aria-disabled="true"]) {
	background: var(--ht-btn-bg, #223558);
	border-color: var(--ht-btn-bg, #223558);
	color: var(--ht-btn-color, #ffffff);
}

.ht-artsen .ht-nav:focus-visible {
	background: var(--ht-btn-bg, #223558);
	border-color: var(--ht-btn-bg, #223558);
	color: var(--ht-btn-color, #ffffff);
}

.ht-artsen .ht-nav[aria-disabled="true"],
.ht-artsen .ht-nav[aria-disabled="true"]:hover,
.ht-artsen .ht-nav[aria-disabled="true"]:focus {
	opacity: 0.35;
	cursor: default;
	background: var(--ht-card-bg, #ffffff);
	border-color: var(--ht-card-border, #22355840);
	color: var(--ht-primary, #223558);
}

.ht-artsen .ht-dots {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0;
	min-width: 0;
	/* leave room for the two 44px arrows + gaps so many dots wrap instead
	   of pushing the arrows out of the column */
	max-width: calc(100% - 108px);
}

.ht-artsen .ht-dot {
	/* 24×24 hit area around a 7px dot (WCAG 2.5.8); dots are decorative
	   (aria-hidden), keyboard users get the arrow buttons instead */
	width: 24px;
	height: 24px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ht-artsen .ht-dot:hover,
.ht-artsen .ht-dot:focus {
	background: none;
	border-radius: 0;
	box-shadow: none;
}

.ht-artsen .ht-dot i {
	display: block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	/* ≥3:1 against white/#f5f6f8/#eeeff2, independent of the card-border token */
	background: rgba(34, 53, 88, 0.6);
	transition: background-color 0.3s;
}

.ht-artsen .ht-dot.on i {
	background: var(--ht-primary, #223558);
}

/* visually hidden live region: "2 van 4: Dr. G. Tokmaji" after a button press */
.ht-artsen .ht-status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ht-artsen .ht-pill,
	.ht-artsen .ht-nav,
	.ht-artsen .ht-dot i {
		transition: none;
	}
	.ht-artsen .ht-grid {
		scroll-behavior: auto;
	}
}

@media print {
	.ht-artsen .ht-controls {
		display: none;
	}
}

/*
 * NOTE: the mobile carousel layout rules are NOT in this file. They are
 * added via wp_add_inline_style() in hairtec-artsen-widget.php so the
 * breakpoint follows the site's configured Elementor mobile breakpoint
 * instead of a hard-coded 767px.
 */

/* ---- rail layout: one row, narrow cards, auto-scroll -------------------
   Same card anatomy as the grid, compacted: 72px photo strip, name/role/
   info stacked, round arrow link instead of the pill. Copies of the set
   are added by the script when the rail loops. */

.ht-artsen--rail .ht-grid {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: var(--ht-gap, 16px);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: none;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	padding: 4px 0;
	margin: 0;
	position: relative;
}

.ht-artsen--rail .ht-grid::-webkit-scrollbar {
	display: none;
}

.ht-artsen--fade .ht-grid {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}

.ht-artsen--rail .ht-card {
	flex: 0 0 var(--ht-rail-card, 240px);
	width: var(--ht-rail-card, 240px);
	min-width: 0;
	gap: 12px;
	padding: 12px;
	scroll-snap-align: none;
}

/* fixed portrait, centred: the photo never stretches with a taller neighbour */
.ht-artsen--rail .ht-photo {
	width: 64px;
	height: 88px;
	align-self: center;
	object-position: 50% 20%;
}

.ht-artsen--rail .ht-box {
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	row-gap: 8px;
	padding: 10px 12px;
}

/* 110px is what a BIG number needs; while that plus the arrow fits, the
   arrow stays beside the text, otherwise it wraps under it */
.ht-artsen--rail .ht-stack {
	flex: 1 1 110px;
	min-width: 0;
}

.ht-artsen--rail .ht-go {
	margin-left: auto;
}

/* Every card in the row takes the height of the tallest one, so the text
   is capped: name 2 lines, role 1 line, info 2 lines, the rest ends in "…".
   That keeps the row at one predictable height whatever an editor types. */
.ht-artsen--rail .ht-name {
	font-size: min(var(--ht-name-size, 20px), 18px);
	margin-bottom: 4px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.ht-artsen--rail .ht-role {
	margin-bottom: 4px;
}

.ht-artsen--rail .ht-role span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ht-artsen--rail .ht-big {
	font-size: 15px;
}

.ht-artsen--rail .ht-meta {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.ht-artsen--rail .ht-big a {
	letter-spacing: 0;
}

.ht-artsen .ht-meta strong {
	font-weight: 700;
	color: var(--ht-primary, #223558);
}

/* ---- rail, portrait card: photo above the text, like /het-team/ but lower ---- */

.ht-artsen--portrait .ht-card {
	flex-direction: column;
	gap: 8px;
	padding: 10px;
}

.ht-artsen--portrait .ht-photo {
	width: 100%;
	height: auto;
	aspect-ratio: var(--ht-rail-ratio, 4 / 3);
	align-self: auto;
	object-position: 50% 15%;
}

.ht-artsen--portrait .ht-box {
	flex: 1 1 auto;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	padding: 12px 12px 10px;
}

.ht-artsen--portrait .ht-stack {
	flex: 0 0 auto;
	min-width: 0;
	margin-bottom: 10px;
}

.ht-artsen--portrait .ht-name {
	margin-bottom: 4px;
}

.ht-artsen--portrait .ht-role {
	margin-bottom: 6px;
}

.ht-artsen--portrait .ht-big {
	font-size: 14px;
}

.ht-artsen--portrait .ht-big a {
	white-space: nowrap;
}

/* bio link as plain text with an arrow, pinned to the bottom of the box */
.ht-artsen .ht-pill--text {
	background: transparent;
	border-color: transparent;
	color: var(--ht-primary, #223558);
	padding: 4px 0;
	border-radius: 4px;
	align-self: flex-start;
	margin-top: auto;
}

.ht-artsen .ht-pill--text:hover,
.ht-artsen .ht-pill--text:focus-visible {
	background: transparent;
	border-color: transparent;
	color: var(--ht-btn-hover-bg, #5c5c5c);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* round arrow link to the bio, 40px hit area */
.ht-artsen .ht-go {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--ht-btn-bg, #223558);
	color: var(--ht-btn-color, #ffffff);
	border: 1px solid var(--ht-btn-bg, #223558);
	text-decoration: none;
	transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.ht-artsen .ht-go svg {
	width: 13px;
	height: 13px;
	fill: currentColor;
	margin-left: 1px;
}

.ht-artsen .ht-go:hover {
	background: var(--ht-btn-hover-bg, #5c5c5c);
	border-color: var(--ht-btn-hover-bg, #5c5c5c);
	color: var(--ht-btn-hover-color, #ffffff);
}

.ht-artsen .ht-go:focus-visible {
	outline: 2px solid var(--ht-primary, #223558);
	outline-offset: 2px;
}

/* the rail shows its arrows at every width, aligned with the text */
.ht-artsen--rail .ht-controls {
	display: flex;
	justify-content: flex-start;
}

/* copies made by the script are invisible to assistive tech and never focusable;
   their links carry no href until touched, so keep the pointer cursor */
.ht-artsen .ht-card[aria-hidden="true"] a {
	pointer-events: auto;
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	.ht-artsen .ht-go {
		transition: none;
	}
}

@media print {
	.ht-artsen--rail .ht-grid {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
		overflow: visible;
		-webkit-mask-image: none;
		mask-image: none;
	}
	.ht-artsen .ht-card[aria-hidden="true"] {
		display: none;
	}
}
