/* =========================================================
   PESTGUARD PUBLIC GALLERY
   Navbar / topbar / footer intentionally use the same
   classes as the home page.
   ========================================================= */

.gallery-app {
  min-height: 100vh;
  background: #f7faf8;
}

/* Gallery active navbar item */
.gallery-nav-links .gallery-current {
  color: #168344;
}

/* Keep the home navbar's normal link underline behavior
   if the main stylesheet already provides it. */
.gallery-nav-links .gallery-current::after {
  transform: scaleX(1);
}

/* =========================
   MAIN GALLERY
   ========================= */

.gallery-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 85px;
}

.gallery-heading {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.gallery-heading > span {
  display: block;
  margin-bottom: 10px;
  color: var(--purple2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.gallery-heading h1 {
  margin: 0;
  color: #102019;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: -1.8px;
}

.gallery-heading p {
  max-width: 650px;
  margin: 15px auto 0;
  color: #6d7c73;
  font-size: 14px;
  line-height: 1.7;
}

/* =========================
   IMAGE GRID
   ========================= */

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

.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 300px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 15px;
  background: #e9efeb;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 28px rgba(24, 48, 35, 0.07);
}

.gallery-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-tile:hover img {
  transform: scale(1.055);
}

.gallery-tile-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 60px 20px 18px;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(9, 25, 16, 0.82),
    rgba(9, 25, 16, 0)
  );
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-tile:hover .gallery-tile-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-tile-overlay strong {
  font-size: 14px;
  font-weight: 700;
}

.gallery-tile-overlay span {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.85;
}

/* =========================
   EMPTY / LOADING
   ========================= */

.gallery-empty {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 45px;
  border: 1px solid #e1e9e4;
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
  color: #78867e;
}

.gallery-empty svg {
  margin-bottom: 14px;
  color: #168344;
}

.gallery-empty h2 {
  margin: 0 0 7px;
  color: #25332b;
  font-size: 20px;
}

.gallery-empty p {
  margin: 0;
  color: #7b8780;
  font-size: 13px;
}

/* =========================
   LIGHTBOX
   ========================= */

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px 85px;
  box-sizing: border-box;
  background: rgba(5, 15, 10, 0.93);
}

.gallery-lightbox-content {
  max-width: min(1050px, 90vw);
  max-height: 90vh;
  text-align: center;
}

.gallery-lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 9px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-caption {
  margin-top: 12px;
  color: #ffffff;
  font-size: 13px;
}

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
  position: fixed;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
  background: rgba(22, 131, 68, 0.75);
}

.gallery-lightbox-close {
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.gallery-lightbox-prev {
  left: 20px;
}

.gallery-lightbox-next {
  right: 20px;
}

/* =========================
   RESPONSIVE
   ========================= */

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

@media (max-width: 760px) {
  .gallery-main {
    width: calc(100% - 28px);
    padding: 55px 0 65px;
  }

  .gallery-heading {
    margin-bottom: 30px;
  }

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

  .gallery-heading p {
    font-size: 13px;
  }

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

  .gallery-tile {
    height: 280px;
  }

  .gallery-tile-overlay {
    opacity: 1;
    transform: none;
  }

  .gallery-lightbox {
    padding: 50px 45px;
  }

  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    width: 38px;
    height: 38px;
  }

  .gallery-lightbox-prev {
    left: 8px;
  }

  .gallery-lightbox-next {
    right: 8px;
  }
}

@media (max-width: 480px) {
  .gallery-main {
    padding-top: 45px;
  }

  .gallery-heading h1 {
    font-size: 33px;
    letter-spacing: -1px;
  }

  .gallery-tile {
    height: 245px;
  }
}


/* =========================================================
   FLOATING CALL + WHATSAPP
   ========================================================= */
.float-call, .whatsapp {
  position: fixed !important;
  right: 22px !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  text-decoration: none !important;
  z-index: 99999 !important;
  box-sizing: border-box !important;
  font-size: 0 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
}
.float-call {
  bottom: 88px !important;
  background: #350049 !important;
  color: #fff !important;
}
.float-call::before {
  content: '☎';
  font-size: 25px !important;
  line-height: 1 !important;
}
.whatsapp {
  bottom: 22px !important;
  background: #18c968 !important;
  color: #fff !important;
}
.whatsapp::before {
  content: 'WA';
  font-size: 14px !important;
  font-weight: 800 !important;
  border: 2px solid #fff !important;
  width: 35px !important;
  height: 35px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
}
@media(max-width:600px){
  .float-call, .whatsapp { right: 16px !important; width: 52px !important; height: 52px !important; }
  .float-call { bottom: 82px !important; }
  .whatsapp { bottom: 18px !important; }
}

/* Prevent duplicate floating WhatsApp buttons if an older cached/footer copy exists. */
body > .whatsapp ~ .whatsapp { display: none !important; }
