/* Reset & cấu hình chung */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    font-family: 'Open Sans', sans-serif;
    background-color: #ffffff;
    color: #333;
}
.main-container{
    width: 100%;
    margin: 0 auto;
}
.mainimg-slider {
    overflow: hidden;
    width: 100%;
    height: 80vh;
    position: relative;
  }
  .about-section .container .about-image{
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .slide-track {
    display: flex;
    animation: slideBanner 9s infinite;
  }
  
  .slide-track img {
    width: 100%;
    height: 80vh;
    flex-shrink: 0; /* ✨ GIỮ KÍCH THƯỚC ẢNH KHÔNG CO */
  }
  
  @keyframes slideBanner {
    0% { transform: translateX(0); }
    30% { transform: translateX(0); }

    33% { transform: translateX(-100%); }
    63% { transform: translateX(-100%); }

    66% { transform: translateX(-200%); }
    96% { transform: translateX(-200%); }

    100% { transform: translateX(0); }
}
  .image-wrapper img,
.image-wrapper1 img {
  position: absolute;
  width: 150%;
  height: 150%;
  object-fit: cover;
  top: -22%;
  left: -22%;
  opacity: 0;
  animation: fadeImage 6s infinite;
}

.image-wrapper img:nth-child(1),
.image-wrapper1 img:nth-child(1) {
  animation-delay: 0s;
}

.image-wrapper img:nth-child(2),
.image-wrapper1 img:nth-child(2) {
  animation-delay: 3s;
}

@keyframes fadeImage {
  0% { opacity: 0; }
  10% { opacity: 1; }
  45% { opacity: 1; }
  55% { opacity: 0; }
  100% { opacity: 0; }
}

/* Ảnh xoay khung vuông */
.image-container, .image-container1 {
    width: 250px;
    height: 250px;
    overflow: hidden;
    transform: rotate(45deg);
    position: absolute;
    border: 10px solid #baffc4;
}

.image-container {
  top: 80px;
  left: 60px;
}

.image-container1 {
  top: 330px;
  left: 150px;
}

.image-wrapper, .image-wrapper1 {
    width: 100%;
    height: 100%;
    position: relative;
    transform: rotate(-45deg);
}

.image-wrapper img, .image-wrapper1 img {
    width: 150%;
    height: 150%;
    object-fit: cover;
    position: absolute;
    top: -22%;
    left: -22%;
}

.navbar{
    position: relative;
    text-align: center;
    color: #ffffff;
    overflow: hidden; 
}

.content{
    position: absolute;
    top: 50%;
    left: 70%;
    transform: translate(-50%, -50%);
    display: grid;
    gap: 20px;
    width: max-content;
}
.content button {
  font-family: inherit;
  font-size: 20px;
  background: rgb(115, 215, 122);
  color: white;
  padding: 0.7em 1em;
  padding-left: 0.9em;
  display: flex;
  align-items: center;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
}

.content button span {
  display: block;
  margin-left: 0.3em;
  transition: all 0.3s ease-in-out;
}

.content button svg {
  display: block;
  transform-origin: center center;
  transition: transform 0.3s ease-in-out;
}

.content button:hover .svg-wrapper {
  animation: fly-1 0.6s ease-in-out infinite alternate;
}

.content button:hover svg {
  transform: translateX(4em) rotate(45deg) scale(1.1);
}

.content button:hover span {
  transform: translateX(10em);
}

.content button:active {
  transform: scale(0.95);
}

@keyframes fly-1 {
  from {
    transform: translateY(0.1em);
  }

  to {
    transform: translateY(-0.1em);
  }
}

.content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  background: linear-gradient(90deg, #39ff39, #fff82d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 12px 12px 16px rgba(0, 0, 0, 0.25);
  line-height: 1.1;
  letter-spacing: 0.05em;
}
.content a{
  font-family: 'Open Sans', sans-serif;
  text-decoration: none;
  display: inline-block;
}

.content-buttons {
  display: flex;
  gap: 20px; /* khoảng cách giữa 2 nút */
  justify-content: center; /* căn giữa nếu muốn */
  flex-wrap: wrap; /* xuống dòng nếu màn nhỏ */
}
.content-buttons a {
  flex: 1;
  max-width: 220px; /* hoặc 250px tùy bạn muốn rộng tới đâu */
  text-align: center;
}

.content-buttons button {
  width: 100%; /* Đảm bảo button chiếm hết chiều rộng của thẻ a */
  box-sizing: border-box;
}
.content button span {
  display: block;
  margin-left: 0.3em;
  transition: all 0.3s ease-in-out;
  white-space: nowrap;
}
/* About section (ảnh phải - nội dung trái) */
.about-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgb(255 255 255);
    margin: 60px 0;
    gap: 40px;
    padding-left: 50px;
}

.about-section img {
    width: 55%;
    /* height: 50%; */
    object-fit: cover;
    float: right;
}

.about-section .container {
    width: 50%;
    text-align: justify;
    padding: 18px;
}
.about-section .container h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: rgb(13, 127, 64);
    
}
.about-section .container h3 {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: rgb(13, 127, 64);
    margin-left: 9%;
    margin-top: -20px;
}
/* Featured products */
.featured-products .product-grid {
    display: grid;
    text-align: center;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    position: relative;
    margin: 0px 15px;
}

.product-item {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    transition: box-shadow 0.3s;
}

.product-item a{
    text-decoration: none;
    color: black;
}

.product-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}
.product-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Nút "Xem sản phẩm" căn giữa và nằm dưới */
.buton-item {
    display: inline-block;
    margin: 30px auto 0;
    text-align: center;
    padding: 10px 20px;
    text-decoration: none;
    background-color: rgb(13,127,64);
    color: white;
    font-weight: bold;
    border: 2px solid rgb(13,127,64);
    border-radius: 5px;
    transition: 0.3s;
    grid-column: 1 / -1; /* trải dài toàn hàng */
    justify-self: center; /* căn giữa theo ô lưới */
}
.buton-item:hover {
    background-color: #059c1c;
    border-color: #059c1c;
}
/* Gallery */
.gallery {
    margin: 50px 0px;
}
.gallery .container {
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding-right: 50px;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  max-width: 100%;
  float: none;
}

.gallery-header {
  flex: 0 0 50%;
  max-width: 50%;
  width: 50%;
  text-align: justify;
  padding: 18px;
}
.gallery-header h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: rgb(13, 127, 64);
}
.gallery-header .buton-item{
  margin-bottom: 20px;
  margin-top: 10px;
  display: table;
}

/* Testimonials */
.testimonials {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    margin: 60px 0;
    gap: 40px;
}
.testimonials img {
    width: 55%;
    height: 450px;
    object-fit: cover;
    float: right;
}
.testimonials .container {
    width: 50%;
    text-align: center;
}
.testimonials .container h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: green;
}
.testimonial-item blockquote {
    font-style: italic;
    margin-bottom: 10px;
}

.customer-name {
    font-weight: bold;
}

/* CTA Section */

.cta-section {
    text-align: center;
    padding: 60px 0px;
    background-color: rgb(13,127,64);
    color: #fff;
}
.cta-section .cta-button{
    text-decoration: none;
    background-color: #fff;
    color: rgb(13,127,64);
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    margin-bottom: 50px;
}
.cta-section .container h2{
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #fff;
}
.cta-section .container p{
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #fff;
    padding: 0px 20px;
}
.endline {
    background: rgb(13,127,64);
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    margin: 60px 0px;
  }
  
  .endline-content {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: nowrap;
    max-width: 1200px;
    margin: 0 auto 40px;
  }
  
  .resource-box {
    display: grid;
    background-color: #fff;
    color: #333;
    padding: 30px 25px;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    justify-items: center;
    text-align: center;
  }
  
  .resource-box h4 {
    font-size: 14px;
    letter-spacing: 2px;
    color: #a67c52;
    text-transform: uppercase;
  }
  
  .resource-box h3 {
    font-size: 28px;
    margin: 15px 0;
    color: #a0672a;
  }
  
  .resource-box p {
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .endline-btn {
    background-color: rgb(13,127,64);
    color: white;
    font-weight: bold;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 5px;
  }
  
  .endline-btn:hover {
    background-color: #68e77b;
  }
  
  .endline-footer {
    text-align: center;
  }
  
  .view-all {
    background-color: white;
    color: rgb(13, 127, 64);
    font-weight: bold;
    padding: 12px 28px;
    border: none;
    border-radius: 4px;
    letter-spacing: 1px;
    cursor: pointer;
  }
  
  .view-all:hover {
    background-color: #eeeeeebc;
  }
  /* Ẩn tràn nội dung và tạo hiệu ứng */
.collapsible-content {
    /* max-height: 200px;      chiều cao tối đa khi chưa mở */
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  
  /* Khi đã mở rộng (expanded) */
  .collapsible-content.expanded {
    max-height: 1000px;     /* hoặc dùng max-height: none; */
  }
  
  /* Style cho nút Xem thêm / Thu gọn */
  .toggle-about {
    display: block;
    margin: 0.5em auto 1em;
    background: none;
    border: none;
    color: #08c20e;
    font-size: 1em;
    cursor: pointer;
  }
  .about-section img{
    object-fit: cover;
    flex-shrink: 0; /* ✨ GIỮ KÍCH THƯỚC ẢNH KHÔNG CO */
    clip-path: polygon(-5% 0%, 100% 0%, 100% 100%, 0% 100%);
  }
  .tabs {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 16px;
  border: none;
  background-color: #e0ffe0;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  color: #a0672a;
}
.tab-btn.active {
  background-color: rgb(13, 127, 64);
  color: white;
}
.tab-content {
  margin-top: 15px;
  background: #f9f9f9;
  padding: 15px;
  border-left: 4px solid rgb(13, 127, 64);
  border-radius: 4px;
}
.tab-content {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.tab-content.fade-out {
  opacity: 0;
}
#tab-image {
  transition: opacity 0.4s ease-in-out;
  opacity: 1;
}

#tab-image.fade-out {
  opacity: 0;
}
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}
.main-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.main {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.main a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.main img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.main .text {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.main .text h2 {
  font-size: 1.2em;
  margin: 0 0 10px;
  min-height: 3em; /* Đảm bảo cùng chiều cao */
}

.main .text p {
  flex: 1;
  font-size: 0.95em;
  margin-bottom: 10px;
  text-align: justify;
}

.main .text::after {
  content: "";
  display: block;
  height: 40px; /* dành chỗ cho nút */
}

.main .text button {
  margin-top: auto;
  align-self: center;
  padding: 8px 16px;
  background-color: #07ae20;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.img-mobile {
  display: none;
}

  @media (max-width: 768px) {
    .gallery-header h2{
      text-align: center;
    }
    .about-section .container h2{
      text-align: center;
    }
    .about-section .container h3{
      text-align: center;
      margin-left: 0%;
    }
    .tabs{
      width: 100%;
    }
    .tab-btn{
      width: 100%;
      color: #a0672a;
    }
    .content-buttons {
    flex-direction: column; /* Trên điện thoại thì xếp theo cột */
    align-items: center;
    gap: 12px;
  }

  .content-buttons a {
    width: 100%;
    text-align: center;
    justify-items: center;
  }

  .content-buttons button {
    width: 60%;
    max-width: 300px;
  }
  .content-buttons span{
    font-size: 0.7em;
  }
  /* About Section */
  .about-section {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-left: 0px;
    gap: 20px;
  }
  .about-section img {
    width: 100% !important;
    height: auto !important;
    margin-top: 12px;
  }
  .img-desktop {
    display: none;
  }
  .img-mobile {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-top: 12px;
  }
  .about-section .container {
    width: 100% !important;
    padding: 10px;
  }

  /* Gallery Section */
  .gallery .container {
    flex-direction: column-reverse !important;
    align-items: flex-start !important;
    gap: 20px;
    padding-right: 0px;
  }
  .gallery-header,
  .gallery-grid {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0;
  }
  .gallery-header{
    padding: 10px;
  }
  /* Testimonials */
  .testimonials {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px;
  }
  .testimonials img {
    width: 100% !important;
    margin-top: 12px;
  }
  .testimonials .container {
    width: 100% !important;
    text-align: left !important;
    padding: 8px 0;
  }

  .navbar .content h1 {
    font-size: 1.3em;
    line-height: 1.2;
  }

  /* Nếu các section có margin lớn thì giảm margin */
  .about-section,
  .testimonials,
  .gallery {
    margin: 28px 0;
  }
  .image-container{
    display: none;
  }
  .image-container1{
    display: none;
  }
  .content{
    left: 50%;
  }
  .mainimg-slider {
    height: auto;
  }
  .slide-track img{
    height: 100%;
  }
  .endline-content {
    flex-wrap: wrap;
  }
}