.core-services {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.core-services > .container {
  max-width: 90rem;
}

.core-services-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.core-service-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1.25rem, 5vw, 4rem);
  min-width: 0;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-card);
  background: linear-gradient(150deg, var(--surface-warm), var(--surface) 65%);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.core-service-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 42rem;
  justify-self: center;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.core-service-card:focus-within {
  border-color: var(--link);
}

.core-service-icon {
  padding: 10px;
  margin-bottom: .85rem;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(140deg, #C90012, #8F0010);
  box-shadow: 0 4px 16px rgba(255, 23, 37, .22);
}

.core-service-card h2 {
  margin: 0 0 .6rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.core-service-card p,
.core-service-solutions ul,
.core-services-cta p {
  color: var(--muted);
}

.core-service-card summary {
  width: fit-content;
  padding: .7rem 0;
  margin-top: .45rem;
  color: var(--link);
  font-weight: 700;
  cursor: pointer;
}

.core-services :is(summary, a):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

.core-service-detail {
  padding-top: .8rem;
  border-top: 1px solid var(--gray-border);
}

.core-service-copy h3 {
  font-size: 1rem;
  margin: .9rem 0 .25rem;
}

.core-service-solutions ul {
  list-style: disc;
  padding-inline-start: 1.25rem;
}

.core-service-copy > .btn {
  margin-top: .5rem;
  text-align: center;
  white-space: normal;
}

.core-service-solutions li + li {
  margin-top: .3rem;
}

.core-service-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.core-services-cta {
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-card);
  background: var(--surface-warm);
  text-align: center;
}

.core-services-cta p {
  max-width: 62ch;
  margin: .75rem auto 1.25rem;
}

.core-services-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
}

@media (hover: hover) and (pointer: fine) {
  .core-service-card:hover {
    border-color: var(--link);
    box-shadow: 0 12px 32px rgba(255, 23, 37, .16);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .core-service-card:not(:has(details[open])):hover {
    transform: perspective(1000px) translateY(-4px) rotateX(1.5deg);
  }
}

@media (min-width: 701px) {
  .core-service-card:nth-child(even) .core-service-image {
    grid-column: 2;
    grid-row: 1;
  }

  .core-service-card:nth-child(even) .core-service-copy {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (max-width: 700px) {
  .core-service-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .core-service-card {
    transition: none;
  }
}

.core-services,
.core-service-card {
  position: relative;
  scroll-margin-top: 7rem;
}

.core-service-anchor {
  position: absolute;
  inset-block-start: 0;
  scroll-margin-top: 7rem;
}
