/* Studio Gallery: Single row slider */
.studio-gallery {
  display: flex;
  flex-wrap: nowrap; /* Force single row */
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  white-space: nowrap;
}

/* About Gallery: Wrap images to new rows when needed */
.about-gallery {
  display: flex;
  flex-wrap: wrap; /* Allow images to wrap onto new rows */
  gap: 10px;
  /* Remove overflow-x and white-space to allow wrapping */
}

/* Gallery Items (Uniform thumbnails) */
.gallery-item {
  flex: 0 0 200px; /* Fix each item at 200px and prevent shrinking */
  position: relative;
  width: 200px;         /* Fixed width */
  height: 150px;        /* Fixed height for cropping */
  overflow: hidden;
  cursor: pointer;
  margin: 0;
  border-radius: 10px;
  transition: transform 0.3s ease; /* Transition on hover */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* Crop image to fill */
  border-radius: 10px;
}

/* Hover Effect on Gallery Item (scaling entire frame) */
.gallery-item:hover {
  transform: scale(1.05);
}

/* Gallery Wrapper & Arrows (common for slider) */
.gallery-wrapper {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(23, 59, 73, 0.7);
  color: #fff;
  border: none;
  font-size: 30px;
  padding: 10px;
  cursor: pointer;
  z-index: 2;
}

.gallery-arrow.prev {
  left: 5px;
}

.gallery-arrow.next {
  right: 5px;
}

/* Modal Background */
.modal {
  border-radius: 10px;
  display: none; 
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

/* Modal Image (Maintains natural aspect ratio) with a small white frame */
.modal-content {
  border: 2px solid #ffffff;
  border-radius: 10px;
  margin: auto;
  display: block;
  max-height: 90vh;
  width: auto;
  object-fit: contain; /* Preserve aspect ratio without cropping */
  background-color: rgba(0,0,0,0.9);
}

/* Mobile adjustments for modal */
@media (max-width: 600px) {
  .modal {
    padding-top: 0;
  }
  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
  }
}

/* Close Button */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #bbb;
}

/* Navigation Arrows */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  margin-top: -50px;
  color: #fff;
  font-weight: bold;
  font-size: 40px;
  transition: 0.3s;
  user-select: none;
}

.prev:hover,
.next:hover {
  color: #bbb;
}

.prev {
  left: 0;
}

.next {
  right: 0;
}
