@import url('/style.css');

body { background: var(--bg); }

.gallery-hero {
  padding: 150px 0 54px;
  background:
    linear-gradient(180deg, rgba(0, 29, 37, 0.66), var(--bg)),
    url('/assets/images/Backgrounds/Mountain.jpg') center / cover;
}

.gallery-hero h1 { max-width: 780px; }
.gallery-hero p:not(.eyebrow) { max-width: 640px; font-size: 1.1rem; }

.gallery-section { padding: 44px 0 96px; }

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

.gallery-card {
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--panel-surface);
  box-shadow: var(--shadow);
  background-clip: padding-box;
}

.gallery-card.wide { grid-column: span 2; }

.gallery-card img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: top center;
  background: #00242d;
  transition: transform 240ms ease, filter 240ms ease;
}

.gallery-card.wide img { object-fit: contain; padding: 1rem; }

.gallery-card:hover img { transform: scale(1.015); filter: brightness(1.05); }

.gallery-card figcaption {
  padding: 0.9rem 1rem;
  border-top: 0;
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 991px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-card.wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  .gallery-hero { padding-top: 125px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card.wide { grid-column: auto; }
  .gallery-card img { height: auto; max-height: none; }
}

/* match home/system card treatment */
.gallery-card {
  border: 0;
  border-radius: 1px;
  background: var(--panel-surface);
  box-shadow: 0 10px 16px -16px rgba(0, 0, 0, 0.72);
}

.gallery-card img,
.gallery-card figcaption {
  border: 0;
  background-color: var(--panel-surface);
}


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

.gallery-card:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 4px;
}

body.lightbox-open { overflow: hidden; }

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 5rem 2rem 2rem;
  background: rgba(0, 18, 23, 0.86);
  backdrop-filter: blur(4px);
}

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

.lightbox-frame {
  width: min(1120px, 94vw);
  max-height: 86vh;
  display: grid;
  gap: 0.75rem;
  background: var(--panel-surface);
  border-radius: 1px;
  box-shadow: 0 18px 28px -24px rgba(0, 0, 0, 0.82);
  padding: 1rem;
}

.lightbox-frame img {
  width: 100%;
  max-height: calc(86vh - 96px);
  object-fit: contain;
  background: #001a21;
}

.lightbox-frame p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 1px;
  background: var(--panel-surface);
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 18px -18px rgba(0, 0, 0, 0.86);
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--ember);
  color: #071a1f;
  outline: 0;
}

@media (max-width: 640px) {
  .gallery-lightbox { padding: 4.5rem 1rem 1rem; }
  .lightbox-frame { width: 100%; padding: 0.75rem; }
}
