/*
Theme Name: Mondkliniek Lisse
Theme URI: https://mondklinieklisse.nl
Author: Mondkliniek Lisse
Description: Lichtgewicht blokthema voor Mondkliniek Lisse, mondhygiënistenpraktijk in Lisse.
Version: 0.4.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mondkliniek
*/

/* Visible keyboard focus on every interactive element (WCAG 2.4.7). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--contrast);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Minimum 44px tap targets for buttons and the header phone link. */
.wp-element-button,
.wp-block-button__link,
.mk-tel {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Outline buttons: keep contrast on light backgrounds. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--primary-dark);
	border: 2px solid currentColor;
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--primary-dark);
	border-color: var(--wp--preset--color--primary-dark);
}

/* Header phone button stays visible on small screens; shorten the label there. */
@media (max-width: 480px) {
	.mk-tel .wp-block-button__link { padding-inline: 1em; font-size: var(--wp--preset--font-size--small); }
}

/* Google map on Contact (loads directly, owner decision Oct 2026). Fixed ratio, so no layout shift. */
.mk-map {
	position: relative;
	width: 100%;
	height: 25rem;
	background: var(--wp--preset--color--muted);
	border-radius: 12px;
	overflow: hidden;
}
.mk-map iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Opening hours table. */
.mk-hours table { border-collapse: collapse; width: 100%; }
.mk-hours .wp-block-table td { padding: 0.35em 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 35%, transparent); }
.mk-hours .wp-block-table { margin: 0; }
.mk-hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* FAQ disclosure. */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--muted); padding-block: 0.75em; }
.wp-block-details summary { cursor: pointer; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Contact Form 7 */
.wpcf7-form p { margin: 0 0 1em; }
.wpcf7-form label { display: block; font-weight: 600; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin-top: 0.35em;
	padding: 0.7em 0.8em;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--contrast-soft);
	border-radius: 8px;
	min-height: 44px;
}
.wpcf7-form textarea { min-height: 9em; }
.wpcf7-form .wpcf7-list-item { margin: 0; }
.wpcf7-form .wpcf7-acceptance label { font-weight: 400; }
.wpcf7-form input[type="submit"] {
	min-height: 44px;
	padding: 0.7em 1.4em;
	font: inherit;
	font-weight: 600;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--primary-dark);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}
.wpcf7-form input[type="submit"]:hover { background: var(--wp--preset--color--contrast); }
.wpcf7-not-valid-tip { color: var(--wp--preset--color--primary-dark); font-weight: 600; }

/* Home hero photo (sized via width/height attributes, so no layout shift). */
.mk-hero-img { margin: 0; }
.mk-hero-img img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
}

/* Team cards */
.mk-team { margin-top: var(--wp--preset--spacing--40); }
.mk-team-card {
	text-align: center;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--base);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 30%, transparent);
	border-radius: 16px;
	box-shadow: 0 6px 20px color-mix(in srgb, var(--wp--preset--color--primary) 14%, transparent);
}
.mk-team-photo { margin: 0 auto var(--wp--preset--spacing--30); max-width: 9.5rem; }
.mk-team-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	box-shadow: 0 0 0 4px var(--wp--preset--color--base), 0 0 0 6px var(--wp--preset--color--primary);
}
.mk-team-photo-placeholder {
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--muted);
	border-radius: 50%;
	box-shadow: 0 0 0 4px var(--wp--preset--color--base), 0 0 0 6px var(--wp--preset--color--primary);
}
.mk-team-photo-placeholder img { width: 45%; border-radius: 0; object-fit: contain; box-shadow: none; }
.mk-team-name { font-weight: 650; margin: 0; }
.mk-team-role { margin: 0.2em 0 0; }
@media (max-width: 599px) {
	.mk-team.mk-team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wp--preset--spacing--30); }
	.mk-team-card { padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20); }
}

/* Tariff tables */
.mk-tarieven table { border-collapse: collapse; width: 100%; font-size: var(--wp--preset--font-size--small); }
.mk-tarieven th, .mk-tarieven td { border: 0; border-bottom: 1px solid var(--wp--preset--color--muted); padding: 0.6em 0.5em; text-align: left; vertical-align: top; }
.mk-tarieven thead th { border-bottom: 2px solid var(--wp--preset--color--primary); font-weight: 650; }
.mk-tarieven td:first-child { font-weight: 600; white-space: nowrap; }
.mk-tarieven td:last-child, .mk-tarieven th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Header: one row from 900px: logo left, menu centred, text size + phone button right. */
.mk-textsize-label { white-space: nowrap; }
@media (min-width: 900px) {
	.wp-block-group.mk-header-row {
		display: grid;
		grid-template-columns: auto 1fr auto;
		align-items: center;
		column-gap: var(--wp--preset--spacing--40);
	}
	.mk-header-row > .wp-block-site-logo { justify-self: start; }
	.mk-header-row > .mk-header-nav { justify-self: center; }
	.mk-header-row > .mk-header-tools { justify-self: end; }
}
/* 600–899px: logo and tools on the first row, menu centred below. */
@media (min-width: 600px) and (max-width: 899px) {
	.wp-block-group.mk-header-row {
		display: grid;
		grid-template-columns: auto 1fr;
		grid-template-areas: "logo tools" "nav nav";
		align-items: center;
		row-gap: var(--wp--preset--spacing--30);
	}
	.mk-header-row > .wp-block-site-logo { grid-area: logo; }
	.mk-header-row > .mk-header-tools { grid-area: tools; justify-self: end; }
	.mk-header-row > .mk-header-nav { grid-area: nav; justify-self: center; }
}
/* Label only where there is room; the group keeps its aria-label for screen readers. */
@media (max-width: 1199px) {
	.mk-textsize-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Phones: text size on a slim row at the top, then logo, phone button and Menu. */
@media (max-width: 599px) {
	.wp-block-group.mk-header-row {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto auto;
		grid-template-areas: "ts ts ts" "logo cta nav";
		align-items: center;
		column-gap: var(--wp--preset--spacing--20);
		row-gap: var(--wp--preset--spacing--20);
	}
	.mk-header-row > .mk-header-tools { display: contents; }
	.mk-header-row .mk-textsize { grid-area: ts; justify-content: flex-end; }
	.mk-header-row .mk-textsize-label { position: static; width: auto; height: auto; clip: auto; }
	.mk-header-row > .wp-block-site-logo { grid-area: logo; }
	.mk-header-row > .wp-block-site-logo img { max-width: 100%; height: auto; }
	.mk-header-row .mk-header-cta { grid-area: cta; }
	.mk-header-row > .mk-header-nav { grid-area: nav; }
}

/* Footer link list without bullets */
.mk-footer-links { list-style: none; }

/* Menu: coral pill on hover, keyboard focus and the current page.
   Dark text on #F08080 = 5.7:1 (AA). Transition is disabled by the reduced-motion rule above. */
.mk-header-nav .wp-block-navigation-item__content {
	padding: 0.45em 1em;
	border-radius: 999px;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.mk-header-nav .current-menu-item > .wp-block-navigation-item__content,
.mk-header-nav .wp-block-navigation-item__content:focus-visible {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
}
@media (hover: hover) {
	.mk-header-nav .wp-block-navigation-item__content:hover {
		background-color: var(--wp--preset--color--primary);
		color: var(--wp--preset--color--contrast);
	}
}

/* Phone button never wraps; tighter header spacing on mid-size screens. */
.mk-tel .wp-block-button__link { white-space: nowrap; }
@media (min-width: 600px) and (max-width: 960px) {
	.mk-header-nav .wp-block-navigation-item__content { padding: 0.4em 0.7em; }
	.mk-tel .wp-block-button__link { padding-inline: 1em; font-size: var(--wp--preset--font-size--small); }
}

/* Text size levels (A− / A+). All font sizes and most spacing are in rem, so this scales the page evenly. */
html[data-mk-text="-1"] { font-size: 87.5%; }
html[data-mk-text="1"]  { font-size: 115%; }
html[data-mk-text="2"]  { font-size: 130%; }

/* Text size bar above the header */
.mk-textsize { display: flex; align-items: center; gap: 0.4rem; }
.mk-textsize-label { font-size: 0.875rem; color: var(--wp--preset--color--contrast-soft); margin-right: 0.25rem; }
.mk-textsize-btn {
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.6rem;
	font: inherit;
	font-weight: 650;
	font-size: 1rem;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.mk-textsize-btn:hover:not(:disabled) { background: var(--wp--preset--color--primary); }
.mk-textsize-btn:disabled { opacity: 0.4; cursor: default; }

/* Opened phone menu: core resets item padding to 0; give the pills room and larger tap targets. */
.mk-header-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding: 0.55em 1.5em;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}
.mk-header-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0.6rem;
}

/* "Waarom patiënten voor ons kiezen" cards */
.mk-usp-card {
	height: 100%;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--muted);
	border-top: 4px solid var(--wp--preset--color--primary);
	border-radius: 16px;
}
.wp-block-column:has(> .mk-usp-card) { display: flex; }
.mk-usp-card > * { margin-block: 0; }
.mk-usp-card > * + * { margin-top: var(--wp--preset--spacing--20); }
.mk-usp-card a { color: var(--wp--preset--color--primary-dark); font-weight: 600; }
.mk-usp-card h3 { font-size: 1.25rem; margin-top: var(--wp--preset--spacing--30); }
.mk-usp-icon {
	display: inline-grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary-dark);
}

/* Placeholder photo: old class kept for content saved before Oct 2026 */
.mk-team-photo--empty { aspect-ratio: 1; display: grid; place-items: center; background: var(--wp--preset--color--muted); border-radius: 50%; }

/* Headings group with the text below them, not the text above */
.wp-block-post-content :is(p, ul, ol, figure, table, .wp-block-table, .wp-block-buttons) + h2 { margin-top: var(--wp--preset--spacing--50); }
.wp-block-post-content :is(p, ul, ol, figure, table, .wp-block-table) + h3 { margin-top: var(--wp--preset--spacing--40); }
.wp-block-post-content h2 + p, .wp-block-post-content h3 + p { margin-top: var(--wp--preset--spacing--20); }

/* Home: treatment cards (whole card is clickable) */
.mk-treat-card {
	position: relative;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--base);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 30%, transparent);
	border-radius: 16px;
	box-shadow: 0 6px 20px color-mix(in srgb, var(--wp--preset--color--primary) 14%, transparent);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mk-treat-card > * { margin-block: 0; }
.mk-treat-card > * + * { margin-top: var(--wp--preset--spacing--20); }
.mk-treat-card h3 { font-size: 1.25rem; }
.mk-treat-card h3 a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.mk-treat-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.mk-treat-card h3::after { content: "\2192" / ""; margin-left: 0.4em; color: var(--wp--preset--color--primary-dark); }
.mk-treat-card:focus-within { outline: 3px solid var(--wp--preset--color--primary-dark); outline-offset: 3px; }
.mk-treat-card h3 a:focus-visible { outline: none; }
@media (hover: hover) {
	.mk-treat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px color-mix(in srgb, var(--wp--preset--color--primary) 24%, transparent); }
	.mk-treat-card:hover h3 a { color: var(--wp--preset--color--primary-dark); }
}

/* Behandelingen: quick links at the top */
.mk-toc { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--20); margin-top: var(--wp--preset--spacing--40); }
.mk-toc a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 1em;
	border: 1px solid var(--wp--preset--color--primary); border-radius: 999px;
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); text-decoration: none;
}
.mk-toc a:hover { background: var(--wp--preset--color--muted); }
.mk-cta-box { padding: var(--wp--preset--spacing--40); border-radius: 16px; }
.mk-cta-box > h2 { margin-top: 0; }
[id] { scroll-margin-top: 1.5rem; }

/* Footer: white with a coral line, so it separates from pink sections above it */
.mk-footer { border-top: 4px solid var(--wp--preset--color--primary); font-size: var(--wp--preset--font-size--medium); }
.mk-footer .wp-block-column > p:first-child, .mk-footer .wp-block-column > .wp-block-group > p:first-child { font-size: var(--wp--preset--font-size--large); }
.mk-footer .wp-block-column .has-small-font-size { font-size: var(--wp--preset--font-size--medium) !important; }

/* Phone menu button: the word "Menu" instead of an unlabeled icon (core hides it from 600px) */
@media (max-width: 599px) {
	.mk-header-nav .wp-block-navigation__responsive-container-open {
		display: inline-flex; align-items: center; justify-content: center;
		min-height: 44px; padding: 0 1em; border: 1px solid var(--wp--preset--color--primary); border-radius: 999px;
		font-size: var(--wp--preset--font-size--medium); line-height: 1; font-weight: 600; color: var(--wp--preset--color--contrast);
	}
}
