/* Service pages + extra-nav layout. Uses existing /css/styles.css tokens. */

@media (min-width: 769px) {
  .nav__inner {
    gap: 3rem;
  }
  .nav__links {
    flex-wrap: wrap;
    row-gap: 0.25rem;
    margin-left: 0.75rem;
  }
  .nav__links a {
    white-space: nowrap;
  }
  .nav__links-main,
  .nav__links-scroll,
  .nav__links-util {
    display: contents;
  }
  .nav__links-fade,
  .nav__close-icon {
    display: none !important;
  }
}

.nav__toggle {
  color: #000000;
}
.nav__close-icon {
  display: none;
  width: 22px;
  height: 22px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: visible;
}

.page-hero {
  padding: calc(var(--nav-h) + 4.5rem) 0 3.5rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.page-hero .container { max-width: 56rem; }
.page-hero .breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}
.page-hero .breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero .lead {
  color: var(--text-muted);
  font-size: clamp(1.08rem, 1.4vw, 1.22rem);
  line-height: 1.75;
  max-width: 40rem;
}

.service-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.service-card__link:focus-visible {
  outline: 2px solid var(--accent, #b8956a);
  outline-offset: 3px;
}

.page-hero__media {
  margin: 2rem 0 0;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  box-shadow: var(--shadow, 0 8px 24px rgba(28, 25, 23, 0.06));
}
.page-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.prose figure.prose-figure {
  margin: 2rem 0;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  border: 1px solid var(--border);
}
.prose figure.prose-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.prose figure.prose-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg-alt);
}

.prose {
  max-width: 46rem;
  margin-inline: auto;
}
.prose h2 {
  margin: 2.75rem 0 1rem;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}
.prose h3 {
  margin: 2rem 0 0.75rem;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
}
.prose p {
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  font-size: clamp(1.02rem, 1.1vw, 1.1rem);
  line-height: 1.8;
}
.prose ol {
  list-style: decimal;
  margin: 0 0 1.35rem 1.25rem;
  color: var(--text-muted);
}
.prose ul {
  list-style: disc;
  margin: 0 0 1.35rem 1.25rem;
  color: var(--text-muted);
}
.prose li {
  margin-bottom: 0.55rem;
  line-height: 1.7;
  padding-left: 0.25rem;
}
.prose a {
  color: var(--heading);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--accent);
}
.prose a:hover { color: #8a6a3a; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  color: inherit;
  text-decoration: none;
  display: block;
}
.related-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.related-card h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.related-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.85rem; }
.related-card .link-more {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--heading);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.cta-band {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.cta-band h2 { margin-bottom: 0.75rem; }
.cta-band p { color: var(--text-muted); max-width: 32rem; margin: 0 auto 1.5rem; }
.cta-band .btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }

.nav__links a.is-active { opacity: 0.65; }

@media (max-width: 768px) {
  .related-grid { grid-template-columns: 1fr; }

  .nav__toggle.is-open span {
    opacity: 0 !important;
    transform: none !important;
  }
  .nav__toggle.is-open .nav__close-icon {
    display: block;
    color: var(--heading);
  }
  body.nav-menu-open .nav .nav__toggle {
    color: var(--heading);
  }

  .nav__links {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    top: calc(var(--nav-h) + 0.35rem);
    max-height: calc(100dvh - var(--nav-h) - 0.7rem);
    max-height: calc(100svh - var(--nav-h) - 0.7rem);
    overflow: hidden;
    padding: 0.5rem 0.85rem 0.55rem;
  }
  .nav__links-main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .nav__links-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .nav__links-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.25rem;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--mobile-menu-bg));
  }
  .nav__links-fade[hidden] {
    display: none !important;
  }
  .nav__links-util {
    flex: 0 0 auto;
    border-top: 1px solid var(--border);
    margin-top: 0.15rem;
    padding-top: 0.2rem;
  }
  .nav__links a {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

.services__grid .service-card,
.services__grid .service-card:nth-child(4),
.services__grid .service-card:nth-child(5),
.services__grid--core .service-card,
.services__grid--core .service-card:nth-child(4),
.services__grid--core .service-card:nth-child(5) {
  grid-column: span 2;
}
@media (max-width: 900px) {
  .services__grid .service-card,
  .services__grid .service-card:nth-child(4),
  .services__grid .service-card:nth-child(5),
  .services__grid--core .service-card,
  .services__grid--core .service-card:nth-child(4),
  .services__grid--core .service-card:nth-child(5) {
    grid-column: span 1;
  }
}

.service-card__more {
  margin: 0.55rem 1.1rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted, #6b6560);
}
.service-card__more a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.service-card__more a:hover {
  color: var(--text, #2c2a27);
}
