/* Service Overview block css */
.service-overview {
  width: 100%;
  background-color: var(--white);
  box-sizing: border-box;
}

.service-overview .section-text-content,
.service-overview .card-end-to-end {
  max-width: 938px;
  margin: 0 auto 48px;
  padding: 100px 70px 0;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-overview .end-to-end-global {
  font-family: var(--font-main);
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.28px;
  line-height: 1.6;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.service-overview .text-wrapper,
.service-overview .service-title {
  font-family: var(--font-main);
  color: var(--dark);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0 0 16px 0;
}

.service-overview .service-desc,
.service-overview .div {
  font-family: var(--font-main);
  color: var(--text-gray);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
}

/* Cards Grid Desktop */
.service-overview .solutions-cards,
.service-overview .cards-grid {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 70px 100px;
  box-sizing: border-box;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  width: 100%;
}

.service-overview .service-card-item,
.service-overview .card-explore-EOR,
.service-overview .explore-mobility,
.service-overview .explore-payroll,
.service-overview .explore-benefits {
  flex: 1 1 0;
  background-color: var(--bg-gray);
  border-radius: var(--radius-card-large);
  padding: 32px 30px 30px;
  border: 1px solid var(--stroke-dark-10);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover effect: turn red, shift up, and rotate slightly */
.service-overview .service-card-item:hover,
.service-overview .card-explore-EOR:hover,
.service-overview .explore-mobility:hover,
.service-overview .explore-payroll:hover,
.service-overview .explore-benefits:hover {
  background-color: var(--red) !important;
  border-color: var(--red) !important;
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0px 12px 30px rgba(255, 90, 95, 0.2);
}

.service-overview .icon-container {
  width: 70px;
  height: 70px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  border: 1px solid var(--stroke-dark-10);
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.25s ease;
}

.service-overview .icon-container img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.service-overview .employer-of-record {
  width: 100%;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-overview .text-wrapper-2 {
  font-family: var(--font-main);
  color: var(--dark);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 8px 0;
  transition: color 0.25s ease;
}

/* White text on hover */
.service-overview .service-card-item:hover .text-wrapper-2 {
  color: var(--white) !important;
}

.service-overview .service-card-desc,
.service-overview .p {
  font-family: var(--font-main);
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  transition: color 0.25s ease;
}

/* White paragraph text on hover */
.service-overview .service-card-item:hover .service-card-desc,
.service-overview .service-card-item:hover .p {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Button with Arrow */
.service-overview .service-card-buttons {
  margin-top: auto;
  padding-top: 16px;
  width: 100%;
}

.service-overview .service-card-btn .wp-block-button__link,
.service-overview .button {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  color: var(--red);
  cursor: pointer;
  transition: color 0.25s ease, opacity 0.2s ease;
}

.service-overview .service-card-btn .wp-block-button__link::after,
.service-overview .button::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  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='%23FF5A5F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.0415 6.66663H14.1665V14.7916' stroke='%23FF5A5F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.2s ease;
}

/* White button and white arrow on hover */
.service-overview .service-card-item:hover .service-card-btn .wp-block-button__link,
.service-overview .service-card-item:hover .button {
  color: var(--white) !important;
}

.service-overview .service-card-item:hover .service-card-btn .wp-block-button__link::after,
.service-overview .service-card-item:hover .button::after {
  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");
  transform: translate(2px, -2px);
}

/* Tablet Responsive */
@media (max-width: 1024px) {
  .service-overview .section-text-content,
  .service-overview .card-end-to-end {
    padding: 60px 24px 0;
    margin-bottom: 36px;
  }

  .service-overview .text-wrapper,
  .service-overview .service-title {
    font-size: 36px;
  }

  .service-overview .solutions-cards,
  .service-overview .cards-grid {
    padding: 0 24px 60px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .service-overview {
    padding: 40px 0 40px 20px !important;
    overflow: hidden;
  }

  .service-overview .section-text-content,
  .service-overview .card-end-to-end {
    padding: 0 20px 0 0 !important;
    margin-bottom: 24px !important;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 12px !important;
  }

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

  .service-overview .text-wrapper,
  .service-overview .service-title {
    font-size: 32px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .service-overview .service-desc,
  .service-overview .div {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
  }

  .service-overview .solutions-cards,
  .service-overview .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;
  }

  .service-overview .solutions-cards::-webkit-scrollbar,
  .service-overview .cards-grid::-webkit-scrollbar {
    display: none;
  }

  .service-overview .service-card-item,
  .service-overview .card-explore-EOR,
  .service-overview .explore-mobility,
  .service-overview .explore-payroll,
  .service-overview .explore-benefits {
    flex: 0 0 237px !important;
    width: 237px !important;
    min-width: 237px !important;
    max-width: 237px !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;
  }

  .service-overview .icon-container {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 0 !important;
  }

  .service-overview .icon-container img {
    width: 28px !important;
    height: 28px !important;
  }

  .service-overview .text-wrapper-2 {
    font-size: 18px !important;
    margin-bottom: 6px !important;
  }

  .service-overview .service-card-desc,
  .service-overview .p {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  .service-overview .service-card-buttons {
    padding-top: 12px !important;
    margin-top: auto !important;
  }
}
