

.gallery-page {
  background: linear-gradient(180deg, var(--color-paper) 0%, var(--color-paper-2) 100%);
  padding: clamp(40px, 6vw, 76px) 0 clamp(72px, 9vw, 120px);
}


.gallery-intro-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-bottom: clamp(30px, 4vw, 48px);
}

.gallery-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.gallery-eyebrow-rule {
  display: inline-block;
  width: 45px;
  height: 1.5px;
}

.gallery-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(46px, 5.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}
.gallery-lede {
  max-width: 52ch;
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(17px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--color-ink-soft);
}


.gallery-scripture {
  position: relative;
  border-left: 1px solid var(--color-divider);
  padding-left: clamp(24px, 3vw, 40px);
  padding-top: 6px;
}
.gallery-scripture-mark {
  position: absolute;
  top: -26px;
  left: clamp(18px, 2.4vw, 32px);
  font-family: var(--font-display);
  font-size: 60px;
  line-height: 1;
  color: var(--color-sky-light);
  pointer-events: none;
}
.gallery-scripture-verse {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 1.7vw, 23px);
  line-height: 1.45;
  color: var(--color-ink);
}
.gallery-scripture-ref {
  margin: 0 0 12px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--color-text-secondary);
}
.gallery-scripture-rule {
  display: block;
  width: 45px;
  height: 1.5px;
}


.gallery-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 3vw, 34px);
}
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gallery-filter {
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--color-blue-secondary);
  background: var(--color-paper);
  border: 1px solid rgba(217, 167, 46, 0.4);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease,
    transform 180ms ease, box-shadow 180ms ease;
}

.gallery-filter:hover {
  border-color: var(--color-deep);
  background: var(--color-sky-soft);
}
.gallery-filter.is-active {
  color: var(--color-paper);
  background: var(--color-deep);
  border-color: var(--color-deep);
  box-shadow: 0 6px 18px -8px rgba(217, 167, 46, 0.55);
}

.gallery-filter:focus-visible,
.gallery-filter.is-active:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}


.gallery-stage {
  min-height: 200px;
}

.gallery-grid {
  columns: 4;
  column-gap: 16px;
}
.gallery-grid > * {
  break-inside: avoid;
}
@keyframes gallery-grid-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 16px; 
  padding: 0;
  border: 0;
  border-radius: var(--radius-button);
  overflow: hidden;
  background: var(--color-paper-3);
  cursor: zoom-in;
  isolation: isolate;
  text-align: left;
}
.gallery-card img {
  display: block;
  width: 100%;
  height: auto; 
  transform: scale(1.001);
  transition: transform 500ms var(--ease-emphasis);
}

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

.gallery-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.gallery-card-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(11, 39, 69, 0) 52%,
    rgba(11, 39, 69, 0.62) 100%
  );
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.gallery-card:hover .gallery-card-shade {
  opacity: 1;
}

.gallery-card-expand {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 246, 244, 0.92);
  color: var(--color-ink);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 250ms ease, transform 250ms var(--ease-emphasis);
  pointer-events: none;
}

.gallery-card:hover .gallery-card-expand {
  opacity: 1;
  transform: scale(1);
}

.gallery-card-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  display: block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}

.gallery-card:hover .gallery-card-caption {
  opacity: 1;
  transform: translateY(0);
}
.gallery-card-caption strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  color: var(--color-paper);
  text-shadow: 0 1px 12px var(--color-navy-50);
}
.gallery-card-caption em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-sky-light);
}


.gallery-skeleton {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-skeleton span {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-button);
  background: linear-gradient(
    100deg,
    var(--color-paper-2) 40%,
    var(--color-paper-3) 50%,
    var(--color-paper-2) 60%
  );
  background-size: 200% 100%;
  animation: gallery-shimmer 1.4s infinite linear;
}
@keyframes gallery-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}


.gallery-empty {
  text-align: center;
  max-width: 46ch;
  margin: 48px auto 0;
}
.gallery-empty h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 42px);
  color: var(--color-ink);
}
.gallery-empty p {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink-soft);
  line-height: 1.7;
}


.gallery-lb {
  position: fixed;
  inset: 0;
  z-index: 100001; 
  display: grid;
  place-items: center;
  background: rgba(11, 39, 69, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: gallery-lb-fade 200ms ease;
  cursor: zoom-out;
}
@keyframes gallery-lb-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.gallery-lb-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(1120px, 92vw);
  animation: gallery-lb-pop 260ms var(--ease-emphasis);
  cursor: default;
}
@keyframes gallery-lb-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.gallery-lb-img {
  max-width: 100%;
  max-height: min(78vh, 860px);
  border-radius: var(--radius-button);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75);
  object-fit: contain;
  background: var(--color-ink);
}
.gallery-lb-cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px 22px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1120px;
  padding: 0 6px;
}
.gallery-lb-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.96);
}
.gallery-lb-meta {
  flex: none;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-sky-light);
  opacity: 0.9;
}
.gallery-lb-close,
.gallery-lb-nav {
  position: absolute;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--color-paper);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 180ms ease, transform 180ms ease;
  font-family: var(--font-nav);
}

.gallery-lb-close:hover,
.gallery-lb-nav:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: scale(1.06);
}
.gallery-lb-close {
  top: 22px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}
.gallery-lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
}

.gallery-lb-nav:hover {
  transform: translateY(-50%) scale(1.08);
}
.gallery-lb-prev {
  left: clamp(10px, 2.4vw, 34px);
}
.gallery-lb-next {
  right: clamp(10px, 2.4vw, 34px);
}


@media (max-width: 1199px) {
  .gallery-grid {
    columns: 3;
  }
  .gallery-skeleton {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 960px) {
  .gallery-intro-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .gallery-scripture {
    padding-top: 18px;
  }
  .gallery-scripture-mark {
    top: -14px;
  }
}
@media (max-width: 767px) {
  .gallery-grid {
    columns: 2;
    column-gap: 10px;
  }
  .gallery-card {
    margin-bottom: 10px;
  }
  .gallery-skeleton {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .gallery-filter {
    padding: 8px 16px;
    font-size: 13px;
  }
  .gallery-lb-cap {
    flex-direction: column;
    gap: 6px;
  }
  .gallery-lb-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }
  .gallery-lb-nav {
    width: 44px;
    height: 44px;
    font-size: 38px;
  }
}


@media (hover: none) {
  .gallery-card-caption,
  .gallery-card-expand,
  .gallery-card-shade {
    display: none;
  }
}

.gallery-page {
  position: relative;
  overflow: hidden;
}

.gallery-page::before,
.gallery-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.gallery-page::before {
  width: clamp(260px, 30vw, 460px);
  height: clamp(260px, 30vw, 460px);
  top: -140px;
  right: -120px;
  background: var(--color-sky-wash, rgba(217, 167, 46, 0.08));
}

.gallery-page::after {
  width: clamp(200px, 24vw, 360px);
  height: clamp(200px, 24vw, 360px);
  bottom: -110px;
  left: -110px;
  background: var(--color-sky-soft, var(--color-primary-soft));
}

/* :not(.gallery-lb) — the lightbox must keep its own position: fixed below,
   otherwise this rule (equal specificity, later in source order) turns the
   overlay into an inline block at the bottom of the page. */
.gallery-page > *:not(.gallery-lb) {
  position: relative;
  z-index: 1;
}
