/* Services page: all four services as equal-height cards (2 x 2 desktop/tablet, stacked on phones). */
.as-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}
.as-head-note {
  margin: 0;
  max-width: 420px;
  color: var(--as-muted);
  line-height: 1.65;
}

.as-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.as-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--as-line);
  background: #fff;
  box-shadow: 0 2px 6px rgba(11, 37, 69, 0.04);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.as-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--as-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.as-card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 30px 60px -28px rgba(11, 37, 69, 0.35);
}
.as-card:hover::after {
  transform: scaleX(1);
}

/* photo column fills the card height */
.as-card-media {
  position: relative;
  display: block;
  min-height: 100%;
  overflow: hidden;
}
.as-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.as-card:hover .as-card-media img {
  transform: scale(1.06);
}
.as-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 37, 69, 0) 55%, rgba(11, 37, 69, 0.55) 100%);
}
.as-card-media .as-panel-layer {
  z-index: 1;
}
.as-card-num {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 12px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
}

.as-card-body {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.2vw, 32px);
}
.as-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--as-tint);
  color: var(--as-navy);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.as-card:hover .as-card-icon {
  background: var(--as-navy);
  color: var(--as-accent);
}
.as-card-title {
  margin: 0;
  font-size: clamp(21px, 1.6vw, 26px);
  font-weight: 700;
  color: var(--as-ink);
}
.as-card-title a {
  color: inherit;
}
.as-card-tagline {
  margin: 4px 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--as-navy);
  opacity: 0.75;
}
.as-card-summary {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--as-muted);
}
.as-card .as-panel-points {
  margin-bottom: 22px;
  gap: 8px;
}
.as-card .as-panel-points li {
  font-size: 14.5px;
}
.as-card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.as-card-actions .as-btn {
  min-height: 46px;
  padding: 0 18px;
  font-size: 14.5px;
}
.as-card-calc {
  font-size: 14px;
  font-weight: 700;
  color: var(--as-navy);
  text-decoration: underline;
  text-decoration-color: var(--as-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.as-card-calc:hover {
  color: var(--as-navy);
  text-decoration-color: var(--as-navy);
}

/* narrower desktops and tablets: photo on top of each card */
@media (max-width: 1299px) {
  .as-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .as-card-media {
    min-height: 0;
    aspect-ratio: 16 / 8;
  }
}
@media (max-width: 991px) {
  .as-head-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 767px) {
  .as-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .as-card:hover {
    transform: none;
  }
  .as-card-media {
    aspect-ratio: 16 / 9;
  }
  .as-card-actions .as-btn {
    width: 100%;
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  .as-card,
  .as-card-media img,
  .as-card::after {
    transition: none;
  }
}
