.active-page {
  color: var(--brand) !important;
  background: var(--brand-dim) !important;
}

.gallery-hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gallery-hero .hero-orb-1 {
  top: -100px;
  right: -80px;
}

.gallery-hero .hero-orb-2 {
  bottom: -60px;
  left: -60px;
}

.gallery-hero .eyebrow {
  margin-bottom: 16px;
}

.gallery-hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  margin-bottom: 20px;
  letter-spacing: 0;
}

.gallery-hero p {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  grid-auto-flow: dense;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-2);
  min-height: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}

.gallery-item--tall {
  grid-row: span 2;
}

.gallery-item--tall img {
  aspect-ratio: 3 / 4;
  min-height: 320px;
}

.gallery-item--wide {
  grid-column: span 1;
}

.gallery-item--wide img {
  aspect-ratio: 16 / 9;
  min-height: 240px;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(255, 107, 0, 0.18));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transform: scale(0.8);
  transition: transform 0.3s var(--ease-out);
}

.gallery-item:hover .gallery-zoom {
  transform: scale(1);
}

.gallery-empty {
  width: 100%;
  padding: 36px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  color: var(--text-3);
  text-align: center;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.lightbox-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 901;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  pointer-events: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-out);
  display: block;
}

.lightbox.active .lightbox-inner img {
  transform: scale(1);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 902;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-close:hover {
  background: rgba(255, 107, 0, 0.4);
  transform: rotate(90deg);
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.video-carousel {
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
}

.video-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.video-slide {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

.video-slide.fade-out {
  opacity: 0;
}

.video-slide video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 5;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text-3);
}

.video-caption-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.video-counter {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  white-space: nowrap;
}

.video-caption-text {
  font-size: 0.85rem;
  color: var(--text-2);
  text-align: right;
}

.video-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-stage:hover .video-controls,
.video-stage:focus-within .video-controls {
  opacity: 1;
}

.vid-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s var(--ease-out);
}

.vid-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.08);
}

.vid-btn--play {
  width: 60px;
  height: 60px;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 8px 24px var(--brand-glow);
}

.video-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.video-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.video-dot.active {
  background: var(--brand);
  width: 24px;
  border-radius: 4px;
}

@media (min-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 600px) {
  .gallery-item--wide {
    grid-column: span 2;
  }
}

@media (min-width: 900px) {
  .gallery-item--wide img {
    min-height: 280px;
  }
}

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

  .gallery-item--wide,
  .gallery-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-item--wide img,
  .gallery-item--tall img {
    aspect-ratio: 4 / 3;
    min-height: 220px;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
    top: auto;
    bottom: 80px;
  }

  .lightbox-prev {
    left: 24px;
  }

  .lightbox-next {
    right: 24px;
  }

  .video-caption-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-caption-text {
    text-align: left;
  }
}
