
.carousel-container {
  /* display: grid; */
  /* grid-template-columns: repeat(2,1fr); */
  width: 100%;
  /* max-width: 1200px; */
  margin: auto;
  overflow: hidden;
  position: relative;

}

.slides {
  margin-bottom: 0px;
  margin-left: 180px;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide-item {
  flex: flex;
  /* grid-template-columns: repeat(2,1fr); */
  padding: 10px;
  text-align: center;
  padding-top: 40px;
  padding-right: 20px;
}

.slide-item img {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  display: flex;
  /* padding-right: 20px; */
}

.slide-item p {
    /* align-items: flex-start; */
    /* padding: 0px 8px; */
    margin: 10px;
    margin-left: 0px;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

.slide-item a{
  color: black;
  text-decoration: transparent;
}

.slide-item a:hover{
  text-decoration: underline;
}

/* .slide-item p:hover {
    text-decoration: underline;
} */

/* Mobile nhỏ: tối ưu cho màn hình <= 480px */
@media (max-width: 480px) {
  .carousel-container {
    padding: 0 10px;
  }
  .slides {
    margin-left: 0;           /* bỏ margin cố định */
    display: flex;
    flex-wrap: nowrap;        /* hoặc wrap tuỳ nhu cầu */
    overflow-x: auto;         /* cho phép scroll ngang */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .slide-item {
    flex: 0 0 80%;            /* mỗi slide chiếm ~80% viewport */
    padding: 10px 5px;
    scroll-snap-align: start;
  }
  .slide-item img {
    height: auto;             /* tự co theo tỉ lệ */
    max-height: 150px;        /* giảm chiều cao */
  }
  .slide-item p {
    font-size: 14px;          /* giảm cỡ chữ */
  }
}

/* Tablet/vừa: màn hình <= 768px */
@media (max-width: 768px) {

  body{
    background-color: #fff;
  }
  .carousel-container {
    padding: 0 20px;
  }
  .slides {
    margin-left: 0;
    display: flex;
    flex-wrap: wrap;          /* 2 slide trên 1 hàng */
    justify-content: space-between;
  }
  .slide-item {
    flex: 0 0 48%;            /* 2 items / hàng */
    padding: 15px 10px;
  }
  .slide-item img {
    height: auto;
    max-height: 180px;
  }
  .slide-item p {
    font-size: 10px;
    padding-left: 10px;
  }
}
