/* A program működés közben (template-parts/home/program.php): the planner,
   the fine-tuning and the complex cases as three modes of one stage. */
.ksf-prog__head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.ksf-prog__head .ks-lead {
  margin-inline: auto;
}

/* Three large mode tabs across the top. */
.ksf-prog__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: clamp(40px, 5vw, 60px) 0 clamp(36px, 4vw, 56px);
}

.ksf-prog__tab {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 6px 12px;
  width: 100%;
  margin: 0;
  padding: 20px 22px 26px;
  border: 1px solid rgba(13, 43, 56, .08);
  border-radius: 18px;
  color: inherit;
  background: rgba(255, 255, 255, .5);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .35s ease, border-color .35s ease, box-shadow .45s ease;
}

.ksf-prog__tab:hover {
  background: rgba(255, 255, 255, .9);
}

.ksf-prog__tab.is-on {
  border-color: rgba(23, 142, 139, .35);
  background: #fff;
  box-shadow: 0 1px 2px rgba(13, 43, 56, .04), 0 20px 44px -28px rgba(23, 142, 139, .45);
}

.ksf-prog__tab:focus-visible {
  outline: 3px solid rgba(23, 142, 139, .35);
  outline-offset: 2px;
}

.ksf-prog__num {
  color: var(--ks-soft);
  font: 600 13px/1.6 "Inter", sans-serif;
  font-variant-numeric: tabular-nums;
  transition: color .35s ease;
}

.ksf-prog__tab.is-on .ksf-prog__num {
  color: var(--ks-teal);
}

.ksf-prog__tab-title {
  color: var(--ks-ink);
  font: 700 19px/1.3 var(--ks-display);
  letter-spacing: -.02em;
}

.ksf-prog__tab-text {
  grid-column: 2;
  color: var(--ks-copy);
  font-size: 14.5px;
  line-height: 1.55;
}

/* The guided tour's progress, on the active tab only. */
.ksf-prog__bar {
  position: absolute;
  right: 22px;
  bottom: 12px;
  left: 22px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(13, 43, 56, .07);
  opacity: 0;
  transition: opacity .3s ease;
}

.ksf-prog.is-touring .ksf-prog__tab.is-on .ksf-prog__bar {
  opacity: 1;
}

.ksf-prog__bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ks-teal);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* The stage: one mode at a time once JS runs; all three, stacked, without it. */
.ksf-prog__stage {
  min-height: var(--ksf-prog-h, auto);
}

.ksf-prog__panel + .ksf-prog__panel {
  margin-top: clamp(56px, 6vw, 88px);
}

.ksf-prog.is-ready .ksf-prog__panel + .ksf-prog__panel {
  margin-top: 0;
}

.ksf-prog.is-ready .ksf-prog__panel[hidden] {
  display: none;
}

.ksf-prog.is-ready .ksf-prog__panel.is-entering {
  animation: ksf-prog-in .55s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes ksf-prog-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.ksf-prog__anchor {
  display: block;
  height: 0;
}

.ksf-prog__panel-lead {
  margin: 0 0 22px;
  color: var(--ks-copy);
  font-size: 17px;
  line-height: 1.65;
}

/* Tablets: shorter tabs. */
@media (max-width: 1080px) {
  .ksf-prog__tab {
    padding: 16px 16px 22px;
  }

  .ksf-prog__tab-text {
    display: none;
  }

  .ksf-prog__tab-title {
    font-size: 16.5px;
  }
}

/* Phones: three compact tabs in a row. */
@media (max-width: 620px) {
  .ksf-prog__tabs {
    gap: 6px;
  }

  .ksf-prog__tab {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 2px;
    padding: 12px 8px 18px;
    border-radius: 14px;
    text-align: center;
  }

  .ksf-prog__tab-title {
    font-size: 13.5px;
    line-height: 1.25;
  }

  .ksf-prog__bar {
    right: 12px;
    bottom: 8px;
    left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ksf-prog.is-ready .ksf-prog__panel.is-entering {
    animation: none;
  }

  .ksf-prog__tab,
  .ksf-prog__num {
    transition: none;
  }
}
