/* ============================
   Gallery & Lightbox
============================= */
.gallery {
  margin-top: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-item p.description {
  font-size: 1rem;
  color: #555;
  text-align: center;
  margin-top: 8px;
}
  
.lightbox {
  display: none;
  position: fixed;
  z-index: var(--z-modal);
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease;
}

/* ============================
   Carousel Styling
============================= */

.carousel-container {
  position: relative;  /* Position the container to place the buttons inside it */
  max-width: 100%;
  width: 600px;
  margin: auto;
  overflow: hidden; /* Prevent images from overflowing */
}

.carousel-images {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-images img {
  width: 100%;
  flex-shrink: 0; /* Prevent image from shrinking */
  display: none; /* Initially hide images */
}

.carousel-images img.active {
  display: block; /* Only the active image will be shown */
}

/* Buttons to control carousel navigation */
.carousel-button {
  position: absolute;  /* Absolute positioning to place the buttons over the images */
  top: 50%;  /* Vertically center the buttons */
  transform: translateY(-50%);  /* Center vertically */
  background-color: rgba(236, 222, 222, 0.281); /* Semi-transparent dark background */
  color: white;
  font-size: 3rem;  /* Make buttons larger */
  padding: 20px; /* Increase button size */
  border: none;
  cursor: pointer;
 
  user-select: none; /* Prevent text selection */
  transition: background-color 0.3s ease;  /* Smooth hover effect */
}

.carousel-button:hover {
  background-color: rgba(245, 204, 204, 0.473);  /* Slightly darker background on hover */
}

/* Positioning the previous and next buttons */
.carousel-prev {
  left: 10px;  /* Position left button on the left side */
}

.carousel-next {
  right: 10px;  /* Position right button on the right side */
}

/* For smaller screens, adjust the size of the buttons */
@media screen and (max-width: 768px) {
  .carousel-container {
    width: 100%; /* Make carousel full width on small screens */
  }
  .carousel-button {
    font-size: 2.5rem; /* Slightly smaller buttons on mobile */
    padding: 15px; /* Smaller padding */
  }
}
