/* Gallery Section STARTS */
/* Video Section */
.video-section {
  margin-top: 5rem;
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
}

.video-slider {
  display: flex;
  overflow: hidden;
  width: 80%;
  position: relative;
  margin-right: 10rem;
  margin-left: 10rem;
}

.videocontainer {
  display: flex;
  transition: transform 0.3s ease;
  width: 100%;
  gap: 1rem;
}

.video-item {
  flex: 0 0 50%;
  box-sizing: border-box;
}

.video-item iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
}

.video-arrow-left,
.video-arrow-right {
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  width: 4rem;
  height: 5rem;
}

.video-arrow-left {
  position: absolute;
  left: 0;
}

.video-arrow-right {
  position: absolute;
  right: 0;
}

/* Tablet Version */
@media (min-width: 768px) and (max-width: 1024px) {
  .video-section{
    margin-top: 3rem;
  }
  .video-slider {
    width: 85%;
  }

  .videocontainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 1rem;
    width: 100%;
  }

  .video-item {
    flex: none;
    width: 100%;
    height: auto;
  }

  .video-item iframe {
    height: 100%;
  }

  .video-arrow-left, .video-arrow-right {
  display: none;
  }
}@media (max-width: 768px) {

  .video-section{
    margin-top: 5rem;
  }
  
  .video-slider {
    width: 100%;
    margin: 0 4rem 1rem 0rem;
  }

  .videocontainer {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
  }

  .video-item {
    flex: 0 0 100%;
  }

  .video-arrow-left, .video-arrow-right {
    display: none;
  }
}


/*Slider for photos*/
.gallery-section {
  margin-top: 5rem;
  display: flex;
  width: 100%;
}

.gallery-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80%;
  overflow: hidden;
}

.arrow {
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  width: 20vw;
}

.arrow img {
  width: 4rem;
  height: 5rem;
}

.gallery {
  display: flex;
  transition: transform 0.3s ease;
  will-change: transform;
}

.gallery-item {
  flex: 0 0 50%;
  margin: 0 1%;
  box-sizing: border-box;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Preview Modal */
.preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.preview-content {
  position: relative;
  width: 80%;
  height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin-top: 10vh;
}

.close-preview {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 30;
  width: 12vw;
  height: 12vh;

}

.close-preview img {
  width: 10vw;
  height: 10vh;
  object-fit: contain;
}

.preview-arrow-left, .preview-arrow-right {
  background: none;
  border: none;
  cursor: pointer;
  z-index: 30;
  width: 20vw;
  height: 20vh;
}

.preview-arrow-left {
  position: absolute;
  left: -10rem;
}

.preview-arrow-right {
  position: absolute;
  right: -10rem;
}

/* Tablet Version */
@media (min-width: 768px) and (max-width: 1024px) {
  .gallery-section{
    display: flex;
  }
  .gallery-container {
      width: 80%;
  }

  .gallery-item {
      flex: 0 0 50%;
  }

  .arrow {
    width: 59vw;
  }

  .preview-arrow-left{
    left: -19rem;
  }
  .preview-arrow-right{
    right: -20rem;
  }

  .video-container {
    grid-template-columns: 1fr;
  }
}

/* Mobile Version */
@media (max-width: 768px) {
  .gallery-container {
      width: 100%;
      justify-content: center;
  }

  .arrow {
      display: none;
  }

  .gallery {
      display: flex;
      flex-direction: column;
  }

  .gallery-item {
      flex: 0 0 100%;
      cursor: default;
  }

  .gallery-item img {
      pointer-events: none;
  }

  .video-container {
    grid-template-columns: 1fr;
  }
}
/* Gallery Section ENDS */
