/* Dodge RAM original photographs and unified workshop gallery. */
.ram-original-overview { margin: 28px 0; }
.ram-original-overview img { display: block; width: 100%; height: auto; border-radius: 4px; }
.ram-original-overview figcaption { font-size: .85rem; line-height: 1.5; color: #526b75; margin-top: 10px; }
#ram-werkstattaufnahme img { filter: brightness(1.07) contrast(1.08) saturate(1.06); }
.ram-unified-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 28px 0; scroll-margin-top: 110px; }
.ram-workshop .ram-gallery-item { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid #d3e1e3; border-radius: 8px; background: #fff; }
.ram-gallery-item a { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; overflow: hidden; background: #edf2f3; }
.ram-gallery-item img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ram-gallery-item figcaption { flex: 1; margin: 0; padding: 14px 16px; border-top: 1px solid #d3e1e3; color: #526b75; font-size: .85rem; line-height: 1.5; }
.ram-gallery-item a:focus-visible { outline: 3px solid #007c8d; outline-offset: -3px; }
.ram-photo-credit { font-size: .875rem; padding-top: 14px; border-top: 1px solid #d3e1e3; }
@media (max-width: 600px) { .ram-unified-gallery { grid-template-columns: 1fr; gap: 20px; } }

/* Editorial workshop gallery: large lead photograph and varied image rhythm. */
.ram-workshop {
  background: #0b2d37;
  color: #e8f2f4;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 12px;
  border-top: 4px solid #d7b66d;
  margin-top: 48px;
}
.ram-workshop h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.ram-workshop .eyebrow { color: #e9c780; }
.ram-workshop p { color: #c4d7dc; }
.ram-unified-gallery { gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ram-workshop .ram-gallery-item { background: #133b46; border: 0; border-radius: 7px; position: relative; }
.ram-gallery-item a { background: #102f39; aspect-ratio: 4 / 3; }
.ram-gallery-item img { transition: transform .35s ease; }
.ram-gallery-item a:hover img { transform: scale(1.025); }
.ram-gallery-item figcaption { color: #e0ebee; border: 0; padding: 15px 18px; }
.ram-gallery-item:first-child { grid-column: 1 / -1; }
.ram-gallery-item:first-child a { aspect-ratio: 16 / 9; }
.ram-gallery-item:nth-child(8) { grid-column: 1 / -1; }
.ram-gallery-item:nth-child(8) a { aspect-ratio: 16 / 9; }
.ram-workshop .ram-photo-credit { border-color: #40616a; color: #a9c4cc; }
@media (max-width: 600px) {
  .ram-workshop { padding: 20px 14px; margin-left: -8px; margin-right: -8px; }
  .ram-unified-gallery { grid-template-columns: 1fr; }
  .ram-gallery-item figcaption { padding: 13px 14px; }
}
@media (prefers-reduced-motion: reduce) { .ram-gallery-item img { transition: none; } }

.ram-workshop .ram-unified-gallery .ram-gallery-item figcaption { color: #e0ebee; border: 0; margin: 0; padding: 15px 18px; background: #133b46; }
.ram-gallery-item:nth-child(2) { grid-column: 1 / -1; }
.ram-gallery-item:nth-child(2) a { aspect-ratio: auto; }
.ram-gallery-item:nth-child(2) img { height: auto; }

/* Cards follow the original image ratios in independent columns. */
.ram-workshop .ram-unified-gallery {
  display: block;
  columns: 2;
  column-gap: 20px;
}
.ram-workshop .ram-unified-gallery .ram-gallery-item {
  display: block;
  width: 100%;
  margin: 0 0 20px;
  break-inside: avoid;
}
.ram-workshop .ram-unified-gallery .ram-gallery-item a {
  display: block;
  aspect-ratio: auto;
  height: auto;
}
.ram-workshop .ram-unified-gallery .ram-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}
.ram-workshop .ram-unified-gallery .ram-gallery-item:first-child,
.ram-workshop .ram-unified-gallery .ram-gallery-item:nth-child(2) { column-span: all; }
@media (max-width: 600px) {
  .ram-workshop .ram-unified-gallery { columns: 1; }
}
