/* ============================================================
   images-styles.css — Henkelquote
   Стили для inline-картинок (figure + figcaption) внутри статьи.
   Hero-картинка стилизована в основном <style> блоке index.html.
   ============================================================ */

article figure {
  margin: clamp(1.75rem, 3vw, 2.5rem) 0;
  padding: 0;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 22, 35, 0.06));
}

article figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: var(--border, #e2e8f0);
}

article figure figcaption {
  font-family: var(--font-body, 'Lora', Georgia, serif);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted, #475569);
  font-style: italic;
  padding: 0.85rem 1.1rem 1rem;
  text-align: left;
}

/* Hero figure: no caption, no border, no card chrome — фон уже в hero */
article [data-content="hero"] figure {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg, 12px);
  box-shadow: none;
  overflow: hidden;
}

article [data-content="hero"] figure img {
  border-bottom: none;
  border-radius: var(--radius-lg, 12px);
}

/* Адаптив: на узком экране отступы уменьшаем, скругления — мягче */
@media (max-width: 640px) {
  article figure {
    margin: 1.25rem 0;
    border-radius: var(--radius-sm, 4px);
  }
  article figure figcaption {
    padding: 0.7rem 0.85rem 0.85rem;
    font-size: 0.8125rem;
  }
}

/* Поддержка prefers-reduced-motion: убираем переходы у фигур */
@media (prefers-reduced-motion: reduce) {
  article figure,
  article figure img {
    transition: none;
  }
}
