/* Dialog shrinks to fit image */
.modal-dialog {
  margin: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* vertical centering */
}

/* Transparent modal */
.modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
  width: auto;   /* hug image */
  height: auto;
}

/* Body also hugs image */
.modal-body {
  padding: 0;
}

/* Image defines popup size */
.modal-body img {
  width: auto;
  height: auto;
  max-width: 90vw;  /* keep inside screen */
  max-height: 90vh;
  display: block;
}

.carousel-fade .carousel-inner {
  position: relative;
}
.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.carousel-fade .carousel-item.active {
  opacity: 1;
  position: relative;
}


.gallery-thumb {
  width: 100%;
  height: 200px;              /* uniform height */
  object-fit: cover;          /* crop nicely */
  border-radius: 6px;         /* optional rounded corners */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* soft shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* === Medium-sized Left/Right Arrows for Modal Gallery === */
.carousel-control-prev i,
.carousel-control-next i {
  font-size: 1.2rem; /* moderate size (default 1.25rem) */
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  padding: 10px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.carousel-control-prev i:hover,
.carousel-control-next i:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #000;
  transform: scale(1.05);
}

/* slightly enlarge clickable zone for comfort */
.carousel-control-prev,
.carousel-control-next {
  width: 8%;
}
