/* ========== BASE LAYOUT ========== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', sans-serif;
  background-color: #fff;
  color: #282434;
}

.container {
  max-width: 1400px;
  padding: 0 24px;
  margin: 0 auto;
}

section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  section {
    padding: 50px 0;
  }
  .container {
    padding: 0 16px;
  }
}

/* ========== ABOUT SECTION ========== */
.about-section {
  position: relative;
  height: 90vh;
  background: url('./image/out2 copy 2.jpeg') center/cover no-repeat;
  color: white;
  display: flex;
  align-items: center;
  z-index: 1;
}

.about-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

@media (max-width: 768px) {
  #about .container {
    text-align: center;
  }
  #about .container .d-flex {
    justify-content: center;
  }
  #about h4 {
    font-size: 1.8rem;
  }
  #about p {
    font-size: 15px;
  }
}

/* ========== SWIPER TESTIMONIALS ========== */
.swiper {
  position: relative;
  padding: 0 48px;
}

.swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.swiper-slide {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

/* Navigation buttons */
.swiper-button-next,
.swiper-button-prev {
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  color: #00b81c;
  width: 30px;
  height: 30px;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 16px;
}

/* Hover */
.swiper-button-next:hover,
.swiper-button-prev:hover {
  color: rgba(20, 162, 20, 0.6);
}

/* Mobile */
@media (max-width: 768px) {
  .swiper {
    padding: 0 16px;
  }
  .swiper-slide {
    max-width: 100%;
    padding: 1rem;
    min-height: auto;
  }
  .swiper-button-prev,
  .swiper-button-next {
    display: none;
  }
}

/* ========== BUTTONS ========== */
.btn-custom-green {
  background-color: #00b81c;
  color: #fff;
  border: none;
  transition: 0.3s;
}

.btn-custom-green:hover {
  background-color: #b3b3b3;
  color: #fff;
}

.btn-toggle {
  min-width: 100px;
  padding: 8px 16px;
  font-weight: 600;
  background-color: #e0e0e0;
  color: #282434;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-toggle.active {
  background-color: #00b81c !important;
  color: white !important;
}

/* ========== WHY SECTION ========== */
#why .col-md-4.col-lg-2 {
  max-width: 200px;
  min-height: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#why img {
  width: 36px;
  height: 36px;
}

#why h5 {
  font-size: 1rem;
  margin: 0.5rem 0;
}

#why .text-muted.small {
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0 4px;
}

/* Mobile */
@media (max-width: 768px) {
  #why .col-md-4.col-lg-2 {
    flex: 0 0 48%;
    max-width: 48%;
    min-height: auto;
    margin-bottom: 1.5rem;
  }
  #why .section-title {
    font-size: 1.6rem;
  }
}

/* ========== CASE STUDY ========== */
#case-study img, #case-study2 img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
}

.case-description, .case-description2 {
  max-height: 300px;
  overflow-y: auto;
  background-color: #f2f2f2;
  padding: 20px;
  border-radius: 8px;
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
}

/* Responsive grid fix */
@media (max-width: 768px) {
  #case-study .col-md-6.col-lg-3,
  #case-study2 .col-md-6.col-lg-3 {
    flex: 1 1 48%;
    max-width: 48%;
  }
}

@media (max-width: 576px) {
  #case-study .col-md-6.col-lg-3,
  #case-study2 .col-md-6.col-lg-3 {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ========== GALLERY ========== */
.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 768px) {
  #gallery .col-6.col-md-3 {
    flex: 1 1 48%;
    max-width: 48%;
  }
}

@media (max-width: 576px) {
  #gallery .col-6.col-md-3 {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ========== FOOTER ========== */
.pre-footer {
  background-color: #282434;
  height: 500px;
}

@media (max-width: 768px) {
  .pre-footer {
    text-align: center;
    padding: 3rem 1rem;
    height: auto;
  }
  .pre-footer .logo {
    align-items: center !important;
  }
  .pre-footer ul {
    padding-left: 0;
  }
}
/* ===== FIX OVERLAP BUG: Case Study title bị chồng ===== */

/* Giữ khoảng cách rõ ràng giữa các section */
section {
  position: relative;
  z-index: 1;
}

/* Đảm bảo section kế tiếp không đè lên phần trước */
section + section {
  margin-top: 40px;
}

/* Cụ thể cho phần Case Study */
#case-study {
  position: relative;
  padding-top: 60px !important; /* đẩy nội dung xuống dưới một chút */
  z-index: 2;
}

/* Tiêu đề trong Case Study */
#case-study h2,
#case-study .section-title {
  position: relative;
  z-index: 5;           /* nằm trên mọi phần khác */
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.8rem;
  line-height: 1.2;
  word-break: break-word;
}

/* Responsive fix cho mobile */
@media (max-width: 768px) {
  #case-study {
    padding-top: 40px !important;
  }

  #case-study h2,
  #case-study .section-title {
    font-size: 1.3rem;
    text-align: center;
  }
}
/* === FIX: Why Imagtor bị cắt phần dưới === */

/* Tăng không gian cuối section Why Imagtor */
#why {
  padding-bottom: 60px !important;
  background-color: #f9f8f8; /* hoặc giữ nguyên màu bạn đang dùng */
  position: relative;
  z-index: 2;
}

/* Tăng khoảng cách giữa các icon hàng cuối */
#why .row {
  row-gap: 2rem; /* đảm bảo các hàng có giãn cách */
}

/* Icon + text căn đều, không bị sát mép */
#why .col-md-4.col-lg-2 {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  min-height: 300px; /* ép chiều cao tối thiểu để icon cuối không bị chạm cạnh */
}

/* Responsive cho mobile: tăng khoảng cách thêm chút */
@media (max-width: 768px) {
  #why {
    padding-bottom: 80px !important;
  }
  #why .col-md-4.col-lg-2 {
    margin-bottom: 24px;
    min-height: auto;
  }
}
/* Hiển thị nút Swiper trên mọi kích thước */
.swiper-button-next,
.swiper-button-prev {
  color: #000; /* Đổi màu nếu cần */
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  transition: opacity 0.3s;
  z-index: 10;
}

/* Ẩn khi không cần */
.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
  opacity: 0.3;
}

/* Vị trí nút */
.swiper-button-next {
  right

