/* ============================================================
   images-styles.css — ApoCota
   Estilos para imagens e figuras da página de artigo
   ============================================================ */

/* ── Hero image ────────────────────────────────────────────── */
[data-content="hero"] figure {
  margin: 1.5rem 0 0;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

[data-content="hero"] figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1200 / 630;
}

/* ── Article figures ────────────────────────────────────────── */
.article-figure {
  margin: 2rem 0;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 800 / 500;
  transition: opacity 0.3s ease;
}

.article-figure img[loading="lazy"] {

  transition: opacity 0.4s ease;
}

.article-figure img.loaded,
.article-figure img:not([loading]) {
  opacity: 1;
}

.article-figure figcaption {
  padding: 0.65rem 1rem 0.7rem;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary, #7a8fa6);
  border-top: 1px solid var(--border, #1e2d3d);
  background: var(--bg-card, #131920);
}

/* Lazy-load reveal via IntersectionObserver (JS fallback below) */
@media (prefers-reduced-motion: no-preference) {
  .article-figure {
    animation: none;
  }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .article-figure {
    margin: 1.5rem -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .article-figure figcaption {
    padding: 0.55rem 1rem 0.6rem;
    font-size: 0.775rem;
  }

  [data-content="hero"] figure {
    border-radius: 6px;
  }
}

/* ── Lazy-load JS ────────────────────────────────────────────── */
/* Inline script handles lazy reveal — class added by observer */
