/*
Theme Name: InStrafrecht
Theme URI: https://instrafrecht.nl
Author: Richard van der Meer
Author URI: https://delaque.nl/
Description: Thema voor de website van InStrafrecht
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.1
Version: 1.0
Text Domain: instrafrecht

InStrafrecht, (C) 2024 deLaque.nl
*/

:root {
	--theme-color-1: #B88D3C;
	--theme-color-1-rgb: 184 141 60;
	--theme-color-2: #000000;
	--theme-color-2-rgb: 0 0 0;
	--theme-color-3: #fbdba1;
	--theme-color-3-rgb: 251 219 161;
	--theme-color-black: #0c0b0b;
	--theme-color-black-rgb: 12 11 11;
	--theme-color-white: #ffffff;
	--theme-color-white-rgb: 255 255 255;

	--theme-color-title: var(--theme-color-2);
	--theme-color-title-gradient: linear-gradient(to top, var(--theme-color-1), var(--theme-color-3));
	--theme-color-button-gradient: linear-gradient(to right, var(--theme-color-1), var(--theme-color-3));
	--theme-color-button-text-gradient: var(--theme-color-2);

	--theme-font-size-default: 18px;
	--theme-font-size-small: 16px;
	--theme-font-size-xsmall: 14px;

	--fontsize-title-preset-1: clamp(32px, 2.5vw + 1rem, 50px);
	--fontsize-title-preset-2: clamp(28px, 2vw + 1rem, 44px);
	--fontsize-title-preset-3: clamp(24px, 1.75vw + 1rem, 38px);
	--fontsize-title-preset-4: clamp(22px, 1.5vw + 1rem, 34px);
	--fontsize-title-preset-5: clamp(20px, 1.25vw + 1rem, 30px);
	--fontsize-title-preset-6: clamp(18px, 1.5vw + 1rem, 28px);

	--theme-title-gap: 10px;
}

@property --gradient-start-color {
	syntax: '<color>';
	initial-value: transparent;
	inherits: false;
}

@property --gradient-end-color {
	syntax: '<color>';
	initial-value: transparent;
	inherits: false;
}

body {

}

body:not(.home) {
	padding-top: var(--header-height);
}

.wp-site-blocks :is(h1, h2, h3, h4, h5, h6) {
	line-height: 1.2;
	margin-block-start: 0;
	margin-block-end: 1rem;
	color: var(--theme-color-title);
}

.wp-site-blocks :is(h3, h4, h5, h6) {
	text-transform: none;
}

h1 {
	font-size: var(--fontsize-title-preset-1);
}

h2 {
	font-size: var(--fontsize-title-preset-2);
}

h3 {
	font-size: var(--fontsize-title-preset-3);
}

h4 {
	font-size: var(--fontsize-title-preset-4);
}

h5 {
	font-size: var(--fontsize-title-preset-5);
}

h6 {
	font-size: var(--fontsize-title-preset-6);
}

.wp-block-navigation {
	&.wp-block-navigation__container {
		gap: 2rem;

		a:hover {
			text-decoration: underline;
		}
	}

	.wp-block-navigation__responsive-container-content {
		gap: 2rem;
	}
}

.wp-site-blocks {
	display: grid;
	grid-template: 'header' 'content' 'footer';
}

header.wp-block-template-part {
	position: fixed;
	top: 0;
	grid-area: header;
	width: 100%;
	z-index: 40;

	&::after {
		animation: solidHeaderBackgroundGradient linear both;
		animation-range: 0 10vh;
		animation-timeline: scroll();
		background: var(--theme-color-white);
		border-bottom: .5rem solid transparent;
		content: '';
		height: 100%;
		left: 0;
		position: absolute;
		top: 0;
		width: 100%;
		z-index: -1;
	}


	> div {
		max-width: calc(var(--wp--style--global--wide-size) - 2rem);
		left: 50%;
		transform: translateX(-50%);
	}

	.wp-block-site-logo {
		animation: logoHeaderSize linear both;
		animation-timeline: scroll();
		animation-range: 0 10vh;
		width: clamp(100px, 25vw, 400px);

		@media (width < 600px) {
			animation: logoHeaderSizeMobile linear both;
			animation-timeline: scroll();
			animation-range: 0 10vh;
			width: clamp(100px, 50vw, 400px);
		}
	}
}


@media (width < 1600px) {
	.wp-block-site-logo,
	header nav {
		margin-left: 1rem !important;
	}

	main > .entry-content > *:not(.wp-block-media-text) {
		padding-left: 1.375em;
		padding-right: 1.375em;
	}
}

:where(.wp-block-group.has-background) {
	padding-left: 1.375em;
	padding-right: 1.375em;
}

@keyframes solidHeaderBackgroundGradient {
	0% {
		opacity: 85%;
		border-bottom-color: transparent;
	}
	90% {
		border-bottom-color: transparent;
	}
	100% {
		opacity: 100%;
		border-bottom-color: var(--theme-color-black);
	}
}

@keyframes logoHeaderSize {
	0% {
		width: clamp(100px, 25vw, 400px);
	}
	100% {
		width: clamp(100px, 20vw, 200px);
	}
}

@keyframes logoHeaderSizeMobile {
	0% {
		width: clamp(100px, 50vw, 400px);
	}
	100% {
		width: clamp(100px, 35vw, 250px);
	}
}

.wp-block-template-part:has(>.header-image) {
	margin: 0 auto;
	grid-area: header;
	border-bottom: .675rem solid var(--wp--preset--color--theme-1);
	width: 100%;

	>.header-image {
		height: calc(100vh - .75rem);
		object-fit: contain;
		margin: 0 auto;
		text-align: center;
		overflow: hidden;

		img {
			height: 100%;
			width: 100%;
			object-position: center 75%;
			object-fit: cover;
		}
	}
}

.wp-block-delaque-image-content {
	max-width: 100% !important;
	border-bottom: .675rem solid var(--wp--preset--color--theme-1);
}

.is-layout-grid--persons:where(.is-layout-grid) {
	gap: 2rem;

	@media (width < 768px) {
		grid-template-columns: 1fr !important;
	}
}

.is-layout-grid--persons figure {
	position: relative;
	z-index: 1;
}

.is-layout-grid--persons figure::after {
	content: '';
	display: block;
	width: 100%;
	height: 100%;
	background-color: var(--theme-color-black);
	left: 0;
	position: absolute;
	top: 0;
	z-index: -1;
	transition: left 100ms linear, top 100ms linear;
}

.is-layout-grid--persons figure:hover::after {
	left: .25rem;
	top: .25rem;
}

.is-layout-grid--persons figure img {
	transition: transform 100ms linear;
}

.is-layout-grid--persons figure a:hover img {
	transform: scale(1.05);
}

.is-layout-grid--persons img,
.is-layout-grid--persons figure a {
	display: block;
	overflow: hidden;
}

.wp-block-delaque-image-content__content {
	@media (width < 768px) {
		--wp--style--root--padding-right: 1rem;
		--wp--style--root--padding-left: 1rem;
	}

	@media (width > 600px) {
		padding: 1rem 0 !important
	}

	@media (width > 1024px) {
		padding: 2rem 0 !important
	}
}



.card .card__image img {
	object-fit: cover;
	aspect-ratio: 16 / 9;
	filter: grayscale(1);
	max-width: 100%;
	height: auto;
	object-position: center 20%;
}

.card__legal {
	font-size: var(--theme-font-size-xsmall);
	font-style: italic;
}

.contact {
	list-style: none;
	margin: 0;
	padding: 0 10px;
}

.contact:not(:last-child) {
	margin-bottom: 0;
}

.contact a {
	color: var(--theme-color-white);
	text-decoration: none;
}

.contact a:hover {
	text-decoration: underline;
}

.contact__icon {
	color: var(--theme-color-white);
	max-height: 20px;
	opacity: .6;
}

.contact svg {
	fill: currentColor;
	max-height: 100%;
	max-width: 100%;
}

.contact li {
	align-items: center;
	display: grid;
	grid-template-columns: 20px auto;
	gap: 10px;
	margin-bottom: 10px;
}

footer > .footer {
	--theme-color-title: var(--theme-color-black);

	--fontsize-title-preset-1: clamp(32px, 2.5vw + 1rem, 50px);
	--fontsize-title-preset-2: clamp(28px, 2vw + 1rem, 30px);
	--fontsize-title-preset-3: clamp(24px, 1.75vw + 1rem, 26px);
	--fontsize-title-preset-4: clamp(22px, 1.5vw + 1rem, 24px);
	--fontsize-title-preset-5: clamp(20px, 1.25vw + 1rem, 22px);
	--fontsize-title-preset-6: clamp(18px, 1.5vw + 1rem, 20px);

	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' xml:space='preserve' viewBox='0 0 55.3 36.9' preserveAspectRatio='none'%3E%3Cstyle type='text/css'%3E .background-st0 %7B fill: transparent; stroke: rgb(255 255 255 / 25%); stroke-width: 1px; %7D %3C/style%3E%3Cg%3E%3Cpolygon class='background-st0' points='55.3,36.9 40.8,17.6 34.5,9.1 29.9,15.1 33.5,20.1 34.4,19 47.9,36.9 ' vector-effect='non-scaling-stroke' /%3E%3Cpolygon class='background-st0' points='25.4,12.6 31.3,4.8 27.7,0 0,36.9 7.2,36.9 21.7,17.6 31.4,31.2 25,31.2 26.6,29.1 23.1,24 13.2,36.9 42.6,36.9 ' vector-effect='non-scaling-stroke' /%3E%3C/g%3E%3C/svg%3E%0A");
	background-color: var(--theme-color-1);
	background-size: 100vw 50vw;
	background-position: bottom center;
	background-repeat: no-repeat;
	padding-top: 2.5rem;
}

.footer hr {
	width: 100%;
	margin: 0;
}

.footer .footer__logo {
	align-self: center;
	display: none;
	text-align: center;
}

.footer .footer__logo img {
	margin: 0 auto;
	max-width: 300px;
}

.footer a {
	color: var(--theme-color-white);
}

.block-editor-iframe__html .footer :is(h1, h2, h3, h4, h5, h6) {
	color: var(--theme-color-black);
}

.background {
	bottom: 0;
	height: 100vh;
	pointer-events: none;
	position: fixed;
	right: 0;
	width: 100vw;
}

.background img {
	height: 100%;
	position: absolute;
	left: 50%;
	object-fit: cover;
	opacity: 0.05;
	transform: translateX(-50%);
	width: 100%;
}

@media screen and (min-width: 768px) {
	:root {
		--cards-grid-template-columns: repeat(2, 1fr);

		--content-padding-x: 20px;

		--theme-title-gap: 20px;

		--footer-grid-template-columns: repeat(3, 1fr);
		--footer-padding-x: 20px;
	}

	.card:not(.card--main):nth-child(1) {
		/* margin-bottom: 10vh; */
	}

	.card:nth-child(2) {
		/* margin-top: 10vh; */
	}

	.footer .footer__logo {
		display: block;
	}

	.footer hr {
		display: none;
	}
}


p > a {
	text-decoration: underline;
	border-bottom: 1px solid transparent;
	transition: border-bottom-width 100ms linear;

	&:hover {
		text-decoration: none;
		border-bottom-color: var(--wp--preset--color--theme-1);
		border-bottom-width: 4px;
	}
}

.has-border-bottom {
	border-bottom: .675rem solid var(--wp--preset--color--theme-1);
}

.has-border-top {
	border-top: .675rem solid var(--wp--preset--color--theme-1);
}

body .wp-site-blocks :where(.wp-element-button, .wp-block-button .wp-block-button__link) {
	background-color: var(--theme-color-white);
	border: 1px solid var(--theme-color-black);
	color: var(--theme-color-black);
	position: relative;
}

body .wp-site-blocks :where(.wp-element-button, .wp-block-button .wp-block-button__link)::after {
	z-index: -1;
	background-color: var(--theme-color-black);
	content: '';
	position: absolute;
	top: .25rem;
	left: .25rem;
	width: 100%;
	height: 100%;
	transition: top 100ms linear, left 100ms linear;
}

body .wp-site-blocks :where(.wp-element-button, .wp-block-button .wp-block-button__link):hover::after {
	top: .5rem;
	left: .5rem;
}

/* .wp-block-post-terms {
	background-color: var(--wp--preset--color--theme-4);
	color: var(--theme-color-white);
	padding: 0.25rem .5rem;
	border-radius: 0.5rem;
	display: inline-flex;
	margin-bottom: 1rem;
} */

.wp-block-post-terms a {
	color: var(--theme-color-black);
	text-decoration: none;
	border: 1px solid var(--theme-color-black);
	padding: .25rem;
	border-radius: .25rem;
	font-size: var(--theme-font-size-xsmall);
}

.article-meta {
	display: inline-flex;
	gap: 1rem;
	justify-content: flex-start;
	align-items: center;
	margin-bottom: 1rem;
}

.article-meta > * {
	margin: 0;
}

.article-meta > *:not(:last-child)::after {
	content: '•';
	margin-left: 1rem;
}


.blog-overview :is(h1, h2, h3, h4, h5, h6) {
	text-transform: none;

}


.wp-block-query-pagination-numbers .page-numbers {
	padding: 0 .5rem;
}

ol li {
	padding-left: 1rem;
}

.wp-block-list li {
	padding-left: 1rem;
}

.wp-block-media-text--extended .wp-block-media-text__content {
	padding-top: 2rem;
	padding-bottom: 2rem;
}

.wp-block-navigation__responsive-container-open {
	flex-direction: column;
	justify-content: center;
	margin-right: 1rem !important;
}

.wp-block-navigation__responsive-container-close svg,
.wp-block-navigation__responsive-container-open svg {
	width: 2rem;
	height: 2rem;
	margin: 0 auto;
}

.wp-block-navigation__responsive-container-open::after {
	content: 'Menu';
}

.has-modal-open .wp-block-navigation__responsive-container {
	--navigation-layout-justification-setting: center;

	color: var(--theme-color-white) !important;
	background-color: var(--theme-color-2) !important;
	font-size: 1.25rem;
	height: 100vh;
	padding: 1rem 2rem;
}

.has-modal-open .wp-block-navigation__responsive-container .wp-block-navigation {
	--navigation-layout-justification-setting: flex-start;

	align-self: stretch;
}

.wp-block-navigation__responsive-container-close {
	display: flex;
	align-items: center;
}

.mobile-menu-logo {
	max-width: 100%;
	overflow: hidden;

	@media (width > 600px) {
		display: none;
	}
}

.mobile-menu-logo img {
	max-width: 100%;
	overflow: hidden;
}

.blog-overview .wp-block-column:has(.wp-block-post-title) {
	padding-inline: 1rem;
}
