/* Expert Advantage Why Us Section */
.expert-advantage-why {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
  padding: 100px 70px;
  position: relative;
  background-color: var(--white);
  box-sizing: border-box;
}

.expert-advantage-why .section-text-content,
.expert-advantage-why .card-end-to-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  max-width: 916px;
  margin: 0 auto 50px;
  text-align: center;
  box-sizing: border-box;
}

.expert-advantage-why .end-to-end-global {
  font-family: var(--font-main);
  font-weight: 500;
  color: var(--red);
  font-size: 14px;
  letter-spacing: 0.28px;
  text-transform: uppercase;
  margin: 0;
}

.expert-advantage-why .text-wrapper {
  font-family: var(--font-main);
  font-weight: 600;
  color: var(--dark);
  font-size: 48px;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0;
}

.expert-advantage-why .no-matter-the,
.expert-advantage-why .div {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--text-gray);
  font-size: 16px;
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

/* Cards Grid Desktop */
.expert-advantage-why .expert-cards,
.expert-advantage-why .cards-grid {
  display: flex !important;
  flex-direction: row !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
}

.expert-advantage-why .expert-card-item,
.expert-advantage-why .card-explore-EOR,
.expert-advantage-why .instance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 36px 32px 32px;
  position: relative;
  flex: 1 1 0 !important;
  background-color: var(--bg-gray) !important;
  border-radius: var(--radius-card-large);
  border: 1px solid var(--stroke-dark-10) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.expert-advantage-why .expert-card-item:hover,
.expert-advantage-why .card-explore-EOR:hover,
.expert-advantage-why .instance:hover {
  background-color: var(--white) !important;
  box-shadow: 0 12px 36px rgba(10, 27, 46, 0.08);
  border-color: var(--stroke-dark-20) !important;
  transform: translateY(-4px);
}

.expert-advantage-why .icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background-color: var(--white);
  border-radius: 50%;
  border: 1px solid var(--stroke-dark-10);
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.expert-advantage-why .icon-container img,
.expert-advantage-why .icon-container svg {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.expert-advantage-why .card-content,
.expert-advantage-why .employer-of-record {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.expert-advantage-why .card-title,
.expert-advantage-why .employer-of-record-3 {
  font-family: var(--font-main);
  font-weight: 500;
  color: var(--dark);
  font-size: 24px;
  line-height: 1.3;
  margin: 0;
}

.expert-advantage-why .card-desc,
.expert-advantage-why .hire-compliantly-in {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Button centered at the bottom */
.expert-advantage-why .why-us-cta-buttons,
.expert-advantage-why .wp-block-buttons {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

.expert-advantage-why .why-us-cta-buttons .wp-block-button__link,
.expert-advantage-why .button .wp-block-button__link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background-color: var(--red) !important;
  border-radius: var(--radius-btn);
  color: var(--white) !important;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.15s ease;
  border: none;
  cursor: pointer;
}

.expert-advantage-why .why-us-cta-buttons .wp-block-button__link:hover,
.expert-advantage-why .button .wp-block-button__link:hover {
  background-color: var(--red-hover) !important;
  color: var(--white) !important;
}

.expert-advantage-why .why-us-cta-buttons .wp-block-button__link::after,
.expert-advantage-why .button .wp-block-button__link::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.83301 15L14.1663 6.66663' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.0415 6.66663H14.1665V14.7916' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.expert-advantage-why .why-us-cta-buttons .wp-block-button__link:hover::after,
.expert-advantage-why .button .wp-block-button__link:hover::after {
  transform: translate(2px, -2px);
}

/* Tablet Responsive */
@media (max-width: 1024px) {
  .expert-advantage-why {
    padding: 60px 24px;
  }

  .expert-advantage-why .text-wrapper {
    font-size: 36px;
  }

  .expert-advantage-why .expert-cards,
  .expert-advantage-why .cards-grid {
    flex-direction: column !important;
    gap: 20px !important;
  }

  .expert-advantage-why .expert-card-item,
  .expert-advantage-why .card-explore-EOR,
  .expert-advantage-why .instance {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .expert-advantage-why {
    padding: 40px 0 40px 20px !important;
    align-items: flex-start !important;
    overflow: hidden;
  }

  .expert-advantage-why .section-text-content,
  .expert-advantage-why .card-end-to-end {
    padding: 0 20px 0 0 !important;
    margin: 0 0 28px 0 !important;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 12px !important;
  }

  .expert-advantage-why .end-to-end-global {
    font-size: 12px !important;
    letter-spacing: 0.24px !important;
    margin: 0 !important;
  }

  .expert-advantage-why .text-wrapper {
    font-size: 32px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    margin: 0 !important;
  }

  .expert-advantage-why .no-matter-the,
  .expert-advantage-why .div {
    font-size: 14px !important;
    line-height: 1.6 !important;
    text-align: left !important;
    margin: 0 !important;
  }

  .expert-advantage-why .expert-cards,
  .expert-advantage-why .cards-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px !important;
    padding: 0 20px 20px 0 !important;
    margin: 0 !important;
    scrollbar-width: none;
  }

  .expert-advantage-why .expert-cards::-webkit-scrollbar,
  .expert-advantage-why .cards-grid::-webkit-scrollbar {
    display: none;
  }

  .expert-advantage-why .expert-card-item,
  .expert-advantage-why .card-explore-EOR,
  .expert-advantage-why .instance {
    flex: 0 0 237px !important;
    width: 237px !important;
    min-width: 237px !important;
    max-width: 237px !important;
    min-height: 280px !important;
    scroll-snap-align: start;
    padding: 22px 20px 20px !important;
    border-radius: var(--radius-small-card) !important;
    gap: 16px !important;
    box-sizing: border-box !important;
  }

  .expert-advantage-why .icon-container {
    width: 60px !important;
    height: 60px !important;
  }

  .expert-advantage-why .icon-container img,
  .expert-advantage-why .icon-container svg {
    width: 28px !important;
    height: 28px !important;
  }

  .expert-advantage-why .card-title,
  .expert-advantage-why .employer-of-record-3 {
    font-size: 20px !important;
    margin: 0 !important;
  }

  .expert-advantage-why .card-desc,
  .expert-advantage-why .hire-compliantly-in {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
  }

  .expert-advantage-why .why-us-cta-buttons,
  .expert-advantage-why .wp-block-buttons {
    width: calc(100% - 20px) !important;
    margin-top: 16px !important;
    padding-right: 20px;
    box-sizing: border-box;
  }

  .expert-advantage-why .why-us-cta-buttons .wp-block-button,
  .expert-advantage-why .wp-block-buttons .wp-block-button {
    width: 100% !important;
  }

  .expert-advantage-why .why-us-cta-buttons .wp-block-button__link,
  .expert-advantage-why .button .wp-block-button__link {
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    justify-content: center !important;
  }
}
