/* Gallery-specific styles. Shared nav/header/footer/hero styles come from style.css. */

.site-nav .current {
  color: var(--blue);
}

.gallery-hero {
  min-height: 690px;
}

.gallery-hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: 50px;
  padding: 85px 0 105px;
  position: relative;
  z-index: 2;
}

.gallery-hero-art {
  position: relative;
  min-height: 470px;
}

.gallery-preview-card {
  position: absolute;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0,0,0,.32);
  border: 8px solid rgba(255,255,255,.96);
}

.gallery-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-one {
  width: 72%;
  height: 285px;
  top: 55px;
  left: 3%;
  transform: rotate(-5deg);
}

.preview-two {
  width: 68%;
  height: 270px;
  right: 0;
  bottom: 35px;
  transform: rotate(5deg);
}

.preview-three {
  width: 42%;
  height: 180px;
  right: 7%;
  top: 5px;
  transform: rotate(2deg);
}

.gallery-section {
  background: var(--offwhite);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(8,25,54,.08);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 22px;
  color: #fff;
  background: linear-gradient(180deg, transparent 35%, rgba(3,15,34,.88) 100%);
  opacity: 0;
  transition: opacity .3s ease;
}

.gallery-overlay span {
  font-weight: 800;
  font-size: .9rem;
}

.gallery-overlay strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 1.5rem;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.045);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  place-items: center;
  padding: 25px;
}

.lightbox.open { display: grid; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,10,24,.9);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  width: min(1200px, 94vw);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-dialog img {
  max-width: 100%;
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 3;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(4,17,39,.82);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
}

.lightbox-close {
  top: -18px;
  right: -18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  width: 48px;
  height: 62px;
  transform: translateY(-50%);
  border-radius: 14px;
  font-size: 2.5rem;
}

.lightbox-prev { left: -64px; }
.lightbox-next { right: -64px; }

.lightbox-caption {
  position: absolute;
  bottom: -42px;
  left: 0;
  right: 0;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 980px) {
  .gallery-hero-grid {
    grid-template-columns: 1fr;
    padding-top: 70px;
  }

  .gallery-hero-art {
    min-height: 390px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

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

  .gallery-hero-grid {
    padding: 60px 0 90px;
    gap: 35px;
  }

  .gallery-hero-art {
    min-height: 290px;
  }

  .preview-one {
    width: 75%;
    height: 185px;
    top: 45px;
  }

  .preview-two {
    width: 68%;
    height: 165px;
    bottom: 5px;
  }

  .preview-three {
    width: 43%;
    height: 115px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-overlay {
    opacity: 1;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-close {
    top: -12px;
    right: -5px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 42px;
    height: 54px;
  }
}
