/* ============================================
   Images — ParGreen
   Стили для hero-изображения и контентных figure
   ============================================ */

/* Hero-figure внутри секции hero */
.hero-figure {
  margin: 2rem auto 2.5rem;
  max-width: min(100%, 48rem);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-muted);
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--bg-card);
}

/* Контентные figure (в data-content секциях, кроме hero) */
.content-figure {
  margin: clamp(1.75rem, 3vw, 2.5rem) 0;
  padding: 0;
  max-width: 100%;
}

.content-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 675;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
}

.content-figure figcaption {
  margin-top: 0.75rem;
  padding: 0 0.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 0.875rem;
}

/* Отступ между figure и соседним контентом */
.content-figure + p,
.content-figure + h3,
.content-figure + h2,
.content-figure + div {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
}

p + .content-figure,
div + .content-figure,
h3 + .content-figure,
h2 + .content-figure {
  margin-top: clamp(1.5rem, 3vw, 2rem);
}

/* Мобильная адаптация */
@media (max-width: 680px) {
  .hero-figure {
    margin: 1.5rem auto 2rem;
    border-radius: 10px;
  }

  .content-figure {
    margin: 1.5rem 0;
  }

  .content-figure img {
    border-radius: 8px;
  }

  .content-figure figcaption {
    font-size: 0.82rem;
    padding-left: 0.75rem;
  }
}

@media (max-width: 420px) {
  .hero-figure {
    border-radius: 8px;
  }

  .content-figure img {
    border-radius: 6px;
  }
}

/* Уменьшенное движение — для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero-figure,
  .content-figure img {
    transition: none;
  }
}
