/* ========================
   GALLERY PAGE STYLES
=========================== */

.gallery-item {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Gallery item wrapper */
.gallery-img-wrapper {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  background-color: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image inside wrapper */
.gallery-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease-in-out;
}

.gallery-img-wrapper:hover img {
  transform: scale(1.05);
}



/* Modal Styles */
.modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  position: relative;
}

/* Full-size image in modal */
#modalImage {
  max-height: 85vh;
  max-width: 95vw;
  width: auto;
  height: auto;
  object-fit: contain; /* No cropping in modal */
}

/* Custom close button */
.btn-close-red {
  color: red;
  background-color: red;
  opacity: 1;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1056;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  border: none;
}

.btn-close-red:hover,
.btn-close-red:focus {
  background-color: darkred;
  outline: none;
  box-shadow: 0 0 10px rgba(139, 0, 0, 0.7);
}

/* Slide navigation buttons */
.btn-slide {
  font-size: 2rem;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  user-select: none;
  z-index: 1055;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-slide:hover,
.btn-slide:focus {
  background-color: #fff;
  outline: none;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

#prevBtn {
  left: 10px;
}

#nextBtn {
  right: 10px;
}

/* ========================
   Responsive
=========================== */

@media (max-width: 768px) {
  .gallery-img-wrapper {
    aspect-ratio: 1 / 1;
    margin-bottom: 1rem;
  }

  .btn-slide {
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .btn-slide {
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
  }
}
