/* ===========================================================================
   Courses and workshops page, design canvas "Rådgivning – Kurs og
   workshops" (2026-10-07)
   ===========================================================================
   Loaded only on pages whose content uses the `cq-kw-` sections (see
   inc/page-workshops.php), so nothing here reaches other pages. Values
   follow the canvas and the Certain QMS Web Design System it was built with:
   white hero with breadcrumb and photo, a mist section with a white panel of
   three rows (icon, heading, text, pills), a photo with an overlapping grey
   card, and a full-bleed indigo-900 CTA band. Breakpoints as on the other
   canvas pages: tablet below 1024px, phone below 600px.

   Spacing comes from flex/grid `gap`, so block margins inside these sections
   are reset, as on the contact and training pages. */

.cq-main {
	/* Same gutter as the header/footer (theme.json root padding). */
	--cq-kw-gutter: var(--wp--style--root--padding-left, clamp(24px, 5.56vw, 80px));
	--cq-kw-section: clamp(64px, 8vw, 112px);
	--cq-kw-muted: #3f4947;
	--cq-kw-radius: 16px;
}

.wp-block-post-content > .cq-kw-s {
	margin-block: 0 !important;
}

.cq-main .cq-kw-s :where(h1, h2, h3, p, ul, li, figure, .wp-block-buttons, .wp-block-group) {
	margin: 0 !important;
}

.cq-main .cq-kw-s {
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.cq-main .cq-kw-wrap {
	box-sizing: border-box;
	margin-inline: auto !important;
	/* 1200px of content, like the header and footer (contentSize). */
	max-width: calc(1200px + 2 * var(--cq-kw-gutter));
	padding-inline: var(--cq-kw-gutter);
}

/* --- Shared type ------------------------------------------------------------ */

.cq-main .cq-kw-eyebrow {
	color: var(--cq-navy);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.cq-main .cq-kw-h1 {
	color: var(--cq-ink);
	font-size: clamp(34px, 4.4vw, 56px);
	font-weight: 500;
	letter-spacing: -0.022em;
	line-height: 1.08;
	text-wrap: balance;
}

.cq-main .cq-kw-lead {
	color: var(--cq-kw-muted);
	font-size: 20px;
	line-height: 1.6;
	max-width: 520px;
}

.cq-main .cq-kw-lead--dark {
	color: #232323;
	max-width: none;
}

.cq-main .cq-kw-h2 {
	color: var(--cq-ink);
	font-size: clamp(28px, 3.2vw, 40px) !important;
	font-weight: 500;
	letter-spacing: -0.016em;
	line-height: 1.15;
	text-wrap: balance;
}

.cq-main .cq-kw-h2--large {
	font-size: clamp(32px, 3.6vw, 48px) !important;
	line-height: 1.08;
}

.cq-main .cq-kw-text {
	color: #232323;
	font-size: 18px;
	line-height: 1.7;
}

/* --- Buttons ---------------------------------------------------------------- */
/* `!important` here: the theme's catch-all button rule chains ten :not()s,
   which outranks any reasonable page-scoped selector. */

.cq-main .cq-kw-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.cq-main .cq-kw-s .wp-block-button > .wp-block-button__link {
	align-items: center;
	box-shadow: none !important;
	box-sizing: border-box;
	display: inline-flex;
	font-family: inherit;
	font-size: 17px !important;
	font-weight: 500 !important;
	justify-content: center;
	letter-spacing: 0;
	line-height: 1.2 !important;
	min-height: 52px !important;
	padding: 14px 26px !important;
	text-decoration: none;
	transition: background-color 120ms var(--cq-ease), border-color 120ms var(--cq-ease), color 120ms var(--cq-ease);
}

.cq-main .cq-kw-s .wp-block-button > .wp-block-button__link:focus-visible {
	outline: 2px solid var(--cq-blue);
	outline-offset: 2px;
}

/* Secondary: white, hairline, Certain blue text; mist on hover. */
.cq-main .cq-kw-s .cq-kw-btn--secondary > .wp-block-button__link {
	background-color: #ffffff !important;
	border: 1px solid var(--cq-border) !important;
	border-radius: var(--cq-radius-sm) !important;
	color: var(--cq-blue) !important;
}

.cq-main .cq-kw-s .cq-kw-btn--secondary > .wp-block-button__link:hover {
	background-color: var(--cq-mist) !important;
	border-color: var(--cq-blue) !important;
	color: var(--cq-blue) !important;
}

/* White button on the indigo CTA band. */
.cq-main .cq-kw-cta .cq-kw-btn--light > .wp-block-button__link {
	background-color: #ffffff !important;
	border: 1px solid #ffffff !important;
	border-radius: var(--cq-radius-sm) !important;
	color: var(--cq-ink) !important;
	font-size: 16px !important;
	min-height: 48px !important;
	padding: 12px 22px !important;
}

.cq-main .cq-kw-cta .cq-kw-btn--light > .wp-block-button__link:hover {
	background-color: var(--cq-sky) !important;
	border-color: var(--cq-sky) !important;
}

.cq-main .cq-kw-cta .wp-block-button > .wp-block-button__link:focus-visible {
	outline-color: var(--cq-sky);
}

/* --- Hero ------------------------------------------------------------------- */

.cq-main .cq-kw-hero {
	background-color: #ffffff;
	border-bottom: 1px solid var(--cq-border);
	padding-block: var(--cq-crumb-top) 80px;
}

.cq-main .cq-kw-hero .cq-breadcrumb ol {
	margin: 0;
}

.cq-main .cq-kw-hero__grid {
	/* Copy starts --cq-crumb-gap below the breadcrumb, as on every hero. */
	align-items: start;
	display: grid;
	gap: 32px;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	padding-top: var(--cq-crumb-gap);
}

.cq-main .cq-kw-hero__copy {
	display: flex;
	flex-direction: column;
	gap: 20px;
	grid-column: 1 / span 6;
}

.cq-main .cq-kw-hero .cq-kw-actions {
	padding-top: 12px;
}

.cq-main .cq-kw-hero__media {
	grid-column: 7 / span 6;
}

.cq-main .cq-kw-hero__media img {
	aspect-ratio: 4 / 3;
	border: 1px solid var(--cq-border);
	border-radius: var(--cq-kw-radius);
	box-sizing: border-box;
	display: block;
	height: auto;
	object-fit: cover;
	object-position: 50% 30%;
	width: 100%;
}

/* --- Tailored training: copy + white panel on mist -------------------------- */

.cq-main .cq-kw-tailored {
	background-color: var(--cq-mist);
	padding-block: var(--cq-kw-section);
}

.cq-main .cq-kw-tailored__grid {
	align-items: center;
	display: grid;
	gap: 32px;
	grid-template-columns: repeat(12, minmax(0, 1fr));
}

.cq-main .cq-kw-tailored__copy {
	display: flex;
	flex-direction: column;
	gap: 24px;
	grid-column: 1 / span 5;
	padding-right: 16px;
}

.cq-main .cq-kw-panel {
	background-color: #ffffff;
	border-radius: var(--cq-kw-radius);
	box-shadow: var(--cq-shadow-md);
	grid-column: 6 / span 7;
	overflow: hidden;
}

.cq-main .cq-kw-row {
	display: grid;
	gap: 16px;
	grid-template-columns: 28px minmax(0, 1fr);
	padding: 32px 36px;
}

.cq-main .cq-kw-row + .cq-kw-row {
	border-top: 1px solid var(--cq-border);
}

.cq-main .cq-kw-row__icon {
	color: var(--cq-blue);
	display: flex;
	height: 28px;
	width: 28px;
}

.cq-main .cq-kw-row__icon::before {
	background-color: currentColor;
	content: "";
	height: 24px;
	-webkit-mask: var(--cq-icon) center / contain no-repeat;
	mask: var(--cq-icon) center / contain no-repeat;
	width: 24px;
}

/* Lucide-style glyphs, 24px, 1.5px stroke, as in the canvas. */
.cq-kw-icon--users {
	--cq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.cq-kw-icon--clipboard {
	--cq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");
}

.cq-kw-icon--settings {
	--cq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.cq-main .cq-kw-row__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cq-main .cq-kw-row__title {
	color: var(--cq-ink);
	font-size: 21px !important;
	font-weight: 500;
	line-height: 1.3;
}

.cq-main .cq-kw-row__text {
	color: #232323;
	font-size: 16px;
	line-height: 1.65;
}

.cq-main .cq-kw-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 8px 0 0 !important;
	padding: 0;
}

.cq-main .cq-kw-pill {
	align-items: center;
	background-color: #ffffff;
	border: 1px solid var(--cq-border);
	border-radius: var(--cq-radius-pill);
	box-sizing: border-box;
	color: var(--cq-ink);
	display: inline-flex;
	font-size: 14px;
	font-weight: 500;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
}

.cq-main .cq-kw-pill--on {
	background-color: var(--cq-blue);
	border-color: var(--cq-blue);
	color: #ffffff;
}

/* The checkmark in a highlighted pill. */
.cq-main .cq-kw-pill--on::before {
	background-color: currentColor;
	content: "";
	height: 16px;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	width: 16px;
}

/* --- Sessions: photo with an overlapping card -------------------------------- */

.cq-main .cq-kw-sessions {
	background-color: #ffffff;
	padding-block: var(--cq-kw-section);
}

.cq-main .cq-kw-sessions__grid {
	align-items: center;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
}

.cq-main .cq-kw-sessions__media {
	grid-column: 1 / span 8;
	grid-row: 1;
}

.cq-main .cq-kw-sessions__media img {
	aspect-ratio: 16 / 10;
	border-radius: var(--cq-kw-radius);
	display: block;
	height: auto;
	object-fit: cover;
	object-position: 50% 40%;
	width: 100%;
}

.cq-main .cq-kw-sessions__card {
	background-color: #f5f5f5;
	border-radius: var(--cq-kw-radius);
	box-shadow: 0 4px 8px rgba(6, 12, 49, 0.04), 0 20px 48px rgba(178, 77, 21, 0.12);
	display: flex;
	flex-direction: column;
	gap: 20px;
	grid-column: 7 / span 6;
	grid-row: 1;
	padding: 56px;
	position: relative;
	z-index: 1;
}

.cq-main .cq-kw-sessions__card .cq-kw-actions {
	padding-top: 4px;
}

/* --- CTA band ---------------------------------------------------------------- */

.cq-main .cq-kw-cta {
	background-color: var(--cq-indigo-900);
	padding-block: var(--cq-kw-section);
}

.cq-main .cq-kw-cta__inner {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 32px;
	text-align: center;
}

.cq-main .cq-kw-cta__copy {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 760px;
}

.cq-main .cq-kw-cta__eyebrow {
	color: var(--cq-sky);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.cq-main .cq-kw-cta__title {
	color: #ffffff;
	font-size: clamp(26px, 3vw, 36px) !important;
	font-weight: 500;
	letter-spacing: -0.016em;
	line-height: 1.2;
	text-wrap: balance;
}

.cq-main .cq-kw-cta__lead {
	color: #ffffff;
	font-size: 17px;
	line-height: 1.6;
	margin-top: 4px !important;
	max-width: 60ch;
}

.cq-main .cq-kw-cta .cq-kw-actions {
	justify-content: center;
}

/* --- Tablet: stack, text before the image ------------------------------------ */

@media (max-width: 1023.98px) {
	.cq-main .cq-kw-hero {
		padding-bottom: 64px;
	}

	.cq-main .cq-kw-hero__grid,
	.cq-main .cq-kw-tailored__grid {
		gap: 40px;
		grid-template-columns: minmax(0, 1fr);
	}

	.cq-main .cq-kw-hero__copy,
	.cq-main .cq-kw-hero__media,
	.cq-main .cq-kw-tailored__copy,
	.cq-main .cq-kw-panel {
		grid-column: 1;
	}

	.cq-main .cq-kw-tailored__copy {
		padding-right: 0;
	}

	.cq-main .cq-kw-hero__media img {
		aspect-ratio: 16 / 10;
	}

	/* The card overlaps the bottom of the photo instead of its side. */
	.cq-main .cq-kw-sessions__media,
	.cq-main .cq-kw-sessions__card {
		grid-column: 1 / -1;
	}

	.cq-main .cq-kw-sessions__card {
		grid-row: 2;
		margin: -64px 32px 0 !important;
		padding: 40px;
	}
}

/* --- Phone ------------------------------------------------------------------- */

@media (max-width: 599.98px) {
	.cq-main .cq-kw-hero {
		padding-bottom: 56px;
	}

	.cq-main .cq-kw-hero__grid {
		gap: 32px;
	}

	.cq-main .cq-kw-hero__media img {
		aspect-ratio: 4 / 3;
	}

	.cq-main .cq-kw-lead {
		font-size: 18px;
	}

	.cq-main .cq-kw-row {
		grid-template-columns: minmax(0, 1fr);
		padding: 24px 20px;
	}

	.cq-main .cq-kw-sessions__media img {
		aspect-ratio: 4 / 3;
	}

	.cq-main .cq-kw-sessions__card {
		margin: -40px 12px 0 !important;
		padding: 32px 24px;
	}

	.cq-main .cq-kw-text {
		font-size: 17px;
	}

	.cq-main .cq-kw-cta .wp-block-buttons,
	.cq-main .cq-kw-cta .wp-block-button,
	.cq-main .cq-kw-cta .wp-block-button__link {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cq-main .cq-kw-s .wp-block-button > .wp-block-button__link {
		transition: none;
	}
}
