src/components/social-proof/CaseStudyCard.astro
---
/**
* CaseStudyCard
* Mini case study cards met resultaten en klantinfo.
*/
interface Props {
eyebrow?: string;
headline?: string;
cases: {
client: string;
industry: string;
result: string;
resultLabel: string;
description: string;
image?: string;
tags?: string[];
}[];
}
const { eyebrow = 'Klantresultaten', headline, cases } = Astro.props;
---
<section class="csc">
<div class="csc-inner">
{(eyebrow || headline) && (
<div class="csc-header">
{eyebrow && <span class="csc-eyebrow">{eyebrow}</span>}
{headline && <h2 class="csc-headline">{headline}</h2>}
</div>
)}
<div class="csc-grid">
{cases.map(c => (
<div class="csc-card">
{c.image && <img src={c.image} alt={c.client} class="csc-img" />}
<div class="csc-body">
<div class="csc-top">
<span class="csc-client">{c.client}</span>
<span class="csc-industry">{c.industry}</span>
</div>
<p class="csc-desc">{c.description}</p>
<div class="csc-result">
<span class="csc-result-val">{c.result}</span>
<span class="csc-result-lbl">{c.resultLabel}</span>
</div>
{c.tags && c.tags.length > 0 && (
<div class="csc-tags">
{c.tags.map(t => <span class="csc-tag">{t}</span>)}
</div>
)}
</div>
</div>
))}
</div>
</div>
</section>
<style>
.csc { background: #fff; padding: 5rem 2rem; border-top: 1px solid #e5e7eb; }
.csc-inner { max-width: 1100px; margin: 0 auto; }
.csc-header { text-align: center; margin-bottom: 3rem; }
.csc-eyebrow { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent,#6366f1); margin-bottom: 0.75rem; }
.csc-headline { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 900; color: #0a0a0a; letter-spacing: -0.04em; line-height: 1.15; margin: 0; }
.csc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.csc-card { border: 1px solid #e5e7eb; border-radius: 1rem; overflow: hidden; display: flex; flex-direction: column; }
.csc-img { width: 100%; height: 200px; object-fit: cover; }
.csc-body { padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.csc-top { display: flex; align-items: center; justify-content: space-between; }
.csc-client { font-size: 0.9375rem; font-weight: 700; color: #0a0a0a; }
.csc-industry { font-size: 0.75rem; color: #9ca3af; background: #f3f4f6; padding: 0.2rem 0.625rem; border-radius: 1rem; }
.csc-desc { font-size: 0.9375rem; color: #6b7280; line-height: 1.6; margin: 0; }
.csc-result { display: flex; flex-direction: column; padding: 1rem; background: #f8fafc; border-radius: 0.625rem; border-left: 3px solid var(--color-accent,#6366f1); }
.csc-result-val { font-size: 1.75rem; font-weight: 900; color: var(--color-accent,#6366f1); letter-spacing: -0.04em; line-height: 1; }
.csc-result-lbl { font-size: 0.8125rem; color: #6b7280; margin-top: 0.25rem; }
.csc-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.csc-tag { font-size: 0.75rem; padding: 0.2rem 0.625rem; background: #ede9fe; color: #6d28d9; border-radius: 1rem; font-weight: 500; }
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
cases * | { client: string; industry: string; result: string; resultLabel: string; description: string; image?: string; tags?: string[] }[] | — | Case study items |
eyebrow | string | — | Eyebrow boven de sectie |
headline | string | — | Sectie headline |
* = verplicht