/*
Theme Name: RR-Elektra
Theme URI: https://rr-elektra.nl/
Author: RR-Elektra
Author URI: https://rr-elektra.nl/
Description: Snel, toegankelijk blokthema (Full Site Editing) voor RR-Elektra, elektricien in Deventer, Apeldoorn, Lochem en Zutphen. Alle teksten en afbeeldingen zijn aan te passen in de WordPress-editor. Geen plugins nodig.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rr-elektra
Tags: full-site-editing, block-patterns, block-styles, one-column, custom-colors, accessibility-ready
*/

/* ---------- Basis ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4, h5, h6 {
	overflow-wrap: break-word;
	hyphens: auto;
	text-wrap: balance;
}

a:where(:not(.wp-element-button)) { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:where(:not(.wp-element-button)):hover { text-decoration-color: var(--wp--preset--color--accent); text-decoration-thickness: 3px; }

img { height: auto; }

/* Duidelijke focus voor toetsenbordgebruikers */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 2px;
}
.has-accent-background-color :where(a, button):focus-visible { outline-color: var(--wp--preset--color--contrast); }

/* Op donkere achtergronden: links wit */
.has-contrast-background-color a:where(:not(.wp-element-button)) { color: inherit; }

/* Accentstreepje onder sectiekoppen (zoals het streepje in het logo) */
.rr-kicker {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 0.5rem !important;
}
.rr-kicker::before {
	content: "";
	display: inline-block;
	width: 1.75em;
	height: 0.4em;
	margin-right: 0.6em;
	background: var(--wp--preset--color--accent);
	vertical-align: 0.15em;
}

/* ---------- Knoppen ---------- */
.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55em;
	min-height: 52px;
	min-width: 44px;
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.wp-block-button .wp-block-button__link:active { transform: translateY(1px); }

.rr-btn-whatsapp .wp-block-button__link {
	background-color: var(--wp--preset--color--whatsapp);
	color: var(--wp--preset--color--contrast);
}
.rr-btn-whatsapp .wp-block-button__link:hover { background-color: #1EBE5B; color: var(--wp--preset--color--contrast); }

.rr-btn-dark .wp-block-button__link {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.rr-btn-dark .wp-block-button__link:hover { background-color: #000; color: var(--wp--preset--color--base); }

.rr-btn-call .wp-block-button__link::before,
.rr-btn-whatsapp .wp-block-button__link::before {
	content: "";
	width: 1.25em;
	height: 1.25em;
	flex: none;
	background-color: currentColor;
	-webkit-mask: var(--rr-icon) center / contain no-repeat;
	mask: var(--rr-icon) center / contain no-repeat;
}
.rr-btn-call { --rr-icon: var(--rr-i-phone); }
.rr-btn-whatsapp { --rr-icon: var(--rr-i-chat); }

@media (max-width: 599px) {
	.rr-buttons-stack { flex-direction: column; align-items: stretch !important; }
	.rr-buttons-stack .wp-block-button,
	.rr-buttons-stack .wp-block-button__link { width: 100%; }
}

/* ---------- Header ---------- */
/* Header blijft bovenaan staan bij scrollen */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 0px); }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }

/* Geen witte strepen tussen header, secties en footer */
.wp-site-blocks > * + *,
.wp-block-post-content > .alignfull + .alignfull,
.wp-block-post-content > .alignfull + .wp-block-pattern + .alignfull { margin-block-start: 0 !important; }
.wp-block-post-content > .alignfull:last-child { margin-block-end: 0; }

.rr-header {
	padding-top: 0.6rem;
	padding-bottom: 0.6rem;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.18);
}

.rr-header__inner { gap: 1rem; }
.rr-logo { margin: 0; flex: none; }
.rr-logo img {
	display: block;
	height: 36px;
	width: auto;
	max-width: none;
}
@media (min-width: 782px) { .rr-logo img { height: 48px; } }

.rr-nav { font-weight: 600; margin-left: auto; }
.rr-nav .wp-block-navigation-item__content { padding: 0.5rem 0.25rem; text-decoration: none; }
.rr-nav .wp-block-navigation-item__content:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--accent); text-decoration-thickness: 3px; text-underline-offset: 0.35em; }
.rr-nav .wp-block-navigation__responsive-container-open,
.rr-nav .wp-block-navigation__responsive-container-close { padding: 10px; }
.rr-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	gap: 1.25rem;
	padding-top: 4rem;
}
.rr-header-cta { flex: none; }
.rr-header-cta .wp-block-button__link { min-height: 44px; padding: 0.6rem 1rem; font-size: 0.9375rem; }
@media (max-width: 599px) { .rr-header-cta { display: none !important; } }

/* ---------- Secties ---------- */
.rr-section {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
}
.rr-section-intro { max-width: 680px; margin-left: auto !important; margin-right: auto !important; text-align: center; }
.rr-lead { font-size: var(--wp--preset--font-size--large); }
.rr-muted { color: var(--wp--preset--color--muted); }
.has-contrast-background-color .rr-muted { color: #CFCFCF; }

/* Hero */
.rr-hero { overflow: hidden; position: relative; }
.rr-hero::after { /* subtiel oranje accent rechtsonder */
	content: "";
	position: absolute;
	right: -6rem;
	bottom: -6rem;
	width: 18rem;
	height: 18rem;
	border: 2.5rem solid var(--wp--preset--color--accent);
	opacity: 0.08;
	border-radius: 2rem;
	transform: rotate(18deg);
	pointer-events: none;
}
.rr-hero h1 { margin-top: 0.25rem; margin-bottom: 0.75rem; }
.rr-hero h1 .rr-accent, .rr-accent { color: var(--wp--preset--color--accent); }
.rr-hero .rr-lead { color: #F2F2F2; }
.rr-areas { font-weight: 600; }
.rr-areas strong { color: var(--wp--preset--color--accent); }
.rr-hero__cols { gap: clamp(2rem, 5vw, 4rem) !important; align-items: center !important; }

/* Ingelijste foto: nooit groter dan zijn echte breedte, dus niet wazig */
.rr-photo { margin: 0 0.7rem 0.7rem 0; position: relative; display: table; margin-inline: auto; }
@media (min-width: 782px) { .rr-photo::before { inset: 1.1rem -1.1rem -1.1rem 1.1rem !important; } }
.rr-photo img {
	display: block;
	width: auto;
	max-width: 100%;
	border-radius: 10px;
	border: 4px solid var(--wp--preset--color--contrast-2);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
	position: relative;
	z-index: 1;
}
.rr-photo::before {
	content: "";
	position: absolute;
	inset: 0.7rem -0.7rem -0.7rem 0.7rem;
	border: 3px solid var(--wp--preset--color--accent);
	border-radius: 12px;
	z-index: 0;
}
.rr-photo figcaption { position: relative; z-index: 1; color: #CFCFCF; text-align: center; margin-top: 1.75rem; font-size: 0.875rem; }

.rr-trust {
	list-style: none;
	padding: 0;
	margin-top: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	font-size: 0.9375rem;
}
.rr-trust li { display: flex; align-items: center; gap: 0.45rem; }
.rr-trust li::before,
.rr-checklist li::before,
.rr-tiles li::before {
	content: "";
	width: 1.1em;
	height: 1.1em;
	flex: none;
	background-color: var(--wp--preset--color--accent);
	-webkit-mask: var(--rr-i-check) center / contain no-repeat;
	mask: var(--rr-i-check) center / contain no-repeat;
}

/* Kaarten (diensten) en pijlers (waarom wij) */
.rr-cards { gap: 1.5rem !important; margin-top: var(--wp--preset--spacing--50) !important; }
.rr-card {
	background: var(--wp--preset--color--base);
	border: 1px solid #E4E4E0;
	border-top: 5px solid var(--wp--preset--color--accent);
	border-radius: 10px;
	padding: 1.75rem 1.5rem;
	box-shadow: 0 2px 10px rgba(34, 34, 34, 0.05);
}
.rr-card h3 { margin-top: 0.75rem; }
.rr-icon::before {
	content: "";
	display: block;
	width: 3rem;
	height: 3rem;
	border-radius: 10px;
	background: var(--wp--preset--color--contrast) var(--rr-icon-img, none) center / 1.6rem no-repeat;
}
.rr-icon--bolt { --rr-icon-img: var(--rr-i-bolt-o); }
.rr-icon--clipboard { --rr-icon-img: var(--rr-i-clipboard-o); }
.rr-icon--house { --rr-icon-img: var(--rr-i-house-o); }
.rr-icon--shield { --rr-icon-img: var(--rr-i-shield-o); }
.rr-icon--euro { --rr-icon-img: var(--rr-i-euro-o); }
.rr-icon--award { --rr-icon-img: var(--rr-i-award-o); }

.rr-checklist { list-style: none; padding-left: 0; }
.rr-checklist li { display: flex; gap: 0.6rem; align-items: baseline; margin-bottom: 0.45rem; }
.rr-checklist li::before { background-color: var(--wp--preset--color--accent-dark); transform: translateY(0.18em); }

.rr-pillar { text-align: left; }
.rr-pillar h3 { margin-top: 0.9rem; margin-bottom: 0.4rem; }

/* CTA-balk */
.rr-cta { text-align: center; }
.rr-cta h2 { font-size: var(--wp--preset--font-size--xx-large); margin-bottom: 0.5rem; }
.rr-cta .wp-block-buttons { margin-top: 1.5rem; }
.rr-cta a:where(:not(.wp-element-button)):hover { text-decoration-color: var(--wp--preset--color--contrast); }

/* Specialisaties als tegels */
.rr-tiles {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin-top: var(--wp--preset--spacing--50) !important;
}
@media (min-width: 600px) { .rr-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .rr-tiles { grid-template-columns: repeat(4, 1fr); } }
.rr-tiles li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1.1rem 1.25rem;
	background: var(--wp--preset--color--surface);
	border-left: 4px solid var(--wp--preset--color--accent);
	border-radius: 6px;
	font-weight: 700;
}
.rr-tiles li::before { background-color: var(--wp--preset--color--contrast); }

/* ---------- Footer ---------- */
.rr-footer { padding-top: var(--wp--preset--spacing--50); padding-bottom: 1.5rem; font-size: 0.9375rem; }
.rr-footer h2 {
	font-size: 1rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.75rem;
}
.rr-footer p { margin-top: 0; margin-bottom: 0.6rem; }
.rr-footer-logo img { height: 56px; width: auto; display: block; border-radius: 4px; }
.rr-footer-logo { margin-bottom: 1rem !important; }
.rr-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	margin-top: 2rem !important;
	padding-top: 1.25rem;
	font-size: 0.875rem;
	color: #CFCFCF;
}
.rr-footer-cols { gap: 2rem !important; }

/* Vaste belknop onderin op mobiel */
.rr-sticky-cta { display: none !important; }
@media (max-width: 781px) {
	.rr-sticky-cta {
		display: flex !important;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 100;
		margin: 0 !important;
		gap: 0.5rem !important;
		padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
		background: var(--wp--preset--color--contrast);
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
		flex-wrap: nowrap !important;
	}
	.rr-sticky-cta .wp-block-button { flex: 1 1 50%; margin: 0; }
	.rr-sticky-cta .wp-block-button__link { width: 100%; min-height: 54px; padding: 0.75rem 0.5rem; }
	body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
	/* In de editor niet vastzetten, anders zit hij in de weg */
	.editor-styles-wrapper .rr-sticky-cta { position: static; }
	.editor-styles-wrapper { padding-bottom: 0; }
}

/* ---------- Gewone pagina's en berichten ---------- */
.rr-main { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--60); }
.rr-main .wp-block-post-title { margin-bottom: 1.5rem; }
.wp-block-post-template { list-style: none; padding: 0; }
.wp-block-post-template > li { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid #E4E4E0; }

/* ---------- Iconen (SVG, geen externe bestanden) ---------- */
:root {
	--rr-i-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
	--rr-i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-12.3 7.4L3 21l2-5.4A8.4 8.4 0 1 1 21 11.5z'/%3E%3Cpath d='M8.5 11.5h.01M12 11.5h.01M15.5 11.5h.01'/%3E%3C/svg%3E");
	--rr-i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
	--rr-i-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
	--rr-i-clipboard: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");
	--rr-i-house: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M10 21v-6h4v6'/%3E%3C/svg%3E");
	--rr-i-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
	--rr-i-euro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 7a7 7 0 1 0 0 10'/%3E%3Cpath d='M4 10h10M4 14h10'/%3E%3C/svg%3E");
	--rr-i-award: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.5 13 17 22l-5-3-5 3 1.5-9'/%3E%3C/svg%3E");
	--rr-i-bolt-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9A12E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
	--rr-i-clipboard-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9A12E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");
	--rr-i-house-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9A12E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M10 21v-6h4v6'/%3E%3C/svg%3E");
	--rr-i-shield-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9A12E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
	--rr-i-euro-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9A12E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 7a7 7 0 1 0 0 10'/%3E%3Cpath d='M4 10h10M4 14h10'/%3E%3C/svg%3E");
	--rr-i-award-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9A12E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.5 13 17 22l-5-3-5 3 1.5-9'/%3E%3C/svg%3E");
}

/* In de editor de mobiele belbalk gewoon tonen, zodat u hem kunt aanpassen */
.editor-styles-wrapper .rr-sticky-cta { display: flex !important; position: static !important; outline: 2px dashed var(--wp--preset--color--accent); }
