/*
 Theme Name:   Van Merlenhaven
 Description:  Thema voor Van Merlenhaven
 Template:     martanian-oak-house
 Text Domain:  van_merlenhaven
 Version:      2.0
*/

/*
 * Opmaak bovenop het hoofdthema (Martanian Oak House).
 *
 *  1. Kleuren en basis
 *  2. Laadscherm
 *  3. Kleine opfrisbeurt (alle schermen)
 *  4. Kaart
 *  5. Voettekst
 *  6. Telefoon (t/m 767px)
 */

/* 1. Kleuren en basis ---------------------------------------------------- */

:root {
	--vmh-oranje: #e1490f;
	--vmh-oranje-donker: #b93a0a;
	--vmh-navy: #132a3c;
	--vmh-navy-licht: #1c3142;
	--vmh-grijs: #f2f2f2;
	--vmh-lijn: #e3e8ec;
	--vmh-tekst-zacht: #5b6875;
	--vmh-rond: 8px;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Lange woorden en adressen breken af in plaats van buiten beeld te lopen. */
.wpb_text_column,
article.blog-post,
footer p {
	overflow-wrap: break-word;
}

/* De datum bij een nieuwsbericht blijft heel (dag boven, maand.jaar eronder). */
section.presentation .with-date > .with-date-date .day,
section.presentation .with-date > .with-date-date .rest {
	white-space: nowrap;
}

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

.wpb_text_column img,
article.blog-post img,
.wpb_single_image img {
	max-width: 100%;
	height: auto;
}

iframe,
video,
embed,
object {
	max-width: 100%;
}

/* Zichtbare focus voor wie met het toetsenbord door de site gaat. */
a:focus-visible,
button:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.responsive-menu-button:focus-visible {
	outline: 3px solid var(--vmh-oranje);
	outline-offset: 2px;
}

/* 2. Laadscherm ---------------------------------------------------------- */

/*
 * Het hoofdthema legt een wit scherm over de pagina tot alles geladen is.
 * Lukt dat weghalen niet (trage verbinding, scriptfout), dan verdwijnt het
 * hier na ruim een seconde vanzelf.
 */
#loader {
	animation: vmh-laadscherm-weg 0.3s ease 1.2s forwards;
}

@keyframes vmh-laadscherm-weg {
	to {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}
}

/* 3. Kleine opfrisbeurt (alle schermen) ----------------------------------- */

header.header-bar {
	box-shadow: 0 1px 0 rgba(19, 42, 60, 0.06), 0 6px 18px rgba(19, 42, 60, 0.07);
}

header.header-bar .header-bar-bottom nav.top-menu > ul .children {
	border-radius: 0 0 var(--vmh-rond) var(--vmh-rond);
	box-shadow: 0 12px 24px rgba(19, 42, 60, 0.14);
	overflow: hidden;
}

.button,
form input[type="submit"] {
	border-radius: var(--vmh-rond);
}

.button:after {
	border-radius: var(--vmh-rond);
}

.images .image,
.wpb_text_column img,
article.blog-post .wpb_text_column img {
	border-radius: var(--vmh-rond);
}

.images {
	border-radius: var(--vmh-rond);
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="url"],
form input[type="tel"],
form input[type="number"],
form input[type="date"],
form textarea {
	border-radius: 6px;
}

::selection {
	background: var(--vmh-oranje);
	color: #fff;
}

/*
 * Pijltjes op knoppen. De ledenplugin laadt Font Awesome 5 en neemt daarmee
 * de klasse .fa over; het pijltje van het hoofdthema (Font Awesome 4)
 * bestaat daarin niet en bleef leeg.
 */
.button i.fa {
	font-family: 'FontAwesome';
	font-weight: normal;
	font-style: normal;
}

/*
 * Inlogformulier voor leden. Het hoofdthema zet de tekstgrootte van elk
 * formulier op 0, waardoor "ingelogd blijven" en "wachtwoord vergeten?"
 * onzichtbaar waren.
 */
.pc_login_form {
	font-size: 15px;
}

.pc_login_form .pc_login_smalls {
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.pc_login_form .pc_login_smalls small {
	font-size: 14px;
	opacity: 1;
}

.pc_login_form .pcma_psw_recovery_trigger,
.pc_login_form .pcma_del_recovery {
	color: var(--vmh-oranje-donker);
	text-decoration: underline;
	cursor: pointer;
}

/* De plugin zet zijn eigen (grijze) knopkleuren met !important; vandaar hier ook. */
.pc_login_form button.pc_auth_btn,
.pc_login_form button.pcma_do_recovery {
	min-height: 46px;
	padding: 12px 26px !important;
	border: 2px solid var(--vmh-oranje) !important;
	border-radius: var(--vmh-rond) !important;
	background: var(--vmh-oranje) !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-align: center;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.pc_login_form button.pc_auth_btn .pc_inner_btn,
.pc_login_form button.pcma_do_recovery .pc_inner_btn {
	color: #fff;
	font-size: 15px;
}

.pc_login_form button.pc_auth_btn:hover,
.pc_login_form button.pc_auth_btn:focus,
.pc_login_form button.pcma_do_recovery:hover,
.pc_login_form button.pcma_do_recovery:focus {
	background: var(--vmh-oranje-donker) !important;
	border-color: var(--vmh-oranje-donker) !important;
	color: #fff !important;
}

/* Lege koppen uit de pagina-editor nemen geen ruimte in. */
.wpb_text_column h1:empty,
.wpb_text_column h2:empty,
.wpb_text_column h3:empty {
	display: none;
}

/*
 * Homepage: de twee havens naast elkaar op desktop (vanaf 992px).
 *
 * In de pagina-editor staat tussen de twee halve kolommen een lege kolom
 * over de volle breedte; die duwde de tweede haven naar een nieuwe regel.
 * Die lege kolom telt hier niet mee en beide foto's krijgen dezelfde maat.
 * Tussen 768 en 991px zet het hoofdthema alle kolommen onder elkaar; daar
 * staan de havens dus nog onder elkaar, met foto's over de volle breedte.
 */
@media (min-width: 768px) {

	body.home .vc_row.martanian-row-content-presentation .vc_row.vc_inner > .vc_col-sm-12:has(> .vc_column-inner > .wpb_wrapper:empty) {
		display: none;
	}

	body.home .vc_row.martanian-row-content-presentation .vc_row.vc_inner > .vc_col-sm-6 .images {
		float: none;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		margin: 0 0 30px 0;
	}
}

/* 4. Kaart --------------------------------------------------------------- */

section.vmh-kaart {
	margin: 0;
}

.vmh-kaart-venster {
	display: block;
	width: 100%;
	height: 460px;
	border: 0;
	background: var(--vmh-grijs);
}

.vmh-kaart-routes {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	padding: 24px 15px 0;
}

.vmh-kaart-routes .button {
	margin: 0;
}

/* 5. Voettekst ----------------------------------------------------------- */

/* Donkere band over de hele breedte, ook al zit de voettekst in een kolom. */
footer {
	position: relative;
	margin-top: 60px;
	padding: 40px 0;
	background: var(--vmh-navy);
	box-shadow: 0 0 0 100vmax var(--vmh-navy);
	clip-path: inset(0 -100vmax);
}

footer,
footer p,
footer nav > .menu > ul li,
footer nav > .menu > ul li a,
footer p a,
footer p strong {
	color: rgba(255, 255, 255, 0.82);
}

footer p a,
footer nav > .menu > ul > li > a {
	color: #fff;
}

footer p a:hover,
footer nav > .menu > ul li a:hover {
	color: #fff;
	text-decoration: underline;
}

footer p {
	margin-bottom: 0;
	line-height: 1.8;
}

/* 6. Telefoon (t/m 767px) -------------------------------------------------- */

@media (max-width: 767px) {

	/* 6a. Kop: lager, zodat er meer van de pagina in beeld is. */

	header.header-bar,
	header.header-bar .logo-middle-helper {
		height: 72px;
	}

	header.header-bar .header-bar-logo img {
		max-height: 56px;
		width: auto;
	}

	.big-wrapper {
		margin-top: 72px;
	}

	header.header-bar .responsive-menu-button {
		top: -60px;
		right: -8px;
		width: 48px;
		height: 48px;
		line-height: 48px;
		font-size: 26px;
		text-align: center;
		-webkit-tap-highlight-color: transparent;
	}

	/* 6b. Menu: zelfde breedte als waar het script mee rekent, grotere tekst. */

	.responsive-menu-content {
		width: 250px;
		right: -250px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		padding-bottom: 32px;
		box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
	}

	.responsive-menu-content ul.menu li a {
		padding: 14px 20px;
		font-size: 16px;
		line-height: 1.3;
		font-weight: 500;
	}

	.responsive-menu-content ul.menu li ul.children li a {
		padding: 12px 20px;
		font-size: 15px;
		font-weight: 400;
	}

	.responsive-menu-content .header-bar-top-element {
		padding: 14px 20px;
	}

	.responsive-menu-content .header-bar-top-element,
	.responsive-menu-content .header-bar-top-element a {
		font-size: 14px;
		line-height: 1.5;
	}

	/* 6c. Ruimte: smallere marges links en rechts, minder lege stroken. */

	.contents {
		margin: 0 35px;
	}

	h1 {
		font-size: 28px;
		line-height: 1.15;
		margin-bottom: 20px;
		letter-spacing: -0.5px;
	}

	h2 {
		font-size: 26px;
		line-height: 1.15;
		margin-bottom: 20px;
		letter-spacing: -0.5px;
	}

	h3 {
		font-size: 22px;
		line-height: 1.2;
		margin-bottom: 18px;
		letter-spacing: -0.3px;
	}

	h4 {
		line-height: 1.25;
	}

	.wpb_text_column h1:empty,
	.wpb_text_column h2:empty,
	.wpb_text_column h3:empty,
	.wpb_text_column p:empty {
		display: none;
	}

	.vc_row.martanian-row-content-presentation {
		padding: 28px 0;
	}

	.vc_row.martanian-row-add-padding {
		padding: 32px 0;
	}

	.vc_row.martanian-row-add-padding-for-heading {
		padding: 32px 0 0 0;
	}

	.vc_row.martanian-row-add-padding-bottom {
		padding: 0 0 32px 0;
	}

	.vc_row.martanian-row-content-presentation .vc_row .vc_col-sm-6 .images {
		height: 62vw;
		max-height: 380px;
		margin: 0 0 24px 0;
	}

	/* 6d. Knoppen en formulieren: groot genoeg voor een duim. */

	.button,
	form input[type="submit"] {
		min-height: 48px;
		padding: 15px 22px;
		font-size: 15px;
		line-height: 1.2;
		max-width: 100%;
	}

	/* Pijltje naast de tekst in plaats van op een eigen (lege) regel eronder. */
	.button i,
	.button span i {
		display: inline-block;
		padding: 0 0 0 10px;
	}

	.pc_login_form button.pc_auth_btn,
	.pc_login_form button.pcma_do_recovery {
		width: 100%;
		min-height: 50px;
		margin-top: 6px;
	}

	.pc_login_form .pc_login_smalls small {
		font-size: 15px;
		padding: 6px 0;
	}

	/* 16px voorkomt dat iPhones inzoomen zodra je in een veld tikt. */
	form input[type="text"],
	form input[type="email"],
	form input[type="password"],
	form input[type="url"],
	form input[type="tel"],
	form input[type="number"],
	form input[type="date"],
	form select,
	form textarea,
	.pc_login_form input[type="text"],
	.pc_login_form input[type="password"] {
		font-size: 16px;
		min-height: 48px;
		max-width: 100%;
	}

	form label {
		font-size: 15px;
	}

	/* Nieuws op de homepage: datum past weer op één regel naast de titel. */

	section.presentation .with-date > .with-date-date {
		width: 58px;
		margin-right: 16px;
	}

	section.presentation .with-date > .with-date-date .rest {
		font-size: 15px;
		white-space: nowrap;
	}

	section.presentation .with-date > .with-date-content {
		overflow: hidden;
	}

	section.presentation .with-date > .with-date-content p a {
		display: inline-block;
		padding: 6px 0;
	}

	section.presentation p.read-all-news {
		padding-top: 24px;
		text-align: center;
	}

	/*
	 * Achtergrondvideo: op een telefoon heeft die rij geen inhoud en dus geen
	 * hoogte. js/site.js laadt de video daar niet (scheelt data) en deze regel
	 * haalt de lege strook weg.
	 */
	.vc_row.vmh-video-uit {
		display: none;
	}

	/* Een pagina die met alleen een lege tussenruimte begint: die ruimte overslaan. */
	.wpb-content-wrapper > .vc_row:first-child:has(.vc_empty_space):not(:has(.wpb_content_element, .wpb_text_column, section, img, iframe)) {
		display: none;
	}

	/* 6e. Tabellen in tekst: zelf schuiven in plaats van de hele pagina. */

	.wpb_text_column table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* 6f. Prijstabellen: elke regel onder elkaar, zonder zijwaarts schuiven. */

	section.pricing-table {
		margin: 0 0 24px 0;
		overflow: visible;
		width: auto;
	}

	section.pricing-table .pricing-table-container {
		width: auto;
	}

	section.pricing-table .pricing-table-container:before,
	section.pricing-table .pricing-table-container:after {
		display: none;
	}

	/* Kolomkoppen: boven de tabel zolang het script de namen nog niet per bedrag heeft gezet. */
	section.pricing-table .pricing-table-variants {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0 10px;
	}

	section.pricing-table[data-variants-count="1"] .pricing-table-variants {
		grid-template-columns: minmax(0, 1fr);
	}

	section.pricing-table[data-variants-count="2"] .pricing-table-variants,
	section.pricing-table[data-variants-count="4"] .pricing-table-variants {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	section.pricing-table .pricing-table-variants li.space {
		display: none;
	}

	section.pricing-table .pricing-table-variants li:not(.space) {
		width: auto !important;
		margin-bottom: 8px;
		font-size: 14px;
		text-align: left;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		color: var(--vmh-tekst-zacht);
	}

	section.pricing-table.vmh-met-kolomnamen .pricing-table-variants {
		display: none;
	}

	section.pricing-table .pricing-table-list li {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px 10px;
		padding: 14px 0;
		border-bottom: 1px solid var(--vmh-lijn);
	}

	section.pricing-table[data-variants-count="2"] .pricing-table-list li,
	section.pricing-table[data-variants-count="4"] .pricing-table-list li {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	section.pricing-table .pricing-table-list li .pricing-table-element-title {
		grid-column: 1 / -1;
		width: auto;
		font-size: 16px;
		font-weight: 700;
		line-height: 1.35;
	}

	section.pricing-table .pricing-table-list li .pricing-table-variant-value {
		width: auto !important;
		font-size: 16px;
		line-height: 1.35;
		text-align: left;
	}

	section.pricing-table .pricing-table-list li .pricing-table-variant-value[data-kolom]:before {
		content: attr(data-kolom);
		display: block;
		margin-bottom: 2px;
		font-size: 12px;
		line-height: 1.3;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		color: var(--vmh-tekst-zacht);
	}

	section.pricing-table .pricing-table-list li .pricing-table-variant-value.vmh-geen-kolom,
	section.pricing-table .pricing-table-list li .pricing-table-element-title.vmh-leeg,
	section.pricing-table .pricing-table-list li.vmh-lege-regel {
		display: none;
	}

	/* Eén kolom: omschrijving links, bedrag rechts op dezelfde regel. */
	section.pricing-table[data-variants-count="1"] .pricing-table-list li {
		grid-template-columns: minmax(0, 1fr) minmax(0, auto);
		align-items: start;
	}

	section.pricing-table[data-variants-count="1"] .pricing-table-list li .pricing-table-element-title {
		grid-column: 1;
		font-weight: 400;
	}

	section.pricing-table[data-variants-count="1"] .pricing-table-list li .pricing-table-variant-value {
		max-width: 46vw;
		font-weight: 700;
		text-align: right;
	}

	section.pricing-table[data-variants-count="1"] .pricing-table-list li .pricing-table-variant-value[data-kolom]:before {
		display: none;
	}

	section.pricing-table[data-variants-count="1"] .pricing-table-list li.vmh-zonder-bedrag .pricing-table-element-title {
		grid-column: 1 / -1;
	}

	/* 6g. Kaart */

	.vmh-kaart-venster {
		height: 70vw;
		max-height: 380px;
		min-height: 260px;
	}

	.vmh-kaart-routes {
		flex-direction: column;
		align-items: stretch;
		padding: 20px 20px 0;
	}

	.vmh-kaart-routes .button {
		text-align: center;
	}

	/* 6h. Voettekst */

	footer {
		margin-top: 40px;
		padding: 32px 0;
	}

	footer .col-md-9,
	footer .col-md-3 {
		padding: 0 20px;
		text-align: center;
	}

	footer .col-md-3 {
		margin-top: 18px;
	}

	footer p {
		text-align: center;
		font-size: 15px;
	}

	footer nav > .menu > ul > li > a {
		display: inline-block;
		padding: 10px 14px;
		font-size: 15px;
	}

	footer p a {
		display: inline-block;
		padding: 6px 2px;
	}
}

/* Het script van het hoofdthema gebruikt een smal menu op heel smalle schermen. */
@media (max-width: 370px) {

	.responsive-menu-content {
		width: 180px;
		right: -180px;
	}

	.responsive-menu-content ul.menu li a {
		padding: 13px 14px;
		font-size: 15px;
	}

	.responsive-menu-content ul.menu li ul.children li a {
		padding: 11px 14px;
		font-size: 14px;
	}

	.contents {
		margin: 0 30px;
	}
}

@media (prefers-reduced-motion: reduce) {

	*,
	*:before,
	*:after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
