.diensten { padding: 72px 0; background-color: var(--swo-color-background-soft); background-image: var(--swo-motif); background-size: var(--swo-motif-size); background-position: var(--swo-motif-position); }
.diensten__header { max-width: 760px; margin-bottom: 34px; }
.diensten__title { margin: 0; color: var(--swo-color-heading); font-size: clamp(32px, 3vw, 42px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; text-wrap: pretty; }
.diensten__intro { max-width: 680px; margin-top: 14px; color: var(--swo-color-text); font-size: 18px; line-height: 1.65; }
.diensten__intro p { margin: 0; }
/* Kaarten naast elkaar (veld in het blok, 30-10-2026): 3 t/m 6 op een groot scherm, via een class op de sectie. */
.diensten--kolommen-4 { --diensten-kolommen: 4; }
.diensten--kolommen-5 { --diensten-kolommen: 5; }
.diensten--kolommen-6 { --diensten-kolommen: 6; }
.diensten__grid { display: grid; grid-template-columns: repeat(var(--diensten-kolommen, 3), minmax(0, 1fr)); gap: 24px; }
.diensten-card { min-width: 0; height: 100%; transform-origin: center top; }
.diensten-card__link { position: relative; overflow: hidden; display: flex; height: 100%; flex-direction: column; color: var(--swo-color-heading); background: var(--swo-color-card); border: 1px solid #D8D8D8; border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .06); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.diensten-card__link::before { position: absolute; z-index: 4; top: 0; right: 0; left: 0; height: 6px; content: ""; background: var(--dienst-color, var(--swo-color-primary-dark)); }
.diensten-card__link:hover { color: var(--swo-color-heading); border-color: var(--dienst-color, var(--swo-color-primary-dark)); box-shadow: 0 8px 24px rgba(0, 0, 0, .11); transform: translateY(-4px); text-decoration: none; }
.diensten-card__link:focus-visible { outline: 3px solid var(--swo-color-focus); outline-offset: 4px; }
.diensten-card__media { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 7; background: #EDEAE5; }
.diensten-card__image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.diensten-card__link:hover .diensten-card__image { transform: scale(1.03); }
.diensten-card__placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #F2EEE8 0%, #E6E0D8 100%); }
.diensten-card__content { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 16px; min-height: 176px; flex: 1; padding: 20px 22px 18px; }
.diensten-card__icon { position: relative; z-index: 3; grid-column: 1; grid-row: 1 / span 3; display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-top: -49px; color: var(--swo-color-white); background: var(--dienst-color, var(--swo-color-primary-dark)); border: 4px solid var(--swo-color-card); border-radius: 50%; box-shadow: 0 3px 10px rgba(0, 0, 0, .12); }
.diensten-card__icon svg { display: block; width: 30px; height: 30px; }
.diensten-card__icon .kami-icon { width: 30px; height: 30px; }
.diensten-card__icon .dashicons { width: 30px; height: 30px; font-size: 30px; line-height: 1; }
.diensten-card__title { grid-column: 2; grid-row: 1; align-self: start; margin: 0; color: var(--swo-color-heading); font-size: 21px; line-height: 1.2; font-weight: 700; text-wrap: balance; }
.diensten-card__description { grid-column: 2; grid-row: 2; margin: 7px 0 0; color: var(--swo-color-text); font-size: 17px; line-height: 1.45; }
.diensten-card__cta { display: inline-flex; grid-column: 2; grid-row: 3; align-self: end; align-items: center; justify-self: start; gap: 8px; margin-top: 12px; color: var(--dienst-color, var(--swo-color-primary-dark)); font-size: 17px; line-height: 1.3; font-weight: 700; }
.diensten-card__arrow { display: block; width: 22px; height: 22px; flex: 0 0 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px 22px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px 22px no-repeat; transition: transform .2s ease; }
.diensten-card__link:hover .diensten-card__arrow { transform: translateX(4px); }
.diensten__footer { display: flex; justify-content: flex-end; margin-top: 24px; }
.diensten__all { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; color: var(--swo-color-primary-dark); font-size: 18px; line-height: 1.3; font-weight: 700; text-decoration: none; }
.diensten__all:hover { color: var(--swo-color-heading); text-decoration: none; }
.diensten__all:focus-visible { outline: 3px solid var(--swo-color-focus); outline-offset: 4px; }
.diensten__all-arrow { display: block; width: 24px; height: 24px; flex: 0 0 24px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px 24px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px 24px no-repeat; transition: transform .2s ease; }
.diensten__all:hover .diensten__all-arrow { transform: translateX(4px); }

/* Bij 5 of 6 naast elkaar is een kaart smal: het icoon staat boven de titel en de tekst is iets kleiner. */
@media (min-width: 1201px) {
	.diensten--kolommen-5 .diensten__grid, .diensten--kolommen-6 .diensten__grid { gap: 20px; }
	.diensten--kolommen-5 .diensten-card__media, .diensten--kolommen-6 .diensten-card__media { aspect-ratio: 16 / 9; }
	.diensten--kolommen-5 .diensten-card__content, .diensten--kolommen-6 .diensten-card__content { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; min-height: 0; padding: 18px; }
	.diensten--kolommen-5 .diensten-card__icon, .diensten--kolommen-6 .diensten-card__icon { grid-column: 1; grid-row: 1; width: 52px; height: 52px; margin: -44px 0 10px; }
	.diensten--kolommen-5 .diensten-card__icon svg, .diensten--kolommen-6 .diensten-card__icon svg, .diensten--kolommen-5 .diensten-card__icon .kami-icon, .diensten--kolommen-6 .diensten-card__icon .kami-icon { width: 26px; height: 26px; }
	.diensten--kolommen-5 .diensten-card__title, .diensten--kolommen-6 .diensten-card__title { grid-column: 1; grid-row: 2; font-size: 19px; }
	.diensten--kolommen-5 .diensten-card__description, .diensten--kolommen-6 .diensten-card__description { grid-column: 1; grid-row: 3; font-size: 16px; line-height: 1.45; }
	.diensten--kolommen-5 .diensten-card__cta, .diensten--kolommen-6 .diensten-card__cta { grid-column: 1; grid-row: 4; font-size: 16px; }
}

/* Zonder foto (veld "Foto" in het blok): het icoon valt niet over een foto heen maar staat gewoon in de kaart. */
.diensten--zonder-foto .diensten-card__content { padding-top: 26px; }
.diensten--zonder-foto .diensten-card__icon { margin-top: 0; box-shadow: none; }
@media (min-width: 1201px) {
	.diensten--zonder-foto.diensten--kolommen-5 .diensten-card__icon, .diensten--zonder-foto.diensten--kolommen-6 .diensten-card__icon { margin-top: 0; }
}

/* Kleiner scherm: hooguit 3 naast elkaar, dan 2, op een telefoon 1. */
@media (max-width: 1200px) {
	.diensten--kolommen-4, .diensten--kolommen-5, .diensten--kolommen-6 { --diensten-kolommen: 3; }
}

@media (max-width: 1000px) {
	.diensten__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

@media (max-width: 700px) {
	.diensten { padding: 54px 0; }
	.diensten__header { margin-bottom: 26px; }
	.diensten__title { font-size: clamp(30px, 7vw, 38px); }
	.diensten__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.diensten-card__media { aspect-ratio: 16 / 7; }
	.diensten-card__content { min-height: 166px; }
	.diensten__footer { justify-content: flex-start; margin-top: 20px; }
}

@media (max-width: 500px) {
	.diensten-card__media { aspect-ratio: 16 / 8; }
	.diensten-card__content { grid-template-columns: 50px minmax(0, 1fr); column-gap: 14px; min-height: 0; padding: 18px; }
	.diensten-card__icon { width: 50px; height: 50px; margin-top: -43px; border-width: 3px; }
	.diensten-card__icon svg { width: 26px; height: 26px; }
	.diensten-card__icon .kami-icon { width: 26px; height: 26px; }
	.diensten-card__icon .dashicons { width: 26px; height: 26px; font-size: 26px; }
	.diensten-card__title { font-size: 20px; }
	.diensten-card__description { font-size: 16px; line-height: 1.5; }
	.diensten-card__cta { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.diensten-card__link, .diensten-card__image, .diensten-card__media::after, .diensten-card__arrow, .diensten__all-arrow { transition: none; }
	.diensten-card__link:hover { transform: none; }
	.diensten-card__link:hover .diensten-card__image { transform: none; }
	.diensten-card__link:hover .diensten-card__arrow { transform: none; }
	.diensten__all:hover .diensten__all-arrow { transform: none; }
}
/*
 * Buiten de homepage: het blok Diensten heeft de kaarten van het blok Kaarten (assets/css/blokken/kaarten.css, 30-10-2026).
 * Hier alleen het aantal naast elkaar (3 t/m 6 op een groot scherm) en iets kleinere tekst als de kaarten smal zijn.
 */
.blok-diensten .blok-kaarten__raster { grid-template-columns: repeat(var(--diensten-kolommen, 3), minmax(0, 1fr)); }
.blok-diensten .blok-kaarten__raster > .blok-kaart:only-child { max-width: none; }

@media (min-width: 1201px) {
	.blok-diensten.diensten--kolommen-5 .blok-kaarten__raster, .blok-diensten.diensten--kolommen-6 .blok-kaarten__raster { gap: 18px; }
	.blok-diensten.diensten--kolommen-5 .blok-kaart__inhoud, .blok-diensten.diensten--kolommen-6 .blok-kaart__inhoud { padding: 18px; }
	.blok-diensten.diensten--kolommen-5 .blok-kaart__titel, .blok-diensten.diensten--kolommen-6 .blok-kaart__titel { font-size: 19px; }
	.blok-diensten.diensten--kolommen-5 .blok-kaart__tekst, .blok-diensten.diensten--kolommen-6 .blok-kaart__tekst { font-size: 16px; line-height: 1.5; }
	.blok-diensten.diensten--kolommen-5 .blok-kaart__meer, .blok-diensten.diensten--kolommen-6 .blok-kaart__meer { font-size: 16px; }
}

@media (max-width: 1000px) {
	.blok-diensten .blok-kaarten__raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.blok-diensten .blok-kaarten__raster { grid-template-columns: minmax(0, 1fr); }
}
