/* ==========================================================================
   GALLERY CSS
   ========================================================================== */

/* --------------------------------------
   CSS VARIABLES
-------------------------------------- */
:root {
  --transition-speed: 0.3s;
  --nav-bg: rgba(0, 0, 0, 0.5);
  --nav-bg-hover: rgba(0, 0, 0, 0.8);
}

/* --------------------------------------
   GALLERY WRAPPER & IMAGES
-------------------------------------- */
.gallery-wrapper {
  height: 400px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.gallery-wrapper img {
  height: 100%;
  object-fit: cover;
  opacity: 0;
  position: absolute;
  transition: opacity 0.5s ease;
  width: 100%;
}

.gallery-wrapper img.active {
  opacity: 1;
}

/* --------------------------------------
   GALLERY NAVIGATION
-------------------------------------- */
.gallery-nav {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  padding: 0 15px;  /* Added padding to prevent buttons from hitting the edges */
  box-sizing: border-box;
  z-index: 10;
}

.gallery-nav button {
  background: var(--nav-bg);
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
  transition: background var(--transition-speed);
  z-index: 11;
}

.gallery-nav button:hover {
  background: var(--nav-bg-hover);
}

/* --------------------------------------
   GALLERY DOTS NAVIGATION
-------------------------------------- */
.gallery-dots {
  bottom: 15px;
  display: flex;
  gap: 8px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  z-index: 12;
}

.dot {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  height: 10px;
  transition: background var(--transition-speed);
  width: 10px;
}

.dot.active {
  background: white;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (min-width: 768px) {
  .container {
    min-width: 100%;
    margin: 0 auto;
  }
}

/* Medium screens (max-width: 992px) */
@media (max-width: 992px) {
  .gallery-nav button {
    padding: 8px;
    font-size: 0.9rem;
  }
}

/* Small screens (max-width: 768px) */
@media (max-width: 768px) {
  .gallery-wrapper {
    height: 300px;
  }
  
  .gallery-nav button {
    padding: 8px;
    font-size: 0.9rem;
  }
  
  .gallery-dots {
    gap: 6px;
    bottom: 10px;
  }
  
  .dot {
    height: 8px;
    width: 8px;
  }
}

/* Extra small screens (max-width: 480px) */
@media (max-width: 480px) {
  .gallery-wrapper {
    height: 250px;
  }
  
  .gallery-nav button {
    padding: 6px;
    font-size: 0.8rem;
  }
  
  .gallery-dots {
    gap: 4px;
    bottom: 8px;
  }
  
  .dot {
    height: 6px;
    width: 6px;
  }
}
