.services-section {
  position: relative;
  min-height: 796px;
  overflow: hidden;
  padding: 65px 0 132px;
  background: #ffffff;
}

.services-section__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none;
}

.services-section__inner {
  position: relative;
  width: calc(100% - 32px);
  max-width: 1248px;
  margin-inline: auto;
}

.services-section__intro {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.services-section__eyebrow {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 13px;
  border: 1px solid rgb(69 191 209 / 35%);
  border-radius: 999px;
  background: rgb(69 191 209 / 10%);
  color: var(--color-brand-primary-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.services-section__eyebrow svg {
  width: 18px;
  height: 18px;
}

.services-section__title {
  margin: 22px 0 0;
  color: var(--color-text);
  font-size: clamp(43px, 4vw, 58px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.services-section__title span,
.services-section__title strong {
  display: block;
}

.services-section__title strong {
  color: var(--color-brand-secondary);
  font-weight: inherit;
}

.services-section__description {
  margin: 24px 0 0;
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1.85;
}

.services-section__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.services-section .department-card {
  min-height: 264px;
}

.services-section .department-card__button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 264px;
  flex-direction: column;
  padding: 25px 26px 26px;
  border: 1px solid #e3e4ec;
  border-radius: 24px;
  background: white;
  color: var(--color-text);
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
  text-align: right;
  will-change: transform;
  transition:
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 220ms ease,
    box-shadow 260ms ease;
}

.services-section .department-card__button::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 25%, rgb(69 191 209 / 10%) 50%, transparent 75%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(45%);
  transition: opacity 260ms ease, transform 480ms ease;
}

.services-section .department-card:nth-child(odd) .department-card__button {
  border-color: rgb(69 191 209 / 78%);
  background: var(--color-brand-secondary);
  color: white;
}

.services-section .department-card__button:focus-visible {
  border-color: var(--color-brand-primary);
  box-shadow: 0 24px 54px rgb(63 59 89 / 16%);
  outline: 3px solid rgb(69 191 209 / 38%);
  outline-offset: 4px;
  transform: translateY(-7px) scale(1.012);
}

.department-card__heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.services-section .department-card__icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(69 191 209 / 25%);
  border-radius: 17px;
  background: linear-gradient(145deg, rgb(69 191 209 / 15%), rgb(69 191 209 / 7%));
  color: var(--color-brand-primary-dark);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 42%);
  transition: transform 260ms ease, background-color 260ms ease;
}

.services-section .department-card:nth-child(odd) .department-card__icon {
  border-color: rgb(255 255 255 / 22%);
  background: linear-gradient(145deg, rgb(255 255 255 / 14%), rgb(255 255 255 / 7%));
  color: white;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
}

.services-section .department-card__glyph {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.services-section .department-card:nth-child(odd) .department-card__glyph {
  filter: brightness(0) invert(1);
}

.services-section .department-card__title {
  color: var(--color-text);
  font-size: clamp(22px, 1.65vw, 24px);
  font-weight: 900;
  line-height: 1.45;
}

.services-section .department-card:nth-child(odd) .department-card__title {
  color: white;
}

.services-section .department-card__description {
  display: block;
  min-height: 66px;
  margin-top: 25px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 2;
}

.services-section .department-card:nth-child(odd) .department-card__description {
  color: rgb(255 255 255 / 72%);
}

.services-section .department-card__action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--color-brand-secondary);
  font-size: 15px;
  font-weight: 800;
}

.services-section .department-card__action > span:last-child {
  display: inline-block;
  transition: transform 260ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .services-section .department-card__button:hover {
    border-color: var(--color-brand-primary);
    box-shadow: 0 26px 58px rgb(63 59 89 / 16%);
    transform: translateY(-8px) scale(1.012);
  }

  .services-section .department-card__button:hover::after {
    opacity: 1;
    transform: translateX(-55%);
  }

  .services-section .department-card__button:hover .department-card__icon {
    background: rgb(69 191 209 / 17%);
    transform: translateY(-3px) rotate(-4deg) scale(1.07);
  }

  .services-section .department-card__button:hover .department-card__action > span:last-child {
    transform: translateX(-7px);
  }
}

.services-section .department-card__button:active {
  transform: translateY(-2px) scale(0.995);
}

.services-section .department-card:nth-child(odd) .department-card__action {
  color: white;
}

.services-dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.services-dialog__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgb(63 59 115 / 46%);
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: opacity 220ms ease;
}

.services-dialog__layout {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.services-dialog__panel {
  display: flex;
  width: 100%;
  max-width: 768px;
  max-height: calc(100dvh - 48px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e1e2ea;
  border-radius: 28px;
  background: white;
  box-shadow: 0 32px 90px rgb(37 32 81 / 28%);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(16px) scale(0.985);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.services-dialog.is-open .services-dialog__backdrop {
  opacity: 1;
}

.services-dialog.is-open .services-dialog__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.services-dialog__header {
  display: flex;
  min-height: 126px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-bottom: 1px solid #e4e5ed;
}

.services-dialog__identity {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 17px;
}

.services-dialog__icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(69 191 209 / 28%);
  border-radius: 16px;
  background: rgb(69 191 209 / 11%);
  color: var(--color-brand-primary-dark);
}

.services-dialog__icon .department-card__glyph {
  display: block;
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.services-dialog__title {
  margin: 0;
  color: var(--color-text);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.3;
}

.services-dialog__description {
  margin: 7px 0 0;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.services-dialog__close {
  display: inline-flex;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1e2ea;
  border-radius: 14px;
  background: white;
  color: var(--color-text);
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.services-dialog__close:hover {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary-light);
}

.services-dialog__close:focus-visible {
  border-color: var(--color-brand-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgb(69 191 209 / 16%);
}

.services-dialog__close svg {
  width: 22px;
  height: 22px;
}

.services-dialog__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 26px 28px 24px;
}

.services-dialog__legend {
  color: var(--color-brand-secondary);
  font-size: 17px;
  font-weight: 850;
}

.services-dialog__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 20px;
}

.services-dialog .service-choice {
  position: relative;
  display: flex;
  min-height: 48px;
  cursor: pointer;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  border: 1px solid #dce3ea;
  border-radius: 12px;
  background: #f3f7f9;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 700;
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.services-dialog .service-choice:hover {
  border-color: var(--color-brand-primary);
}

.services-dialog .service-choice:has(input:checked) {
  border-color: rgb(91 85 155 / 45%);
  background: var(--color-brand-secondary-light);
  color: var(--color-brand-secondary-dark);
}

.services-dialog .service-choice input {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  margin: 0;
  border: 1.5px solid rgb(69 191 209 / 62%);
  border-radius: 50%;
  appearance: none;
  background: transparent;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.services-dialog .service-choice input:checked {
  border-color: var(--color-brand-secondary);
  background: var(--color-brand-secondary);
  box-shadow: inset 0 0 0 5px white;
}

.services-dialog .service-choice input:focus-visible {
  outline: 3px solid rgb(69 191 209 / 35%);
  outline-offset: 2px;
}

.services-dialog__footer {
  padding: 16px 28px 24px;
  border-top: 1px solid #e4e5ed;
  background: white;
}

.services-dialog__whatsapp {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border-radius: 12px;
  background: var(--color-brand-secondary);
  color: white;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgb(91 85 155 / 18%);
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.services-dialog__whatsapp:hover {
  background: var(--color-brand-secondary-dark);
  transform: translateY(-1px);
}

.services-dialog__whatsapp img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

@media (max-width: 1023px) {
  .services-section {
    min-height: auto;
    padding-block: 72px 96px;
  }

  .services-section__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-section .department-card__title {
    font-size: 24px;
  }
}

@media (max-width: 639px) {
  .services-section {
    padding-block: 58px 76px;
  }

  .services-section__title {
    font-size: 39px;
  }

  .services-section__description {
    font-size: 16px;
  }

  .services-section__description br {
    display: none;
  }

  .services-section__grid {
    grid-template-columns: 1fr;
    margin-top: 46px;
  }

  .services-section .department-card,
  .services-section .department-card__button {
    min-height: 240px;
  }

  .services-dialog__layout {
    align-items: flex-end;
    padding: 0;
  }

  .services-dialog__panel {
    max-height: 94dvh;
    border-radius: 28px 28px 0 0;
    transform: translateY(100%);
  }

  .services-dialog.is-open .services-dialog__panel {
    transform: translateY(0);
  }

  .services-dialog__header {
    min-height: auto;
    padding: 20px;
  }

  .services-dialog__icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .services-dialog__title {
    font-size: 24px;
  }

  .services-dialog__description {
    font-size: 13px;
  }

  .services-dialog__close {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .services-dialog__body {
    padding: 20px;
  }

  .services-dialog__options {
    grid-template-columns: 1fr;
  }

  .services-dialog__footer {
    padding: 14px 20px max(20px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .services-section .department-card__button,
  .services-section .department-card__button::after,
  .services-section .department-card__icon,
  .services-section .department-card__action > span:last-child,
  .services-dialog__backdrop,
  .services-dialog__panel,
  .services-dialog .service-choice,
  .services-dialog__whatsapp {
    transition-duration: 0.01ms !important;
  }
}
