/* =========================================================
   GALLERY PAGE
   Requires: base.css
   ========================================================= */

.gallery-page {
  position: relative;
  z-index: 1;
  background-color: var(--color-off-white);
  min-height: 100vh;
  padding: 60px 0 80px;
}


/* ---------------------------------------------------------
   Introduction
   --------------------------------------------------------- */

.gallery-intro {
  max-width: 680px;
  margin: 0 auto 40px;
  text-align: center;
}

.gallery-kicker {
  display: inline-block;
  margin-bottom: 10px;

  color: var(--color-teal);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.gallery-intro h1 {
  margin: 0 0 12px;

  color: var(--color-deep);

  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.6px;
}

.gallery-intro p {
  margin: 0;

  color: var(--color-muted);

  font-size: 13px;
  line-height: 1.8;
}


/* ---------------------------------------------------------
   Gallery grid
   --------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gallery-item {
  position: relative;

  aspect-ratio: 4 / 3;

  overflow: hidden;

  padding: 0;

  border: 1px solid var(--color-border);
  border-radius: 5px;

  background: var(--color-white);

  cursor: pointer;

  box-shadow: 0 4px 15px rgba(20, 55, 62, 0.04);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);

  box-shadow: 0 10px 25px rgba(20, 55, 62, 0.10);
}

.gallery-item img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.025);
}


/* Small hover indicator */

.gallery-item::after {
  content: "\f065";

  position: absolute;
  right: 14px;
  bottom: 14px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.94);

  color: var(--color-teal);

  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 11px;

  opacity: 0;

  transition: opacity 0.2s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}


/* ---------------------------------------------------------
   Modal
   --------------------------------------------------------- */

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 50px;

  background: rgba(13, 31, 36, 0.93);
}

.gallery-modal.is-visible {
  display: flex;
}


/* Image viewer */

.gallery-viewer {
  position: relative;
  max-width: min(1100px, 80vw);
  max-height: 82vh;

  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-viewer img {
  display: block;

  max-width: 100%;
  max-height: 82vh;

  object-fit: contain;

  border-radius: 3px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}


/* ---------------------------------------------------------
   Close button
   --------------------------------------------------------- */

.gallery-close {
  position: absolute;
  top: 22px;
  right: 25px;
  z-index: 2;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);

  color: white;

  font-size: 16px;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.gallery-close:hover {
  background: rgba(255, 255, 255, 0.16);

  color: var(--color-aqua);
}


/* ---------------------------------------------------------
   Navigation arrows
   --------------------------------------------------------- */

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;

  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);

  color: white;

  font-size: 15px;

  cursor: pointer;

  transform: translateY(-50%);

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.16);

  color: var(--color-aqua);
}

.gallery-arrow-prev {
  left: 25px;
}

.gallery-arrow-next {
  right: 25px;
}


/* ---------------------------------------------------------
   Counter
   --------------------------------------------------------- */

.gallery-counter {
  position: absolute;
  left: 50%;
  bottom: -38px;

  transform: translateX(-50%);

  color: rgba(255, 255, 255, 0.8);

  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 800px) {

  .gallery-page {
    padding: 40px 0 60px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-modal {
    padding: 45px 60px;
  }

  .gallery-viewer {
    max-width: 90vw;
  }

  .gallery-arrow {
    width: 40px;
    height: 40px;
  }

  .gallery-arrow-prev {
    left: 12px;
  }

  .gallery-arrow-next {
    right: 12px;
  }

  .gallery-close {
    top: 15px;
    right: 15px;
  }
}


@media (max-width: 500px) {

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-modal {
    padding: 50px 45px;
  }

  .gallery-viewer {
    max-width: 100%;
  }

  .gallery-viewer img {
    max-height: 75vh;
  }

  .gallery-arrow {
    width: 36px;
    height: 36px;

    font-size: 12px;
  }

  .gallery-arrow-prev {
    left: 6px;
  }

  .gallery-arrow-next {
    right: 6px;
  }
}