/*
 * SuikerSlim theme glue: only what belongs to WordPress.
 * Component styles, accessible defaults and mobile rules live in the design system
 * (design-system/components/bundle.css, copied to components.css). Change them there.
 * 1. WordPress defaults.
 * 2. Page layout around the components.
 * 3. Core blocks styled with design-system classes, used by the patterns.
 */

/* ---------- 1. WordPress defaults ---------- */

.screen-reader-text:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Logged in: keep the menu panel below the admin bar. */
.admin-bar .ss-menu { top: var(--wp-admin--admin-bar--height, 0px); }

/* SitesMonkey honeypot, kept out of view and out of the tab order */
.ss-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 2. Layout ---------- */

/* Header and footer span the full width; the header wrap is the container query root. */
.wp-block-template-part:has(> .ss-header-wrap),
.wp-block-template-part:has(> .ss-footer) { margin: 0; }

/* Articles (recipes, tips, text pages): components carry their own column. */
.ss-article { padding-left: 20px; padding-right: 20px; }
.ss-article-doc { max-width: calc(var(--doc-w) + 40px); }
.ss-article-doc > * + * { margin-top: var(--space-6); }
.ss-article-page { padding-bottom: 0; }

/* Overviews */
.ss-overview { box-sizing: border-box; max-width: calc(var(--container) + 40px); margin: 0 auto; padding: 0 20px var(--space-16); }
.ss-overview > * + * { margin-top: var(--space-10); }
.ss-overview .ss-chips + .ss-grid { margin-top: var(--space-6); }
.ss-grid-empty { padding: var(--space-10) 0; text-align: center; color: var(--heading); }
.ss-overview-fav .ss-article-head { max-width: none; margin-inline: 0; padding-inline: 0; }
/* The overview hero sits inside the overview column but spans the full width. */
.ss-overview > .ss-hero { margin-inline: calc(50% - 50vw); padding-inline: max(20px, (100vw - var(--container)) / 2); }

/* [ss_cards] shortcode inside page content */
.ss-cards-block > * + * { margin-top: var(--space-6); }
.ss-cards-title { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.25; color: var(--heading); }
.ss-cards-more { text-align: center; margin-top: var(--space-10); }

/* Search results reuse the overview */
.ss-search-form { max-width: 520px; margin: 0 auto; }

/* ---------- 3. Core blocks with design-system styling (patterns) ---------- */

/* Full-width sections */
.ss-section { padding-top: var(--space-16) !important; padding-bottom: var(--space-16) !important; }
.ss-section > .wp-block-heading:first-child { margin-top: 0; }
.ss-section .ss-eyebrow { margin-bottom: 0; }

/* Hero built from core blocks (round 2): group.ss-hero > [image.ss-hero-figure] + group.ss-hero-inner|ss-hero-box
   > heading.ss-hero-title + paragraph.ss-hero-lead + buttons. Layout and photo come from components.css. */
.wp-block-group.ss-hero { margin-top: 0; }
.wp-block-group.ss-hero > .ss-hero-inner > *,
.wp-block-group.ss-hero > .ss-hero-box > * { margin-block: 0; }
.wp-block-group.ss-hero .ss-hero-title { margin-bottom: var(--space-4); }
.wp-block-group.ss-hero .wp-block-buttons { justify-content: flex-start; margin-top: var(--space-6); }
.ss-hero .wp-block-button.is-style-licht .wp-block-button__link { background: var(--groen); color: var(--on-groen); }
.ss-hero .wp-block-button.is-style-licht .wp-block-button__link:hover { background: var(--logo-groen-donker); color: var(--on-groen); }
.ss-hero .wp-block-button.is-style-licht .wp-block-button__link:focus-visible { outline-color: var(--groen); }
.ss-hero > .wp-block-image.ss-hero-figure img { max-width: none; }

/* Button block styles (register_block_style in inc/patterns.php) */
.wp-block-button.is-style-licht .wp-block-button__link { background: var(--surface-raised); color: var(--groen); font-size: 17.6px; padding: var(--space-4) var(--space-10); }
.wp-block-button.is-style-licht .wp-block-button__link:hover { background: var(--surface-mint); color: var(--logo-groen-donker); }
.wp-block-button.is-style-licht .wp-block-button__link:focus-visible { outline-color: var(--surface-raised); }
.wp-block-button.is-style-pill .wp-block-button__link { border-radius: var(--radius-pill); padding: 12px 20px; font-size: 15px; line-height: 19px; }

/* ValueCard grid: group.ss-value-grid (grid layout) > group.ss-card */
.wp-block-group.ss-card { padding: var(--space-7); }
.wp-block-group.ss-card > * { margin-block: 0; }
.wp-block-group.ss-card > * + * { margin-top: var(--space-2); }
.wp-block-group.ss-card > .ss-card-icon { margin-bottom: var(--space-4); }
.wp-block-group.ss-card > .ss-card-icon img { width: 40px; height: 40px; }
.wp-block-group.ss-card .wp-block-heading.ss-card-title { margin-top: 0; font-size: 17.6px; }

/* StoryQuote built from core blocks (group + quote) */
.wp-block-group.ss-story > * { margin: 0; }
.ss-story .wp-block-quote.ss-story-quote { margin: 0; padding: 0; border: 0; }
.ss-story .wp-block-quote.ss-story-quote cite { display: block; margin-top: var(--space-4); font-style: normal; font-size: 14.4px; font-weight: 600; color: var(--heading); }
.ss-story-wrap { max-width: 760px; margin-inline: auto; }

/* CtaBand built from core blocks */
.wp-block-group.ss-band > .wp-block-heading { margin: 0 0 var(--space-4); }
.wp-block-group.ss-band > p { margin: 0 auto var(--space-6); max-width: 560px; }
.wp-block-group.ss-band .wp-block-buttons { justify-content: center; }

/* Image with rounded corners and card shadow */
.wp-block-image.is-style-kaart img { border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

/* FormCard around a form block or shortcode */
.wp-block-group.ss-form-card { max-width: 660px; margin-inline: auto; }
.wp-block-group.ss-form-card > .wp-block-heading { margin: 0 0 var(--space-2); }

/* List style "Vinkjes": the CheckList look on a core list block */
.wp-block-list.is-style-check { list-style: none; padding-left: 0; }
.wp-block-list.is-style-check li { position: relative; padding-left: 34px; }
.wp-block-list.is-style-check li + li { margin-top: var(--space-3); }
.wp-block-list.is-style-check li::before {
	content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: var(--radius-full);
	background: var(--surface-mint) url("../icons/check.svg") center / 16px no-repeat;
}

/* TrustRow from core blocks: group.ss-trust > image + paragraph */
.ss-trust .wp-block-image { margin: 0 auto var(--space-2); }
.ss-trust .wp-block-image img { width: 32px; height: 32px; }

/* Mobile: hero button block and sections */
@media (max-width: 600px) {
	.ss-section { padding-top: var(--space-10) !important; padding-bottom: var(--space-10) !important; }
	.wp-block-button.is-style-licht .wp-block-button__link { padding: var(--space-4) var(--space-6); }
}

/* ---------- Round 3: home rhythm (core blocks) ---------- */

/* Section headings sit on the content grid, left-aligned. */
.ss-section > .wp-block-heading:first-child + .ss-lead { margin-top: var(--space-2); }
.ss-section > .wp-block-buttons { justify-content: flex-start !important; margin-top: var(--space-7); }
.ss-section > .ss-value-grid,
.ss-section > .wp-block-suikerslim-latest-cards,
.ss-section > .ss-cards-block { margin-top: var(--space-7); }
.ss-section > .wp-block-heading { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.02em; text-wrap: balance; }

/* "Split" section: heading on the left, a list of rows on the right. */
.ss-section--split {
	display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 0 var(--space-16); align-items: start;
	padding-inline: max(20px, (100% - var(--container)) / 2) !important;
}
.ss-section--split > * { grid-column: 2; margin: 0 !important; }
.ss-section--split > .wp-block-heading:first-child { grid-column: 1; grid-row: 1 / span 3; position: sticky; top: var(--space-10); }
.ss-value-list > .ss-card { padding: var(--space-6) 0 !important; background: none; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--line-groen); display: grid; grid-template-columns: 48px 1fr; gap: 4px var(--space-5); }
.ss-value-list > .ss-card > * { margin: 0 !important; }
.ss-value-list > .ss-card > .ss-card-icon { grid-row: span 2; display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--surface-raised); }
.ss-value-list > .ss-card > .ss-card-icon img { width: 28px !important; height: 28px !important; }
.ss-value-list > .ss-card .ss-card-title { font-size: 20px !important; }
.wp-block-group.ss-value-list { display: block !important; border-top: 1px solid var(--line-groen); }

/* Story band on sand */
.ss-section--zand { background: color-mix(in srgb, var(--theme-roest) 14%, var(--surface-alt)) !important; }
.ss-section--zand .ss-story .wp-block-quote.ss-story-quote cite { margin-top: var(--space-6); font-size: 16px; color: var(--heading); }

/* CTA band from core blocks: white button on deep green, the small note in white. */
.wp-block-group.ss-band .wp-block-button__link { background: var(--surface-raised); color: var(--groen); }
.wp-block-group.ss-band .wp-block-button__link:hover { background: var(--surface-mint); color: var(--logo-groen-donker); }
.wp-block-group.ss-band .wp-block-button__link:focus-visible { outline-color: var(--on-groen); }
.wp-block-group.ss-band > p.has-small-font-size { margin: var(--space-4) auto 0; color: rgba(255, 255, 255, 0.8); }

@media (max-width: 781px) {
  .ss-section--split { display: block; }
  .ss-section--split > .wp-block-heading:first-child { position: static; margin-bottom: var(--space-4) !important; }
  /* "Wat krijg je": cards become compact rows with the icon on the left. */
  .ss-value-grid > .ss-card { display: grid; grid-template-columns: 40px 1fr; gap: 4px var(--space-4); padding: var(--space-5) !important; }
  .ss-value-grid > .ss-card > * { margin: 0 !important; grid-column: 2; }
  .ss-value-grid > .ss-card > .ss-card-icon { grid-column: 1; grid-row: 1 / span 3; }
  .ss-value-grid > .ss-card > .ss-card-icon img { width: 32px !important; height: 32px !important; }
}

/* ---------- Round 4 (29-11-2026): Lid worden ---------- */
/* Two columns: what you get and how it works on the left, the form on the right (sticky).
   On narrow screens the form comes first. */
.ss-signup .wp-block-columns.ss-signup-cols { gap: var(--space-16); align-items: flex-start; }
.ss-signup-info > * { margin-block: 0; }
.ss-signup-info > * + * { margin-top: var(--space-6); }
.ss-signup-info > .wp-block-heading { font-size: 28px; letter-spacing: -0.015em; }
.ss-signup-info > .wp-block-heading + * { margin-top: var(--space-4); }
.ss-signup-info > .ss-lead { font-size: 19.2px; }
.ss-signup-info > * + .wp-block-heading { margin-top: var(--space-10); }
.ss-signup-form { position: sticky; top: var(--space-10); }

/* Steps: "Zo werkt het" */
.ss-steps-list { counter-reset: ss-step; margin: 0; padding: 0; list-style: none; }
.ss-steps-list li { counter-increment: ss-step; position: relative; padding: 0 0 var(--space-5) 52px; min-height: 36px; }
.ss-steps-list li::before {
	content: counter(ss-step); position: absolute; left: 0; top: -4px;
	display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--radius-full);
	background: var(--groen); color: var(--on-groen); font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.ss-steps-list li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 4px; width: 2px; background: var(--line-groen); }

@media (max-width: 781px) {
	.ss-signup .wp-block-columns.ss-signup-cols { gap: var(--space-10); }
	.ss-signup-form { position: static; order: -1; }
}

/* Round 5: no single word alone on the last line of paragraphs in page content. */
.wp-site-blocks p, .wp-site-blocks li { text-wrap: pretty; }
.wp-site-blocks :is(h2, h3) { text-wrap: balance; }
