/*
Theme Name: Hensen
Theme URI: https://hensensolidsystems.nl/
Author: Hensen Solid Systems
Description: Blokthema voor Hensen Solid Systems: blauwe paginakop met telefoonnummer, secties die afwisselen tussen wit en lichtblauw, geen afgeronde hoeken.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: hensen
*/

/* ---------- basics ---------- */

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--blue);
	outline-offset: 2px;
}

:where(.has-blue-background-color, .has-navy-background-color) :focus-visible {
	outline-color: var(--wp--preset--color--white);
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

.wp-block-image {
	margin-block-end: 0;
}

.wp-block-image img {
	width: 100%;
}

.wp-block-image.size-full img {
	width: auto;
}

/* Headings inside running text get room above them. */
:where(.is-layout-constrained, .is-layout-flow) > * + :is(h3, h4) {
	margin-block-start: 1.75rem;
}

ul.wp-block-list {
	list-style: square;
	padding-left: 1.2em;
}

ol.wp-block-list {
	padding-left: 1.4em;
}

.wp-block-list li + li {
	margin-top: 0.35rem;
}

.wp-block-list li::marker {
	color: var(--wp--preset--color--blue);
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

/* "table" makes this beat core's own .wp-block-table td/th rule, which WordPress
   prints after the theme stylesheet once Jetpack Boost has combined the CSS. */
.wp-block-table table :is(td, th) {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--rule);
	padding: 0.5rem 1rem 0.5rem 0;
	text-align: left;
	vertical-align: top;
}

.wp-block-table th {
	font-weight: 600;
}

.wp-block-table tbody tr:last-child :is(td, th) {
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.wp-block-columns {
	gap: 1.5rem 3rem;
	margin-block-end: 0;
}

/* ---------- header ---------- */

.hss-header {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.hss-header .custom-logo {
	width: 158px;
	height: auto;
	aspect-ratio: 260 / 99;
}

.hss-header .wp-block-navigation a {
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}

.hss-header .wp-block-navigation a:hover,
.hss-header .wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--blue);
}

.hss-header .wp-block-navigation .current-menu-item > a {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 6px;
}

body .hss-header .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	--navigation-layout-justification-setting: flex-start;
	--navigation-layout-justify: flex-start;
	padding: 1.5rem clamp(1rem, 3vw, 1.5rem);
}

body .hss-header .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content {
	align-items: flex-start;
	padding-top: 3rem;
}

body .hss-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,
body .hss-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
	--navigation-layout-justification-setting: flex-start;
	align-items: flex-start;
	gap: 1.25rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
	color: var(--wp--preset--color--white);
	font-size: 2rem;
	text-decoration: none;
}

/* Core switches to the hamburger below 600px; the menu doesn't fit on one row
   until ~800px, so keep the hamburger up to the theme's mobile breakpoint. */
@media (min-width: 600px) and (max-width: 781px) {
	.hss-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.hss-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* ---------- hero (page top) ---------- */

.hss-hero {
	padding-top: clamp(2.5rem, 6vw, 4.5rem);
	padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.hss-hero a {
	color: var(--wp--preset--color--white);
}

.hss-hero .wp-block-post-excerpt {
	max-width: 58ch;
	color: var(--wp--preset--color--on-blue);
	font-size: var(--wp--preset--font-size--large);
}

.hss-hero .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.hss-hero .wp-block-post-title,
.hss-hero h1 {
	color: var(--wp--preset--color--white);
	overflow-wrap: break-word;
	hyphens: auto;
}

.hss-hero .breadcrumbs,
.hss-hero .breadcrumbs a {
	color: var(--wp--preset--color--on-blue);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

.hss-hero .breadcrumbs a {
	color: var(--wp--preset--color--white);
}

.hss-home-title {
	text-transform: uppercase;
	line-height: 0.9 !important;
}

.hss-phone {
	border-top: 3px solid var(--wp--preset--color--white);
	padding-top: 0.875rem;
}

.hss-phone p {
	margin: 0;
}

.hss-phone__label {
	font-weight: 600;
	font-size: 1rem;
}

.hss-phone__number a {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: clamp(2.2rem, 4vw, 3.2rem);
	line-height: 1;
	text-decoration: none;
	color: var(--wp--preset--color--white);
}

.hss-phone__note {
	color: var(--wp--preset--color--on-blue);
}

/* claims strip under the hero */
.hss-claims {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-top: 0.875rem;
	padding-bottom: 0.875rem;
	font-weight: 600;
	font-size: 1rem;
}

.hss-claims > .wp-block-group {
	gap: 0.375rem 2rem;
}

.hss-claims p {
	margin: 0;
}

/* ---------- sections ---------- */

.hss-section {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--50);
}

.hss-section > h2 + * {
	margin-block-start: 1.5rem;
}

.hss-section > .wp-block-columns + *,
.hss-section > * + .wp-block-group.is-layout-grid,
.hss-section > * + .wp-block-columns {
	margin-block-start: 1.5rem;
}

.hss-legal h2 {
	font-size: 1.8rem;
	margin-block-start: 2.5rem;
}

.hss-legal h3 {
	font-size: 1.35rem;
}

/* hub pages and homepage: one featured row, then a grid of three */
.hss-feature {
	padding-bottom: 3rem;
	border-bottom: 2px solid var(--wp--preset--color--navy);
}

.hss-feature h2,
.hss-feature h3 {
	font-size: clamp(2rem, 3.4vw, 2.8rem);
	font-weight: 800;
	line-height: 1;
}

.hss-feature p {
	font-size: 1.15rem;
}

.hss-cards {
	padding-top: 2.5rem;
	gap: 2.5rem;
}

.hss-card > * + * {
	margin-block-start: 0.625rem;
}

.hss-card h3 {
	margin-block-start: 1rem !important;
	font-size: 1.7rem;
	font-weight: 800;
	line-height: 1;
}

.hss-card h3 a {
	color: inherit;
	text-decoration: none;
}

.hss-card h3 a:hover {
	color: var(--wp--preset--color--blue);
}

/* FAQ: questions divided by thin rules */
.hss-faq {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-bottom: 1.25rem;
}

.hss-faq > h3 {
	border-top: 1px solid var(--wp--preset--color--rule);
	padding-top: 1.25rem;
	margin-block-start: 1.25rem;
	font-size: 1.45rem;
	line-height: 1.15;
}

.hss-faq > h3:first-child {
	margin-block-start: 0;
}

.hss-faq > h3 + * {
	margin-block-start: 0.5rem;
}

/* homepage: steps */
.hss-steps {
	gap: 1.75rem 2rem;
}

.hss-step {
	border-top: 6px solid var(--wp--preset--color--blue);
	padding-top: 0.875rem;
}

.hss-step:last-child {
	border-top-color: var(--wp--preset--color--navy);
}

.hss-step h3 {
	font-size: 1.5rem;
	font-weight: 800;
}

.hss-step h3 + p {
	margin-block-start: 0.25rem;
}

/* homepage: reviews on navy */
.hss-reviews a {
	color: var(--wp--preset--color--white);
}

.hss-rating {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.75rem;
	font-weight: 600;
	margin: 0;
}

.hss-stars {
	display: inline-flex;
	gap: 2px;
}

.hss-quote-big {
	border: 0;
	padding: 0;
	margin: 0;
}

.hss-quote-big p {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: clamp(1.9rem, 3.6vw, 2.9rem);
	line-height: 1.12;
}

.hss-quote-big cite,
.hss-quotes cite {
	display: block;
	margin-top: 0.75rem;
	font-style: normal;
	font-weight: 600;
	font-size: 1.05rem;
	color: #D7DBEE;
}

.hss-quotes {
	border-top: 1px solid #3C4275;
	padding-top: 1.75rem;
	gap: 1.75rem 3rem;
}

.hss-quotes .wp-block-quote {
	border: 0;
	padding: 0;
	margin: 0;
	font-size: 1.2rem;
}

/* homepage: Hörmann partner row */
.hss-partner {
	padding-top: 3rem;
	padding-bottom: 3rem;
}

.hss-partner .wp-block-image img {
	width: 100%;
	max-width: 360px;
}

.hss-partner p {
	font-size: 1.15rem;
}

/* ---------- contact form band ---------- */

.hss-form-band {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--50);
}

/* The band takes the opposite colour of the last content section. */
body:has(.wp-block-post-content > .hss-section:last-child.has-tint-background-color) .hss-form-band,
body:has(.hss-home > .hss-section:last-of-type.has-tint-background-color) .hss-form-band {
	background-color: var(--wp--preset--color--white) !important;
}

.hss-form-band .wpcf7-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
	gap: 1rem 1.5rem;
}

.hss-form-band .wpcf7-form > p {
	margin: 0;
}

.hss-form-band .wpcf7-form > p:nth-of-type(n+3),
.hss-form-band .wpcf7-response-output {
	grid-column: 1 / -1;
}

.wpcf7-form label {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	font-weight: 600;
}

.wpcf7-form label br {
	display: none;
}

.wpcf7-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea) {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-weight: 400;
	color: var(--wp--preset--color--navy);
	background: var(--wp--preset--color--white);
	padding: 0.75rem;
	border: 1px solid var(--wp--preset--color--navy);
	border-radius: 0;
}

.wpcf7-form textarea {
	height: 9rem;
	resize: vertical;
}

.wpcf7-form .wpcf7-submit {
	font: inherit;
	font-weight: 600;
	background: var(--wp--preset--color--blue);
	color: var(--wp--preset--color--white);
	border: 0;
	border-radius: 0;
	padding: 0.875rem 1.625rem;
	cursor: pointer;
}

.wpcf7-form .wpcf7-submit:hover,
.wpcf7-form .wpcf7-submit:focus-visible {
	background: var(--wp--preset--color--navy);
}

.wpcf7 form .wpcf7-response-output {
	margin: 0;
	padding: 0.75rem 1rem;
	border: 2px solid var(--wp--preset--color--blue);
	font-weight: 600;
}

/* CF7 shows this box (with a light-blue border) as soon as the form leaves its
   start state, e.g. after autofill, even when there is no message yet. */
.wpcf7 form .wpcf7-response-output:empty {
	display: none;
}

.wpcf7 form:is(.invalid, .unaccepted, .payment-required, .failed, .aborted, .spam) .wpcf7-response-output {
	border-color: #B00020;
}

.wpcf7-not-valid-tip {
	font-weight: 600;
	font-size: 0.9375rem;
	color: #B00020;
}

/* ---------- showroom band ---------- */

.hss-showroom {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--50);
}

.hss-showroom h2 {
	text-transform: uppercase;
	font-size: clamp(2.2rem, 4.4vw, 3.6rem);
	line-height: 1;
}

.hss-showroom a {
	color: var(--wp--preset--color--white);
}

.hss-hours {
	border-top: 3px solid var(--wp--preset--color--white);
	padding-top: 0.875rem;
}

.hss-hours p {
	margin: 0;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.hss-hours .hss-phone__number {
	margin-top: 0.625rem;
}

.hss-hours .hss-phone__number a {
	font-size: 2rem;
}

/* ---------- footer ---------- */

.hss-footer {
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
	font-size: 1rem;
}

.hss-footer a {
	color: var(--wp--preset--color--white);
	font-weight: 400;
}

.hss-footer p {
	margin: 0;
}

.hss-footer .hss-footer__name {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: 1.4rem;
}

.hss-footer__links {
	color: #D7DBEE;
}

/* ---------- small screens ---------- */

@media (max-width: 781px) {
	.hss-hero .wp-block-columns {
		gap: 2rem;
	}

	.hss-feature {
		padding-bottom: 2rem;
	}
}

/* ---------- full-width bands sit flush against each other ---------- */

.wp-site-blocks > * + *,
.hss-main > * + *,
.hss-main > .wp-block-template-part > *,
.wp-block-post-content > .alignfull + .alignfull {
	margin-block-start: 0;
}

.hss-hours p + p {
	margin-block-start: 0.375rem;
}

.hss-reviews > .wp-block-heading + .wp-block-html,
.hss-reviews > .hss-rating {
	margin-block-start: 0.625rem;
}

.hss-reviews > * + .hss-quote-big,
.hss-reviews > * + .hss-quotes,
.hss-reviews > .hss-quotes + p {
	margin-block-start: 2rem;
}

/* ---------- grids fill the row; quotes stay left ---------- */

.hss-section .wp-block-group.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
}

.hss-section .wp-block-group.hss-steps {
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.hss-section .wp-block-group.hss-quotes {
	grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.hss-quote-big p {
	max-width: 28ch;
}

.hss-section > * + .hss-feature {
	margin-block-start: 2.5rem;
}

/* ---------- reCAPTCHA and cookie settings ---------- */

/* The badge may be hidden because the form shows Google's notice (hss-recaptcha-note). */
.grecaptcha-badge {
	visibility: hidden;
}

.hss-recaptcha-note {
	margin-block-start: 1rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

/* Reopens the Complianz banner; the floating "Beheer toestemming" tab is off. */
.hss-footer .hss-cookie-settings {
	font: inherit;
	font-weight: 400;
	color: var(--wp--preset--color--white);
	background: none;
	border: 0;
	padding: 0;
	text-decoration: underline;
	cursor: pointer;
}
