/**
 * Services Page Styles
 * Summary grid, comparison table, anchored detail bands, and sticky navigation
 * Updated to use normalized UI system from rk-ui.css
 */

/* Summary grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, .15);
}

.service-card__head {
  padding: 1.25rem;
  text-align: center;
  display: grid;
  gap: .5rem;
  align-content: center;
}

.service-card__head .rk-chip {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto .5rem;
  transition: transform 0.2s var(--rk-ease);
}

.service-card:hover .rk-chip {
  transform: scale(1.05);
}

.service-card__head h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rk-text);
}

.service-card__head p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--rk-muted);
  line-height: 1.4;
}

.service-card__body {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.service-card__body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.service-card__body li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--rk-muted);
}

.service-card__body li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--rk-success);
  font-weight: bold;
}

.service-card__footer {
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.5rem;
}

/* Facts using design tokens */
.facts {
  display: grid;
  gap: .5rem;
}

.fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--rk-surface-alt);
  border: 1px solid var(--rk-border);
  border-radius: 14px;
  padding: .6rem .75rem;
}

.fact__label {
  color: var(--rk-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.fact__value {
  color: var(--rk-text);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Comparison table */
.compare-table-wrapper {
  overflow-x: auto;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--rk-surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--rk-shadow-sm);
}

.compare th,
.compare td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rk-border);
}

.compare th {
  background: var(--rk-surface-alt);
  font-weight: 700;
  color: var(--rk-text);
}

.compare th:first-child {
  width: 140px;
}

.compare td:first-child {
  background: var(--rk-surface-alt);
  font-weight: 600;
  color: var(--rk-muted);
}

.compare tbody tr:last-child td {
  border-bottom: none;
}

/* Sticky mini-nav - updated to use normalized chip styles */
.services-nav {
  position: sticky;
  top: 76px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rk-border);
  padding: 1rem 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: all .18s;
}

.services-nav.is-visible {
  opacity: 1;
  transform: none;
}

.services-nav__chips {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Detail bands */
.band {
  padding: 3rem 0;
}

.band__inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .band__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.band h2 {
  margin-bottom: .5rem;
  color: var(--rk-text);
  font-size: 2rem;
  font-weight: 700;
}

.band h3 {
  margin: 1.5rem 0 1rem;
  color: var(--rk-text);
  font-size: 1.25rem;
  font-weight: 700;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
  line-height: 1.5;
  color: var(--rk-text);
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--rk-success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* FAQ Items - updated to use design tokens */
.faq-item {
  margin: 1rem 0;
  border: 1px solid var(--rk-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--rk-surface);
}

.faq-item summary {
  padding: 1rem;
  background: var(--rk-surface-alt);
  cursor: pointer;
  font-weight: 600;
  color: var(--rk-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--rk-brand);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item > div {
  padding: 1rem;
  background: var(--rk-surface);
  line-height: 1.6;
  color: var(--rk-muted);
}

/* Anchor offset so header doesn't cover titles */
section[id] {
  scroll-margin-top: 88px;
}

html {
  scroll-behavior: smooth;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .band {
    padding: 2rem 0;
  }

  .band h2 {
    font-size: 1.5rem;
  }

  .service-card__head {
    padding: 1rem;
  }

  .service-card__body,
  .service-card__footer {
    padding: 1rem;
  }

  .compare th,
  .compare td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }
}

/* Section title styling */
.section-title-center {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--rk-text);
  margin: 0;
}

@media (max-width: 768px) {
  .section-title-center {
    font-size: 2rem;
  }
}
