.tgm2-produk {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 5% 5% 0 0;
  max-width: 100%;
  overflow-x: hidden; /* Ensure no horizontal scroll */
}

.produk-title h1 {
  font-weight: 700;
  color: #41713d;
  margin-top: 100px;
  text-align: center;
  font-size: 32px;
}

.tgm2 h1 {
  text-align: center;
  padding: 40px 0 50px 0;
  font-family: "Montserrat";
  font-weight: 800;
  font-size: 36px;
  color: #42723d;
}

.container-produk-tgm {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  justify-content: center;
  align-items: center;
  gap: 50px;
  margin-top: 100px;
  position: relative;
  overflow: hidden;
  padding-bottom: 100px;
}

.container-swiper-produk {
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

.swiper-nav-buttons {
  position: absolute;
  top: 60%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}

.mySwiper {
  width: 100%;
  margin: auto;
}

.swiper-wrapper {
  display: flex;
  width: 100%;
}

.swiper-slide {
  width: 100%;
  flex-shrink: 0;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.swiper-slide {
  transition: all 0.3s ease;
  transform: scale(0.8);
}
.swiper-slide-active {
  transform: scale(1);
}
.swiper-container {
  overflow: visible;
}

.swiper-slide:hover {
  transform: translateY(-10px);
}
.swiper-button-next,
.swiper-button-prev {
  color: #000;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  z-index: 10;
  pointer-events: auto;
}

.swiper-button-prev {
  left: 10px; /* Adjust margins to prevent overflow */
}

.swiper-button-next {
  right: 10px;
}

.produk::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 93%; /* Control the width of the border here */
  border-top: 1px solid #000000;
}

.produk-tgm h1 {
  padding-top: 100px;
  text-align: center;
}

.card {
  position: relative;
  width: 17rem;
  height: 23rem;
  background-color: #ffffff;
  color: #000000;
  border-radius: 1rem;
  border: 0.1rem solid transparent;
  overflow: hidden;
  box-shadow: 0 0.2rem 0.6rem grey;
  transition: 0.5s ease-in-out;
  z-index: 1;
  display: flex;
  flex-direction: column; /* Memastikan konten berada dalam kolom */
  align-items: center; /* Menyelaraskan konten di tengah */
  justify-content: center; /* Menyelaraskan konten secara vertikal */
}

.card:hover {
  border: 0.1rem solid var(--warning);
  transform: scale(1.05);
}

.card::before,
.card::after {
  position: absolute;
  content: "";
  background-color: #42723d;
  border-radius: 60% 60% 10% 80%;
  transition: 0.5s ease-in-out;
  z-index: 1;
}

.card::before {
  top: -6%;
  right: -6%;
  width: 9rem;
  height: 9rem;
}

.card::after {
  bottom: -6%;
  left: -6%;
  width: 5rem;
  height: 5rem;
}

.card:hover::before {
  transform: scale(1.8);
}

.card:hover::after {
  transform: scale(0);
}

.card-image {
  width: 100%;
  transform: translateY(0); /* Menghilangkan offset vertikal */
  transition: 0.5s ease-in-out;
  z-index: 2;
}

.card-content {
  display: flex;
  flex-direction: column;
  padding: 10px 0 0 0;
  z-index: 2;
  text-align: center;
}

.card-image img {
  width: 180px;
  height: 200px;
  z-index: 2;
  transition: transform 0.5s ease;
}

.card-image img:hover {
  transform: scale(1.1);
}

/* Video Carousel Styling */
.video-carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 35px 0;
  background-color: hsl(120, 27%, 75%);
  position: relative;
}

.carousel-wrapper {
  max-width: 560px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}

.video-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  flex: 0 0 100%;
  width: 100%;
  font-family: Arial, sans-serif;
  border: 1px solid #ddd;
}

.video-thumbnail-container {
  position: relative;
  width: 100%;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.iframe-wrapper {
  position: relative;
  width: 100%;
  height: 315px;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: 16px;
}

.video-title-container {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

.video-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  flex-grow: 1;
}

@media (min-width: 1450px) and (max-width: 2000px) {
  .produk-title h1 {
    font-size: 42px;
  }

  .container-swiper-produk {
    width: 1650px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    margin: 0 10px;
  }
}

@media (min-width: 1281px) and (max-width: 1450px) {
  .produk-title h1 {
    font-size: 42px;
  }

  .container-swiper-produk {
    width: 1300px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    margin: 0;
  }
}

@media (max-width: 1280px) {
  .produk-title h1 {
    font-size: 28px;
  }

  .container-swiper-produk {
    width: 92%;
  }

  .swiper-button-next,
  .swiper-button-prev {
    margin: 0;
  }
}

@media (max-width: 992px) {
  .produk-title h1 {
    font-size: 28px;
    margin-bottom: 50px;
  }

  .container-swiper-produk {
    width: 90%;
  }

  .swiper-button-prev,
  .swiper-button-next {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .produk-title h1 {
    font-size: 28px;
    margin-bottom: 50px;
  }

  .container-swiper-produk {
    width: 90%; /* Ensure it takes 90% of the width for mobile */
  }

  .carousel-wrapper {
    width: 90%;
  }

  .swiper-button-prev,
  .swiper-button-next {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .produk-title h1 {
    font-size: 24px;
    margin-bottom: 50px;
  }

  .card {
    margin: auto;
  }

  .container-swiper-produk {
    width: 100%; /* Adjust container to 100% width on mobile */
  }

  .swiper-button-prev,
  .swiper-button-next {
    display: none; /* Hide navigation on smaller screens */
  }

  .video-carousel {
    width: 100%;
  }

  .carousel-wrapper {
    width: 90%;
  }
}
