/* Existing hover-card styles */
.hover-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Apply hover effect by default on mobile and tablet */
@media (max-width: 991px) {
  .hover-card {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  }
}

/* Other existing styles */
.feature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 4rem;
  width: 4rem;
  font-size: 2rem;
}

.padd-15 {
  padding-left: 15px;
  padding-right: 15px;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  text-decoration: none;
  color: black;
}

.background .card-body {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 1rem;
  min-height: 1rem;
  width: auto;
}

/* Contact */
.contact button {
  font-size: 16px;
  font-weight: 500;
  padding: 12px 35px;
  color: #fefefe;
  border-radius: 40px;
  display: inline-block;
  white-space: nowrap;
  border: none;
  background: var(--bs-blue);
  transition: all 0.3s ease;
}

.contact-title {
  text-align: center;
  font-size: 25px;
  margin-bottom: 20px;
  color: var(--bs-blue);
}

.contact-sub-title {
  color: var(--text-black-900);
  text-align: center;
  font-size: 15px;
  margin-bottom: 60px;
}

.contact .contact-info-item {
  flex: 0 0 25%;
  max-width: 25%;
  text-align: center;
  margin-bottom: 60px;
}

.contact .contact-info-item .icon {
  display: inline-block;
}

.contact .contact-info-item .icon .fa {
  font-size: 25px;
  color: var(--bs-blue);
}

.contact .contact-info-item h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-black-900);
  text-transform: capitalize;
  margin: 15px 0 5px;
}

.contact .contact-info-item p {
  font-size: 16px;
  line-height: 25px;
  color: var(--text-black-700);
  font-weight: 400;
}

.contact .container .row {
  justify-content: center;
}

.contact .contact-form {
  flex: 0 0 100%;
  max-width: 100%;
}

.contact .contact-form .col-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.contact .contact-form .col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.contact .contact-form .form-item {
  margin-bottom: 30px;
}

.contact .contact-form .form-item .form-control {
  width: 100%;
  height: 50px;
  border-radius: 25px;
  background: #ecedee;
  border: 1px solid var(--bg-black-50);
  padding: 10px 25px;
  font-size: 16px;
  color: var(--text-black-700);
  transition: all 0.3s ease;
}

.contact .contact-form .form-item .form-control:focus {
  box-shadow: 0 0 20px rgba(48, 46, 77, 0.15);
}

.contact .contact-form .form-item textarea.form-control {
  height: 140px;
}

.contact .contact-form .btn {
  height: 50px;
  padding: 0 50px;
}

/* Project styling */
.project-img {
  position: relative;
  padding: 15px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.project-img::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  top: 0;
  left: 0;
  background: #3a389b;
  border-radius: 10px;
  opacity: 1;
  z-index: -1;
  transition: 0.5s;
}

.project-img::after {
  content: "";
  width: 150px;
  height: 150px;
  position: absolute;
  right: 0;
  bottom: 0;
  background: var(--bs-primary);
  border-radius: 10px;
  opacity: 1;
  z-index: -1;
  transition: 0.5s;
}

.project-content {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.5s;
}

.project-content a {
  display: inline-block;
  padding: 20px 25px;
  background: #ecedee;
  border-radius: 10px;
  text-decoration: none;
}

.project-item:hover .project-content {
  opacity: 1;
}

.project-item:hover .project-img::before,
.project-item:hover .project-img::after {
  opacity: 0;
}

.project-item:hover h4 {
  color: #3a389b;
}

/* Condition for mobile and tablet */
@media (max-width: 767px) {
  .project .row.g-5 {
    gap: 10px;
  }

  .project .row.g-5 .col-md-6.col-lg-4 {
    flex: 0 0 48%;
    max-width: 48%;
  }

  .project-img {
    padding: 5px;
  }

  .project-img img {
    width: 100%;
    height: 200px;
  }

  .project h5 {
    font-size: 0.8rem;
  }

  .project-content a {
    padding: 10px 15px;
  }
}

@media (max-width: 1056px) {
  .project-content {
    opacity: 1;
  }

  .project-img::before,
  .project-img::after {
    opacity: 0;
  }

  .project-item:hover .project-content {
    opacity: 1;
  }

  .project-item:hover .project-img::before,
  .project-item:hover .project-img::after {
    opacity: 0;
  }
}

/* Partner card styling */
.partner-card {
  height: 7rem;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #f8f9fa;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.partner-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

.partner-logo {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Ensure partner-card column sizes are consistent */
.row.g-4 .col-6.col-md-4.col-lg-2 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.row.g-5 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Adjust layout for "Sản xuất", "Lắp đặt hệ thống", "Dịch vụ kỹ thuật tòa nhà" */
@media (max-width: 1056px) {
  .row.g-5 {
    align-items: flex-start;
  }
  .col-lg-5 .position-relative {
    min-height: auto;
  }
  .row.gx-lg-5 {
    flex-wrap: wrap;
    justify-content: center;
  }
  .row.gx-lg-5 .col-lg-6.col-xxl-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .row.gx-lg-5 .col-lg-6.col-xxl-4:nth-child(3) {
    flex: 0 0 50%;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
  }
}