/* ==========================================================================
   Service pages — chrome introduced when the single-page catalogue was split
   into /services/ and /services/<slug>/. Chapter bodies keep using
   campus-pages.css; this file only styles what surrounds them.
   ========================================================================== */

/* ---------- Breadcrumbs ---------- */

.svc-crumbs {
  position: relative;
  z-index: 2;
  padding: calc(var(--space-6) + 56px) 0 0;
}

.svc-crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--nx-font-body);
  font-size: 12px;
  color: var(--text-muted);
}

.svc-crumbs__list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.svc-crumbs__list li + li::before {
  content: '/';
  opacity: 0.45;
}

.svc-crumbs__list a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.18s ease;
}

.svc-crumbs__list a:hover {
  color: var(--campus-ink);
}

.svc-crumbs__list [aria-current='page'] {
  color: var(--campus-ink);
  font-weight: 600;
}

/* ---------- Hub grid ---------- */

.svc-hub {
  position: relative;
  z-index: 2;
  padding: var(--space-8) 0 var(--space-12);
}

.svc-hub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

/* Two columns rather than as many as fit. The flagship takes a row to itself
   and exactly four services follow it, so two divide evenly where three strand
   the last card beside a pair of empty cells. */
@media (min-width: 901px) {
  .svc-hub__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .svc-hub__card:first-child {
    grid-column: 1 / -1;
  }
}

.svc-hub__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--nx-border-glass, var(--border));
  border-radius: var(--radius-xl);
  background: var(--campus-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.svc-hub__card:hover {
  transform: translateY(-2px);
  border-color: var(--campus-ink);
}

.svc-hub__card:first-child {
  flex-direction: row;
  align-items: stretch;
}

.svc-hub__media {
  min-height: 160px;
  background-position: center 42%;
  background-size: cover;
}
.svc-hub__card--cloud .svc-hub__media { background-position: 40% 48%; }
.svc-hub__card--desk .svc-hub__media { background-position: 52% 50%; }
.svc-hub__card--studio .svc-hub__media { background-position: 50% 40%; }
.svc-hub__card--security .svc-hub__media { background-position: 48% 42%; }
.svc-hub__card--vault .svc-hub__media { background-position: 36% 50%; }

.svc-hub__card:first-child .svc-hub__media {
  flex: 0 0 42%;
  min-height: 260px;
}

.svc-hub__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: var(--space-5);
}

.svc-hub__kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--nx-font-mono, var(--font-mono));
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.svc-hub__num {
  color: var(--campus-ink);
  font-weight: 700;
}

.svc-hub__title {
  margin: 0;
  font-family: var(--nx-font-display, var(--font-display));
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}

.svc-hub__card:first-child .svc-hub__title {
  font-size: 28px;
}

.svc-hub__title a {
  color: var(--campus-ink);
  text-decoration: none;
}

/* Whole card is clickable via the title's stretched link. */
.svc-hub__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.svc-hub__card {
  position: relative;
}

.svc-hub__teaser {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.svc-hub__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: auto;
}

.svc-hub__price {
  font-family: var(--nx-font-display, var(--font-display));
  font-size: 16px;
  font-weight: 700;
  color: var(--campus-ink);
}

.svc-hub__sub {
  font-size: 12px;
  color: var(--text-muted);
}

.svc-hub__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

/* ---------- Cross-links at the foot of a service page ---------- */

.svc-next {
  position: relative;
  z-index: 2;
  padding: var(--space-10) 0 var(--space-6);
}

.svc-next__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-4);
  color: var(--campus-ink);
}

.svc-next__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.18s ease, gap 0.18s ease;
}

.svc-next__all:hover {
  color: var(--campus-ink);
  gap: 10px;
}

.svc-next__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.svc-next__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--nx-border-glass, var(--border));
  border-radius: var(--radius-lg);
  background: var(--campus-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.svc-next__card:hover {
  transform: translateY(-2px);
  border-color: var(--campus-ink);
}

.svc-next__num {
  font-family: var(--nx-font-mono, var(--font-mono));
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.svc-next__icon {
  font-size: 22px;
  line-height: 1;
  color: var(--campus-ink);
}

.svc-next__title {
  font-family: var(--nx-font-display, var(--font-display));
  font-size: 15px;
  font-weight: 700;
  color: var(--campus-ink);
}

.svc-next__sub,
.svc-next__price {
  font-size: 12px;
  color: var(--text-muted);
}

.svc-next__price {
  margin-top: 4px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Single-service rail ---------- */

/* The rail reuses .chapter-nav from the old catalogue, but the current
   service is a <span> rather than a link — keep it visually identical. */
.chapter-nav__dot[aria-current='page'] {
  cursor: default;
}

@media (max-width: 900px) {
  .svc-hub__card:first-child {
    flex-direction: column;
  }

  .svc-hub__card:first-child .svc-hub__media {
    flex: 0 0 auto;
    min-height: 180px;
  }

  .svc-hub__card:first-child .svc-hub__title {
    font-size: 22px;
  }

  .svc-crumbs {
    padding-top: calc(var(--space-4) + 56px);
  }
}
