/* ============================================================
   Elgar Theme — Polished Spacing & Typography
   ============================================================ */

figure.caption-img {
  display: table;
  margin: 1.5rem auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Image Styling */
figure.caption-img img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Caption Styling — Adjusted for Mukta/Marathi */
figure.caption-img figcaption {
  display: table-caption;
  caption-side: bottom;

  /* SPACING CHANGE: Increased from 0.5rem to 0.85rem */
  margin-top: 0.85rem;

  font-family: 'Mukta', sans-serif;
  font-size: 0.95rem;

  /* TYPOGRAPHY CHANGE: Increased from 1.4 to 1.6 for Devanagari script */
  line-height: 1.6;

  color: #556070;
  text-align: center;
  width: 100%;
}

/* Float Logic (Unchanged - Keeps layout stable) */
@media (min-width: 900px) {
  figure.align-right {
    float: right;
    margin: 0.5rem 0 1rem 2rem;
    max-width: 45%;
    min-width: 320px;
  }

  figure.align-left {
    float: left;
    margin: 0.5rem 2rem 1rem 0;
    max-width: 45%;
    min-width: 320px;
  }
}

/* Mobile Overrides */
@media (max-width: 899px) {
  figure.align-right,
  figure.align-left {
    float: none;
    display: table;
    margin: 2rem auto;
    max-width: 100%;
    min-width: auto;
  }
}