@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/* 
h4: tiêu đề ở giữa
h2: tiêu đề lớn
*/


/* slide hien 1 hinh anh  */
 .dot-container {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
  z-index: 10;
}

.mySlides {
  display: none;
}

.slideshow-container {
  position: relative;
  max-width: 100%;
  /* margin: auto; */
}

.slideshow-container img {
    width: 100%;
    height: 400px;
    text-align: center;
}

.dot {
  cursor: pointer;
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.active, .dot:hover {
  background-color: #717171;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/*  */

/*  */

p{
    font-weight: 100;
    font-family: sans-serif;
    padding-left: 50px;
    text-align:justify ;
}

h4 {
    font-weight: bold;
    font-size: 26px;
    font-family: sans-serif;
    text-align: center;
}


/*  */

body {
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

/*  */

.about-container {
  display: flex;
  flex-wrap: nowrap;              /* buộc không xuống hàng */
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding: 60px 110px;
  /* padding-bottom: 0;*/
  margin-bottom: 0; 
  background-color: #71717114;
}

/* Cho phép mọi direct-child của .about-container co nhỏ */
.about-container > * {
  flex-shrink: 1;                 /* cho phép co */
  min-width: 0;                   /* bắt buộc để nội dung bên trong co */
}

/* Text block */
.about-text {
  flex: 1 1 auto;                 /* flex-grow:1; flex-shrink:1; flex-basis:auto */
}

/* Hình ảnh + giới thiệu */
.Gioi-thieu {
  flex: auto; 
  max-width: 500px;
}

.Gioi-thieu img {
  margin-left: auto;
  width: 50%;
  border-radius: 10px;
}

.about-container h2 {
  padding: 0 50px;
}

/* Nút trong about-text */
.about-text button {
  display: flex;
  flex-wrap: nowrap;
  margin-left: 50px;
  padding: 10px;
  border-radius: 25px;
  background-color: rgb(250, 221, 34);
  color: white;
  font-size: 16px;
  font-weight: 600;
  font-family: sans-serif;
  border: none;
}



.about-text button a {
  color: white;
  text-decoration: none;
}

/* Tiêu đề chung */
h2 {
  padding-left: 60px;
  color: rgb(250, 221, 34);
  font-weight: bold;
  font-family: sans-serif;
}
/*  */


/* slide hien nhieu hinh anh */

.carousel-container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  overflow: hidden;
  position: relative;

}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide-item {
  flex: auto;
  padding: 10px;
  text-align: center;
}

.slide-item img {
  width: 100%;
  height: 300px;
  border-radius: 8px;
}

.slide-item p {
    /* align-items: flex-start; */
    padding: 0px 20px;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

.slide-item a{
  color: black;
  text-decoration: transparent;
}

.slide-item a:hover {
  text-decoration: underline;
}

/* product */

.section-product {
  background-color: #71717114;
  padding: 50px 15px;
}

.product-container {
  text-align: center;
  max-width: 1170px;
  margin: auto;
}

.product-container p {
  margin-left: 20px;
  padding:  0px 200px;
  text-decoration: transparent;
}

.product-container p:hover {
  text-decoration: underline;
}

.product-container h2 {
  /* align-items: center; */
  padding-left: 10px;
  font-size: 26px;
  font-weight: bold;
  color: #1f1f1f;
  margin-bottom: 30px;
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.product-item {
  min-width: 50%;
  padding: 10px;
}

.product-item img {
  height: 300px;
  width: 100%;
  border-radius: 6px;
}

.product-name {
  margin-top: 10px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  color: #333;
}

.carousel-btn {
  position: absolute;
  top: 50%; /* giữa theo chiều dọc */
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  cursor: pointer;
  z-index: 2;
  font-size: 18px;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background-color: #333;
}


/*  */

.section-product-featured {
      background-color: #f8f8f8;
     padding: 50px 15px;
    }

    .featured-products {
      text-align: center;
      max-width: 1160px;
      margin: auto;
    } 

    .featured-products h2 {
      padding-left: 0px;
      font-size: 28px;
      font-weight: bold;
      color: #1f1f1f;
      margin-bottom: 30px;
      position: relative;
      display: inline-block;
      font-weight: bold;
    }

    .featured-products h2::after {
      font-weight: bold;
      content: "";
      display: block;
      width: 60px;
      height: 3px;
      background-color: #c49b63;
      margin: 10px auto 0;
    }

    .featured-products p {
      padding-left: 43%;
    }

    /*  */

    .carousel-container {
      position: relative;
      overflow: hidden;
    }

    .carousel-track {
      display: flex;
      transition: transform 0.5s ease;
    }

    .featured-products .product-item {
      min-width: 50%;
      padding: 10px;
    }

    .product-item img {
      width: 100%;
      border-radius: 6px;
    }

    .product-name {
      margin-top: 10px;
      font-weight: bold;
      text-transform: uppercase;
      font-size: 14px;
      color: #333;
    }

    .carousel-btn {
      position: absolute;
      top: 45%;
      transform: translateY(-50%);
      background-color: rgba(0,0,0,0.4);
      color: white;
      border: none;
      padding: 10px;
      cursor: pointer;
      z-index: 2;
      font-size: 18px;
    }

    .section-product-featured .prev-btn { left: 0; }
    .section-product-featured .next-btn { right: 0; }

    .dots {
      text-align: center;
      margin-top: 15px;
    }

    .dot {
      display: inline-block;
      width: 10px;
      height: 10px;
      margin: 0 5px;
      background-color: #bbb;
      border-radius: 50%;
      cursor: pointer;
    }

    .dot.active {
      background-color: black;
    }

    /*  */
.section-service-carousel .carousel-container {
  padding: 40px 0px;
  position: relative;
  overflow: hidden;
  max-width: 1000px;
  margin: auto;
}

.section-service-carousel .carousel-track {
  /* padding: 20px; */
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-track a {
  text-decoration: none;
}

.carousel-track a:hover {
  text-decoration: underline;
}

.section-service-carousel .slide-item {
  min-width: 50%;
  padding: 10px;
}

.section-service-carousel .slide-item img {
  width: 100%;
  height: 300px;
  display: block;
  /* gap: 50px; */
}

.section-service-carousel .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  /* border-radius: 50%; */
}

.section-service-carousel .prev-btn {
  left: 10px;
}

.section-service-carousel .next-btn {
  right: 10px;
}

.news-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.news-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
  font-weight: normal;
  color: #000;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.news-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.news-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.news-item h3 {
  font-size: 18px;
  margin: 16px;
  line-height: 1.3;
  flex: 0 0 auto;
}
.news-item p {
  font-size: 14px;
  color: #555;
  padding: 0px 15px 15px 15px;
  flex: 1 0 auto;
  text-align: justify;
}
.read-more {
  display: inline-block;
  margin: 0 16px 16px;
  font-weight: bold;
  color: #000;
  text-decoration: none;
  transition: color .2s;
}
.read-more:hover {
  color: yellow;
}



@media (max-width: 768px) {

  /* Căn giữa chữ trong tất cả tiêu đề và đoạn văn */
  h1, h2, h3, h4, h5, h6, p {
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
    /* font-size: 14px; */
  }

  /* Slide ảnh chiều cao tự động */
  .slideshow-container img,
  .section-service-carousel .slide-item img,
  .slide-item img,
  .product-item img {
    width: 100%;
    height: auto;
  }

  /* Container chính */
  .about-container {
    flex-direction: column;
    padding: 40px 20px;
    gap: 20px;
  }

  .Gioi-thieu {
    max-width: 100%;
  }

  .Gioi-thieu img {
    width: 100%;
    margin-left: 30%;
    display: block;
  }

  .about-text {
    margin: 0 auto;
    text-align: center;
  }

  .about-text button {
    margin: 20px auto;
  }

  /* Giảm padding sản phẩm */
  .product-container p {
    padding: 0 20px;
  }

  .product-container h2 {
    font-size: 24px;
  }

  .section-product-featured h2{
    font-size: 24px;
  }

  .featured-products p {
    padding-left: 0;
    padding: 0 20px;
  }

  /* Carousel hiển thị 1 mục mỗi lần */
  .product-item,
  .section-service-carousel .slide-item {
    min-width: 100%;
  }
  
   body {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .carousel-container h4 {
    font-size: 20px;
  }

  .section-product-featured {
    padding-bottom: 30px; /* giữ khoảng cách tổng thể */
  }

  .carousel-container {
    margin-bottom: 0 !important; /* giảm khoảng cách giữa slide và dot */
    padding-bottom: 0 !important ;
  }

  .carousel-track p{
    margin-bottom: 5px !important;
  }

  .dots {
    margin-top: 0px !important; /* giảm khoảng cách dot lên trên */
    padding: 0px !important;
  }

  .dot {
    width: 8px;
    height: 8px;
    /* margin: 0 3px; dot gần nhau hơn */
  }

   .carousel-btn {
      position: absolute;
      top: 35%;
      transform: translateY(-50%);
      background-color: rgba(0,0,0,0.4);
      color: white;
      border: none;
      padding: 10px;
      cursor: pointer;
      z-index: 2;
      font-size: 12px;
    }

 .featured-products .product-item {
      min-width: 50%;
      padding: 10px;
    }

    .featured-products img{
      height: 100px;
    }

    .featured-products p, .carousel-container p {
      font-size: 10px;
    }

    .product-container p {
      font-size: 10px;
      padding-left: 0px;
    }

  .news-section {
    padding: 40px 10px;
  }
  .news-title {
    font-size: 24px;
    margin-bottom: 24px;
  }
  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .news-item img {
    height: 120px;
  }
  .news-item h3 {
    font-size: 16px;
    margin: 12px;
  }
  .news-item p {
    font-size: 13px;
    padding: 0 12px 12px;
  }
  .read-more {
    margin: 0 12px 12px;
    font-size: 14px;
  }


}


