.dv-gallery {
  background:
    radial-gradient(ellipse at 50% 0, #ffffffad 0, transparent 56%),
    #f1eee7;
}

.dv-gallery .dv-section-top {
  align-items: end;
  margin-bottom: 42px;
}

.dv-gallery .dv-section-top > a {
  margin-bottom: 7px;
}

.dv-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.dv-gallery-item {
  position: relative;
  flex: 0 0 calc((100% - 54px) / 4);
  min-width: 0;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  padding: 7px;
  border: 1px solid #bca56f;
  border-radius: 21px;
  background: linear-gradient(145deg, #123f32, #08291f);
  box-shadow: 0 14px 30px #17372b1c, inset 0 1px #ffffff50;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.dv-gallery-item::after {
  position: absolute;
  inset: 5px;
  border: 1px solid #f1e4c15c;
  border-radius: 15px;
  content: "";
  pointer-events: none;
}

.dv-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.dv-gallery-item-logo img {
  object-fit: contain;
  background: #08432f;
}

.dv-gallery-item:hover {
  z-index: 1;
  transform: translateY(-4px);
  box-shadow: 0 20px 38px #17372b30, inset 0 1px #ffffff50;
}

.dv-gallery-item:hover img {
  transform: scale(1.035);
}

.dv-gallery-item figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d5b77a66;
  border-radius: 12px;
  background: #062b22e8;
  box-shadow: 0 8px 18px #0003;
  color: #f7f3ea;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.035em;
  backdrop-filter: blur(8px);
}

@media (max-width: 1100px) {
  .dv-gallery-grid {
    gap: 16px;
  }
}

@media (max-width: 820px) {
  .dv-gallery-item {
    flex-basis: calc((100% - 32px) / 3);
  }

  .dv-gallery-grid {
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .dv-gallery .dv-section-top {
    margin-bottom: 28px;
  }

  .dv-gallery-grid {
    gap: 11px;
  }

  .dv-gallery-item {
    flex-basis: calc((100% - 11px) / 2);
    padding: 5px;
    border-radius: 16px;
  }

  .dv-gallery-item::after {
    inset: 4px;
    border-radius: 12px;
  }

  .dv-gallery-item img {
    border-radius: 10px;
  }

  .dv-gallery-item figcaption {
    right: 9px;
    bottom: 9px;
    left: 9px;
    padding: 9px 10px;
    font-size: 9px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .dv-gallery-item,
  .dv-gallery-item img {
    transition: none;
  }
}
