html,
body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Header Top */
.carousel-caption {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 10px;
}

#feature {
  text-align: center;
  padding: 20px;
}

#feature h2 {
  width: 100%;
  padding: auto;
  font-family: "Titillium+Web", sans-serif;
  justify-content: center;
}

#feature hr {
  margin: 0 auto;
  margin-bottom: 20px;
}

.fe-container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
}

#feature .fe-box {
  flex: 0 0 24rem;
  text-align: center;
  padding: 20px 10px;
  box-shadow: 20px 20px 34px rgba(0, 0, 0, 0.03);
  border: 1px solid #3a389b;
  border-radius: 4px;
  margin: 15px 10px;
  vertical-align: top;
}

#feature .fe-box h6 {
  display: inline-block;
  padding: 9px 8px 6px 8px;
  line-height: 1;
  border-radius: 10px;
  width: 90%;
  color: #1a1a1a;
  font-size: 18px;
  font-family: "Titillium+Web", sans-serif;
  font-weight: bold;
  cursor: pointer;
}

.category-box i {
  font-size: 3rem;
  color: #333;
  display: block;
  text-align: center;
  margin-bottom: 1%;
}

/* Giới thiệu đầu */
#headBanner h4 {
  font-weight: bold;
  text-align: center;
}

#headBanner p {
  font-size: 1rem;
  line-height: 1.7;
  color: #fff;
  text-align: center;
}

/* *** Feature Start ***/
.feature-item {
  display: flex;
  flex-direction: column;
  min-height: 300px; /* Đảm bảo chiều cao tối thiểu để các item đồng đều */
  background-color: #fff; /* Nền trắng để nổi bật */
  border-radius: 8px; /* Bo góc cho đẹp */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Đổ bóng nhẹ */
}

.feature-item:hover {
  background: #3a389b;
}

.feature-item .feature-icon {
  position: relative;
  width: 120px;
  height: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-light);
  margin: 0 auto;
  margin-top: 10px;
}

.feature-item:hover .feature-icon i {
  z-index: 9;
}

.feature-item .feature-icon::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 0;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: var(--bs-dark);
  transition: 0.5s;
  z-index: 1;
}

.feature-item:hover .feature-icon::after {
  height: 100%;
}

.feature-item:hover h5 {
  color: #f0f0f0;
}

.feature-item .feature-icon {
  color: #3a389b;
}

.feature-item .feature-icon,
.feature-item h4,
.feature-item p {
  transition: 0.5s;
}

.feature-item:hover .feature-icon {
  color: var(--bs-white);
}

.feature-item:hover h4,
.feature-item:hover p {
  color: var(--bs-white);
}

.feature-item a.btn {
  border-radius: 50px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.feature-item:hover a.btn {
  background: var(--bs-white);
  color: #3a389b;
}

.feature-item:hover a.btn:hover {
  background: var(--bs-dark);
  color: var(--bs-white);
}

.feature-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-content p {
  white-space: nowrap; 
}


@media (max-width: 575.98px) {
  .feature-item {
    min-height: 265px; 
    padding: 10px; 
  }

  .feature-item .feature-icon {
    width: 80px; 
    height: 80px;
  }

  .feature-item .feature-icon i {
    font-size: 2rem; 
  }

  .feature-item h5 {
    font-size: 0.9rem; 
    margin-bottom: 10px;
  }

  .feature-item a.btn {
    padding: 5px 15px;
  }
}

/*** featurs Start ***/
.featurs .featurs-item .featurs-icon {
  position: relative;
  width: 120px;
  height: 120px;
}

.featurs .featurs-item .featurs-icon::after {
  content: "";
  width: 35px;
  height: 35px;
  background: #3a389b;
  position: absolute;
  bottom: -10px;
  transform: translate(-50%);
  transform: rotate(45deg);
  background: #3a389b;
}
/*** featurs End ***/

/*** Button Start Rules***/
.btn {
  font-weight: 600;
  transition: 0.5s;
}

.btn-square {
  width: 32px;
  height: 32px;
}

.btn-sm-square {
  width: 34px;
  height: 34px;
}

.btn-md-square {
  width: 44px;
  height: 44px;
}

.btn-lg-square {
  width: 56px;
  height: 56px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}

.btn.border-secondary {
  transition: 0.5s;
}

.btn.border-secondary:hover {
  background: var(--bs-secondary) !important;
  color: var(--bs-white) !important;
}

/* Tiêu đề căn giữa */
.category-box h6 {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 5px;
  cursor: pointer;
}

.category-box.active .dropdown {
  display: block;
  text-align: left;
  opacity: 1;
  padding: 2rem;
}

/* Thêm hiệu ứng cho h6 khi hover */
.category-box.active h6 {
  background-color: #f0f0f0;
  border-radius: 10px;
}

.category-box.active .dropdown li a {
  font-family: "Titillium+Web", sans-serif;
  font-weight: 500;
}

.category-box.active .dropdown li a:hover {
  font-family: "Titillium+Web", sans-serif;
  color: #1a1a1a;
  font-weight: bolder;
}

.card-img-overlay h3 {
  font-size: large;
  opacity: 0.9;
  font-weight: bolder;
  background-color: #f2f2f2c9;
}

/* CSS Hover Effect */
.card {
  position: relative;
  overflow: hidden;
}

.card img {
  transition: transform 0.5s ease;
}

.card:hover img {
  transform: scale(1.1); /* Phóng to ảnh khi hover */
}

.card:hover .card-img-overlay {
  background: rgba(0, 0, 0, 0.5); /* Tăng độ tối của nền */
}

.card-img-overlay {
  transition: background 0.5s ease;
}

.button-grid {
  padding: 3rem;
}

.button-grid .icon-box {
  text-align: center;
}

.button-grid .icon-box i {
  margin-bottom: 1rem;
  color: #3e4999; /* Màu xanh cho biểu tượng */
  transition: transform 0.3s ease, color 0.3s ease;
}

.button-grid .icon-box i:hover {
  transform: scale(1.2); /* Hiệu ứng phóng to khi hover */
  color: #3e4999; /* Màu tối hơn khi hover */
}

.button-grid .btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.button-grid .btn:hover {
  background-color: #3e4999;
  color: #fff;
}

@media (max-width: 767.98px) {
  #headBanner p {
    line-height: 1;
  }

  .feature-content p {
    white-space: wrap;
  }

  #header-carousel .carousel-item {
    position: relative;
    min-height: 450px;
  }

  #header-carousel .carousel-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .featurs .featurs-item .featurs-icon {
    width: 100px;
    height: 100px;
  }

  .featurs-item {
    min-height: 180px; /* Giảm chiều cao tối thiểu trên mobile */
  }

  .featurs .featurs-item .featurs-icon::after {
    width: 30px;
    height: 30px;
  }
}

.featurs-row {
  display: flex;
  flex-wrap: wrap; 
}

.featurs-row > div {
  display: flex;
}

.featurs-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px; 
  width: 100%; 
}

.featurs-content {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) and (max-width: 1024px) {
  #headBanner p {
    line-height: 1;
  }
}