/* MEDIADOS image system — compact, calm and consistent across the site. */
.med-photo-strip,
.med-photo-feature,
.med-photo-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.med-photo-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: 16px;
  padding: 24px 0 8px;
}

.med-photo-strip.is-single {
  grid-template-columns: 1fr;
  max-width: 1180px;
}

.med-photo-card,
.med-photo-feature {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #e7f0f2;
  box-shadow: 0 12px 30px rgba(10, 49, 62, .10);
}

.med-photo-card img,
.med-photo-feature img,
.med-topic-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.med-photo-strip .med-photo-card:first-child { min-height: 310px; }
.med-photo-strip .med-photo-card:last-child { min-height: 310px; }

.med-photo-feature {
  margin-top: 24px;
  margin-bottom: 8px;
  aspect-ratio: 16 / 7;
  max-height: 470px;
}

.med-photo-feature img { min-height: 100%; }

.med-photo-caption {
  position: absolute;
  inset: auto 12px 12px;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(5, 35, 47, .82);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  backdrop-filter: blur(6px);
}

.med-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 12px 0 30px;
}

.med-topic-card {
  overflow: hidden;
  border: 1px solid rgba(20, 72, 85, .12);
  border-radius: 16px;
  background: #fff;
}

.med-topic-card img { aspect-ratio: 4 / 3; }
.med-topic-card div { padding: 14px 16px 16px; }
.med-topic-card h3 { margin: 0 0 5px; font-size: 18px; line-height: 1.2; }
.med-topic-card p { margin: 0; color: #52666d; font-size: 14px; line-height: 1.5; }

.med-inline-photo {
  width: min(520px, 46%);
  margin: 8px 0 22px 24px;
  float: right;
  overflow: hidden;
  border-radius: 16px;
  background: #e7f0f2;
}

.med-inline-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.med-inline-photo figcaption {
  padding: 8px 11px;
  color: #52666d;
  font-size: 12px;
  line-height: 1.4;
}

.article-detail > .shell::after,
.legacy-content::after { content: ""; display: table; clear: both; }

@media (max-width: 780px) {
  .med-photo-strip,
  .med-photo-grid { width: min(100% - 28px, 680px); }
  .med-photo-strip { grid-template-columns: 1fr; padding-top: 16px; }
  .med-photo-strip .med-photo-card:first-child,
  .med-photo-strip .med-photo-card:last-child { min-height: 220px; }
  .med-photo-grid { grid-template-columns: 1fr; }
  .med-photo-feature { width: calc(100% - 28px); aspect-ratio: 4 / 3; margin-top: 16px; }
  .med-inline-photo { width: 100%; float: none; margin: 8px 0 18px; }
}

@media (prefers-reduced-transparency: reduce) {
  .med-photo-caption { backdrop-filter: none; }
}
