/* Browsers: last 4 version */


.gallery-container {
  background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#ffffff));
  background-image: -o-linear-gradient(top, #eeeeee, #ffffff);
  background-image: linear-gradient(to bottom, #eeeeee, #ffffff);
}

.gallery {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 1.5rem;
  padding: 50px;
}

.gallery-heading h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.empty-div {
  width: 20%;
  max-width: 100px;
  min-width: 60px;
  height: 20px;
  border: 4px solid transparent;
  border-top-color: var(--secondary-color);
}

.gallery-images {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.gallery-image {
  width: 200px;
  height: 200px;
  min-width: 200px;
  min-height: 200px;
  border-radius: 10px;
  -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  -webkit-transform: translateX(-5%);
  -ms-transform: translateX(-5%);
  transform: translateX(-5%);
  -webkit-transition: all 1.2s ease;
  -o-transition: all 1.2s ease;
  transition: all 1.2s ease;
}

.show-gallery-image {
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-transform: translateX(0) !important;
  -ms-transform: translateX(0) !important;
  transform: translateX(0) !important;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
}

.gallery-image img:hover {
  -webkit-transform: scale(1.05);
  -ms-transform: scale(1.05);
  transform: scale(1.05);
  -webkit-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 40px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(255, 255, 255, 0.95);
}

.modal-content-container {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  align-items: center;
  justify-content: flex-start;
  max-height: calc(100vh - 40px);
}

.modal-content {
  max-width: 300px;
  min-width: 200px;
  width: 100%;
  height: 100vh;
  max-height: 300px;
  min-height: 200px;
  display: block;
  -webkit-transition: 0.3s;
  -o-transition: 0.3s;
  transition: 0.3s;
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: 5px;
}

.close {
  position: absolute;
  top: 5px;
  right: 20px;
  color: var(--secondary-color);
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

/* Arrows */
.modalprev,
.modalnext {
  cursor: pointer;
  position: fixed;
  top: 50%;
  width: auto;
  padding: 16px;
  color: var(--secondary-color);
  font-size: 30px;
  font-weight: bold;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition: 0.3s;
  -o-transition: 0.3s;
  transition: 0.3s;
  z-index: 1001;
}

.modalprev {
  left: 0px;
}

.modalnext {
  right: 0px;
}

/* Thumbnails */
.thumbnails-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 10px;
  gap: 5px;
}

.thumbnails-container img {
  width: 50px;
  height: 50px;
  -o-object-fit: cover;
  object-fit: cover;
  opacity: 0.6;
  cursor: pointer;
  border-radius: 4px;
  -webkit-transition: 0.3s;
  -o-transition: 0.3s;
  transition: 0.3s;
}

.thumbnails-container img.active {
  opacity: 1;
  border: 2px solid var(--secondary-color);
}

/* Controls */
.modal-controls {
  display: flex;
  align-items: center;
  text-align: center;
  margin-top: 5px;
  gap: 20px;
}

.modal-controls img {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.toggle-controls {
  margin: 10px auto;
  width: 20px;
  cursor: pointer;
  background: none;
  border: none;
}

.info-box {
  position: absolute;
  top: 15px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  transform: translateX(-50%);
}

.hidden {
  display: none;
}


@media (max-width: 760px) {
  .gallery-heading h2 {
    font-size: 2rem;
  }
}

@media (max-width: 566px) {
  .info-box {
    position: absolute;
    bottom: 180px;
  }
}

@media (max-width: 600px) {
  .gallery-heading h2 {
    font-size: 1.8rem;
  }

}

@media (max-width: 300px) {
  .gallery-heading h2 {
    font-size: 1.5rem;
  }
}