/* ========================================================================
   Image styles — content figures and hero
   Linked from index.html. Complements the inline <style> in index.html.
   ======================================================================== */

/* Content figures inside <article> sections */
.content-figure {
  margin: 2.2em 0;
  padding: 0;
  background: #FFFFFF;
  border: 1px solid var(--border, #E4E0D8);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.content-figure img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.content-figure figcaption {
  font-family: var(--font-body, "Source Serif 4", Georgia, serif);
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted, #6B6B68);
  text-align: left;
  padding: 0.85em 1.1em 0.95em;
  border-top: 1px solid var(--border, #E4E0D8);
  background: #FAF8F4;
  margin: 0;
}

/* Hero figure refinements (works alongside design.html .hero-figure rules) */
.hero-figure {
  margin: 0 auto clamp(1.5rem, 3vw, 2.4rem);
  padding: 0;
  max-width: var(--content-width, 740px);
  width: 100%;
  text-align: center;
}

.hero-figure img,
.hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  object-position: center;
}

/* Tablet */
@media (max-width: 900px) {
  .content-figure {
    margin: 1.8em 0;
  }
  .content-figure figcaption {
    font-size: 0.88rem;
    padding: 0.75em 0.95em 0.85em;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .content-figure {
    margin: 1.4em -8px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .content-figure figcaption {
    font-size: 0.85rem;
    padding: 0.7em 14px 0.85em;
  }
}

/* Print: keep figures, drop heavy backgrounds */
@media print {
  .content-figure {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }
  .content-figure figcaption {
    background: transparent;
  }
}
