/*
Theme Name: Own the Stage
Theme URI: https://ownthestage.nl
Author: Own the Stage
Description: Block theme for Own the Stage – presentatietrainingen door Xander Straat. Built from the "website" page in the Figma file (homepage, over, programmapagina, artikelpagina).
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: own-the-stage
*/

/* ------------------------------------------------------------------
   Tokens that theme.json can't express
------------------------------------------------------------------- */
:root {
	--ots-red: var(--wp--preset--color--red, #ff1100);
	--ots-ink: var(--wp--preset--color--ink, #1e1e1e);
	--ots-accent: var(--ots-red);
	--ots-line: 4px;
	--ots-line-thin: 2px;
}

/* On red surfaces every accent (underlines, swooshes, links) turns white. */
.has-red-background-color {
	--ots-accent: var(--wp--preset--color--white, #fff);
}

::selection {
	background: var(--ots-red);
	color: #fff;
}

:where(a, button, summary, input, textarea, select):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------- */
/*
 * One header everywhere (homepage design): language left, logo centred,
 * menu right. Fixed to the top; starts large and shrinks once you scroll.
 */
:root {
	--ots-h-pad-top: clamp(24px, 3vw, 40px);
	--ots-h-pad-bottom: clamp(20px, 2.6vw, 34px);
	--ots-logo-w: clamp(230px, 30vw, 460px);
	/* Space reserved under the fixed header = its large height (logo is 266×62). */
	--ots-header-space: calc(var(--ots-h-pad-top) + var(--ots-h-pad-bottom) + var(--ots-logo-w) * 0.2331);
}

body.is-scrolled {
	--ots-h-pad-top: 23px;
	--ots-h-pad-bottom: 16px;
	--ots-logo-w: clamp(150px, 18vw, 266px);
}

.wp-site-blocks > header.wp-block-template-part {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 100;
}

.wp-site-blocks {
	padding-top: var(--ots-header-space);
}

/* Smooth scrolling to anchors (#contact etc.), unless the visitor
   has asked their device for less motion. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

html {
	scroll-padding-top: calc(110px + var(--wp-admin--admin-bar--height, 0px));
}

.ots-header {
	padding-top: var(--ots-h-pad-top) !important;
	padding-bottom: var(--ots-h-pad-bottom) !important;
}

.ots-header .ots-logo {
	margin: 0;
}

.ots-header .ots-logo {
	display: block;
	color: inherit;
	line-height: 0;
}

.ots-header .ots-logo svg {
	width: var(--ots-logo-w);
	height: auto;
	display: block;
}

.ots-header > .wp-block-group {
	display: grid !important;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}

.ots-header .ots-logo {
	grid-column: 2;
}

.ots-header .ots-header__end {
	grid-column: 3;
}

/* Polylang language switcher block (dropdown layout) */
.wp-block-polylang-language-switcher.pll-switcher {
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.1;
	text-transform: uppercase;
	color: inherit;
}

.wp-block-polylang-language-switcher .pll-switcher-inner {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	position: relative;
}

.wp-block-polylang-language-switcher a {
	color: inherit;
	text-decoration: none;
}

.wp-block-polylang-language-switcher a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* the arrow button */
.wp-block-polylang-language-switcher .pll-submenu-toggle {
	display: grid;
	place-items: center;
	padding: 4px;
	margin: 0;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
}

.wp-block-polylang-language-switcher .pll-submenu-toggle svg path {
	stroke: currentColor;
}

.wp-block-polylang-language-switcher .pll-submenu-toggle svg {
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.wp-block-polylang-language-switcher .pll-submenu-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

/* the dropdown list */
.wp-block-polylang-language-switcher ul {
	list-style: none;
	margin: 0;
	top: 100%;
	transform: translateY(6px);
	padding: 8px 16px;
	min-width: 90px;
	background: #fff;
	color: var(--wp--preset--color--ink);
	border: 2px solid var(--wp--preset--color--red);
	z-index: 10;
}

/* invisible bridge so the popup stays open while the mouse moves down */
.wp-block-polylang-language-switcher ul::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -12px;
	height: 12px;
}

/* hide the language you're already on */
.wp-block-polylang-language-switcher li.current-lang,
.wp-block-polylang-language-switcher li:has(> a[aria-current="true"]) {
	display: none !important;
}

/*
 * Logo intro: "with Xander Straat" appears letter by letter, once per visit
 * (functions.php adds html.ots-intro on the first page view of a session).
 */
@media (prefers-reduced-motion: no-preference) {
	.ots-intro .ots-logo__name path {
		opacity: 0;
		transform: translateY(5px);
		transform-box: fill-box;
		animation: ots-name-in 0.45s cubic-bezier(0.2, 0, 0, 1) forwards;
		animation-delay: calc(0.5s + var(--i) * 0.045s);
	}
}

@keyframes ots-name-in {
	to {
		opacity: 1;
		transform: none;
	}
}

/* Wider menu icon: three bars drawn in CSS (44 × 20 px) */
.ots-header .wp-block-navigation__responsive-container-open {
	width: 48px;
	height: 40px;
	display: grid;
	place-items: center;
}

.ots-header .wp-block-navigation__responsive-container-open svg {
	display: none;
}

.ots-header .wp-block-navigation__responsive-container-open::before {
	content: "";
	width: 44px;
	height: 20px;
	background:
		linear-gradient(currentColor, currentColor) left top / 100% 2.5px no-repeat,
		linear-gradient(currentColor, currentColor) left center / 100% 2.5px no-repeat,
		linear-gradient(currentColor, currentColor) left bottom / 100% 2.5px no-repeat;
}

/* EN / NL inside the menu (Polylang or WPML language switcher in the Navigation block) */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	flex-direction: row !important;
	flex-wrap: wrap !important;
}

.wp-block-navigation__responsive-container.is-menu-open :is(.lang-item, .wpml-ls-item, .wp-block-polylang-language-switcher, .wp-block-wpml-navigation-language-switcher) {
	width: auto !important;
	border: 0 !important;
	margin-top: 28px;
}

.wp-block-navigation__responsive-container.is-menu-open :is(.lang-item, .wpml-ls-item) .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open :is(.lang-item, .wpml-ls-item) > a {
	font-size: var(--wp--preset--font-size--large) !important;
	padding: 0 !important;
}

.wp-block-navigation__responsive-container.is-menu-open :is(.lang-item, .wpml-ls-item) + :is(.lang-item, .wpml-ls-item)::before {
	content: "/";
	margin: 0 0.4em;
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
}

.wp-block-navigation__responsive-container.is-menu-open :is(.lang-item, .wpml-ls-item) + :is(.lang-item, .wpml-ls-item) {
	display: flex;
	align-items: baseline;
}

.wp-block-navigation__responsive-container.is-menu-open :is(.lang-item.current-lang, .wpml-ls-current-language) a {
	text-decoration: underline;
}

/* Cork image next to a menu item: add the class "ots-kurk" to the item
   (Navigation block → item → Advanced → Additional CSS class). */
.wp-block-navigation__responsive-container.is-menu-open .ots-kurk > .wp-block-navigation-item__content {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.wp-block-navigation__responsive-container.is-menu-open .ots-kurk .wp-block-navigation-item__label {
	min-width: 0;
	overflow-wrap: break-word;
	hyphens: auto;
}

.wp-block-navigation__responsive-container.is-menu-open .ots-kurk > .wp-block-navigation-item__content::after {
	content: "";
	flex: 0 1 auto;
	width: clamp(80px, 28%, 150px);
	min-width: 56px;
	aspect-ratio: 2 / 1;
	margin-block: -12px;
	background: var(--ots-kurk, url("assets/images/kurk.png")) center / contain no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-navigation__responsive-container.is-menu-open .ots-kurk > .wp-block-navigation-item__content::after {
		transition: transform 0.25s ease;
	}

	.wp-block-navigation__responsive-container.is-menu-open .ots-kurk > .wp-block-navigation-item__content:hover::after {
		transform: rotate(-6deg) scale(1.05);
	}
}

.ots-header .ots-header__end {
	justify-self: end;
}

@media (prefers-reduced-motion: no-preference) {
	.ots-header {
		transition: padding 0.3s ease;
	}

	.ots-header .ots-logo svg {
		transition: width 0.3s ease;
	}
}

.ots-lang {
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	text-transform: uppercase;
	margin: 0;
	white-space: nowrap;
}

.ots-lang a {
	text-decoration: none;
	color: inherit;
}

.ots-lang a[aria-current="true"],
.ots-lang .current-lang a {
	text-decoration: underline;
}

/* Burger button */
.ots-header .wp-block-navigation__responsive-container-open svg {
	width: 39px;
	height: 39px;
}

/* ------------------------------------------------------------------
   Menu panel (Figma: "hamburger menu")
   Slides in from the right. Phone: full width. Tablet/desktop: 1/3.
   To change the speed, edit 0.3s in the animation line below.
------------------------------------------------------------------- */

/* The full-screen layer WordPress opens: transparent, with a dimmed
   backdrop as a separate layer so it can fade (WordPress sets the menu
   colour with !important, which can't be animated). */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: 0 !important;
	background-color: transparent !important;
	animation: none;
}

.wp-block-navigation__responsive-container.is-menu-open::before {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(30, 30, 30, 0.45);
	animation: ots-menu-fade-in 0.3s ease-out;
}

/* The red panel itself, pinned to the right edge. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: none;
	margin: 0 !important;
	padding: clamp(24px, 4vw, 40px) clamp(24px, 3vw, 50px);
	box-sizing: border-box;
	overflow-y: auto;
	overscroll-behavior: contain;
	z-index: 1;
	background: var(--ots-red);
	animation: ots-menu-slide-in 0.3s ease-out;
}

/* Closing (theme.js adds this class for 250ms before WordPress closes it). */
.wp-block-navigation__responsive-container.is-menu-open.ots-menu-closing::before {
	animation: ots-menu-fade-out 0.25s ease-in forwards;
}

.wp-block-navigation__responsive-container.is-menu-open.ots-menu-closing .wp-block-navigation__responsive-close {
	animation: ots-menu-slide-out 0.25s ease-in forwards;
}

@media (min-width: 600px) {
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
		width: clamp(380px, 33.333vw, 560px);
	}
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	width: 100%;
	padding-top: 80px;
}

@keyframes ots-menu-slide-in {
	from { transform: translateX(100%); }
	to { transform: translateX(0); }
}

@keyframes ots-menu-slide-out {
	from { transform: translateX(0); }
	to { transform: translateX(100%); }
}

@keyframes ots-menu-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes ots-menu-fade-out {
	from { opacity: 1; }
	to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.ots-logos__track {
		animation: none;
	}

	.wp-block-navigation__responsive-container.is-menu-open::before,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
		animation: none !important;
	}
}

/* Keep the page from shifting sideways when the menu locks scrolling. */
html {
	scrollbar-gutter: stable;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100%;
	gap: 0 !important;
	align-items: stretch !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	border-top: var(--ots-line-thin) solid currentColor;
	width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child {
	border-bottom: var(--ots-line-thin) solid currentColor;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 18px 0 !important;
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.1;
	text-decoration: none;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
	text-decoration: underline;
}

.wp-block-navigation__responsive-container-close svg {
	width: 32px;
	height: 32px;
}

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------- */
.ots-footer .ots-logo img {
	width: clamp(200px, 19vw, 286px);
	height: auto;
	display: block;
}

.ots-footer .ots-logo {
	margin: 0;
}

.ots-footer .wp-block-navigation a {
	text-decoration: none;
}

.ots-footer .wp-block-navigation a:hover {
	text-decoration: underline;
}

@media (min-width: 1100px) {
	/* Menu starts on the same line as the text column, like in Figma */
	.ots-footer__inner {
		display: grid !important;
		grid-template-columns: calc(50% - 346.5px) 1fr;
		align-items: center;
	}
}

/* ------------------------------------------------------------------
   Headings
------------------------------------------------------------------- */

/* "Met streep": short accent line under a section title */
.is-style-underlined::after {
	content: "";
	display: block;
	width: min(211px, 60%);
	height: var(--ots-line);
	margin-top: 15px;
	background: var(--ots-accent);
}

.is-style-underlined.has-text-align-center::after {
	margin-inline: auto;
}

.is-style-underlined.has-text-align-right::after {
	margin-left: auto;
}

/* "Gelinieerd": each line of the hero heading sits on a rule */
.is-style-ruled {
	/* One line height, used by both the text and the rules, so they can't drift
	   apart. Rounded to whole pixels where supported (all current browsers):
	   browsers snap text lines to whole pixels, the background doesn't. */
	--ots-rule-lh: 1.151em;
	line-height: var(--ots-rule-lh) !important;
	letter-spacing: -0.01em;
	background-image: linear-gradient(to top, var(--ots-ink) var(--ots-line), transparent var(--ots-line));
	background-size: 100% var(--ots-rule-lh);
	background-repeat: repeat-y;
	background-position: left top;
	padding-bottom: 0;
}

@supports (line-height: round(1.151em, 1px)) {
	.is-style-ruled {
		--ots-rule-lh: round(1.151em, 1px);
	}
}

.is-style-ruled mark {
	background: transparent;
	line-height: inherit;
	vertical-align: baseline;
	padding: 0;
}

/* ------------------------------------------------------------------
   Paragraph styles
------------------------------------------------------------------- */
.is-style-lead {
	font-family: var(--wp--preset--font-family--etna);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.1;
	color: var(--wp--preset--color--black);
}

.is-style-label {
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	text-transform: uppercase;
}


/* ------------------------------------------------------------------
   Buttons
------------------------------------------------------------------- */

/* "Onderstreepte link": uppercase text with a line underneath */
.wp-block-button.is-style-text-link .wp-block-button__link {
	background: transparent !important;
	color: var(--ots-accent);
	padding: 0 0.6em 3px;
	border-radius: 0;
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium);
	text-transform: uppercase;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor) !important;
	background-size: calc(100% - 1.2em) var(--ots-line-thin) !important;
	background-position: center bottom !important;
	background-repeat: no-repeat !important;
}

.wp-block-button.is-style-text-link .wp-block-button__link.has-text-color {
	color: inherit;
}

.wp-block-button.is-style-text-link .wp-block-button__link:hover {
	background-size: 100% var(--ots-line-thin) !important;
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-button.is-style-text-link .wp-block-button__link {
		transition: background-size 0.2s ease;
	}
}

/* ------------------------------------------------------------------
   Separators
------------------------------------------------------------------- */

/* "Spreekballon-lijn": the speech-bubble line from the logo */
.wp-block-separator.is-style-swoosh {
	border: 0 !important;
	width: 100%;
	height: 21px;
	opacity: 1;
	background-color: var(--ots-accent) !important;
	-webkit-mask:
		url("assets/images/swoosh-notch.svg") left top / 114px 21px no-repeat,
		linear-gradient(#000, #000) 113px 0 / calc(100% - 113px) 3px no-repeat;
	mask:
		url("assets/images/swoosh-notch.svg") left top / 114px 21px no-repeat,
		linear-gradient(#000, #000) 113px 0 / calc(100% - 113px) 3px no-repeat;
}

.wp-block-separator.is-style-swoosh.has-background:not(.has-red-background-color) {
	background-color: currentColor !important;
}

.wp-block-separator.is-style-swoosh.is-short {
	max-width: 253px;
	margin-inline: auto !important;
}

/* ------------------------------------------------------------------
   Quotes
------------------------------------------------------------------- */

/* Testimonial: big centred quote, accent line, attribution */
.wp-block-quote.is-style-testimonial {
	border: 0;
	padding: 0;
	margin-inline: auto;
	text-align: center;
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-size: var(--wp--preset--font-size--quote);
	font-weight: 600;
	line-height: 1.1;
	color: var(--ots-accent);
}

.wp-block-quote.is-style-testimonial p:last-of-type::after {
	content: "";
	display: block;
	width: 170px;
	height: 21px;
	background: currentColor;
	-webkit-mask:
		url("assets/images/swoosh-notch.svg") left top / 114px 21px no-repeat,
		linear-gradient(#000, #000) 113px 0 / calc(100% - 113px) 3px no-repeat;
	mask:
		url("assets/images/swoosh-notch.svg") left top / 114px 21px no-repeat,
		linear-gradient(#000, #000) 113px 0 / calc(100% - 113px) 3px no-repeat;
	margin: 18px auto 0;
}

/* Round portrait of the person quoted */
.ots-quote-portrait {
	margin: 18px auto 0 !important;
	width: 72px;
}

.ots-quote-portrait img {
	width: 72px !important;
	height: 72px !important;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.is-style-slider .ots-quote-portrait {
	margin-left: 30px !important;
}

.wp-block-quote.is-style-testimonial .ots-quote-portrait + cite {
	margin-top: 10px;
}

.wp-block-quote.is-style-testimonial cite {
	display: block;
	margin-top: 17px;
	font-family: var(--wp--preset--font-family--etna);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	font-style: normal;
	line-height: 1.3;
	color: var(--ots-ink);
}

.has-red-background-color .wp-block-quote.is-style-testimonial cite {
	color: inherit;
}

/* Smaller testimonials inside the slider */
.is-style-slider .wp-block-quote.is-style-testimonial {
	text-align: left;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}

.is-style-slider .wp-block-quote.is-style-testimonial p:last-of-type::after {
	width: 140px;
	margin-left: 0;
}

.is-style-slider .wp-block-quote.is-style-testimonial cite {
	font-family: var(--wp--preset--font-family--public-sans);
	font-size: var(--wp--preset--font-size--small);
}

/* Pull quote in articles: red, lines above and below */
.wp-block-pullquote {
	text-align: center;
}

.wp-block-pullquote blockquote::after {
	content: "";
	display: block;
	width: 170px;
	height: 21px;
	background: currentColor;
	-webkit-mask:
		url("assets/images/swoosh-notch.svg") left top / 114px 21px no-repeat,
		linear-gradient(#000, #000) 113px 0 / calc(100% - 113px) 3px no-repeat;
	mask:
		url("assets/images/swoosh-notch.svg") left top / 114px 21px no-repeat,
		linear-gradient(#000, #000) 113px 0 / calc(100% - 113px) 3px no-repeat;
	margin: 18px auto 0;
}

.wp-block-pullquote p {
	font-size: inherit;
	line-height: inherit;
}

/* ------------------------------------------------------------------
   FAQ (core/details)
------------------------------------------------------------------- */
.ots-faq .wp-block-details:first-of-type {
	border-top: 3px solid var(--ots-ink);
}

.wp-block-details summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
	padding-inline: clamp(0px, 2vw, 26px);
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

/* plus icon that turns into a cross */
.wp-block-details summary::after {
	content: "";
	flex: 0 0 29px;
	height: 29px;
	background:
		linear-gradient(var(--ots-ink), var(--ots-ink)) center / 100% 3px no-repeat,
		linear-gradient(var(--ots-ink), var(--ots-ink)) center / 3px 100% no-repeat;
}

.wp-block-details[open]:not(.is-closing) summary {
	color: var(--ots-red);
}

.wp-block-details[open]:not(.is-closing) summary::after {
	transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-details summary {
		transition: color 0.25s ease;
	}

	.wp-block-details summary::after {
		transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
	}
}

.wp-block-details > :not(summary) {
	max-width: 870px;
	margin-inline: auto;
	padding-inline: 20px;
}

.wp-block-details > summary + * {
	margin-top: 26px;
}

/* ------------------------------------------------------------------
   Hero images
------------------------------------------------------------------- */
.ots-hero img {
	width: 100%;
	min-height: 320px;
	max-height: 75vh;
	object-fit: cover;
}



/* Programme page without a featured image: keep the title off the header */
main > .wp-block-post-title:first-child {
	margin-top: var(--wp--preset--spacing--60);
}

/* ------------------------------------------------------------------
   Training cards (homepage)
------------------------------------------------------------------- */
.ots-cards {
	gap: 22px !important;
}

.ots-card {
	height: 100%;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
}

.ots-card > * {
	margin-block: 0 !important;
}

.ots-card > .wp-block-image img {
	width: 100%;
	aspect-ratio: 454 / 261;
	object-fit: cover;
	display: block;
}

.ots-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ots-card__body > .wp-block-buttons {
	margin-top: auto !important;
	padding-top: 30px;
}

.ots-card h3 {
	font-size: clamp(34px, 3.4vw, 55px);
	/* Dutch sites hyphenate long words; anything still too long wraps. */
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: auto;
	text-transform: uppercase;
	line-height: 0.98;
}

.ots-card .wp-block-list {
	padding-left: 1.3em;
}

/* ------------------------------------------------------------------
   Post cards ("Overzicht met kaarten" template)
------------------------------------------------------------------- */
.ots-post-grid .wp-block-post-template {
	align-items: stretch;
}

.ots-post-grid .wp-block-post-featured-image {
	margin: 0;
}

.ots-post-grid .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ots-post-grid .ots-card h2 {
	font-size: clamp(26px, 2.4vw, 36px);
	line-height: 1;
	text-transform: uppercase;
	/* Dutch sites hyphenate long words; anything still too long wraps. */
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: auto;
}

.ots-post-grid .ots-card h2 a {
	text-decoration: none;
}

.ots-post-grid .ots-card h2 a:hover {
	text-decoration: underline;
	color: inherit;
}

.ots-post-grid .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.ots-post-grid .wp-block-read-more {
	margin-top: auto !important;
	padding: 24px 0.6em 3px 0;
	align-self: flex-start;
	color: inherit;
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-size: var(--wp--preset--font-size--medium);
	text-transform: uppercase;
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) left bottom / calc(100% - 0.6em) var(--ots-line-thin) no-repeat;
}

.ots-post-grid .wp-block-read-more:hover {
	color: inherit;
	background-size: 100% var(--ots-line-thin);
}

@media (min-width: 600px) and (max-width: 960px) {
	.ots-post-grid .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* ------------------------------------------------------------------
   Programme info box
------------------------------------------------------------------- */
.ots-infobox .ots-infobox__row {
	gap: 14px !important;
	align-items: flex-start !important;
}

.ots-infobox .ots-infobox__row .wp-block-image {
	flex: 0 0 26px;
	margin: 0;
	display: flex;
	justify-content: center;
}

.ots-infobox .ots-infobox__row .wp-block-image img {
	width: auto;
	height: 22px;
}

.ots-infobox .ots-infobox__row p {
	margin: 0;
}

/* ------------------------------------------------------------------
   Testimonial slider
------------------------------------------------------------------- */
.ots-slider {
	position: relative;
	padding-inline: clamp(0px, 7vw, 130px);
}

.is-style-slider {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: clamp(40px, 9vw, 140px) !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.is-style-slider::-webkit-scrollbar {
	display: none;
}

.is-style-slider > * {
	flex: 0 0 100%;
	scroll-snap-align: start;
	margin: 0 !important;
}

@media (min-width: 900px) {
	.is-style-slider > * {
		flex-basis: calc(50% - clamp(40px, 9vw, 140px) / 2);
	}
}

.ots-slider__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.ots-slider__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

@media (prefers-reduced-motion: no-preference) {
	.ots-slider__btn svg {
		transition: transform 0.2s ease;
	}

	.ots-slider__btn--prev:not(:disabled):hover svg {
		transform: translateX(-4px);
	}

	.ots-slider__btn--next:not(:disabled):hover svg {
		transform: translateX(4px);
	}
}

.ots-slider__btn[hidden] {
	display: none;
}

.ots-slider__btn--prev {
	left: 0;
}

.ots-slider__btn--next {
	right: 0;
}

@media (max-width: 700px) {
	.ots-slider {
		padding-bottom: 60px;
	}

	.ots-slider__btn {
		top: auto;
		bottom: 0;
		transform: none;
	}

	.ots-slider__btn--prev {
		left: calc(50% - 54px);
	}

	.ots-slider__btn--next {
		right: calc(50% - 54px);
	}
}

/* ------------------------------------------------------------------
   Post lists ("Andere verhalen", blog index)
------------------------------------------------------------------- */
.ots-post-list .wp-block-post-template {
	border-top: 3px solid var(--ots-ink);
}

.ots-post-list .wp-block-post {
	border-bottom: 3px solid var(--ots-ink);
	padding: 22px clamp(0px, 2vw, 21px);
	margin: 0;
}

.ots-post-list .wp-block-post-title {
	font-size: var(--wp--preset--font-size--xx-large);
	text-transform: uppercase;
	color: var(--ots-ink);
	line-height: 1.3;
	margin: 0;
}

.ots-post-list .wp-block-post-title a {
	text-decoration: none;
}

.ots-post-list .wp-block-post-title a:hover {
	color: var(--ots-red);
}

.ots-post-list .wp-block-post-date {
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1.3;
	color: var(--ots-red);
	white-space: nowrap;
}

/* ------------------------------------------------------------------
   Article meta and share link
------------------------------------------------------------------- */
.ots-byline > * {
	margin: 0;
}

.ots-share .wp-block-button.is-style-text-link .wp-block-button__link::after {
	content: "";
	display: inline-block;
	width: 17px;
	height: 18px;
	margin-left: 12px;
	vertical-align: -2px;
	background: url("assets/icons/share.svg") center / contain no-repeat;
}

.ots-share .wp-block-button.is-style-text-link .wp-block-button__link {
	color: var(--wp--preset--color--black) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	padding-left: 0 !important;
	background-image: linear-gradient(var(--ots-red), var(--ots-red)) !important;
	background-size: 100% var(--ots-line-thin) !important;
	background-position: left bottom !important;
}

/* ------------------------------------------------------------------
   Contact form on red (works with Contact Form 7, WPForms, Gravity
   Forms, Fluent Forms and plain core markup)
------------------------------------------------------------------- */
.ots-form {
	max-width: 536px;
	margin-inline: auto;
	color: #fff;
}

.ots-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea, select) {
	width: 100%;
	box-sizing: border-box;
	background: transparent;
	color: #fff;
	border: 2px solid #fff;
	border-radius: 0;
	padding: 10px 15px;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
}

.ots-form :is(input, textarea)::placeholder {
	color: #fff;
	opacity: 0.85;
}

.ots-form textarea {
	min-height: 134px;
}

.ots-form :is(input[type="submit"], button[type="submit"], .wpforms-submit, .gform_button) {
	display: block;
	margin: 24px auto 0;
	background: transparent !important;
	color: #fff !important;
	border: 0 !important;
	border-bottom: 2px solid #fff !important;
	border-radius: 0;
	padding: 0 20px 4px !important;
	font-family: var(--wp--preset--font-family--etna-condensed);
	font-size: var(--wp--preset--font-size--medium);
	text-transform: uppercase;
	cursor: pointer;
}

.ots-form-placeholder {
	border: 2px dashed #fff;
	padding: 24px;
	text-align: center;
}

/* ------------------------------------------------------------------
   Clients list
------------------------------------------------------------------- */
.ots-clients mark {
	background: transparent;
}

/* ------------------------------------------------------------------
   Small screens
------------------------------------------------------------------- */
@media (max-width: 781px) {
	.ots-header .ots-lang {
		font-size: 18px;
	}

	.wp-block-details summary {
		gap: 16px;
	}

	.ots-post-list .wp-block-post > .wp-block-group {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 4px !important;
	}

	.ots-post-list .wp-block-post-date {
		font-size: var(--wp--preset--font-size--large);
	}
}

/* Header, main and footer sit flush against each other */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ------------------------------------------------------------------
   Footer: contact details and newsletter
------------------------------------------------------------------- */
.ots-footer__details {
	border-top: var(--ots-line-thin) solid currentColor;
	padding-top: var(--wp--preset--spacing--40);
}

.ots-footer__details > * {
	flex: 1 1 280px;
	max-width: 520px;
}

.ots-footer__title {
	font-size: var(--wp--preset--font-size--large);
	margin-bottom: 10px;
}

.ots-footer p {
	margin-block: 0 12px;
}

.ots-footer a {
	color: inherit;
}

@media (min-width: 1100px) {
	.ots-footer__details {
		display: grid !important;
		grid-template-columns: calc(50% - 346.5px) 1fr;
		align-items: start;
	}

	.ots-footer__details > * {
		max-width: none;
	}

	.ots-footer__newsletter {
		max-width: 536px !important;
	}
}

/* Laposta (or any) newsletter form: one email field and a submit button */
.ots-newsletter form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: stretch;
}

.ots-newsletter label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.ots-newsletter input[type="email"],
.ots-newsletter input[type="text"] {
	flex: 1 1 220px;
	min-width: 0;
	background: transparent;
	color: #fff;
	border: 2px solid #fff;
	border-radius: 0;
	padding: 10px 15px;
	font: inherit;
}

.ots-newsletter input::placeholder {
	color: #fff;
	opacity: 0.85;
}

.ots-newsletter :is(input[type="submit"], button) {
	background: #fff;
	color: var(--wp--preset--color--black);
	border: 2px solid #fff;
	border-radius: 0;
	padding: 10px 18px;
	font-family: var(--wp--preset--font-family--etna);
	font-size: var(--wp--preset--font-size--medium);
	cursor: pointer;
}

.ots-newsletter :is(input[type="submit"], button):hover {
	background: transparent;
	color: #fff;
}

.ots-newsletter__placeholder {
	border: 2px dashed #fff;
	padding: 14px;
}

/* ------------------------------------------------------------------
   Logo carousel ("Samenwerkingen")
------------------------------------------------------------------- */
.ots-logos {
	gap: clamp(40px, 6vw, 90px) !important;
	flex-wrap: wrap !important;
	align-items: center !important;
}

.ots-logos .wp-block-image {
	margin: 0;
	flex: 0 0 auto;
}

.ots-logos img {
/* 	height: clamp(44px, 5vw, 70px); */
	max-height:125px;
	width: auto;
	max-width: 220px;
	object-fit: contain;
}

.ots-logos.is-moving {
	flex-wrap: nowrap !important;
	justify-content: flex-start !important;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ots-logos__track {
	display: flex;
	align-items: center;
	gap: clamp(40px, 6vw, 90px);
	padding-right: clamp(40px, 6vw, 90px);
	width: max-content;
	animation: ots-logos-scroll var(--ots-logos-duration, 30s) linear infinite;
}

.ots-logos.is-moving:hover .ots-logos__track {
	animation-play-state: paused;
}

@keyframes ots-logos-scroll {
	to {
		transform: translateX(-50%);
	}
}

/* ------------------------------------------------------------------
   "Andere trainingen" on training pages (2 cards)
------------------------------------------------------------------- */
.ots-post-grid .ots-card h3 {
	font-size: clamp(26px, 2.4vw, 36px);
	line-height: 1;
	text-transform: uppercase;
	overflow-wrap: break-word;
	hyphens: auto;
}

.ots-post-grid .ots-card h3 a {
	text-decoration: none;
}

.ots-other-trainings .wp-block-post-template.is-layout-grid {
	max-width: 930px;
	margin-inline: auto;
}

/* ------------------------------------------------------------------
   Tighter spacing on phones
------------------------------------------------------------------- */
@media (max-width: 600px) {
	.ots-card__body {
		padding: 22px 22px 28px !important;
	}

	.wp-block-post-featured-image.alignfull {
		margin-bottom: 20px !important;
	}

	.wp-block-post-title {
		margin-bottom: 0;
	}

	.is-style-underlined::after {
		margin-top: 10px;
	}

	.ots-faq .wp-block-heading {
		margin-bottom: var(--wp--preset--spacing--40) !important;
	}

	.wp-block-details {
		padding-block: 16px !important;
	}

	.ots-footer {
		padding-top: 36px !important;
		padding-bottom: 40px !important;
	}
}


/* Header with language switcher: keep everything fitting on phones */
.ots-header > .wp-block-group {
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	column-gap: 12px;
}

/* Switcher in the left column of the header bar */
.ots-header .pll-switcher {
	grid-column: 1;
	justify-self: start;
	position: relative;
}

/* Header with language switcher */
.ots-header > .wp-block-group {
	column-gap: 12px;
}

.ots-header .pll-switcher {
	grid-column: 1;
	justify-self: start;
	position: relative;
}

/* The dropdown floats over the page instead of making the header taller */
.ots-header .pll-switcher ul {
	position: absolute;
	top: 100%;
	left: 0;
}

@media (max-width: 600px) {
	/* Two equal side columns, so the logo sits exactly in the middle of the screen */
	.ots-header > .wp-block-group {
		--ots-header-side: 64px;
		grid-template-columns: var(--ots-header-side) minmax(0, 1fr) var(--ots-header-side) !important;
	}

	.ots-header .ots-header__end {
		justify-self: end;
	}

	/* The link fills the middle column and centres the logo inside it */
	.ots-header .ots-logo {
		justify-self: stretch;
		min-width: 0;
		display: flex;
		justify-content: center;
	}

	.ots-header .ots-logo svg {
		width: min(var(--ots-logo-w), 100%);
		height: auto;
		flex: 0 1 auto;
	}

	:root {
		--ots-logo-w: clamp(170px, 46vw, 230px);
	}

	body.is-scrolled {
		--ots-logo-w: clamp(140px, 38vw, 190px);
	}

	.ots-header .pll-switcher {
		font-size: 18px;
	}

	.ots-header .wp-block-navigation__responsive-container-open {
		width: 40px;
	}

	.ots-header .wp-block-navigation__responsive-container-open::before {
		width: 34px;
	}
}

/* Nothing on the page can make it wider than the screen */
.wp-site-blocks {
	overflow-x: clip;
}