/* ============================================================
   SERVICES HUB (/pakalpojumi/) — selectors prefixed pk-
   Kept from css/styles.css: inner-page hero, badges, logo strip, FAQ list,
   related links. From css/pages/hm2.css: Art 1a tiles, situation router,
   free-audit band, process line, compare + guarantees, "at a glance" facts.
   New here: the pillar index in the hero, the sticky pillar bar and the
   priced service directory.
   ============================================================ */

/* The homepage blocks read these from .hm-page */
.pk-page {
  --ink: var(--deep);
  --ink-line: var(--deep-line);
  --ink-muted: var(--deep-muted);
  --hm-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.45);
  --pk-nav-h: 58px;
}

/* ============================================================
   HERO — copy beside an index of the four pillars
   ============================================================ */
.pk-hero h1 { max-width: 16ch; }

.pk-index { border: 1px solid var(--line); background: var(--surface); }
.pk-index-k {
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.pk-index ol { list-style: none; }
.pk-index li + li { border-top: 1px solid var(--line); }
.pk-index li a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 4px 12px;
  padding: 18px 22px;
  transition: background 0.2s;
}
.pk-index li a:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.pk-index li a:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.pk-index-no {
  grid-row: span 2;
  align-self: start;
  padding-top: 4px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}
.pk-index b { font-size: var(--fz-17-5); font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
.pk-index small { grid-column: 2; font-size: var(--fz-13-5); color: var(--muted); }
.pk-index-arrow {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.pk-index li a:hover .pk-index-arrow { transform: translateY(3px); }
.pk-index-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: var(--fz-13-5);
  color: var(--muted);
}
.pk-index-foot a { font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.pk-index-foot a:hover { text-decoration-color: var(--text); }

/* ============================================================
   DIRECTORY — sticky pillar bar, then one row per pillar
   ============================================================ */
.pk-dir { padding-bottom: clamp(24px, 4vw, 48px); }

.pk-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
body.admin-bar .pk-nav { top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 32px)); }
.pk-nav ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; }
.pk-nav li + li { border-left: 1px solid var(--line); }
.pk-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--pk-nav-h);
  padding: 0 18px;
  font-size: var(--fz-14-5);
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.pk-nav a span { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--faint); }
.pk-nav a em { margin-left: auto; font-size: 12px; font-style: normal; font-variant-numeric: tabular-nums; color: var(--faint); }
.pk-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.pk-nav a:hover { color: var(--text); background: var(--bg-alt); }
.pk-nav a.is-on { color: var(--text); }
.pk-nav a.is-on::after { transform: scaleX(1); }
.pk-nav a:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }

.pk-pillar {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(40px, 5vw, 64px) 0;
  scroll-margin-top: calc(var(--header-h) + var(--pk-nav-h));
}
.pk-pillar + .pk-pillar { border-top: 1px solid var(--line); }

.pk-pillar-head { position: sticky; top: calc(var(--header-h) + var(--pk-nav-h) + 28px); align-self: start; }
.pk-pillar-art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
}
.pk-pillar-art .art { color: color-mix(in srgb, var(--text) 78%, transparent); transition: transform 0.9s var(--ease); }
.pk-pillar-art.m-4 .art { color: color-mix(in srgb, var(--ramp-4-ink) 82%, transparent); }
.pk-pillar-art:hover .art { transform: scale(1.04); }
.pk-pillar-k {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pk-pillar-k span + span { padding: 4px 8px; border: 1px solid var(--line); font-size: 10.5px; letter-spacing: 0.1em; color: var(--faint); }
.pk-pillar-head h3 {
  margin: 12px 0 10px;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}
.pk-pillar-head > p { max-width: 46ch; font-size: var(--fz-15-5); line-height: 1.5; color: var(--muted); }
.pk-pillar-meta { display: flex; flex-wrap: wrap; gap: 10px 36px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.pk-pillar-meta dt { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pk-pillar-meta dd { margin-top: 4px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 600; letter-spacing: -0.04em; }
.pk-pillar-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 24px; }

/* Service cards: a bordered grid, the whole card is the link */
.pk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.pk-grid > li { display: flex; min-width: 0; }
.pk-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 248px;
  padding: 24px 22px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  transition: background 0.2s, color 0.2s;
}
.pk-card:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--text); outline-offset: -2px; }
.pk-card-ico { display: block; width: 40px; height: 40px; margin-bottom: 20px; font-size: 40px; }
.pk-card-k { margin-bottom: 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.pk-card h4 { font-size: var(--fz-17-5); font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
.pk-card p { margin: 8px 0 20px; font-size: var(--fz-14); line-height: 1.45; color: var(--muted); }
.pk-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.pk-card-foot b { font-size: var(--fz-15-5); font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pk-card-foot > span { font-size: var(--fz-13-5); color: var(--muted); }
.pk-card-go {
  width: 20px;
  height: 20px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.pk-card:hover { background: var(--accent); color: var(--accent-ink); }
.pk-card:hover p,
.pk-card:hover .pk-card-k,
.pk-card:hover .pk-card-foot > span { color: color-mix(in srgb, var(--accent-ink) 66%, transparent); }
.pk-card:hover .pk-card-foot { border-top-color: color-mix(in srgb, var(--accent-ink) 30%, transparent); }
.pk-card:hover .pk-card-go { transform: translateX(4px); }

/* The spare cell in each pillar asks the question visitors get stuck on */
.pk-card.is-cta { background: var(--deep); color: var(--deep-text); }
.pk-card.is-cta .pk-card-k { color: var(--deep-accent); }
.pk-card.is-cta p { color: var(--deep-muted); }
.pk-card.is-cta .pk-card-foot { border-top-color: var(--deep-line); }
.pk-card.is-cta .pk-card-foot b { color: var(--deep-accent); }
.pk-card.is-cta:hover { background: var(--deep-card-hover); color: var(--deep-text); }
.pk-card.is-cta:hover p { color: var(--deep-muted); }
.pk-card.is-cta:hover .pk-card-k { color: var(--deep-accent); }
.pk-card.is-cta:hover .pk-card-foot { border-top-color: var(--deep-line); }

.pk-dir-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Short laptop screens: a sticky pillar head taller than the window would hide its buttons */
@media (max-height: 820px) {
  .pk-pillar-head { position: static; }
}

/* Four equal cells stop fitting the longest label; the bar scrolls sideways instead */
@media (max-width: 1100px) {
  .pk-nav ol { display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .pk-nav ol::-webkit-scrollbar { display: none; }
  .pk-nav li { flex: 1 0 auto; scroll-snap-align: start; }
  .pk-nav a em { display: none; }
}

@media (max-width: 980px) {
  .pk-pillar { grid-template-columns: 1fr; gap: 28px; }
  .pk-pillar-head { position: static; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 28px; }
  .pk-pillar-art { grid-row: 1 / span 6; align-self: start; }
  .pk-pillar-k { margin-top: 0; }
}

@media (max-width: 760px) {
  .pk-nav li { flex: 0 0 auto; }
  .pk-nav a { padding: 0 16px; }
  .pk-pillar-head { display: block; }
  .pk-pillar-art { aspect-ratio: 16 / 8; }
  .pk-pillar-k { margin-top: 20px; }
}

@media (max-width: 640px) {
  .pk-page { --pk-nav-h: 52px; }
  .pk-index li a { padding: 16px 18px; }
  .pk-index-k,
  .pk-index-foot { padding-inline: 18px; }
  .pk-grid { grid-template-columns: 1fr; }
  .pk-card { min-height: 0; padding: 22px 18px 18px; }
  .pk-card-ico { width: 34px; height: 34px; margin-bottom: 16px; font-size: 34px; }
  .pk-pillar-k,
  .pk-pillar-meta dt,
  .pk-card-k { font-size: 12px; }
  .pk-pillar-cta .btn { width: 100%; justify-content: center; }
}
