/* Services Pages Styling — full-page layout */

.services-content {
  color: var(--ink);
  width: 100%;
}

/* Services Index Page */
.services-header {
  text-align: center;
  margin-bottom: 3rem;
}

.services-title {
  font-size: 2em;
  color: var(--primary);
  margin-bottom: 0.8em;
}

.services-subtitle {
  font-size: 1.65em;
  color: var(--accent);
  margin-bottom: 0;
}

.services-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 0 auto 2rem;
  max-width: 1120px;
  width: 100%;
}

.services-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.service-card {
  background: var(--surface-variant);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  flex: 0 1 320px;
  max-width: 360px;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
  text-decoration: none;
}

.service-card:hover * {
  text-decoration: none;
}

.service-card-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card-icon svg {
  width: 100%;
  height: 100%;
  color: var(--primary);
}

.service-card-title {
  font-size: 1.4em;
  color: var(--primary);
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  text-align: center;
}

.service-card-oneliner {
  font-size: 1.05em;
  color: var(--ink-muted);
  margin: 0;
  text-align: center;
  flex-grow: 1;
}

.service-card-cta {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.95em;
  color: var(--accent);
  font-weight: 600;
}

/* Service Detail Page */
.service-back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  margin-bottom: 1.5rem;
}

.service-back-link:hover {
  text-decoration: underline;
}

.service-detail-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.service-detail-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: block;
}

.service-detail-icon svg {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block;
}

.service-detail-title {
  flex: 1;
  font-size: 2em;
  color: var(--primary);
  margin: 0;
  font-weight: 700;
}

.service-detail-intro {
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 2rem;
}

.service-detail-section {
  margin-bottom: 2.5rem;
}

.service-detail-section-title {
  font-size: 1.4em;
  color: var(--secondary);
  margin: 1.5em 0 0.8em 0;
  font-weight: 700;
}

/* List styling moved to shared/css/text-formatting.css */

/* Service detail CTA - now uses shared .cta-card from components.css */

/* Tablet Responsive */
@media (max-width: 1024px) {
  .services-title {
    font-size: 1.8em;
  }

  .service-detail-title {
    font-size: 1.8em;
  }
}

/* Mobile Responsive */
@media (max-width: 767px) {
  .services-header {
    flex-direction: column;
    align-items: center;
  }

  .services-title {
    font-size: 1.5em;
    text-align: center;
  }

  .services-subtitle {
    font-size: 1.4em;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 740px;
    gap: 1.5rem;
  }

  .services-row {
    gap: 1.5rem;
  }

  .service-card {
    padding: 1.5rem;
    flex: 0 1 320px;
  }

  .service-detail-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .service-detail-icon {
    width: 48px;
    height: 48px;
  }

  .service-detail-title {
    font-size: 1.5em;
    text-align: center;
  }

}

@media (max-width: 680px) {
  .services-row {
    flex-direction: column;
    align-items: center;
  }

  .service-card {
    width: 100%;
    flex: 0 1 auto;
  }
}

/* Mobile Landscape - Override to horizontal layout */
@media (max-width: 767px) and (orientation: landscape) {
  .services-header {
    flex-direction: row;
    align-items: flex-start;
  }

  .services-title {
    text-align: left;
  }

  .service-detail-header {
    flex-direction: row;
    align-items: flex-start;
  }

  .service-detail-title {
    text-align: left;
  }
}

/* Larger service icons (2026-11-15, Jason: icons read too small).
   Scoped to the TS services list and detail pages by their page ids, so the
   homepage cards (home.css) and DG (own templates, doesn't load this file)
   are untouched. */
#services-page-content .ts-service-card__icon {
  width: 60px;
  height: 60px;
}

#service-detail-page-content .service-detail-icon {
  width: 84px;
  height: 84px;
}

@media (max-width: 767px) {
  /* Phone cards put the icon beside the title, so keep it a step smaller. */
  #services-page-content .ts-service-card__header .ts-service-card__icon {
    width: 52px;
    height: 52px;
  }

  #service-detail-page-content .service-detail-icon {
    width: 76px;
    height: 76px;
  }
}

/* Service stages (2026-11-15, Jason picked "step strip, option 2" from
   brands/TsunamiSwami/mockups/services-stages.html). Rendered only when
   services.json has "stages" (TS). Scoped to the services page id. */
#services-page-content .ts-stage-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 760px;
  margin: 0 auto 2.5rem;
  position: relative;
}
#services-page-content .ts-stage-strip::before {
  content: "";
  position: absolute;
  left: 16.66%;
  right: 16.66%;
  top: 1.2rem;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
#services-page-content .ts-stage-num {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.15rem;
}
#services-page-content .ts-stage-step {
  position: relative;
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 0 0.4rem;
}
#services-page-content .ts-stage-step:hover { text-decoration: none; color: inherit; }
#services-page-content .ts-stage-step .ts-stage-num {
  margin: 0 auto 0.55rem;
  position: relative;
  box-shadow: 0 0 0 6px var(--bg);
}
#services-page-content .ts-stage-step b {
  display: block;
  font-family: var(--heading-font);
  color: var(--primary);
  font-size: 1rem;
  line-height: 1.25;
}
#services-page-content .ts-stage-step:hover b { text-decoration: underline; }
#services-page-content .ts-stage-step__sub {
  display: block;
  color: var(--ink-muted);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

#services-page-content .ts-stage { margin: 0 0 3rem; scroll-margin-top: 140px; }
#services-page-content .ts-stage__head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.1rem;
  text-align: left;
}
#services-page-content .ts-stage__title {
  font-family: var(--heading-font);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  color: var(--primary);
  margin: 0;
  line-height: 1.2;
}
#services-page-content .ts-stage__sub { color: var(--ink-muted); margin: 0.15rem 0 0; font-size: 0.95rem; }

/* Balanced: 4 across, then 2 x 2, then 1. Never 3 + 1. */
#services-page-content .ts-stage__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  text-align: left;
}
@media (max-width: 1100px) {
  #services-page-content .ts-stage__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  #services-page-content .ts-stage__grid { grid-template-columns: 1fr; }
  #services-page-content .ts-stage-step b { font-size: 0.88rem; }
  #services-page-content .ts-stage-step__sub { font-size: 0.72rem; }
}
