/* --- Gallery Page Styles for Swiper Gallery --- */
* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #fff;
  overflow-x: hidden;
}

/* Width like main */
.gallery-container {
  width: 90%;
  max-width: 852px;   /* like .container on index.html */
  margin: 0 auto;
  position: relative; /* for Back button */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* back-button inside limited width */
.back-button {
  position: absolute;
  top: 20px;
  left: 0; 
  z-index: 1000;
  padding: 10px 20px;
  background-color: #00a3df;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Swiper */
.swiper {
  width: 100%;
  max-width: 100%;
  height: 80vh; /* Fill whole screen */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0 40px; /* Top for the button, bottom for pagination */
  box-sizing: border-box;
  position: relative; /* For arrows */
}

/* imgs */
.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-slide img {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


/* limit the arrows */
.swiper-button-next,
.swiper-button-prev {
  width: auto;
  color: #000;
  margin: 0 10px;
  top: 50%;
  position: absolute; 
  z-index: 10; 
}

.swiper-button-next {
  right: 0;
  transform: translateY(-50%);
}

.swiper-button-prev {
  left: 0;
  transform: translateY(-50%);
}

/* Mobile */
@media (max-width: 768px) {
  .back-button {
    font-size: 14px;
    padding: 8px 16px;
  }

  .swiper {
    padding-top: 60px;
    padding-bottom: 40px; 
    width: 100%;
    max-width: 100%; 
  }

  .swiper-slide img {
    max-width: 95vw;
    max-height: 65vh;
  }
}

@media (max-width: 480px) {
  .swiper-slide img {
    max-height: 60vh;
  }

  .swiper {
    padding-bottom: 40px;
  }
}
