/* Centering the Title and Gallery */
.gallery-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  width: 100vw;
  padding: 100px;
  background: linear-gradient(
    to right,
    rgba(9, 115, 183, 1),
    rgba(9, 115, 183, 0) 100%,
    transparent
  );
}

.gallery-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
  padding-top: 100px;
}

.gallery-container {
  display: grid; /* Use grid layout */
  grid-template-columns: repeat(4, 1fr); /* 5 equal columns */
  gap: 20px; /* Spacing between items */
  max-width: 100%; /* Full width for responsive design */
}

.card {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s;
  height: 250px;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card h2 {
  padding: 10px;
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1;
}
.close-btns {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1;
  color: white;
}

.modal-images {
  display: grid;

  gap: 20px;
  grid-template-columns: repeat(5, 1fr);
}

.modal-images img {
  width: 100%; /* Make sure it fills the width of the grid cell */
  height: 200px; /* Fixed height for all images */
  object-fit: cover; /* Ensure images cover the area while maintaining aspect ratio */
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.modal-images img:hover {
  transform: scale(1.05);
}

/* Lightbox Image */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
}

.lightbox-content {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px; /* Optional: for rounded corners */
}

.nav-buttons {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%); /* Center vertically */
}

.nav-buttons button {
  background-color: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
}

.nav-buttons button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}
