/* ---------- Cjenik (Price list) page ---------- */

/* Visually hidden helper (screen-reader only) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Active nav link styling */
.mobile-menu__nav a[aria-current="page"] { opacity: 0.5; }
.site-footer__nav a[aria-current="page"] { color: var(--color-invert); }

/* ---------- Cjenik page: "Cjenik (N)" heading + flat price table ----------
   Matches the Sketch artboard: heading is Inter Regular, 24px on mobile /
   42px on desktop (kerning -0.96 / -1.68 = letter-spacing -0.04em), black,
   left-aligned; on desktop it sits in the LEFT half (sticky) and the flat
   two-column "NAZIV USLUGE / CIJENA" table in the RIGHT half. */
.pricing {
  padding-top: calc(var(--space-9) + var(--space-7));   /* clear the fixed header + breathe */
}

.pricing__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-7);
  flex-wrap: wrap;
  margin-bottom: var(--space-7);    /* mobile: gap to the table */
}

.pricing-hero__title,
.pricing-hero__count {
  font-family: var(--font-sans);
  font-size: var(--fs-md);          /* 24px — mobile artboard */
  font-weight: 400;                 /* Inter Regular */
  line-height: 1.2;
  letter-spacing: -0.04em;          /* artboard kerning -0.96 @ 24px */
  color: var(--color-fg);
  margin: 0;
}

/* The table block: column-header row + rows + disclaimer, kept together so it
   can be parked in the right column on desktop. */
.pricing__table { display: grid; }

.pricing-list__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  font-size: var(--fs-xs);
  letter-spacing: -0.04em;
  color: var(--color-fg);
}

.pricing-list__head-price { text-align: right; white-space: nowrap; }

.pricing-list {
  margin: 0;
  display: grid;
}

/* Optional sub-heading row (only rendered if a category has a title; the
   default seeded data is one untitled flat list, so this won't show). */
.pricing-list__group-title {
  padding-block: var(--space-6) var(--space-2);
  border-top: 1px solid var(--color-line);
}
.pricing-list__group-title:first-child { border-top: none; padding-top: 0; }
.pricing-list__group-title dt {
  margin: 0;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.pricing-list__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-top: 1px solid var(--color-line);
}

.pricing-list__row:last-child { border-bottom: 1px solid var(--color-line); }

.pricing-list__name {
  font-size: var(--fs-sm);
  letter-spacing: -0.02em;
  margin: 0;
  flex: 1 1 auto;
}

.pricing-list__price {
  font-size: var(--fs-sm);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--color-fg);
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Disclaimer — below the items, in the table column (right side on desktop),
   left-aligned within it, as on the artboard. */
.pricing-disclaimer {
  font-size: var(--fs-xs);
  color: var(--color-fg-muted);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  padding-top: var(--space-5);
  margin: 0;
}

@media (min-width: 1024px) {
  /* Heading in the left half (sticky), table in the right half — like the artboard. */
  .pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    column-gap: var(--space-7);
  }

  .pricing__head { margin-bottom: 0; }

  /* Native sticky for tablet / no-JS (where there IS a real scroll context).
     Under Locomotive smooth-scroll (html.has-scroll-smooth, desktop) native
     `position: sticky` can't work — html/body are overflow:hidden — so there
     the `data-scroll-sticky` attribute on .pricing__head handles the pinning. */
  html:not(.has-scroll-smooth) .pricing__head {
    position: sticky;
    top: var(--space-9);            /* sits below the fixed desktop header */
  }

  /* Column-header row a touch below the big heading's top (artboard: "Naziv
     usluge" ≈70px under "Cjenik"); keeps the small header from floating. */
  .pricing__table { padding-top: var(--space-6); }

  .pricing-hero__title,
  .pricing-hero__count {
    font-size: 2.625rem;            /* 42px — desktop artboard (kerning -1.68 @ 42px = -0.04em) */
  }

  .pricing-list__row { padding-block: var(--space-5); }
}
