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

@media (min-width: 1101px) and (min-height: 701px) {
  .nav__inner {
    gap: 2rem;
  }
  .nav__links {
    flex-wrap: nowrap;
    row-gap: 0;
    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__services {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
  }
  .nav__services-link,
  .nav__services-btn {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000000;
    text-decoration: none;
  }
  .nav__services-link:hover,
  .nav__services-btn:hover {
    opacity: 0.65;
  }
  .nav__services-chevron {
    background: none;
    border: 0;
    padding: 0.2rem 0.15rem;
    cursor: pointer;
    color: #000000;
    line-height: 0;
  }
  .nav__services-chevron::after {
    content: "";
    display: block;
    width: 0.38rem;
    height: 0.38rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -0.15rem;
  }
  .nav__services.is-open .nav__services-chevron::after {
    transform: rotate(-135deg);
    margin-top: 0.1rem;
  }
  .nav__services-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0;
    min-width: 17rem;
    padding: 0.45rem 0;
    background: var(--surface, #faf8f5);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 1200;
  }
  .nav__services.is-open .nav__services-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .nav__services-menu a {
    display: block;
    padding: 0.55rem 1.1rem;
    white-space: nowrap;
  }
}

.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;
}
.bss-trio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}
.bss-trio img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  height: auto;
}
.page-hero__media .bss-trio img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  height: auto;
}
.service-card__img:has(.bss-trio) {
  aspect-ratio: auto;
}
.bss-switch {
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 600;
  overflow: hidden;
}
.bss-switch img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: bss-fade 15s infinite;
}
.bss-switch img:nth-child(1) { animation-delay: 0s; }
.bss-switch img:nth-child(2) { animation-delay: 5s; }
.bss-switch img:nth-child(3) { animation-delay: 10s; }
@keyframes bss-fade {
  /* Hold past the 1/3 mark so the next frame fades in while this one fades out — no empty gap */
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  33%  { opacity: 1; }
  37%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bss-switch img { animation: none; opacity: 0; }
  .bss-switch img:first-child { opacity: 1; }
}
.service-card:hover .bss-switch img { transform: none; }
.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; }
[data-theme="dark"] .prose a:hover { color: #e8c98a; }

.offer-block {
  margin: 2.5rem 0 0;
}
.offer-block h2,
.offer-block h3 {
  margin-bottom: 0.75rem;
}
.offer-block__media {
  margin: 0 0 1.1rem;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
}
.offer-block__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.offer-block__media .bss-switch {
  aspect-ratio: 3 / 2;
}
.offer-block__media .bss-switch img {
  height: 100%;
  aspect-ratio: auto;
}
.offer-block p,
.offer-block ul {
  margin-bottom: 0.85rem;
}

.related-wrap {
  max-width: 46rem;
  margin: 3rem auto 0;
}
.related-wrap > h2 {
  margin: 0.35rem 0 1.25rem;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}

.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; }

/* Compact nav extras (align with styles.css mid-width / short viewport) */
@media (max-width: 1100px), (max-height: 700px) {
  .nav__services-chevron { display: none; }
  .nav__services,
  .nav__services-menu {
    display: contents;
  }
  .nav__services-link {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .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;
  }
}

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

.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);
}
