<!-- 이미지 카드: 상단 이미지 + 하단 텍스트 (2~4열) -->
<!--
  📋 card-image
  ─────────────────
  용도: 단계별 설명, 카테고리별 설명 (이미지가 핵심인 카드)
  슬롯: cards[] 배열 (각 카드에 image, title, title_en, items[])
  Figma 원본: 2-1_02 > Group 1171281594 (카드 3열)
-->
<div class="block-card-image" style="--ci-count: {{ cards|length }}">
  {% for card in cards %}
  <div class="ci-card">
    {% if card.image %}
    <img class="ci-img" src="{{ card.image }}" alt="{{ card.title }}">
    {% endif %}
    <div class="ci-body">
      <div class="ci-title" style="color: {{ card.color | default('var(--color-accent, #006aff)') }}">{{ card.title }}</div>
      {% if card.title_en %}<div class="ci-title-en">{{ card.title_en }}</div>{% endif %}
      <div class="ci-divider"></div>
      <ul class="ci-list">
        {% for item in card.bullets %}
        <li>{{ item }}</li>
        {% endfor %}
      </ul>
      {% if card.source %}<div class="ci-source">{{ card.source }}</div>{% endif %}
    </div>
  </div>
  {% endfor %}
</div>

<style>
.block-card-image {
  display: grid;
  grid-template-columns: repeat(var(--ci-count, 3), 1fr);
  gap: 16px;
}
.ci-card {
  background: var(--color-bg, #ffffff);
  border-radius: var(--radius, 8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ci-img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #f8f9fb;
  padding: 10px;
}
.ci-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ci-title {
  font-size: 14px;
  font-weight: var(--weight-bold, 700);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 2px;
}
.ci-title-en {
  font-size: 12px;
  font-weight: var(--weight-normal, 400);
  color: var(--color-text-secondary, #666);
  margin-bottom: 10px;
}
.ci-divider {
  width: 100%;
  height: 1px;
  background: #000;
  margin-bottom: 10px;
}
.ci-list {
  white-space: pre-line;
  list-style: disc;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text, #000);
  flex: 1;
}
.ci-list li {
  margin-bottom: 3px;
}
.ci-source {
  font-size: 11px;
  color: var(--color-text-light, #94a3b8);
  font-style: italic;
  margin-top: 8px;
  border-top: 1px solid var(--color-border, #e2e8f0);
  padding-top: 6px;
}
</style>
