/* ===============================
   CONTAINER
================================= */
.container {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* ===============================
   GALLERY TITLE
================================= */
.gallery {
  text-align: center;
  margin-bottom: 20px;
}

.gallery h1 {
  font-family: Arial, sans-serif;
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===============================
   GALLERY GRID
================================= */
.rowgallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

/* ===============================
   IMAGE COLUMN
================================= */
.custom-col {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.custom-col img {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}

.custom-col img:hover {
  transform: scale(1.05);
}

.custom-col img:last-child {
  margin-bottom: 0;
}

/* ===============================
   MODAL STYLING
================================= */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.9);

  /* Center content */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

/* When modal is active */
.modal.active {
  display: flex;
}

.modal-content {
  max-width: 95%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

/* Caption */
#caption {
  margin-top: 15px;
  text-align: center;
  color: #fff;
  font-size: 16px;
}

/* Close Button */
.close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: 0.3s;
}

.close:hover {
  color: #bbb;
}

/* ===============================
   RESPONSIVE DESIGN
================================= */
@media (max-width: 768px) {
  .custom-col img {
    max-width: 150px;
  }

  .modal-content {
    max-height: 70vh;
  }

  .close {
    font-size: 28px;
    top: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .custom-col {
    flex: 1 1 100%;
  }

  .custom-col img {
    max-width: 100%;
  }
}
