* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.gallery-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 80vh;
  margin-top: 40px;
}


.close-gallery {
  position: absolute;
  top: 120px; 
  right: 50px; 
  font-size: 28px;
  color: #e0e0e0;
  z-index: 1000;
  transition: color 0.3s, transform 0.3s;
}

.close-gallery:hover {
  color: var(--primary, red);
  transform: scale(1.1);
}


.gallery {
  position: relative;
  width: 100%;
  height: 65vh; 
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  pointer-events: none; 
  
  
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-item img {
  display: block;
  
  
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  
  object-fit: contain;
  box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.4); 
}

.nav-prev,
.nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  color: #e0e0e0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 50;
  transition: color 0.3s;
}

.nav-prev { left: 8%; }
.nav-next { right: 8%; }

.nav-prev:hover, .nav-next:hover { color: var(--primary, red); }


.thumbnail-window {
  
  width: 360px; 
  margin: 30px auto 0 auto;
  overflow: hidden; 
  position: relative;
}

.thumbnail-track {
  display: flex;
  gap: 15px;
  
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.thumbnail-item {
  flex-shrink: 0; 
  width: 60px;
  height: 60px;
  object-fit: cover;
  opacity: 0.3;
  cursor: pointer;
  transition: opacity 0.3s;
}

.thumbnail-item.active {
  opacity: 1;
}

.thumbnail-item:hover {
  opacity: 0.8;
}


.video-section {
  width: 90%; 
  max-width: 900px; 
  margin: 80px auto 100px auto; 
  display: flex;
  justify-content: center;
}

.video-section iframe {
  width: 100%;
  aspect-ratio: 16 / 9; 
  border: none;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5); 
}


html {
  scroll-behavior: smooth;
}


.scroll-down-arrow {
  display: block;
  text-align: center;
  margin: 40px auto 10px auto;
  font-size: 24px;
  color: inherit; 
  text-decoration: none;
  animation: bounce 2s infinite;
  transition: opacity 0.3s ease;
}

.scroll-down-arrow:hover {
  opacity: 0.5;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-15px); }
  60% { transform: translateY(-7px); }
}



@media (max-width: 900px) {
  
  .close-gallery {
    top: 160px; 
    right: 30px;
  }
}

@media (max-width: 768px) {
  
  .gallery-container {
    margin-top: 10px; 
  }

  
  .gallery {
    height: 55vh; 
  }

  
  .nav-prev { left: 2%; }
  .nav-next { right: 2%; }
  
  
  .nav-prev, .nav-next {
    font-size: 28px;
  }

  
  .thumbnail-window {
    width: 290px; 
    margin-top: 15px;
  }

  .thumbnail-track {
    gap: 10px; 
  }

  .thumbnail-item {
    width: 50px; 
    height: 50px;
  }

  
  .close-gallery {
    top: 75px; 
    right: 20px;
    font-size: 25px;
    z-index: 9999; 
  }
  
  .video-section {
    margin: 50px auto;
    width: 95%; 
  }
}