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

Regtien, (C) 2025 deLaque.nl
*/

h1, h2, h3, h4, h5, h6 {
	text-wrap: balance;
}

header.header {
	align-items: stretch;
	container-type: inline-size;
	display: flex;
	min-height: 65vh;

	> div {
		flex: 1
	}

	.wp-block-cover {
		height: 100%;

		@media (600px < width < 800px) {
			margin-top: 2rem;
		}
	}

	h1 {
		font-size: clamp(2rem, 10vw, 2.75rem);
	}
}

.header-navigation {
	left: 0;
	padding: 0 1rem;
	position: fixed;
	right: 0;
	top: var(--wp-admin--admin-bar--height, 0);
	z-index: 10;

	@media (600px < width < 800px) {
		padding-bottom: 1rem;
	}

	@media (width < 1640px) {
		width: calc(100% - 2rem);
	}

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

		.current-menu-item .wp-block-navigation-item__content {
			color: var(--wp--preset--color--theme-1);
		}

		.wp-block-navigation-item__content {
			&:hover {
				color: var(--wp--preset--color--theme-1);
			}
		}
	}
}

.home .header-navigation {
	padding-left: 0;
	padding-right: 0;
}

header.wp-block-template-part .header-navigation,
header.wp-block-template-part.header-navigation {
	z-index: 3;

	> * {
		z-index: 2;
	}

	&::before {
		backdrop-filter: blur(10px);
		content: '';
		height: 100%;
		left: 50%;
		position: absolute;
		top: 0;
		transform: translateX(-50%);
		width: 100vw;
		z-index: 1;
	}

	&::after {
		animation: solidHeaderBackgroundGradient linear both;
		animation-range: 0 400px;
		animation-timeline: scroll();
		background-color: var(--wp--preset--color--white);
		box-shadow: 0 10px 10px rgb(0 0 0 / 10%);
		content: '';
		height: 100%;
		left: 50%;
		opacity: 0;
		position: absolute;
		top: 0;
		transform: translateX(-50%);
		width: 100cqw;
		z-index: 1;
	}

	.wp-block-site-logo {
		animation: logoHeaderSize linear both;
		animation-range: 0 400px;
		animation-timeline: scroll();
		margin-bottom: .5rem;
		margin-top: .5rem;
		max-width: 75vw;
		width: clamp(100px, 25vw, 400px);

		@media (width >= 800px) {
			max-width: 175px;
		}

		@media (width >= 1000px) {
			max-width: 25vw;
		}
	}

}

.header-images {
	width: 100%;

	@media (width >= 1000px) {
		width: calc(50vw - (2.375em * 1));
	}

	> :first-child {
		margin-bottom: -10%;
		padding-left: 0%;
		padding-right: 15%;

		@media (width < 1000px) {
			padding-right: 5%;
		}
	}

	> :last-child {
		margin-top: -10%;
		padding-left: 15%;
		padding-right: 0%;
		padding-top: 0%;

		@media (width < 1000px) {
			padding-left: 5%;
		}
	}
}

.wp-block-media-text {
	margin-bottom: 2rem;

	img {
		border-radius: 1rem;
	}
}

.certificate {
	align-items: center;
	display: flex;
	gap: 1rem;

	figcaption {
		color: inherit;
		font-size: 1rem;
		margin: 0 !important;
	}
}

.wp-site-blocks > main {
	animation: animateMainBackground linear both;
	animation-range: 0 25vh;
	animation-timeline: scroll();
	background-attachment: fixed;
	background-image: url('./assets//logo-blocks.png');
	background-position: left bottom;
	background-repeat: no-repeat;
	background-size: auto 25vh;
	padding: 0 1rem 1rem;
}


@keyframes solidHeaderBackgroundGradient {
	0% {
		border-bottom-color: transparent;
		opacity: 0;
	}

	90% {
		border-bottom-color: transparent;
	}

	100% {
		border-bottom-color: var(--wp--preset--color--theme-1);
		opacity: 0.65;
	}
}

@keyframes logoHeaderSize {
	0% {
		width: 400px;
	}

	100% {
		width: 175px;
	}
}

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

	font-size: 1.25rem;
	height: 100vh;
	margin-left: -1rem;
	margin-right: -1rem;
	padding-right: 2rem;
	padding-top: 1rem;
}

.wp-block-navigation__responsive-container-open {
	align-items: center;
	flex-direction: column;
	gap: .25rem;
	justify-content: center;
}

.wp-block-navigation__responsive-container-open svg {
	height: 2.5rem;
	width: 2.5rem;
}

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

.wp-block-navigation__responsive-container-close {
	align-items: center;
	display: flex;
	font-size: 1rem !important;
	gap: .5rem;
}

.mobile-menu-logo {
	width: min(75%, 400px);
}

@media (width >= 600px) {
	.mobile-menu-logo {
		display: none;
	}
}

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


.page-template-default:not(.home) {
	padding-top: 5.5rem;
}

.wp-block-group:is(.is-layout-grid) {
	column-gap: 2rem;
}

.wp-block-list {
	li:not(:last-child) {
		margin-bottom: .35rem;
	}
}

/* Main content width override */
:where(.wp-block-group.has-background) {
	padding: 1.25rem 1rem !important;
}

.wp-container-core-group-is-layout-13 {
	@media (width < 800px) {
		grid-template-columns: 1fr;
	}
}


.maps {
	margin: 0 -1rem -1rem;

	img {
		aspect-ratio: auto;
		border-radius: 0;
		height: 500px;
		object-fit: cover;
		width: 100%;
	}
}

.services {
	&.is-layout-grid {
		@media (width < 800px) {
			grid-template-columns: 1fr;
		}
	}

	> .wp-block-group {
		> .wp-block-columns {
			height: 100%;

			> .wp-block-column {
				align-self: start;
			}
		}
	}
}

footer {
	h2 {
		font-size: 1.5rem;
	}

	figure.wp-block-image {
		img {
			border-radius: 0;
		}
	}
}
