.services {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 0;
  gap: 80px;
  background-color: var(--background);
}

.services__wrapper {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.services__pill {
  width: max-content;
  text-align: center;
  padding: 6px 24px;
  margin: 0 auto;
  border-radius: 24px;
  background-color: var(--primary-25);
  font-weight: 500;
  font-size: 16px;
  transition: transform 0.2s ease;
}

.services__pill:hover {
  transform: scale(1.03);
}

.services__header {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.services__title {
  position: relative;
  text-align: center;
}

.services__title::after {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  width: 100px;
  height: 5px;
  background-color: var(--primary-75);
}

.services__introduction {
  text-align: justify;
}

.services__card-title {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.services__card-title > svg {
  position: relative;
  display: inline-block;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  padding: 9px;
  color: var(--white);
  background-color: var(--primary-75);
  border-radius: 50%;
  box-sizing: content-box;
}

.services__card-body {
  position: relative;
  max-height: 160px;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.services__card-body::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: linear-gradient(to bottom, transparent, var(--cream));
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.services__card-body--full {
  max-height: none;
}

.services__card--main.is-expanded .services__card-body {
  max-height: 1200px;
}

.services__card--main.is-expanded .services__card-body::after {
  opacity: 0;
}

.services__card-description {
  text-align: justify;
}

.services__card-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

.services__card-toggle:hover {
  opacity: 0.75;
}

.services__card-toggle-less {
  display: none;
}

.services__card--main.is-expanded .services__card-toggle-more {
  display: none;
}

.services__card--main.is-expanded .services__card-toggle-less {
  display: inline;
}

.services__main-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

.services__card--main,
.services__card--other {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 24px;
  border-radius: 3px;
  border: 1px solid var(--primary-25);
  background-color: var(--cream);
}

.services__card--other {
  max-width: 100%;
}

.services__card--other > .services__card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.services__card--other > .services__card-list > .services__card-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  text-align: start;
}

.services__card--other > .services__card-list > .services__card-item > svg {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
}

@media screen and (min-width: 768px) {
  .services__card-title {
    flex-direction: row;
  }
}

@media screen and (min-width: 900px) {
  .services__introduction {
    max-width: 75%;
    margin: 0 auto;
  }

  .services__main-cards {
    grid-template-columns: repeat(2, 48%);
  }

  .services__card--other {
    max-width: max-content;
    margin: 0 auto;
  }
}
