/* Studio gallery: a single row sizing model for all page widths. */
#mc-home .mc-studio-gallery,
#mc-home[data-page="studio"] .mc-studio-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-rows: none !important;
  grid-auto-rows: clamp(190px, 22vw, 300px) !important;
  gap: 16px !important;
  align-items: stretch !important;
  overflow: visible;
}

#mc-home .mc-studio-gallery > .mc-studio-photo,
#mc-home[data-page="studio"] .mc-studio-gallery > .mc-studio-photo,
#mc-home[data-page="studio"] .mc-studio-gallery > .mc-studio-photo:first-child,
#mc-home[data-page="studio"] .mc-studio-gallery > .mc-studio-photo:nth-child(2) {
  position: relative !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100%;
  height: 100%;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  margin: 0 !important;
  border-radius: 14px;
}

#mc-home .mc-studio-photo .mc-gallery-open {
  position: absolute !important;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
}

#mc-home .mc-studio-photo .mc-gallery-open img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

@media (max-width: 767px) {
  #mc-home .mc-studio-gallery,
  #mc-home[data-page="studio"] .mc-studio-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: clamp(150px, 43vw, 230px) !important;
    gap: 10px !important;
  }

  #mc-home .mc-studio-gallery > .mc-studio-photo:nth-child(-n+2),
  #mc-home[data-page="studio"] .mc-studio-gallery > .mc-studio-photo:nth-child(-n+2) {
    grid-column: span 2 !important;
  }
}
