/*
Theme Name: Rikra Campers
Theme URI: https://rikracampers.nl/
Author: Kamphorst ICT
Description: Blokthema voor Rikra Campers. Werkt samen met de OVIS-plugin (shortcode [ovis-voorraad]) en de plugin "Rikra Functies" (formulieren, calculator, SEO-fixes, installatie).
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rikra-campers
*/

/* ---------- Basis ---------- */
:root {
	--rk-ink: var(--wp--preset--color--ink, #0F1726);
	--rk-navy: var(--wp--preset--color--navy, #1B2E4B);
	--rk-accent: var(--wp--preset--color--accent, #E8763A);
	--rk-base: var(--wp--preset--color--base, #F5F4EF);
	--rk-sand: var(--wp--preset--color--sand, #ECEAE2);
	--rk-sky: var(--wp--preset--color--sky, #E3E8F0);
	--rk-line: var(--wp--preset--color--line, #E1DFD6);
	--rk-muted: var(--wp--preset--color--muted, #4A5363);
	--rk-radius: 22px;
	--rk-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='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; max-width: 100%; }
:where(a):focus-visible, :where(button, summary, input, select, textarea):focus-visible {
	outline: 2px solid var(--rk-navy);
	outline-offset: 3px;
	border-radius: 4px;
}
.screen-reader-text:not(:focus) { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* Secties sluiten naadloos op elkaar aan */
.wp-site-blocks > * + *, .rk-main > .rk-flow, .rk-flow > * + * { margin-block-start: 0; }
.rk-main { padding-top: 0; }

/* ---------- Typografie-helpers ---------- */
.rk-eyebrow {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rk-navy);
}
.rk-lead { font-size: var(--wp--preset--font-size--large); color: var(--rk-muted); max-width: 640px; }
.rk-muted { color: var(--rk-muted); }
.rk-small { font-size: 0.8125rem; color: var(--rk-muted); }
.rk-stars::before { content: "★★★★★"; color: var(--rk-accent); letter-spacing: 2px; margin-right: 0.5rem; }

/* ---------- Secties ---------- */
.rk-section { padding-top: var(--wp--preset--spacing--60) !important; padding-bottom: var(--wp--preset--spacing--60) !important; }
.rk-section-tight { padding-top: var(--wp--preset--spacing--50) !important; padding-bottom: var(--wp--preset--spacing--50) !important; }
.rk-section > * + * { margin-block-start: 1.25rem; }
.rk-head-row { align-items: flex-end !important; justify-content: space-between; margin-bottom: 1.75rem; }
.rk-head-row > * { margin: 0; }

.rk-navy, .rk-ink { color: var(--rk-base); }
.rk-navy { background: var(--rk-navy); }
.rk-ink { background: var(--rk-ink); }
.rk-navy :where(h1, h2, h3, h4), .rk-ink :where(h1, h2, h3, h4) { color: #fff; }
.rk-navy a:where(:not(.wp-element-button)), .rk-ink a:where(:not(.wp-element-button)) { color: #fff; }
.rk-navy .rk-eyebrow, .rk-ink .rk-eyebrow { color: #BFCDE0; }
.rk-navy .rk-lead, .rk-navy .rk-muted, .rk-ink .rk-lead, .rk-ink .rk-muted { color: #D5DEEA; }
.rk-sand { background: var(--rk-sand); }
.rk-white { background: #fff; border-top: 1px solid var(--rk-line); border-bottom: 1px solid var(--rk-line); }

.rk-card {
	background: #fff;
	border: 1px solid var(--rk-line);
	border-radius: var(--rk-radius);
	padding: clamp(1.5rem, 3vw, 2.25rem) !important;
}
.rk-card--sky { background: var(--rk-sky); border-color: transparent; }
.rk-card.rk-ink { background: var(--rk-ink); border-color: transparent; }
.rk-card.rk-navy { background: var(--rk-navy); border-color: transparent; }
.rk-h1-md { font-size: clamp(1.9rem, 4.2vw, 3.5rem) !important; }
h1, h2 { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.rk-card > * { margin-block: 0; }
.rk-card > * + * { margin-block-start: 1rem; }

.rk-photo img {
	width: 100%;
	height: clamp(260px, 32vw, 420px);
	object-fit: cover;
	border-radius: 26px;
	display: block;
}
.rk-photo--short img { height: clamp(200px, 22vw, 300px); }
.rk-photo { margin: 0; }

/* Knoppen */
.wp-block-button.rk-btn-ink .wp-block-button__link { background: var(--rk-ink); color: #fff; }
.wp-block-button.rk-btn-ink .wp-block-button__link:hover { background: var(--rk-navy); }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 1.5px solid currentColor;
	padding: calc(0.95rem - 1.5px) calc(1.6rem - 1.5px);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--rk-ink); color: #fff; border-color: var(--rk-ink); }
.rk-navy .wp-block-button.is-style-outline .wp-block-button__link:hover,
.rk-hero .wp-block-button.is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--rk-ink); border-color: #fff; }

/* Lijsten met vinkjes */
ul.rk-checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem 1.5rem; }
ul.rk-checks li { position: relative; padding-left: 1.9rem; }
ul.rk-checks li::before {
	content: "";
	position: absolute; left: 0; top: 0.2em;
	width: 1.2rem; height: 1.2rem;
	background: var(--rk-navy);
	-webkit-mask: var(--rk-check) center / contain no-repeat;
	mask: var(--rk-check) center / contain no-repeat;
}
.rk-navy ul.rk-checks li::before, .rk-ink ul.rk-checks li::before { background: var(--rk-accent); }
ul.rk-checks.rk-checks--stack { grid-template-columns: 1fr; }

/* Rasters vullen de volle breedte (ook bij 3 items) */
.rk-fit.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)) !important; }
.rk-fit-sm.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)) !important; }
.rk-posts .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)) !important; }

/* ---------- Header ---------- */
.rk-header {
	background: var(--rk-ink);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .rk-header { top: var(--wp-admin--admin-bar--height, 32px); }
.rk-header__inner { justify-content: space-between; padding-top: 1rem; padding-bottom: 1rem; gap: 1rem 2rem; }
.rk-header__logo { margin: 0; }
.rk-header__logo img { height: 38px; width: auto; display: block; }
.rk-header .wp-block-navigation { color: #fff; }
.rk-header .wp-block-navigation a { color: #fff; text-decoration: none; padding-block: 0.5rem; }
.rk-header .wp-block-navigation a:hover,
.rk-header .wp-block-navigation .current-menu-item > a {
	text-decoration: underline;
	text-decoration-color: var(--rk-accent);
	text-decoration-thickness: 3px;
	text-underline-offset: 8px;
}
.rk-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--rk-ink); color: #fff; }
.rk-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.25rem; font-size: 1.375rem; }
.rk-header__actions { gap: 0.75rem 1.25rem; }
.rk-header__actions p { margin: 0; }
.rk-header__phone a { color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.rk-header__phone a::before { content: "☎"; margin-right: 0.4rem; color: var(--rk-accent); }
.rk-header .wp-block-button__link { padding: 0.7rem 1.25rem; font-size: 0.875rem; }
@media (max-width: 960px) {
	.rk-header__phone { display: none; }
}
@media (max-width: 600px) {
	.rk-header__actions .wp-block-buttons { display: none; }
}

/* ---------- Hero ---------- */
.rk-hero { color: #fff; }
.rk-hero { padding-left: var(--wp--style--root--padding-left, 24px) !important; padding-right: var(--wp--style--root--padding-right, 24px) !important; padding-bottom: clamp(2.5rem, 6vw, 4rem) !important; }
.rk-hero .wp-block-cover__inner-container { width: 100%; }
.rk-hero .wp-block-cover__inner-container > .alignwide { max-width: var(--wp--style--global--wide-size, 1240px); margin-inline: auto; width: 100%; }
.rk-hero__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	font-size: 0.875rem;
	font-weight: 600;
	margin: 0;
}
.rk-hero h1.rk-hero__kicker {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	letter-spacing: 0;
	color: #EEF2F7;
	margin: 0;
}
.rk-hero__slogan {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: clamp(3rem, 7.4vw, 6.5rem);
	line-height: 0.95;
	letter-spacing: -0.04em;
	max-width: 960px;
	margin: 0;
	color: #fff;
}
.rk-hero .rk-lead { color: #EEF2F7; max-width: 560px; }
.rk-hero .wp-block-cover__inner-container > * + * { margin-block-start: 1.5rem; }

/* ---------- USP-balk ---------- */
.rk-usp { background: var(--rk-ink); color: #E8ECF2; }
.rk-usp ul.rk-checks { padding-block: 1.25rem; font-size: 0.875rem; font-weight: 500; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.rk-usp ul.rk-checks li::before { background: var(--rk-accent); }

/* ---------- Tegels (types) ---------- */
.rk-tile {
	position: relative;
	border-radius: var(--rk-radius);
	overflow: hidden;
	min-height: 240px;
	color: #fff;
	isolation: isolate;
}
.rk-tile > .wp-block-image { position: absolute; inset: 0; margin: 0; z-index: -2; }
.rk-tile > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; }
.rk-tile::before { content: ""; position: absolute; inset: 0; background: rgba(10, 16, 30, 0.42); z-index: -1; transition: background 0.2s; }
.rk-tile:hover::before { background: rgba(10, 16, 30, 0.58); }
.rk-tile { display: flex; flex-direction: column; justify-content: flex-end; padding: 1.4rem !important; }
.rk-tile > * { margin: 0; }
.rk-tile h3 { color: #fff; font-size: 1.625rem; }
.rk-tile h3 a { color: #fff; text-decoration: none; }
.rk-tile h3 a::after { content: ""; position: absolute; inset: 0; }
.rk-tile p { color: #EEF2F7; font-size: 0.9375rem; }

/* ---------- Reviews ---------- */
.rk-review { background: #fff; border-radius: var(--rk-radius); padding: 1.75rem !important; display: flex; flex-direction: column; gap: 1rem; }
.rk-review > * { margin: 0 !important; }
.rk-review__quote { font-family: var(--wp--preset--font-family--display); font-size: 1.25rem; line-height: 1.35; font-weight: 500; }
.rk-review__name { font-size: 0.875rem; margin-top: auto !important; }

/* ---------- Kennisbank / berichtkaarten ---------- */
.rk-posts .wp-block-post {
	background: #fff;
	border: 1px solid var(--rk-line);
	border-radius: var(--rk-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.rk-posts .wp-block-post > * { margin: 0; }
.rk-posts .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.rk-posts .wp-block-post-terms { padding: 1.25rem 1.4rem 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rk-posts .wp-block-post-terms a { text-decoration: none; }
.rk-posts .wp-block-post-title { padding: 0.5rem 1.4rem 1.5rem; font-size: 1.3125rem; line-height: 1.25; }
.rk-posts .wp-block-post-title a { color: var(--rk-ink); text-decoration: none; }
.rk-posts .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.rk-posts .wp-block-post { position: relative; }
.rk-posts .wp-block-post:hover { border-color: var(--rk-navy); }

.rk-chips ul, ul.rk-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rk-chips li a, ul.rk-chips li {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem;
	border-radius: 999px; background: #fff; border: 1px solid #C9C6BB;
	color: var(--rk-ink); text-decoration: none; font-weight: 600; font-size: 0.875rem;
}
.rk-chips li.current-cat a { background: var(--rk-ink); color: #fff; border-color: var(--rk-ink); }

/* ---------- FAQ ---------- */
.rk-faq .wp-block-details + .wp-block-details { margin-top: 0.6rem; }
.wp-block-details summary {
	font-weight: 600;
	font-size: 1.0625rem;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	flex: none;
	width: 2rem; height: 2rem;
	border-radius: 50%;
	background: #F0EFE9;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 1.25rem; font-weight: 500;
}
.wp-block-details[open] summary::after { content: "−"; }
.wp-block-details > p { color: var(--rk-muted); margin-top: 0.75rem; }

/* ---------- CTA ---------- */
.rk-cta__box {
	background: var(--rk-accent);
	color: var(--rk-ink);
	border-radius: 28px;
	padding: clamp(2rem, 5vw, 4rem) !important;
	justify-content: space-between;
	gap: 1.75rem;
}
.rk-cta__box h2 { font-weight: 800; color: var(--rk-ink); margin: 0 0 0.5rem; }
.rk-cta__box p { margin: 0; }
.rk-cta__box .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--rk-ink); color: #fff; }

/* ---------- Pagina-intro / kruimelpad ---------- */
.rk-intro { padding-top: 1.75rem !important; padding-bottom: 2.5rem !important; }
.rk-intro > * { margin-block: 0; }
.rk-intro > * + * { margin-block-start: 1rem; }
.rk-breadcrumb, .rank-math-breadcrumb { font-size: 0.875rem; color: var(--rk-muted); margin-bottom: 1.5rem; }
.rk-breadcrumb a, .rank-math-breadcrumb a { color: var(--rk-muted); }
.rk-navy .rk-breadcrumb, .rk-navy .rk-breadcrumb a, .rk-navy .rank-math-breadcrumb a { color: #BFCDE0; }

/* ---------- Stappen ---------- */
ol.rk-steps {
	list-style: none; padding: 0; margin: 0;
	counter-reset: rk-step;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem;
}
ol.rk-steps li {
	counter-increment: rk-step;
	background: #fff; border: 1px solid var(--rk-line); border-radius: var(--rk-radius);
	padding: 1.5rem; color: var(--rk-muted);
}
ol.rk-steps li strong { display: block; color: var(--rk-ink); font-family: var(--wp--preset--font-family--display); font-size: 1.375rem; margin: 0.75rem 0 0.4rem; }
ol.rk-steps li::before {
	content: counter(rk-step);
	display: flex; align-items: center; justify-content: center;
	width: 2.75rem; height: 2.75rem; border-radius: 50%;
	background: var(--rk-accent); color: var(--rk-ink); font-weight: 800; font-size: 1.125rem;
}
.rk-navy ol.rk-steps li { background: transparent; border-color: #2D3B52; color: #D5DEEA; }
.rk-navy ol.rk-steps li strong { color: #fff; }

/* ---------- Tabel ---------- */
.rk-compare { overflow-x: auto; border-radius: 20px; background: #fff; }
.rk-compare table { min-width: 560px; border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.rk-compare th, .rk-compare td { border: 0; border-bottom: 1px solid var(--rk-sand); padding: 1rem 1.25rem; text-align: left; }
.rk-compare thead { border: 0; }
.rk-compare thead th { background: var(--rk-ink); color: #fff; font-weight: 600; }
.rk-compare thead th:last-child { color: var(--rk-accent); }
.rk-compare tbody td:first-child { font-weight: 600; }
.rk-compare tbody td:nth-child(2) { color: var(--rk-muted); }
.rk-compare tbody td:last-child { font-weight: 600; }

/* ---------- Paneel (garantie) ---------- */
.rk-panel { border-radius: 28px; padding: clamp(1.75rem, 5vw, 3.5rem) !important; }

/* ---------- Team ---------- */
.rk-person { background: #fff; border: 1px solid var(--rk-line); border-radius: 20px; padding: 1.25rem !important; }
.rk-person > * { margin: 0; }
.rk-person h3 { font-size: 1.125rem; font-family: var(--wp--preset--font-family--body); letter-spacing: 0; }

/* ---------- Artikel ---------- */
.rk-article-meta { font-size: 0.875rem; color: var(--rk-muted); gap: 0.5rem 1rem; }
.rk-article-meta > * { margin: 0; }
.rk-article .wp-block-post-featured-image img { border-radius: 28px; max-height: 480px; object-fit: cover; width: 100%; }
.rk-article .wp-block-post-content { font-size: 1.125rem; line-height: 1.7; }
.rk-article .wp-block-post-content h2 { font-size: 2rem; margin-top: 2.5rem; }
.rk-article-cta { border-radius: var(--rk-radius); }

/* ---------- Footer ---------- */
.rk-footer { background: var(--rk-ink); color: #D3DAE4; font-size: 0.875rem; }
.rk-footer a { color: #D3DAE4; }
.rk-footer a:hover { color: #fff; }
.rk-footer h2 { color: #fff; font-family: var(--wp--preset--font-family--body); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0; margin: 0 0 0.75rem; }
.rk-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.rk-footer__logo img { height: 34px; width: auto; }
.rk-footer ul.rk-chips { display: flex; margin-top: 2.5rem; }
.rk-footer ul.rk-chips li { background: transparent; border-color: #36445C; color: #D3DAE4; min-height: 36px; font-size: 0.8125rem; font-weight: 500; }
.rk-footer__bottom { border-top: 1px solid #27344A; padding-top: 1.25rem; margin-top: 2rem !important; justify-content: space-between; color: #A8B3C4; font-size: 0.8125rem; }
.rk-footer__bottom p { margin: 0; }

/* ---------- OVIS-plugin: aansluiten op de huisstijl ---------- */
#ovis-container, #ovis-search { font-family: var(--wp--preset--font-family--body); color: var(--rk-ink); }
#ovis-container :where(h1, h2, h3) { font-family: var(--wp--preset--font-family--display); letter-spacing: -0.02em; }
#ovis-container a { color: var(--rk-navy); }
#ovis-container img { border-radius: 14px; }
#ovis-search { background: #fff; border: 1px solid var(--rk-line); border-radius: var(--rk-radius) !important; padding: 1rem !important; }
#ovis-container :where(button, .button, input[type="submit"]) { border-radius: 999px; font-weight: 700; }

/* ---------- Instagram (Smash Balloon) ---------- */
.rk-instagram #sb_instagram { padding: 0 !important; }
.rk-instagram #sb_instagram .sbi_photo { border-radius: 16px; }

/* ---------- Mobiel ---------- */
@media (max-width: 781px) {
	.rk-hero { min-height: 620px !important; }
	.rk-head-row { align-items: flex-start !important; }
}
