body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(160deg, #0054c2, #b7d0ff);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Default: responsive grid */
  gap: 8px;
  padding: 20px;
  margin: 0 80px;
  justify-content: center;
}

.img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  display: block;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 0;
  padding-bottom: 100%; /* Square aspect ratio */
  transition: transform 0.4s ease-in-out;
}

.img-wrapper:hover img,
.img-wrapper:hover video {
  transform: scale(1.1); /* Zoom-in on hover */
  transition: transform 0.4s ease-in-out;
}

.gallery img,
.gallery video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.4s ease-in-out; /* Smooth transition for zooming */
}

.video-play-icon {
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 36px;
  color: white;
  z-index: 10;
}

.video-play-icon::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(to top right, rgba(0, 0, 0, 01) 0%, rgba(0, 0, 0, 0) 50%); /* Gradient fades to transparency at 50% */
  clip-path: polygon(0% 0%, 100% 100%, 0% 100%); /* Triangle with hypotenuses from top-left to bottom-right */
  z-index: 9;
}

.video-play-icon i {
  position: absolute;
  bottom: 10px; /* Increased spacing from the edges */
  left: 10px;  /* Increased spacing from the edges */
  font-size: 20px;
  z-index: 11; /* Make sure play button is on top of the triangle */
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  display: none;
}

.lightbox-img,
.lightbox-video {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 36px;
  color: white;
  cursor: pointer;
}

.nav {
  position: absolute;
  top: 50%;
  font-size: 48px;
  color: white;
  padding: 10px;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
}

.nav.left {
  left: 30px;
}

.nav.right {
  right: 30px;
}



/* Remove underline from anchor links */
a {
  text-decoration: none;
}

/* Add extra space above the heading when jumping */
h2 {
  padding-top: 10px;
  margin-left: 110px; /* Moves the header in from the left side */
  margin-top: 10px;  /* Adds extra space above the heading */
  margin-bottom: 5px; /* Adds some space between the header and the gallery section */
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
}

/* Media query for mobile devices (max-width: 768px) */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr); /* Two images per row */
    padding: 20px;
    margin: 0;
  }

  .img-wrapper {
    padding-bottom: 100%; /* Maintain square aspect ratio */
  }

  .nav {
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-img,
  .lightbox-video {
    max-width: 95%;
    max-height: 70vh; /* Ensure it's not too tall on mobile */
  }

  .nav.left {
    left: 10px; /* Reduce side spacing for small screens */
  }

  .nav.right {
    right: 10px;
  }
  
  h2 {
      margin-left: 25px;
  }
}
