/* ==========================================================================
   Blok „Pytania do dostawcy druku”
   Źródło (prototyp): assets/css/podstrony/dlaczego-dts.css (4. Wstęga pytań)
   ========================================================================== */

/* wspólne klocki strony Dlaczego DTS (te same reguły w każdym bloku dl-*, który ich używa) */
.dl-ask { --dl-gap: clamp(2rem, 6vw, 6rem); }
.dl-sect { padding: var(--section-y) 0; }
.dl-ask { background: var(--paper-2); }

/* the prefix takes its own row, so the copy on the right starts level with the title */
.dl-head {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.25rem var(--dl-gap); align-items: start; margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.dl-head > .eyebrow.eyebrow { grid-column: 1 / -1; margin: 0; }
.dl-head h2 { margin: 0; max-width: 17ch; }
.dl-head__lead { margin: 0; color: var(--muted); font-size: 1.0625rem; max-width: 58ch; }
.dl-head__side { display: grid; gap: 1.5rem; align-content: start; }
.dl-head--solo { grid-template-columns: minmax(0, 1fr); }
.dl-head--solo h2 { max-width: 26ch; }

/* round previous / next buttons (reasons, questions) */
.dl-stage__nav { display: flex; gap: .5rem; }
.dl-round {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--navy-900); box-shadow: inset 0 0 0 1.5px var(--line-strong); cursor: pointer;
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.dl-round .icon { width: 1.1rem; height: 1.1rem; }
.dl-round--prev .icon { transform: scaleX(-1); }
.dl-round:hover:not(:disabled) { background: var(--navy-900); color: #fff; box-shadow: none; }
.dl-round:disabled { opacity: .38; cursor: default; }
.dl-rib__count { margin: 0; font-family: var(--font-ui); font-size: .875rem; color: var(--muted); }
.dl-rib__count b { font-weight: 600; color: var(--navy-900); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   4. Wstęga pytań: cards scrolling sideways, a thread through their numbers
   -------------------------------------------------------------------------- */

.dl-ask .dl-head { margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem); }
.dl-ask .dl-head h2 { max-width: 19ch; }
.dl-rib__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.dl-rib {
  --dl-edge: max(var(--gutter), (100% - var(--container)) / 2);
  --dl-card: min(84vw, 24rem);
  --dl-rib-top: 3.25rem;
}
.dl-rib__view {
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--dl-edge); padding: 0 var(--dl-edge) 1.75rem;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.dl-rib__view::-webkit-scrollbar { height: 8px; }
.dl-rib__view::-webkit-scrollbar-track { background: transparent; }
.dl-rib__view::-webkit-scrollbar-thumb { background: var(--line-strong); border: 0; border-radius: 8px; }
.dl-rib__view:focus-visible { outline-offset: -3px; border-radius: 12px; }
.dl-rib__track { position: relative; width: max-content; padding-top: var(--dl-rib-top); }
/* without JS a straight orange line stands in for the drawn thread */
.dl-rib__track::before {
  content: ""; position: absolute; left: calc(1.5rem + 18px); right: 0; top: calc(var(--dl-rib-top) / 2 - 1px); height: 2px;
  background: var(--orange); border-radius: 2px;
}
.dl-rib.is-js .dl-rib__track::before { display: none; }
.dl-rib__thread { position: absolute; left: 0; top: 0; width: 100%; height: var(--dl-rib-top); overflow: visible; pointer-events: none; }
.dl-rib__thread path { fill: none; stroke-linecap: round; }
.dl-rib__thread .track { stroke: var(--orange-100); stroke-width: 2; }
.dl-rib__thread .draw { stroke: var(--orange); stroke-width: 2.5; transition: stroke-dashoffset 1.1s var(--ease); }

.dl-rib__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(4, auto); grid-auto-columns: var(--dl-card);
  column-gap: clamp(.875rem, 1.6vw, 1.25rem); row-gap: 0;
}
.dl-q {
  position: relative; grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; scroll-snap-align: start;
  padding: 1.5rem 1.5rem 1.4rem; border-radius: var(--radius-lg); background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(22, 42, 67, .04);
  transition: box-shadow .4s var(--ease);
}
.dl-q:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-float); }
.dl-q__dot {
  position: absolute; left: 1.5rem; top: calc(var(--dl-rib-top) / -2 - 18px); width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-ui); font-weight: 600; font-size: .875rem; font-variant-numeric: tabular-nums;
  background: var(--orange); color: #fff; box-shadow: 0 0 0 5px var(--paper-2), 0 0 0 7px var(--orange-50);
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.dl-rib.is-armed .dl-q:not(.is-reached) .dl-q__dot { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2.5px var(--orange-100), 0 0 0 5px var(--paper-2); }
.dl-q__title { margin: 0 0 .65rem; font-size: 1.1875rem; line-height: 1.28; letter-spacing: -.012em; text-wrap: pretty; }
.dl-q__num { display: block; margin-bottom: .5rem; font-family: var(--font-ui); font-weight: 500; font-size: .8125rem; letter-spacing: .02em; color: var(--muted); }
.dl-q__sub { margin: 0 0 1.15rem; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.dl-q__label {
  display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem;
  font-family: var(--font-ui); font-weight: 500; font-size: .75rem; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2);
}
.dl-q__why { padding: 1rem 0 1.1rem; border-top: 1px solid var(--line); }
.dl-q__why p:last-child, .dl-q__dts p:last-child { margin: 0; font-size: .9375rem; line-height: 1.5; }
.dl-q__why p:last-child { color: var(--text); }
.dl-q__dts { align-self: stretch; padding: 1rem 1.1rem 1.1rem; border-radius: 14px; background: var(--navy-50); }
.dl-q__dts .dl-q__label { color: var(--navy); }
.dl-q__dts p:last-child { color: var(--navy-900); font-weight: 500; }
.dl-q__tick {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--orange); color: #fff;
}
.dl-q__tick .icon { width: .8rem; height: .8rem; stroke-width: 2.5; }

@media (max-width: 900px) {
  .dl-head { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .dl-rib__thread .draw, .dl-q__dot { transition: none; }
}
