.gallery-hero {
  background: linear-gradient(135deg, rgba(18, 28, 49, 0.96), rgba(48, 63, 84, 0.92)), url("../img/ValTechHub.webp") center / cover no-repeat;
  color: #ffffff;
  padding: 8rem 0 5rem;
}

.gallery-hero h1, .gallery-hero p {
  color: #ffffff;
}

.gallery-kicker {
  color: #d7b44a;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-section {
  background: #f7f8fb;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.gallery-item-square {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  background: #82291e;
  border: 0;
  border-radius: 5%;
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.16);
  cursor: zoom-in;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 0;
  overflow: hidden;
  background: #101828;
  border: 0;
  border-radius: 5%;
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.16);
  cursor: zoom-in;
}

.gallery-item img, .gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item:hover img, .gallery-item:hover video, .gallery-item:focus-visible img, .gallery-item:focus-visible video {
  filter: brightness(0.86);
  transform: scale(1.05);
}

.gallery-item:focus-visible {
  outline: 3px solid #d7b44a;
  outline-offset: 4px;
}

.gallery-video-item::after {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.25rem 0.6rem;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(16, 24, 40, 0.72);
  border-radius: 999px;
  content: "Reel";
}

.gallery-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.gallery-play::after {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid #101828;
  content: "";
  transform: translate(-50%, -50%);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 13, 24, 0.9);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-dialog {
  width: min(1100px, 100%);
  max-height: 92vh;
}

.gallery-lightbox-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.gallery-lightbox-media img, .gallery-lightbox-media video {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  background: #000000;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.gallery-lightbox-title {
  margin: 0.85rem 0 0;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
}

.gallery-lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2001;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.gallery-lightbox-close:hover, .gallery-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

body.gallery-lightbox-open {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .gallery-hero {
    padding: 6.5rem 0 3.5rem;
  }
}

@media (max-width: 575.98px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

