.mini-gallery {
  position: relative;
  display: grid;
  gap: 1rem;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--section-radius, 36px);
  background: var(--orange-panel-background);
}

.gallery-group.grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-areas:
    "large s1 s2"
    "large s3 s4";
  gap: 1rem;
}

.gallery-group.grid .large {
  grid-area: large;
  aspect-ratio: 1 / 1;
}

.gallery-group.grid .s1 {
  grid-area: s1;
}

.gallery-group.grid .s2 {
  grid-area: s2;
}

.gallery-group.grid .s3 {
  grid-area: s3;
}

.gallery-group.grid .s4 {
  grid-area: s4;
}

.cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--section-media-radius, 24px);
  aspect-ratio: 4 / 3;
  background: var(--orange-card-background);
  box-shadow: 0 12px 28px rgba(86, 43, 16, 0.08);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.cell::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(58, 35, 20, 0.16));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.cell:hover::after {
  opacity: 1;
}

.cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.cell:hover img {
  transform: scale(1.04);
}

.cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(86, 43, 16, 0.12);
}

.mg-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(58, 35, 20, 0.45);
  backdrop-filter: blur(18px);
}

.mg-lightbox-content {
  position: relative;
  width: min(100%, 70rem);
  padding: 1rem;
  border-radius: 32px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 30px 80px rgba(58, 35, 20, 0.2);
}

.mg-lightbox-content img {
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.mg-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
  border-radius: 999px;
}

@media (max-width: 800px) {
  .gallery-group.grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "large"
      "s1"
      "s2"
      "s3"
      "s4";
  }
}
