.gallery-detail-page {
  background: #fff;
}

.gallery-hero {
  position: relative;
  min-height: 24rem;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: var(--theme-hero-visual-bg);
}

.gallery-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(6, 18, 38, 0.08) 0%, rgba(6, 18, 38, 0.74) 100%);
}

.gallery-hero__inner {
  max-width: 50rem;
  padding: 0 0 3.5rem;
  color: #fff;
}

.gallery-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-hero__title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.35rem);
  font-weight: 800;
  line-height: 1.14;
}

.gallery-hero__summary {
  margin: 1rem 0 0;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
}

.gallery-page {
  padding: 0.5rem 0 0;
}

.gallery-page__head {
  margin-bottom: 2rem;
}

.gallery-page__eyebrow {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--theme-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-page__title {
  margin: 0;
  color: var(--theme-heading);
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  font-weight: 800;
}

.gallery-page__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.9rem;
  color: var(--theme-text-muted);
  font-size: 0.875rem;
}

.gallery-page__lead {
  max-width: 52rem;
  margin: 1rem 0 0;
  color: var(--theme-text-muted);
  font-size: 0.9375rem;
  line-height: 1.85;
}

.gallery-waterfall__meta {
  margin-bottom: 1rem;
  color: var(--theme-text-muted);
  font-size: 0.875rem;
}

.gallery-waterfall__columns {
  column-count: 3;
  column-gap: 1.25rem;
}

.gallery-card {
  position: relative;
  display: block;
  margin: 0 0 1.25rem;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0b1423;
  box-shadow: 0 12px 30px rgba(7, 22, 40, 0.12);
  text-decoration: none;
  color: #fff;
}

.gallery-card--interactive {
  cursor: zoom-in;
}

.gallery-card--disabled {
  cursor: default;
}

.gallery-card__image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.35s ease;
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(8, 18, 36, 0) 28%, rgba(8, 18, 36, 0.84) 100%);
}

.gallery-card__body {
  width: 100%;
  padding: 1rem 1rem 0.95rem;
}

.gallery-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.gallery-card__summary {
  display: -webkit-box;
  margin: 0.45rem 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8125rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.gallery-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.gallery-card__action--disabled {
  cursor: default;
  opacity: 0.8;
}

.gallery-card:hover .gallery-card__image,
.gallery-card:focus-visible .gallery-card__image {
  transform: scale(1.04);
}

.gallery-empty {
  padding: 2.25rem 1.5rem;
  text-align: center;
  color: var(--theme-text-muted);
  background: #fff;
  border: 1px solid var(--theme-border-light);
  border-radius: 0.75rem;
}

.gallery-preview-modal .modal-dialog {
  max-width: min(92vw, 84rem);
}

.gallery-preview-modal .modal-content {
  border: 0;
  border-radius: 1rem;
  background: #08111f;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.gallery-preview-modal__content {
  position: relative;
  overflow: hidden;
}

.gallery-preview-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.gallery-preview-modal__media {
  background: #050c16;
}

.gallery-preview-modal__image {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.gallery-preview-modal__caption {
  padding: 1rem 1.25rem 1.25rem;
  color: #fff;
}

.gallery-preview-modal__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.gallery-preview-modal__summary {
  margin: 0.6rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.875rem;
  line-height: 1.75;
}

.gallery-preview-modal__summary:empty {
  display: none;
}

@media (max-width: 991.98px) {
  .gallery-waterfall__columns {
    column-count: 2;
  }
}

@media (max-width: 767.98px) {
  .gallery-hero {
    min-height: 18rem;
    height: 100vh;
  }

  .gallery-hero__inner {
    padding-bottom: 2.25rem;
  }

  .gallery-waterfall__columns {
    column-count: 1;
  }

  .gallery-preview-modal__caption {
    padding: 0.9rem 1rem 1rem;
  }
}
