.gallery-page {
  background: #f8f5ed;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.gallery-hero {
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 72px 0;
  text-align: center;
  background: #f4f1e8;
  border-bottom: 1px solid #e8e1d3;
}

.gallery-hero-inner {
  max-width: 820px;
}

.gallery-hero h1 {
  margin-bottom: 18px;
  color: var(--green-950);
  font-size: clamp(3.4rem, 6vw, 5.8rem);
}

.gallery-hero h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 24px auto 0;
  background: var(--gold);
  border-radius: 999px;
}

.gallery-hero p:last-child {
  max-width: 670px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
}

.gallery-section {
  padding: 76px 0 88px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-card {
  min-width: 0;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #0d1613;
  border: 1px solid #e2dbcd;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(22, 48, 39, .07);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.video-frame:hover,
.video-frame:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(197, 154, 61, .55);
  box-shadow: 0 16px 38px rgba(22, 48, 39, .14);
}

.video-frame:focus-visible {
  outline: 3px solid rgba(197, 154, 61, .45);
  outline-offset: 3px;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #0d1613;
}

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(0deg, rgba(4, 35, 27, .42), rgba(4, 35, 27, .1));
  transition: opacity .2s ease;
}

.video-play i {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  color: var(--green-950);
  background: rgba(255, 255, 255, .93);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(4, 35, 27, .32);
  font-size: 1.5rem;
  transition: transform .2s ease;
}

.video-frame:hover .video-play i {
  transform: scale(1.08);
}

.video-frame.is-playing .video-play {
  opacity: 0;
  pointer-events: none;
}

.video-frame.is-failed .video-play {
  display: none;
}

.video-frame.is-failed::after {
  content: "Video unavailable";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: rgba(255, 255, 255, .72);
  font-size: .82rem;
  text-align: center;
}

.video-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.gallery-contact {
  padding: 90px 0;
  color: white;
  background: var(--green-950);
}

.gallery-contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}

.gallery-contact .eyebrow {
  color: #e6bd62;
}

.gallery-contact h2 {
  margin-bottom: 13px;
  color: white;
}

.gallery-contact p:last-child {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, .75);
}

.gallery-contact .button {
  flex: none;
}

.video-lightbox {
  width: min(100%, 980px);
  max-width: 980px;
  padding: 0;
  background: #071511;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.video-lightbox::backdrop {
  background: rgba(3, 26, 20, .82);
  backdrop-filter: blur(5px);
}

.video-lightbox video {
  width: 100%;
  max-height: min(82vh, 780px);
  display: block;
  margin-inline: auto;
  background: #000;
  border-radius: 14px;
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--green-950);
  background: rgba(255, 255, 255, .92);
  border: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s ease;
}

.lightbox-close:hover {
  background: white;
}

@media (max-width: 1050px) {
  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 800px) {
  .gallery-hero {
    min-height: 270px;
    padding: 56px 0;
  }

  .gallery-hero h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .gallery-hero p:last-child {
    font-size: .95rem;
  }

  .gallery-section {
    padding: 56px 0 66px;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .video-caption {
    font-size: .78rem;
  }

  .gallery-contact {
    padding: 70px 0;
  }

  .gallery-contact-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 30px;
  }

  .gallery-contact .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .gallery-hero {
    min-height: 250px;
  }

  .video-grid {
    gap: 12px;
  }

  .video-play i {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }
}
