:root {
  --overlay-bg: rgba(0,0,0,0.9);
  --accent: #ffffff;
  --transition: 0.3s ease;
  font-family: Arial, sans-serif;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  padding: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform var(--transition);
  display: block;
}

/* Hover Zoom */
.gallery-item:hover img {
  transform: scale(1.1);
}

/* Overlay Effect */
.gallery-item::after {
  content: "View Image";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  font-size: 18px;
  font-weight: bold;
}

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

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  z-index:1001 !important;
  margin:0px !important;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.lightbox img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
}

.caption {
  color: #fff;
  margin-top: 10px;
  font-size: 16px;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

/* Navigation Arrows */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  padding: 10px;
}

.prev { left: 20%; position: fixed; }
.next { right: 20%; position: fixed; }



@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .prev { left: 10px; }
  .next { right: 10px; }
  .close-btn { top: -35px; }
}



/* Footer Gallery */
.footer-gallery {
  padding: 10px 0;
}

.footer-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 images per row */
  gap: 5px;
  /* max-width: 360px;  */
}

/* Small Images */
.footer-gallery-grid img {
  width: 100%;
  height: 50px; /* small height */
  object-fit: cover;
  border: 2px solid #ccc; /* only border */
  border-radius: 6px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

/* Hover effect */
.footer-gallery-grid img:hover {
  transform: scale(1.05);
  border-color: #1e3a8a;
}

