/* Studio Alpha — blog (index, archives, articles, "Lees ook" on product pages).
   Loaded only on blog views by the suite's Blog module. Tokens from theme.json. */

/* ---------- Index / archive hero ---------- */
.sa-blog-hero { background: #fff; border-radius: var(--sa-radius-lg); padding: var(--wp--preset--spacing--50); margin-bottom: var(--wp--preset--spacing--40); }
.sa-blog-hero > * { margin-block: 0; }
.sa-blog-hero > * + * { margin-top: 0.85rem; }
.sa-blog-hero .sa-blog-hero-title { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.05; max-width: 22ch; overflow-wrap: anywhere; }
.sa-blog-hero .sa-lead, .sa-blog-hero .wp-block-term-description { color: var(--wp--preset--color--body); max-width: 44rem; font-size: 1.0625rem; }
.sa-blog-hero .wp-block-term-description p { margin: 0; }
.sa-blog-chips { margin-top: 1.25rem !important; }
@media (max-width: 781px) {
	.sa-blog-hero { padding: 1.5rem 1.25rem; border-radius: var(--sa-radius); }
}

/* ---------- Cards ---------- */
.sa-blog-card { background: #fff; border-radius: var(--sa-radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; }
.sa-blog-card:hover { box-shadow: 0 14px 30px -18px rgba(31,35,40,.35); }
.sa-blog-card > * { margin: 0 !important; }
.sa-blog-card-img, .sa-blog-card .wp-block-post-featured-image { margin: 0; background: var(--wp--preset--color--sand); aspect-ratio: 16 / 9; overflow: hidden; display: block; }
.sa-blog-card-img img, .sa-blog-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sa-blog-card-body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.sa-blog-card-body > * { margin: 0 !important; }
.sa-blog-card-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; font-size: var(--wp--preset--font-size--xs); color: var(--sa-muted); font-weight: 600; margin: 0; }
.sa-blog-card-meta span:first-child:not(:last-child) { color: var(--sa-accent); }
.sa-blog-card-title, .sa-blog-card .wp-block-post-title { font-size: 1.1875rem !important; line-height: 1.25; letter-spacing: -0.02em; font-weight: 800; }
.sa-blog-card-title a, .sa-blog-card .wp-block-post-title a { text-decoration: none; color: var(--sa-ink); }
.sa-blog-card-title a:hover, .sa-blog-card .wp-block-post-title a:hover { color: var(--sa-accent); }
/* Whole card clickable through the title link. */
.sa-blog-card { position: relative; }
.sa-blog-card-title a::after, .sa-blog-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.sa-blog-card-title a:focus-visible, .sa-blog-card .wp-block-post-title a:focus-visible { outline: none; }
.sa-blog-card:has(.wp-block-post-title a:focus-visible), .sa-blog-card:has(.sa-blog-card-title a:focus-visible) { outline: 2px solid var(--sa-ink); outline-offset: 3px; }
.sa-blog-card-excerpt, .sa-blog-card .wp-block-post-excerpt { color: var(--wp--preset--color--body); font-size: var(--wp--preset--font-size--sm); line-height: 1.55; }
.sa-blog-card .wp-block-post-excerpt__excerpt { margin: 0; }
.sa-blog-card .wp-block-post-excerpt__more-text { display: none; }

/* ---------- Grid: the first article large ---------- */
.sa-blog-grid .wp-block-post-template { gap: 1.25rem; margin: 0; padding: 0; }
.sa-blog-grid .wp-block-post-template > li { margin: 0; }
@media (min-width: 782px) {
	.sa-blog-grid .wp-block-post-template > li:first-child { grid-column: 1 / -1; }
	.sa-blog-grid .wp-block-post-template > li:first-child .sa-blog-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
	.sa-blog-grid .wp-block-post-template > li:first-child .wp-block-post-featured-image { aspect-ratio: 1200 / 630; height: 100%; }
	.sa-blog-grid .wp-block-post-template > li:first-child .sa-blog-card-body { padding: clamp(1.5rem, 3vw, 2.5rem); justify-content: center; gap: 0.85rem; }
	.sa-blog-grid .wp-block-post-template > li:first-child .wp-block-post-title { font-size: clamp(1.6rem, 2.6vw, 2.25rem) !important; line-height: 1.12; }
	.sa-blog-grid .wp-block-post-template > li:first-child .wp-block-post-excerpt { font-size: 1.0625rem; }
}
.sa-blog-pagination { margin-top: var(--wp--preset--spacing--50); gap: 0.5rem; font-weight: 700; }
.sa-blog-pagination a, .sa-blog-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 0.9rem; border-radius: 999px; background: #fff; text-decoration: none; color: var(--sa-ink); }
.sa-blog-pagination .page-numbers.current { background: var(--sa-ink); color: #fff; }
.sa-blog-empty { background: #fff; border-radius: var(--sa-radius); padding: 2rem; text-align: center; color: var(--wp--preset--color--body); }

/* ---------- Article ---------- */
.sa-article-head { text-align: left; margin-bottom: var(--wp--preset--spacing--40); }
.sa-article-head > * { margin-block: 0; }
.sa-article-head > * + * { margin-top: 0.9rem; }
.sa-article-cats { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: var(--wp--preset--font-size--xs); }
.sa-article-cats a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 0.8rem; border-radius: 999px; background: var(--wp--preset--color--sage-soft); color: var(--sa-accent); font-weight: 700; text-decoration: none; }
.sa-article-cats a:hover { background: var(--wp--preset--color--sage); color: var(--sa-accent); }
.sa-article-cats .wp-block-post-terms__separator { display: none; }
.sa-article-title { font-size: clamp(2rem, 4.6vw, 3.25rem) !important; line-height: 1.07; letter-spacing: -0.035em; overflow-wrap: anywhere; hyphens: auto; }
.sa-article-lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--wp--preset--color--body); }
.sa-article-lead p { margin: 0; }
.sa-article-lead .wp-block-post-excerpt__more-text { display: none; }

.sa-blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.1rem; font-size: var(--wp--preset--font-size--sm); color: var(--sa-muted); }
.sa-blog-meta > span { display: inline-flex; align-items: center; gap: 0.5rem; }
.sa-blog-meta > span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #C9C4B8; margin-right: 0.6rem; }
.sa-blog-author strong { color: var(--sa-ink); font-weight: 700; }
.sa-blog-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sa-accent); color: #F7F5F0; }

.sa-article-cover { margin-block: 0 var(--wp--preset--spacing--40) !important; }
.sa-article-cover img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--sa-radius-lg); display: block; background: var(--wp--preset--color--sand); }

.sa-article-body { background: #fff; border-radius: var(--sa-radius-lg); padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3rem); }
.sa-article-body > * { margin-block: 0; }

/* Readable article typography: ~720px column, 18px body (17px mobile). */
.sa-article-content { font-size: 1.125rem; line-height: 1.75; color: #3A3F47; }
.sa-article-content > * { margin-block: 0; }
.sa-article-content > * + * { margin-top: 1.15em; }
.sa-article-content h2 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.025em; margin-top: 2.2em !important; scroll-margin-top: 110px; }
.sa-article-content h3 { font-size: 1.3125rem; line-height: 1.3; letter-spacing: -0.015em; margin-top: 1.8em !important; scroll-margin-top: 110px; }
.sa-article-content h2 + *, .sa-article-content h3 + * { margin-top: 0.6em !important; }
.sa-article-content a { color: var(--sa-accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; font-weight: 600; }
.sa-article-content a:hover { color: #244A37; text-decoration-thickness: 2px; }
.sa-article-content strong { color: var(--sa-ink); }
.sa-article-content ul, .sa-article-content ol { padding-left: 1.4em; }
.sa-article-content li + li { margin-top: 0.4em; }
.sa-article-content li::marker { color: var(--sa-accent); font-weight: 700; }
.sa-article-content blockquote { border-left: 4px solid var(--wp--preset--color--sage); margin-inline: 0; padding: 0.25rem 0 0.25rem 1.25rem; color: var(--sa-ink); }
.sa-article-content .wp-block-table { overflow-x: auto; }
.sa-article-content table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.sa-article-content th, .sa-article-content td { border: 0; border-bottom: 1px solid var(--sa-line); padding: 0.7rem 0.75rem; text-align: left; vertical-align: top; }
.sa-article-content thead th { background: var(--wp--preset--color--base); font-weight: 700; color: var(--sa-ink); }
.sa-article-content .wp-block-image img { border-radius: var(--sa-radius); }

/* Product block inside an article. */
.sa-blog-shop { background: var(--wp--preset--color--base); border-radius: var(--sa-radius); padding: 1.25rem; margin-block: 2em !important; }
.sa-blog-shop-title { font-size: var(--wp--preset--font-size--xs) !important; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sa-accent); margin: 0 0 0.75rem !important; }
.sa-blog-shop .wc-block-product-template, .sa-blog-related-products .wc-block-product-template { margin: 0 !important; padding: 0 !important; }
.sa-blog-shop .wp-block-post-title { font-size: 0.9375rem !important; line-height: 1.35; }
.sa-blog-shop .wp-block-post-title a { text-decoration: none; color: var(--sa-ink); font-weight: 700; }
.sa-blog-shop .wc-block-components-product-price { font-size: 0.9375rem !important; }

/* FAQ in an article. */
.sa-article-content .sa-blog-faq { border: 1px solid var(--sa-line); background: #fff; border-radius: 16px; padding: 0; margin-top: 0.6rem !important; }
.sa-article-content .sa-blog-faq summary { cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.25rem; font-weight: 700; color: var(--sa-ink); position: relative; min-height: 44px; line-height: 1.4; }
.sa-article-content .sa-blog-faq summary::-webkit-details-marker { display: none; }
.sa-article-content .sa-blog-faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 500; color: var(--sa-accent); }
.sa-article-content .sa-blog-faq[open] summary::after { content: "−"; }
.sa-article-content .sa-blog-faq > :not(summary) { padding: 0 1.25rem; margin: 0 0 1rem; font-size: 1.0625rem; }

/* Table of contents. */
.sa-blog-toc { margin-bottom: 2rem !important; }
.sa-blog-toc details { background: var(--wp--preset--color--base); border-radius: 16px; padding: 0.25rem 1.25rem; }
.sa-blog-toc summary { cursor: pointer; font-weight: 800; color: var(--sa-ink); min-height: 44px; display: flex; align-items: center; list-style: none; }
.sa-blog-toc summary::-webkit-details-marker { display: none; }
.sa-blog-toc summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--sa-ink); border-bottom: 2px solid var(--sa-ink); transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
.sa-blog-toc details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.sa-blog-toc ol { margin: 0 0 1rem; padding-left: 1.3em; counter-reset: none; }
.sa-blog-toc li { margin: 0.3rem 0; line-height: 1.45; }
.sa-blog-toc li::marker { color: var(--sa-muted); font-size: 0.9em; }
.sa-blog-toc a { color: var(--wp--preset--color--body); text-decoration: none; font-size: 1rem; }
.sa-blog-toc a:hover { color: var(--sa-accent); text-decoration: underline; }

/* ---------- After the article ---------- */
.sa-article-after { margin-top: var(--wp--preset--spacing--50) !important; }
.sa-article-after > * + * { margin-top: var(--wp--preset--spacing--50); }
.sa-blog-section-title { font-size: clamp(1.375rem, 2.4vw, 1.75rem); margin: 0 0 1.1rem; letter-spacing: -0.025em; }
.sa-blog-related-products .sa-products { margin: 0; }
.sa-blog-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.sa-article-back { margin-top: var(--wp--preset--spacing--40) !important; font-weight: 700; }
.sa-article-back a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

/* "Lees ook" on product pages. */
.sa-product-read-more { margin-block: var(--wp--preset--spacing--50) 0; }

@media (max-width: 1024px) {
	.sa-blog-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 781px) {
	.sa-article-content { font-size: 1.0625rem; line-height: 1.7; }
	.sa-article-content h2 { font-size: 1.375rem; }
	.sa-article-content h3 { font-size: 1.1875rem; }
	.sa-article-body { border-radius: var(--sa-radius); }
	.sa-article-cover img { border-radius: var(--sa-radius); }
	.sa-blog-cards { grid-template-columns: minmax(0, 1fr); }
	.sa-blog-meta { font-size: var(--wp--preset--font-size--xs); }
	.sa-blog-shop { padding: 1rem; }
}
@media (max-width: 600px) {
	.sa-blog-meta .sa-blog-author { flex-basis: 100%; }
	.sa-blog-meta > span:nth-child(2)::before { display: none; }
}
@media (max-width: 600px) {
	.sa-blog-related-products .wc-block-product-template { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
	.sa-blog-related-products .wc-block-product-template > li:nth-child(n+5) { display: none; }
	.sa-blog-related-products .wp-block-post-title { font-size: 0.875rem !important; }
}
