.service-card {
  --service-background: #132634;
  --service-highlight: #174767;
  --service-border: #4babe9;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(17px, 2.2vw, 24px);
  border: 1px solid var(--service-border);
  border-radius: 12px;
  background: var(--service-background);
}

.service-card--insects {
  --service-background: #112b23;
  --service-highlight: #164b32;
  --service-border: #39b971;
}

.service-card--overview:active,
.service-card--overview.is-touch-pressed,
.service-card--overview:has(.service-category-link:focus-visible) {
  background-color: var(--service-highlight);
}

.service-card--overview:active .service-category-link::after,
.service-card--overview.is-touch-pressed .service-category-link::after {
  box-shadow: inset 0 0 0 2px var(--service-border);
}

@media (hover: hover) {
  .service-card--overview:hover {
    background-color: var(--service-highlight);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-card--overview {
    transition: background-color .18s ease;
  }
}

.service-card--overview {
  padding: 0;
}

.service-card-photo {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 11px 11px 0 0;
  background: #090e12;
}

.service-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 65%, var(--service-background));
}

.service-card-body {
  padding: 9px clamp(18px, 2.3vw, 28px) clamp(20px, 2.3vw, 28px);
}

.service-card-body .service-card-summary {
  margin-bottom: 0;
}

.service-card h2,
.service-card h3 {
  color: #fff;
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -.018em;
}

.service-card-summary {
  margin: 12px 0 20px;
  color: #ecf4f7;
  font-size: 1rem;
}

.service-category-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.service-category-link h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.service-card-arrow {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--service-border);
}

.service-category-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 11px;
  pointer-events: none;
}

.service-category-link:focus-visible {
  outline: none;
}

.service-category-link:focus-visible::after {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.service-card-actions {
  position: relative;
  z-index: 2;
  align-self: center;
  margin-top: auto;
}

.catalog-service-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 38px;
}

.catalog-service-cards .service-card-actions {
  margin-top: 0;
}

.catalog-service-cards .service-card {
  --service-background: #101619;
  --service-divider: #3b4b54;
}

.service-card-icons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  aspect-ratio: 1;
  min-height: 0;
  max-width: 300px;
  width: 100%;
  margin: auto auto 22px;
}

.service-card-icons .insect-unit {
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 4px;
}

.service-card-icons .insect-unit:nth-child(odd) {
  border-inline-end: 1px solid var(--service-divider);
}

.service-card-icons .insect-unit:nth-child(-n+2) {
  border-block-end: 1px solid var(--service-divider);
}

.service-card-icons .insect-unit svg {
  width: min(55%, 72px);
  height: auto;
}

.service-card-icons .insect-unit > span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.service-card .service-category-toggle {
  --service-button-color: var(--blue);
  --service-button-dark: #0b5489;
  min-width: 150px;
  background-color: var(--service-button-color);
  border-color: var(--service-button-color);
}

.service-card--insects .service-category-toggle {
  --service-button-color: var(--green);
  --service-button-dark: #00632a;
}

.service-card .service-category-toggle:hover,
.service-card .service-category-toggle:active {
  background-color: var(--service-button-dark);
  border-color: var(--service-button-dark);
}

.home-intro-actions .home-services-link {
  background-color: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.home-intro-actions .home-services-link:hover {
  background-color: #0b5489;
  border-color: #0b5489;
  text-decoration: none;
}

@media (min-width: 801px) and (max-width: 960px) {
  .service-card-icons .insect-unit {
    gap: 4px;
  }

  .service-card-icons .insect-unit > span {
    font-size: .8125rem;
  }
}

@media (max-width: 800px) {
  .catalog-service-cards,
  #servicios > .service-layout {
    max-width: 410px;
    margin-inline: auto;
    grid-template-columns: 1fr;
  }

}

@media (max-width: 540px) {
  .catalog-service-cards {
    max-width: none;
  }

  .catalog-service-cards .service-card {
    padding-inline: var(--mobile-action-inset);
  }

  .catalog-service-cards .service-card-actions {
    align-self: stretch;
  }
}
