@import url(./header.css);
@import url(./pages-hero.css);
body {
  font-family: 'AvenirMedium';
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.5;
  min-height: 100vh;
  padding-top: 4.5rem;
}
.hero-section {
  margin: 0 20px 25px 20px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(
      rgba(0, 0, 0, 0.1) 0%,
      rgba(46, 125, 50, 0.8) 100%
    ),
    url("../img/team.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 24px;
  color: white;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.gallery-intro {
  text-align: center;
  padding: 70px 20px 40px;
}

.gallery-intro h1 {
  font-size: 40px;
  margin-bottom: 10px;
}

.gallery-intro p {
  color: #666;
  max-width: 600px;
  margin: auto;
}

/* Masonry Grid */
.gallery {
  column-count: 4;
  column-gap: 20px;
}

@media (max-width: 1200px) {
  .gallery { column-count: 3; }
}
@media (max-width: 768px) {
  .gallery { column-count: 2; }
}
@media (max-width: 480px) {
  .gallery { column-count: 1; }
}

.gallery-item {
  margin-bottom: 20px;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item::after {
  content: "👁️View";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none;  /* HIDE by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Show when active */
.lightbox.active {
  display: flex;
}

#lightbox-img {
  max-width: 90%;
  max-height: calc(100vh - 80px); /* Adjust for fixed header */
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 45px rgba(46,125,50,0.35);
  transition: transform 0.3s ease;
}

/* Close button */
.lightbox .close {
  position: fixed;   /* fixed ensures it stays visible */
  top: 20px;
  right: 30px;
  width: 50px;
  height: 50px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  z-index: 10001;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.lightbox .close:hover {
  color: var(--secondary);
  transform: scale(1.1);
}

/* Navigation buttons */
.lightbox .nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 36px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 12px;
  z-index: 10001;
  transition: transform 0.2s ease, background 0.2s ease;
}
.lightbox .nav.prev { left: 20px; }
.lightbox .nav.next { right: 20px; }

.lightbox .nav:hover {
  background: var(--primary-dark);
  transform: translateY(-50%) scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #lightbox-img { max-height: calc(100vh - 70px); }
  .lightbox .close { width: 44px; height: 44px; font-size: 32px; }
  .lightbox .nav { font-size: 30px; padding: 12px 18px; }
}

@media (max-width: 480px) {
  #lightbox-img { max-height: calc(100vh - 60px); }
  .lightbox .close { width: 40px; height: 40px; font-size: 28px; }
  .lightbox .nav { font-size: 26px; padding: 10px 14px; }
}
.gallery-item::after {
  pointer-events: none; /* ✅ allow clicks */
}