/* CSS for Expandable services section */
.acf-layout-expandable-services-section {
  background-color: var(--color-white);
  overflow: hidden;
}

.expandable-services-container {
  display: flex;
  flex-direction: row;
  height: 100dvh;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
}

.service-slide {
  position: relative;
  height: 100%;
  flex: 0 0 50px;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.service-slide.active {
  flex: 1; /* Expands to fill remaining space */
  cursor: default;
}

/* Collapsed Title (Vertical) */
.service-side-heading {
  position: absolute;
  bottom: 40px; /* Anchor text close to the bottom */
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.3s ease;
  user-select: none;

  /* Custom typography */
  font-family: "Clash Display", var(--font-clash-display);
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  leading-trim: none;
  line-height: 30px;
  letter-spacing: 0%;
}

.service-slide.active .service-side-heading {
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Expanded Content wrapper */
.service-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding-top: 115px;
  padding-left: 90px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
}

.service-slide.active .service-content-wrapper {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s ease 0.2s;
}

.service-content-header {
  position: relative;
}

.service-title {
  position: relative;
  display: inline-block;
  margin: 0 !important;
  z-index: 2;
  text-align: left !important;
}

.service-title-circle {
  position: absolute;
  left: -46px;
  top: 32%;
  transform: translateY(-50%);
  width: 112px;
  height: 112px;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.8;
}

.service-description {
  max-width: 35%;
}

.service-content-body {
  margin-top: 90px;
  position: relative;
  z-index: 3;
}

.service-content-footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  position: relative;
  width: 100%;
}

/* Number styles requested by user */
.service-number {
  font-family: "Clash Display", var(--font-clash-display);
  font-weight: 500;
  font-style: normal;
  font-size: 394.47px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: right;
  position: absolute;
  left: 20px;
  bottom: -140%;
  opacity: 20%;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* Button styles */
.service-primary-btn {
  margin-left: auto; /* aligns button on the far right */
  z-index: 3;
  margin-bottom: 50px;
  margin-right: 50px;
}

/* Mobile responsive styles */
@media (max-width: 991px) {
  .service-number {
    font-size: 250px;
    bottom: -60px;
  }
  .service-side-heading {
    font-size: 14px;
    line-height: 18px;
  }
}

@media (max-width: 767px) {
  .expandable-services-container {
    height: 100dvh;
    display: flex;
    flex-direction: row;
    gap: 0;
  }

  .service-slide {
    flex: 0 0 35px; /* Narrower collapsed width for mobile */
  }

  .service-slide.active {
    flex: 1;
  }

  .service-side-heading {
    display: flex;
    font-size: 14px;
    bottom: 30px;
  }

  .service-content-wrapper {
    padding: 40px 20px;
  }

  .service-title {
    font-size: 24px !important;
  }

  .service-title-circle {
    width: 50px;
    height: 50px;
    left: -12px;
  }

  .service-content-body {
    margin-top: 15px;
    margin-bottom: 20px;
  }

  .service-description {
    max-width: 100%;
    padding-left: 20px;
    font-family: var(--font-clash-display);
    font-weight: 400;
    font-size: 14px;
    line-height: normal;
    letter-spacing: 0%;
  }
  .service-content-header {
    padding-left: 40px;
  }

  .service-number {
    font-size: 127px;
    bottom: -30%;
    left: -3%;
  }

  .service-primary-btn {
    font-size: 14px;
    margin-bottom: 150px;
    margin-left: 0;
  }
}
