.services {
  padding: calc(var(--section-space) + 8px) 0 var(--section-space);
  scroll-margin-top: 130px;
}

.services__container {
  width: min(var(--container-max), calc(100% - var(--container-inline)));
  margin: 0 auto;
}

.services__header {
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: var(--section-heading-gap);
}

.services__title {
  font-family: var(--font-heading);
  font-size: var(--section-title-size);
  line-height: var(--section-title-line-height);
  font-weight: 700;
  letter-spacing: var(--section-title-spacing);
  color: var(--text-primary);
}

.services__subtitle {
  margin-top: 0;
  max-width: 400ch;
  font-family: var(--font-body);
  font-size: var(--section-subtitle-size);
  line-height: var(--section-subtitle-line-height);
  font-weight: var(--section-subtitle-weight);
  color: var(--green-primary);
  text-wrap: balance;
}

.services__layout {
  margin: var(--section-content-gap) auto 0;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  width: 100%;
}

.services__feature-card,
.services__card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition:
    box-shadow 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease;
}

.services__feature-card {
  overflow: hidden;
  width: 100%;
  max-width: none;
  justify-self: start;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  border-radius: var(--radius-card-sm);
}

.services__card {
  transform-origin: center;
}

.services__feature-media {
  position: relative;
  background: #dde5d8;
}

.services__feature-viewport {
  overflow: hidden;
}

.services__feature-track {
  display: flex;
  touch-action: pan-y pinch-zoom;
}

.services__feature-slide {
  min-width: 0;
  flex: 0 0 100%;
}

.services__feature-picture {
  display: block;
  width: 100%;
}

.services__feature-picture img {
  width: 100%;
  height: 252px;
  object-fit: cover;
  display: block;
  transition: transform 280ms ease;
}

.services__window-dots {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.services__window-dot {
  --dot-focus-ring: var(--interaction-focus-ring-light);

  appearance: none;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: var(--control-transition);
}

.services__window-dot.is-active {
  background: rgba(0, 57, 77, 0.78);
  transform: scale(1.1);
}

.services__feature-arrow {
  --control-hover-shadow: var(--shadow-control-strong-hover);
  --control-active-shadow: var(--shadow-control-strong-active);
  --control-focus-ring: var(--interaction-focus-ring-light);

  position: absolute;
  top: 50%;
  z-index: 2;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: var(--control-transition);
}

.services__feature-arrow:disabled {
  opacity: 0.5;
  cursor: default;
}

.services__feature-arrow--left {
  left: 14px;
}

.services__feature-arrow--right {
  right: 14px;
}

.services__feature-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: 16px 20px;
  padding: 18px 20px 20px;
  flex: 1;
  min-height: 0;
  align-content: space-between;
}

.services__benefit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 24px;
  font-size: 0.85rem;
  line-height: 1.38;
  font-weight: 700;
  color: #1c5b74;
}

.services__benefit svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--green-primary);
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.services__feature-cta {
  grid-column: 2;
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--button-height);
  margin-top: 4px;
  padding: 0 var(--button-padding-x);
  border-radius: var(--radius-pill);
  background: var(--gradient-blue);
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--button-font-size);
  font-weight: var(--button-font-weight);
  box-shadow: none;
  transition: var(--button-transition);
}

.services__feature-cta svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 18px;
  align-content: start;
  justify-self: start;
}

.services__card {
  min-height: 132px;
  border-radius: var(--radius-card-sm);
  padding: 20px 24px 19px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  height: 100%;
  transition: var(--card-hover-transition);
}

.services__card-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.services__card-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--green-tint-12);
  color: var(--green-primary);
  box-shadow: inset 0 0 0 1px var(--green-tint-16);
  transition: var(--card-icon-transition);
  transform-origin: center;
}

.services__card-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: var(--card-icon-glyph-transition);
}

.services__card-title {
  font-family: var(--font-heading);
  font-size: var(--card-title-size);
  line-height: var(--card-title-line-height);
  font-weight: var(--card-title-weight);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.services__card-description {
  margin-top: 0;
  margin-left: 0;
  max-width: 60ch;
  font-family: var(--font-body);
  font-size: var(--card-copy-size);
  line-height: var(--card-copy-line-height);
  font-weight: var(--card-copy-weight);
  color: var(--text-secondary);
  text-wrap: pretty;
}

@media (hover: hover) and (pointer: fine) {
  .services__feature-arrow:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
  }

  .services__card:hover {
    border-color: rgba(var(--green-rgb), 0.075);
    background-color: rgba(var(--green-rgb), 0.009);
    box-shadow: var(--shadow-card-soft);
  }

  .services__card:hover .services__card-icon {
    transform: translateY(-1px) scale(1.045);
    background: linear-gradient(
      135deg,
      rgba(var(--green-rgb), 0.22) 0%,
      rgba(var(--green-rgb), 0.14) 100%
    );
    color: var(--green-dark);
    box-shadow:
      0 6px 14px rgba(var(--green-rgb), 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .services__card:hover .services__card-icon svg {
    transform: scale(1.02);
  }
}

@media (max-width: 1199px) {
  .services {
    padding: var(--section-space) 0 calc(var(--section-space) + 2px);
    scroll-margin-top: 118px;
  }

  .services__title {
    font-size: var(--section-title-size);
  }

  .services__subtitle {
    max-width: 400ch;
    font-size: var(--section-subtitle-size);
  }

  .services__layout {
    margin: 40px auto 0;
    grid-template-columns: minmax(312px, 356px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    width: 100%;
  }

  .services__feature-card {
    min-height: 100%;
    height: 100%;
    border-radius: 18px;
  }

  .services__feature-picture img {
    height: clamp(212px, 24vw, 234px);
  }

  .services__feature-body {
    gap: 14px 16px;
    padding: 16px 17px 18px;
  }

  .services__benefit {
    gap: 9px;
    font-size: 0.8rem;
  }

  .services__feature-cta {
    min-height: var(--button-height);
    padding: 0 var(--button-padding-x);
    font-size: var(--button-font-size);
  }

  .services__grid {
    gap: 14px;
  }

  .services__card {
    min-height: 122px;
    border-radius: 16px;
    padding: 18px 18px 16px;
    gap: 12px;
  }

  .services__card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .services__card-icon svg {
    width: 17px;
    height: 17px;
  }

  .services__card-title {
    font-size: var(--card-title-size);
  }

  .services__card-description {
    margin-top: 0;
    font-size: var(--card-copy-size);
    line-height: var(--card-copy-line-height);
  }
}

@media (max-width: 1024px) and (min-width: 768px) {
  .services__layout {
    margin-top: 36px;
    grid-template-columns: minmax(272px, 0.88fr) minmax(0, 1.12fr);
    gap: 18px;
  }

  .services__feature-picture img {
    height: clamp(220px, 26vw, 248px);
  }

  .services__feature-body {
    gap: 12px 14px;
    padding: 15px 15px 17px;
  }

  .services__benefit {
    gap: 8px;
    font-size: 0.76rem;
  }

  .services__feature-cta {
    padding: 0 18px;
    font-size: 0.84rem;
  }

  .services__grid {
    gap: 12px;
  }

  .services__card {
    padding: 16px 14px 14px;
    gap: 10px;
    min-height: 0;
  }

  .services__card-heading {
    gap: 10px;
  }

  .services__card-icon {
    width: 32px;
    height: 32px;
  }

  .services__card-title {
    font-size: 0.94rem;
  }

  .services__card-description {
    font-size: 0.78rem;
    line-height: 1.42;
  }
}

@media (max-width: 767px) {
  .services {
    padding: calc(var(--section-space) - 2px) 0 var(--section-space);
    scroll-margin-top: 104px;
  }

  .services__title {
    max-width: 12ch;
    margin: 0 auto;
    font-size: clamp(1.9rem, 7.6vw, 2.18rem);
    line-height: 1.04;
    text-align: center;
  }

  .services__subtitle {
    max-width: 40ch;
    margin: 0 auto;
    font-size: var(--section-subtitle-size);
    line-height: 1.62;
    text-align: center;
    text-wrap: pretty;
  }

  .services__layout {
    margin-top: 26px;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
  }

  .services__feature-card {
    order: 2;
    max-width: none;
    min-height: 0;
    height: auto;
    border-radius: 20px;
  }

  .services__feature-picture img {
    height: clamp(206px, 58vw, 250px);
  }

  .services__window-dots {
    top: 12px;
    left: 12px;
  }

  .services__feature-arrow {
    width: 32px;
    height: 32px;
    margin-top: -16px;
    font-size: 1.6rem;
  }

  .services__feature-arrow--left {
    left: 12px;
  }

  .services__feature-arrow--right {
    right: 12px;
  }

  .services__feature-body {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 10px;
    flex: initial;
    padding: 14px 14px 16px;
    align-content: start;
  }

  .services__benefit {
    gap: 10px;
    font-size: 0.9rem;
  }

  .services__feature-cta {
    width: 180px;
    grid-column: 2;
    justify-self: start;
    min-height: var(--button-height);
    margin-top: 4px;
    padding: 0 var(--button-padding-x);
    font-size: var(--button-font-size);
  }

  .services__grid {
    order: 1;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .services__card {
    min-height: 0;
    padding: 16px 15px 15px;
    gap: 10px;
    height: auto;
  }

  .services__card-title {
    font-size: 0.98rem;
  }

  .services__card-description {
    margin-top: 0;
    margin-left: 0;
    font-size: var(--card-copy-size);
    line-height: var(--card-copy-line-height);
  }
}
