:root {
  --slide-width: min(800px, 90vw);
  --slide-height: 700px;
  --transition-time: 0.8s;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: var(--slide-width);
  margin: 0 auto;
  background: #000;
  margin-bottom: 10rem;
  margin-top: 5rem;
}

.carousel-container {
  width: 100%;
  height: var(--slide-height);
  position: relative;
  perspective: 2000px;
  /* transform-style: preserve-3d; */
}

.carousel {
  width: 100%;
  height: 100%;
  position: absolute;
  /* transform-style: preserve-3d; */
  transition: transform var(--transition-time) cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* background: white; */
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-time);
  transform-origin: center center -400px;
  background: url("images/abstract-blur-empty-green-gradient\ green.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.slide.active {
  z-index: 1;
}

.slide:not(.active) {
  pointer-events: none;
}

.image-container {
  width: 30%;
  height: 300px;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  margin: 0 auto;

  text-align: center;
  justify-content: center;
  align-items: center;

  /* transform: translateZ(500px); */
  /* overflow-x: hidden; */
  /* left: 95px;  */
}

.main-image {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.description {
  padding: 20px;
  background: #f8f8f8;

  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  flex-grow: 1;
}

.description h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
  color: #e9c46a;
  font-size: 1.5rem;
}

.description p {
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 40px;
}

.description a {
  text-decoration: none;
  background-color: #000;
  color: white;
  padding: 1rem;
  border: 3px solid green;
  cursor: pointer;
  /* width: 100%; */
  border-radius: 0 30px;
}

.description .indicator {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  bottom: -5rem;
  transform: translateX(-50%);
  color: orange;
  animation: bounce 2s infinite;
}

.sub-images {
  display: flex;
  gap: 15px;
  height: 100%;
  max-width: 500px;
}

.sub-image-container {
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  height: 180px;
  margin-top: 80px;
}

.sub-image-container img {
  width: 80px;
}

.sub-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.sub-image:hover,
.main-image:hover {
  transform: scale(1.05);
}

.controls {
  position: absolute;
  bottom: -450px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.buttons {
  display: flex;
  gap: 10px;
}

.control-btn {
  padding: 12px 24px;
  border: none;
  background: green;
  color: white;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}

.control-btn:hover {
  background: #555;
  transform: translateY(-2px);
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: green;
  transform: scale(1.2);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  position: relative;
}

.modal-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.3s;
}

.close-modal:hover {
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  :root {
    --slide-height: auto;
  }

  .carousel-container {
    height: auto;
    min-height: 600px;
  }

  .slide {
    height: auto;
    min-height: 600px;
  }

  .image-container {
    height: 200px;
  }

  .sub-images {
    height: 80px;
  }

  .description {
    padding: 15px;
  }

  .description h3 {
    font-size: 1.2rem;
  }
}
