/* ============================================================
   images-styles.css — styles for article images and figures
   ============================================================ */

article figure {
  margin: 2em auto;
  max-width: 100%;
  display: block;
}

article figure img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  background: #1c2128;
}

article figcaption {
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #9aa3a0;
  margin-top: 0.7em;
  padding: 0 0.5rem;
  font-style: italic;
}

/* Hero figure — wider canvas, no figcaption */
[data-content="hero"] figure {
  margin: 2.2rem auto 1.6rem;
  max-width: 100%;
}
[data-content="hero"] figure img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* Contextual figures inside data-content sections */
article [data-content] figure {
  margin: 2.2em auto;
}

article [data-content] figure img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  article figure {
    margin: 1.5em auto;
  }
  article figcaption {
    font-size: 0.8rem;
    padding: 0 0.25rem;
  }
  [data-content="hero"] figure img {
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  article figure img {
    border-radius: 6px;
  }
}
