/* ============================================================
   Vriendi – how-it-works.css
   Only for the "How Vriendi works" pages (/jak-dziala/, /en/how-it-works/),
   on top of style.css.
   ============================================================ */

/* ── Hero ───────────────────────────────────────────────────── */
.hw-hero { padding-block: 72px 48px; }
.hw-hero-grid { display: grid; gap: 40px; align-items: center; }
.hw-hero h1 { margin-top: 4px; }
.hw-hero h1 em { font-style: normal; color: var(--color-accent); }
.hw-lead { font-size: 1.125rem; margin-top: 18px; max-width: 520px; opacity: .85; }
.hw-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hw-facts li {
  display: inline-flex; gap: 6px; align-items: center;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: 999px; padding: 6px 14px; font-size: .875rem; font-weight: 600;
}
.hw-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hw-video {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
  overflow: hidden; background: #2C3E35; box-shadow: 0 18px 48px rgba(44, 62, 53, .18);
}
.hw-video img, .hw-video video { width: 100%; height: 100%; object-fit: cover; }
.hw-video-play {
  position: absolute; inset: 0; border: 0; cursor: pointer; padding: 0;
  background: linear-gradient(180deg, rgba(44, 62, 53, 0) 40%, rgba(44, 62, 53, .55));
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.hw-video-play span {
  margin: 0 0 20px 20px; display: inline-flex; align-items: center; gap: 10px;
  background: var(--color-white); color: var(--color-text); border-radius: 999px;
  padding: 10px 18px 10px 12px; font: 700 .9375rem var(--font-body);
  transition: transform var(--transition);
}
.hw-video-play span::before {
  content: ''; width: 28px; height: 28px; border-radius: 50%; background: var(--color-accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l8 5-8 5z' fill='%23fff'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.hw-video-play:hover span { transform: scale(1.04); }

/* ── Steps ──────────────────────────────────────────────────── */
.hw-steps-section { padding-block: 32px 72px; }
.hw-steps { position: relative; }
/* The rail behind the numbers, and its fill that follows the scroll. */
.hw-steps::before, .hw-steps::after {
  content: ''; position: absolute; left: 21px; top: 22px; width: 3px; border-radius: 3px;
}
.hw-steps::before { bottom: 22px; background: var(--color-border); }
.hw-steps::after {
  height: calc((100% - 44px) * var(--hw-progress, 0)); background: var(--color-accent);
  transition: height .15s linear;
}

.hw-step {
  position: relative; display: grid; gap: 20px 40px;
  padding: 0 0 64px 68px; scroll-margin-top: 96px;
}
.hw-step:last-child { padding-bottom: 0; }
.hw-num {
  position: absolute; left: 0; top: 0; z-index: 1; width: 45px; height: 45px; border-radius: 50%;
  display: grid; place-items: center; font: 700 1.125rem var(--font-heading);
  background: var(--color-bg); color: var(--color-primary); border: 3px solid var(--color-border);
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}
.hw-step.is-reached .hw-num { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-white); }
.hw-step.is-current .hw-num { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(240, 120, 86, .18); }

.hw-when {
  display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--color-accent); margin-top: 10px;
}
.hw-text h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); margin-top: 6px; }
.hw-text p { margin-top: 12px; font-size: 1.0625rem; }
.hw-text a:not(.btn) { color: var(--color-primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hw-tip {
  display: flex; gap: 10px; margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-md);
  background: rgba(74, 124, 126, .08); font-size: .9375rem;
}
.nowrap { white-space: nowrap; }

.hw-media {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--color-white);
  box-shadow: 0 12px 36px rgba(44, 62, 53, .12); aspect-ratio: 4 / 3;
}
.hw-media img { width: 100%; height: 100%; object-fit: cover; }
.hw-media-top img { object-position: top; }

/* Step 1: the booking screens, as a small phone with tabs. */
.hw-phone { aspect-ratio: auto; background: transparent; box-shadow: none; overflow: visible; display: grid; justify-items: center; gap: 14px; }
.hw-phone-screen {
  position: relative; width: min(100%, 300px); aspect-ratio: 780 / 976; border-radius: 28px; overflow: hidden;
  border: 8px solid #2C3E35; background: var(--color-bg); box-shadow: 0 18px 40px rgba(44, 62, 53, .2);
}
.hw-phone-screen img {
  position: absolute; inset: 0; opacity: 0; transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.hw-phone-screen img.is-active { opacity: 1; transform: none; }
.hw-tabs { display: flex; gap: 6px; background: var(--color-white); border: 1px solid var(--color-border); border-radius: 999px; padding: 4px; }
.hw-tab {
  border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  font: 700 .8125rem var(--font-body); color: var(--color-text); transition: background var(--transition), color var(--transition);
}
.hw-tab[aria-selected="true"] { background: var(--color-primary); color: var(--color-white); }

/* Scroll reveal: only when JS runs, and never with reduced motion. */
.js .hw-step > :not(.hw-num) { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .hw-step .hw-media { transition-delay: .12s; }
.js .hw-step.is-visible > :not(.hw-num) { opacity: 1; transform: none; }

/* ── Good to know + final CTA ───────────────────────────────── */
.hw-good { padding-block: 64px; background: var(--color-white); }
.hw-good h2 { text-align: center; }
.hw-good-grid { display: grid; gap: 16px; margin-top: 32px; }
.hw-good-item { background: var(--color-bg); border-radius: var(--radius-md); padding: 20px; }
.hw-good-item h3 { font-size: 1rem; display: flex; gap: 8px; align-items: center; }
.hw-good-item p { margin-top: 6px; font-size: .9375rem; opacity: .85; }
.hw-good-more { text-align: center; margin-top: 28px; }
.hw-good-more a { color: var(--color-primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.hw-cta { padding-block: 72px; text-align: center; background: var(--color-primary); color: var(--color-white); scroll-margin-top: 73px; }
.hw-cta p { margin: 12px auto 28px; max-width: 480px; opacity: .9; }

@media (min-width: 900px) {
  .hw-hero-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .hw-step { grid-template-columns: 1fr 1fr; align-items: center; padding-left: 96px; padding-bottom: 96px; }
  .hw-num { top: 50%; margin-top: -22px; }
  .hw-good-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .hw-hero { padding-block: 40px 32px; }
  .hw-hero-cta .btn { flex: 1 1 100%; }
  /* Narrower rail so the text column keeps a comfortable width. */
  .hw-steps::before, .hw-steps::after { left: 16px; top: 18px; }
  .hw-steps::before { bottom: 18px; }
  .hw-steps::after { height: calc((100% - 36px) * var(--hw-progress, 0)); }
  .hw-step { padding: 0 0 56px 50px; gap: 20px; }
  .hw-num { width: 35px; height: 35px; font-size: 1rem; }
  .hw-step.is-current .hw-num { box-shadow: 0 0 0 4px rgba(240, 120, 86, .18); }
  .hw-text p { font-size: 1rem; }
  .hw-phone-screen { width: min(100%, 250px); border-width: 6px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .hw-step > :not(.hw-num) { opacity: 1; transform: none; transition: none; }
  .hw-phone-screen img, .hw-steps::after, .hw-num { transition: none; }
}
