/* =========================================================
   CUTLER BAY PLUMBING - SIMPLE PHOTO GALLERY
   ========================================================= */

.main-nav a[aria-current="page"] {
  color: var(--green);
}

.main-nav a[aria-current="page"]::after {
  right: 0 !important;
}

/* PAGE INTRO */
.gallery-page-header {
  padding: 68px 0 54px;
  text-align: center;
  background: var(--light);
  border-bottom: 1px solid var(--border);
}

.gallery-page-header .container {
  max-width: 900px;
}

.gallery-page-header h1 {
  margin: 0;
  color: var(--navy-dark);
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.05em;
}

.gallery-page-header p:last-child {
  max-width: 760px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 18px;
}

/* PHOTO GRID */
.gallery-photo-section {
  padding: 54px 0 84px;
  background: #fff;
}

.simple-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-thumb {
  position: relative;
  height: 230px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--light);
  cursor: pointer;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .28s ease, opacity .28s ease;
}

.gallery-thumb::after {
  content: "View Photo";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,47,99,.62);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  opacity: 0;
  transition: opacity .25s ease;
}

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

.gallery-thumb:hover::after {
  opacity: 1;
}

/* CTA */
.gallery-bottom-cta {
  margin-top: 52px;
  padding: 44px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 34px;
  align-items: center;
  border-radius: 28px;
  background:
    linear-gradient(125deg, rgba(8,47,99,.98), rgba(18,77,168,.93));
}

.gallery-bottom-cta h2,
.gallery-bottom-cta p {
  color: #fff;
}

.gallery-bottom-cta .eyebrow {
  color: rgba(255,255,255,.82);
}

.gallery-bottom-cta h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.gallery-bottom-cta p {
  max-width: 760px;
}

.gallery-bottom-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

/* LIGHTBOX */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 90px;
  background: rgba(0, 0, 0, .94);
}

.photo-lightbox.open {
  display: flex;
}

.photo-lightbox-content {
  width: min(1100px, 88vw);
  text-align: center;
}

.photo-lightbox-content img {
  max-width: 100%;
  max-height: 78vh;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.photo-lightbox-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  font-weight: 800;
}

.photo-lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox-arrow {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox-arrow:hover {
  background: var(--green);
}

.photo-lightbox-prev {
  left: 22px;
}

.photo-lightbox-next {
  right: 22px;
}

body.lightbox-open {
  overflow: hidden;
}

/* TABLET */
@media (max-width: 980px) {
  .simple-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-bottom-cta {
    grid-template-columns: 1fr;
  }

  .gallery-bottom-actions {
    justify-content: flex-start;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .simple-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-thumb {
    height: 190px;
  }

  .photo-lightbox {
    padding: 56px 16px 26px;
  }

  .photo-lightbox-content {
    width: 100%;
  }

  .photo-lightbox-arrow {
    top: auto;
    bottom: 22px;
    width: 46px;
    height: 46px;
  }

  .photo-lightbox-prev {
    left: 18px;
  }

  .photo-lightbox-next {
    right: 18px;
  }

  .photo-lightbox-footer {
    padding-bottom: 58px;
  }
}

/* SMALL MOBILE */
@media (max-width: 520px) {
  .gallery-page-header {
    padding: 50px 0 42px;
  }

  .gallery-page-header h1 {
    font-size: 38px;
  }

  .gallery-photo-section {
    padding-top: 34px;
  }

  .gallery-thumb {
    height: 155px;
    border-radius: 6px;
  }

  .gallery-bottom-cta {
    padding: 30px;
  }
}
