/* ===== התהליך – גרסה 2: גלילה לרוחב =====
   החלק "ננעל" במסך, ובכל גלילה למטה הכרטיסים זזים לרוחב (מימין לשמאל)
   ומתגלה שלב נוסף. הציפור עפה מכרטיס לכרטיס. */

.hprocess {
  position: relative;
  z-index: 2;
  height: 560vh; /* כמה "גלילה" החלק לוקח – כולל זמן קריאה לכל כרטיס */
  --cw: min(80vw, 1500px);  /* רוחב כרטיס – פרוס לרוחב המסך */
  --ch: min(40vh, 400px);  /* גובה מינימלי – הכרטיס גדל לפי הטקסט */
}
.hprocess__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--white);
}

.hprocess__head {
  position: absolute;
  top: 7vh;
  right: 10vw;
  z-index: 3;
}
.hprocess__title {
  font-size: max(30px, 2.2vw);
  font-weight: 700;
  color: #236382;
  line-height: 1.1;
}
.hprocess__kicker {
  margin-top: .5em;
  font-size: max(22px, 1.5vw);
  font-weight: 300;
  color: #c91f2c;
}

/* נקודות התקדמות 1-2-3 */
.hprocess__dots {
  position: absolute;
  top: 9vh;
  left: 10vw;
  z-index: 3;
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hprocess__dots li {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #c9d6dd;
  color: #5f7480; /* כהה מספיק לקריאה (נגישות) */
  font-size: 16px;
  font-weight: 700;
  transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.hprocess__dots li.is-active {
  background: #c91f2c;
  border-color: #c91f2c;
  color: #fff;
  transform: scale(1.12);
}

/* מסילת הכרטיסים – המיקום של כל כרטיס נקבע ב-JS */
.hprocess__track {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hstep {
  position: absolute;
  top: 26vh;
  left: 0;
  width: var(--cw);
  min-height: var(--ch);
  will-change: transform, opacity;
  transform-origin: 50% 60%;
}
.hstep__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hstep__frame path {
  fill: #fff;
  stroke: url(#frame-gradient);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
/* מספר השלב: מחוץ לכרטיס, על הצד השמאלי, בתוך עיגולים מסתובבים */
.hstep { --badge: clamp(130px, 11vw, 210px); }
.hstep__badge {
  position: absolute;
  top: 50%;
  left: calc(var(--badge) * -0.5);
  z-index: 2;
  width: var(--badge);
  height: var(--badge);
  translate: 0 -50%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.hstep__rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hstep__rings .ring { transform-box: view-box; transform-origin: 50% 50%; }
.hstep__rings .ring--a { animation: ring-spin 14s linear infinite; animation-delay: var(--spin-delay, 0s); }
.hstep__rings .ring--b { animation: ring-spin 9s linear infinite reverse; animation-delay: var(--spin-delay, 0s); }
.hstep__rings .ring--c { animation: ring-spin 6s linear infinite; animation-delay: var(--spin-delay, 0s); }
.hstep__rings .ring--dots { animation: ring-spin 40s linear infinite reverse; }
.hstep__rings .orb { filter: drop-shadow(0 0 4px currentColor); }
.hstep__rings .orb--blue { fill: #006482; color: #006482; }
.hstep__rings .orb--red { fill: #d0162d; color: #d0162d; }
.hstep__rings .orb--green { fill: #4eaa48; color: #4eaa48; }
.hstep__rings .disc { /* עיגול לבן במרכז שנושם בעדינות */
  fill: #fff;
  stroke: rgba(0, 100, 130, .12);
  stroke-width: 1;
  filter: drop-shadow(0 6px 14px rgba(0, 60, 90, .15));
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: disc-breathe 3.2s ease-in-out infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes disc-breathe { 50% { transform: scale(1.05); } }
.hstep__badge-num {
  position: relative;
  font-size: calc(var(--badge) * 0.4);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #006482, #4eaa48 55%, #d0162d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hstep__inner {
  position: relative;
  padding: clamp(28px, 2.6vw, 52px) clamp(22px, 2.2vw, 44px);
  font-size: clamp(14px, .92vw, 19px);
  font-weight: 300;
  line-height: 1.5;
  color: #236382;
}
.hstep__title {
  text-align: center;
  font-size: clamp(19px, 1.4vw, 28px);
  font-weight: 300;
  line-height: 1.2;
  color: #c91f2c;
  margin-bottom: clamp(12px, 1vw, 20px);
}
.hstep__inner p { margin-bottom: .5em; }

/* מילים שמתכהות עם הגלילה */
.rw {
  color: #c4d2da;
  transition: color .35s ease;
}
.rw.is-on { color: inherit; }
.hstep__inner ul { margin: 0 0 .5em; padding: 0; list-style: none; }

/* כרטיס רחב: טור אחד, פונט גדול */
@media (min-width: 901px) {
  .hstep__inner {
    padding-inline: clamp(40px, 5vw, 110px);
    padding-left: calc(var(--badge) * 0.5 + clamp(24px, 3vw, 60px)); /* מקום לעיגול של המספר */
    padding-block: clamp(36px, 3.4vw, 64px);
    font-size: clamp(18px, 1.45vw, 28px);
  }
  .hstep__title { font-size: clamp(26px, 2.1vw, 40px); }
  .hstep__inner ul { margin-top: .6em; }
  .hstep__inner li {
    position: relative;
    padding-inline-start: 1.1em;
    margin-bottom: .6em;
  }
  .hstep__inner li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .62em;
    width: .4em;
    height: .4em;
    border-radius: 50%;
    background: #4eaa48;
  }
}

/* הציפור */
.hbird {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: min(11vw, 200px);
  aspect-ratio: 470 / 290;
  pointer-events: none;
  will-change: transform;
}
.hbird img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  transition: opacity .15s linear;
}
.hbird__fly { opacity: 0; }
.hbird.is-flying .hbird__stand { opacity: 0; }
.hbird.is-flying .hbird__fly { opacity: 1; animation: hbird-flap .16s ease-in-out infinite alternate; }
.hbird:not(.is-flying) .hbird__stand { animation: hbird-idle 2.4s ease-in-out infinite; }
@keyframes hbird-flap { from { scale: 1 1; } to { scale: 1.03 .78; } }
@keyframes hbird-idle { 0%, 100% { rotate: 0deg; } 50% { rotate: -3deg; } }

.hprocess__hint {
  position: absolute;
  bottom: 4vh;
  left: 50%;
  translate: -50% 0;
  font-size: 18px;
  color: #5f7480; /* כהה מספיק לקריאה (נגישות) */
  animation: hint-bob 1.6s ease-in-out infinite;
}
@keyframes hint-bob { 50% { translate: -50% 6px; } }

/* טלפון / הפחתת תנועה: בלי גלילה לרוחב – כרטיסים אחד מתחת לשני */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .hprocess { height: auto; }
  .hprocess__sticky { position: static; height: auto; overflow: visible; padding: 40px 16px 56px; }
  .hprocess__head { position: static; margin-bottom: 24px; }
  .hprocess__dots, .hprocess__hint, .hbird { display: none; }
  .hprocess__track { position: static; display: grid; gap: 24px; }
  .hstep { position: relative; top: auto; width: auto; height: auto; transform: none !important; opacity: 1 !important; }
  .hstep__frame path { stroke-dashoffset: 0 !important; }
  .hstep__inner { padding: 28px 24px 20px; font-size: 17px; opacity: 1 !important; }
  .hstep__title { font-size: 22px; margin-bottom: 12px; }
  .hstep { --badge: 110px; margin-top: 50px; }
  .hstep__badge { top: calc(var(--badge) * -0.45); left: 50%; translate: -50% 0; }
  .hstep__inner { padding-top: 70px; }
  .rw { color: inherit; }
}

/* ===== מסגרת מסתובבת במעבר עכבר (כמו בדף הבית באתר הקיים) ===== */
@property --rotate {
  syntax: "<angle>";
  initial-value: 132deg;
  inherits: false;
}
@keyframes hstep-spin { to { --rotate: 492deg; } }

.hstep::before,
.hstep::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--rotate), #d0162d, #4eaa48 43%, #006482);
  opacity: 0;
  transition: opacity .4s ease;
}
.hstep::before { /* קו המסגרת הצבעוני – מציץ מסביב לכרטיס */
  inset: -3px;
  border-radius: 23px;
}
.hstep::after { /* זוהר רך מתחת לכרטיס */
  inset: 12% 6% -6%;
  border-radius: 30px;
  filter: blur(40px);
  transform: scale(.92);
}
.hstep:hover::before,
.hstep:hover::after {
  opacity: 1;
  animation: hstep-spin 2.5s linear infinite;
}
.hstep:hover::after { opacity: .55; }
@media (prefers-reduced-motion: reduce) {
  .hstep__rings .ring, .hstep__rings .disc { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hstep:hover::before, .hstep:hover::after { animation: none; }
}
