/* Extra layout helpers: image + text columns like original site */

/* Contained photo grid (same gutters as page text) */
.media-grid {
  padding: 0.85rem var(--gutter) 1.35rem;
}
.media-grid .photo-row {
  margin: 0;
  padding: 0.75rem;
  background: var(--paper, #fff);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy, #0c2340);
  box-shadow: inset 0 0 0 1px rgba(154, 123, 79, 0.18);
  border-radius: 2px;
  gap: 0.65rem;
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem var(--gutter) 1.25rem;
}
.photo-row .figure {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
/* Cover frame: image always fills cell (even if low-res / pixelated) */
.photo-row .figure > a {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #d8e4ee;
}
.photo-row .figure > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #d8e4ee;
  image-rendering: auto;
}
.photo-row .figure > a > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  background: #d8e4ee;
}
.photo-row .figure figcaption {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.3;
}
.photo-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-media--flip {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}
.grid-media--flip .figure { order: -1; }
.grid-media .figure {
  min-width: 0;
  overflow: hidden;
}
.grid-media .figure > a {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #d8e4ee;
}
.grid-media .figure > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #d8e4ee;
}
.grid-media .figure > a > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border: 0;
  background: #d8e4ee;
}
.logo-band {
  margin: 1.25rem 0 0;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: #e8eef5;
  position: relative;
  border-radius: 4px;
}
.logo-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  aspect-ratio: auto;
}
.archive details:not([open]) .archive-body { display: none; }
@media (max-width: 920px) {
  .photo-row,
  .photo-row--3,
  .grid-media--flip {
    grid-template-columns: 1fr 1fr;
  }
  .grid-media--flip .figure { order: 0; }
}
@media (max-width: 560px) {
  .photo-row,
  .photo-row--3 {
    grid-template-columns: 1fr 1fr;
  }
}
