/* ===== אתר עימוד ספרים: אותם צבעים וגופן כמו אתר בניית האתרים (style.css), ועיצוב לחלקים החדשים ===== */
.page-imud { background: #fff; }
.page-imud .topbar { position: absolute; }
.page-imud .container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- פתיחה: אותו רקע לילה עם ציפורים ---------- */
.ihero {
  position: relative; min-height: max(560px, 92vh); display: grid; place-items: center; text-align: center;
  padding: 150px 16px 90px; color: #fff;
  background: linear-gradient(180deg, rgba(0, 85, 130, .6), rgba(0, 105, 145, .5)), url("../images/hero-bg-birds-night.jpg") center / cover no-repeat, #071a2e;
  background-blend-mode: multiply, normal, normal;
}
.ihero__inner { max-width: 1180px; display: flex; flex-direction: column; align-items: center; }
.ihero__icon {
  width: clamp(160px, 18vw, 240px); height: auto; padding: 18px 22px; border-radius: 24px; margin-bottom: 18px;
  background: rgba(255, 255, 255, .92); box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.ihero__title { margin: 0 0 18px; font-size: clamp(38px, 5.6vw, 80px); font-weight: 700; line-height: 1.12; text-shadow: 0 3px 18px rgba(0, 0, 0, .45); }
.ihero__sub { margin: 0 auto 30px; max-width: 640px; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.55; }
.ihero__btn {
  display: inline-flex; align-items: center; min-height: 56px; padding: 0 34px; border-radius: 999px; text-decoration: none;
  color: var(--blue); font-size: 20px; font-weight: 700; border: 2px solid transparent;
  background: linear-gradient(#f2f5f7, #f2f5f7) padding-box, linear-gradient(90deg, #d0162d, #4eaa48 50%, #006482) border-box;
  transition: transform .2s, box-shadow .2s;
}
.ihero__btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.ihero__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.isec__sub { margin: 10px 0 34px; font-size: clamp(18px, 1.5vw, 22px); color: rgba(255, 255, 255, .9); }
.isec__sub--dark { color: #3b5260; }

/* ---------- כריכות: על רקע כחול-טורקיז כמו בתמונות עצמן ---------- */
.icovers { padding: clamp(70px, 9vw, 120px) 0; background: linear-gradient(170deg, #003f53, #006482 55%, #0a7a73); color: #fff; }
.icovers__title { color: #fff; }
.igrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 44%), 1fr)); gap: clamp(14px, 2vw, 26px); }
.igrid__item button, .ibook__page button {
  display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: #00546b;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
}
.igrid__item img, .ibook__page img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 1098; object-fit: cover; }
.igrid__item button:hover, .ibook__page button:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 18px 34px rgba(0, 0, 0, .4); }
.igrid__item button:focus-visible, .ibook__page button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- עימוד פנימי: לשונית לכל ספר ---------- */
.ipages { padding: clamp(70px, 9vw, 120px) 0; }
.itabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.itab {
  min-height: 46px; padding: 0 22px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 18px; font-weight: 700;
  color: var(--blue); border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #d0162d, #4eaa48 50%, #006482) border-box;
}
.itab[aria-selected="true"] { color: #fff; background: linear-gradient(90deg, #b3122a, #3d8a39 50%, #006482) border-box; }
.itab:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.ibook:focus-visible { outline: 3px solid var(--blue); outline-offset: 6px; border-radius: 12px; }
.ibook__pages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 44%), 1fr)); gap: clamp(14px, 2vw, 24px); }

/* ---------- מה אני עושה ---------- */
.iwhat { padding: 0 0 clamp(70px, 9vw, 120px); }
.iwhat__list { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 22px; }
.iwhat__item { position: relative; padding: 30px 26px 26px; }
.iwhat__num {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; margin-bottom: 14px;
  font-size: 24px; font-weight: 900; color: #fff; background: var(--brand-gradient);
}
.iwhat__item h3 { margin: 0 0 8px; font-size: 24px; color: var(--blue); }
.iwhat__item p { margin: 0; font-size: 18px; line-height: 1.55; color: #3b5260; }

/* ---------- צור קשר ---------- */
.icontact {
  padding: clamp(80px, 10vw, 130px) 0; color: #fff;
  background: linear-gradient(180deg, rgba(0, 60, 90, .7), rgba(0, 40, 70, .85)), url("../images/sites-bg-birds-on-wire.jpg") center / cover no-repeat, #071a2e;
}
.icontact__inner { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 60px; align-items: center; }
.icontact__sub { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.55; margin: 16px 0 0; }
.icontact__form { padding: 34px 32px 28px; color: #1d3a47; display: grid; gap: 14px; }
.ifield { display: grid; gap: 5px; }
.ifield label { font-size: 16px; font-weight: 700; color: var(--blue); }
.ifield input, .ifield textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid #c3cfd5; border-radius: 12px; background: #fff;
  font: inherit; font-size: 18px; color: #1d3a47; resize: vertical;
}
.ifield input:focus-visible, .ifield textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 100, 130, .25); }
.ifield.is-bad input, .ifield.is-bad textarea { border-color: var(--red); }
.iconsent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: #3b5260; }
.iconsent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--blue); }
.iconsent.is-bad { color: var(--red); }
.iconsent a { color: var(--blue); }
.icontact__form .contact__send { margin-top: 6px; }
.icontact__status { margin: 0; min-height: 1.4em; text-align: center; font-size: 17px; }
.icontact__status.is-ok { color: #2e7d32; font-weight: 700; }
.icontact__status.is-err { color: var(--red); }

/* ---------- תצוגה מוגדלת ---------- */
.ibox { position: fixed; inset: 0; z-index: 8000; display: grid; place-items: center; padding: 60px 70px 70px; background: rgba(4, 20, 30, .92); }
.ibox[hidden] { display: none; }
.ibox__img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.ibox__cap { position: absolute; bottom: 20px; left: 0; right: 0; margin: 0; text-align: center; color: #fff; font-size: 17px; }
.ibox button { display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; background: rgba(255, 255, 255, .92); color: var(--blue); font-weight: 700; }
.ibox__close { position: absolute; top: 16px; left: 16px; width: 48px; height: 48px; font-size: 28px; }
.ibox__nav { position: absolute; top: 50%; translate: 0 -50%; width: 52px; height: 52px; font-size: 34px; line-height: 1; }
.ibox__nav--prev { right: 14px; }
.ibox__nav--next { left: 14px; }
.ibox button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

@media (max-width: 900px) {
  .icontact__inner { grid-template-columns: 1fr; gap: 30px; }
  .icontact__form { padding: 26px 20px 22px; }
  .ibox { padding: 70px 12px 80px; }
  .ibox__nav { top: auto; bottom: 14px; translate: none; }
}
@media (prefers-reduced-motion: reduce) { .igrid__item button, .ibook__page button { transition: none; } }
/* the hidden anti-bot field: hidden from people, without making the page scroll sideways */
.page-imud .contact__trap { position: absolute; left: auto; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; }

/* ---------- "ספר ברמת על.": אותיות חלולות עם מסגרת במעבר צבעים, שמצטיירות לאט ---------- */
.ihero__big { margin: 0 auto 18px; width: min(1180px, 92vw); line-height: 0; font-size: inherit; }
.ihero__draw { display: block; width: 100%; height: auto; overflow: visible; }
.ihero__draw path {
  font-family: "Birzia", Arial, sans-serif; font-weight: 900; font-size: 158px;
  fill: transparent; stroke: url(#drawGrad); stroke-width: 3.6; stroke-linejoin: round;
  stroke-dasharray: 1500; stroke-dashoffset: 1500;
  animation: ihero-draw 3.4s cubic-bezier(.5, 0, .3, 1) .5s forwards;
  filter: drop-shadow(0 0 8px rgba(120, 220, 110, .45)) brightness(1.35);
}
@keyframes ihero-draw { to { stroke-dashoffset: 0; } }
.ihero__title { font-size: clamp(32px, 4.2vw, 60px); margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .ihero__draw path { animation: none; stroke-dashoffset: 0; } }
.a11y-still .ihero__draw path { stroke-dashoffset: 0 !important; }
.ihero__l2 path { animation-delay: 1.4s; }
.ihero__draw path { stroke-width: 3; }

/* ---------- "ספרים וחוברות למידה שכיף ללמוד בהם." – גדול, ו"שכיף" מואר ומקפץ קלות ---------- */
.ihero__lead { margin: 0 0 14px; font-size: clamp(26px, 3.2vw, 48px); font-weight: 700; line-height: 1.25; text-shadow: 0 3px 16px rgba(0, 0, 0, .45); }
.ihero__fun {
  display: inline-block; font-size: 1.3em; font-weight: 900; padding: 0 .08em;
  background: linear-gradient(90deg, #ffe27a, #8fe07c 45%, #6fd0ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 226, 122, .55)) drop-shadow(0 0 24px rgba(111, 208, 255, .35));
  animation: ihero-fun 2.6s ease-in-out 4s infinite;
}
@keyframes ihero-fun {
  0%, 100% { transform: translateY(0) rotate(0); }
  20% { transform: translateY(-6px) rotate(-3deg); }
  40% { transform: translateY(0) rotate(2deg); }
  55% { transform: translateY(-2px) rotate(0); }
}
.ihero__sub { max-width: 760px; font-size: clamp(17px, 1.45vw, 21px); color: rgba(255, 255, 255, .9); }
@media (prefers-reduced-motion: reduce) { .ihero__fun { animation: none; } }

/* ===== עדכון: הכותרת מצטיירת, מתמלאת בצבע, מתרוקנת ומצטיירת שוב – בלי סוף (כמו ב-bretler.co.il) ===== */
.ihero__draw path {
  fill: url(#drawGrad); fill-opacity: 0;
  animation: ihero-loop 7s cubic-bezier(.45, 0, .35, 1) .5s infinite;
}
.ihero__l2 path { animation-delay: .9s; }
@keyframes ihero-loop {
  0%   { stroke-dashoffset: 1500; fill-opacity: 0; }
  45%  { stroke-dashoffset: 0;    fill-opacity: 0; }
  60%  { stroke-dashoffset: 0;    fill-opacity: 1; }
  82%  { stroke-dashoffset: 0;    fill-opacity: 1; }
  100% { stroke-dashoffset: -1500; fill-opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ihero__draw path { animation: none; stroke-dashoffset: 0; fill-opacity: 1; } }
.a11y-still .ihero__draw path { stroke-dashoffset: 0 !important; fill-opacity: 1 !important; }

/* "שכיף" באדום של הלוגו, ומהבהבת בעדינות (פחות מפעם בשנייה – בטוח לנגישות) */
.ihero__fun {
  background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #e3243b;
  filter: none; text-shadow: 0 0 10px rgba(208, 22, 45, .8), 0 0 26px rgba(208, 22, 45, .5);
  animation: ihero-blink 1.8s ease-in-out 4s infinite;
}
@keyframes ihero-blink {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(208, 22, 45, .85), 0 0 28px rgba(208, 22, 45, .55); }
  50% { opacity: .45; text-shadow: 0 0 2px rgba(208, 22, 45, .2); }
}
/* the title fills with soft white (a little see-through), the outline stays in the brand gradient */
.ihero__draw path { fill: #fff; }
@keyframes ihero-loop {
  0%   { stroke-dashoffset: 1500; fill-opacity: 0; }
  45%  { stroke-dashoffset: 0;    fill-opacity: 0; }
  60%  { stroke-dashoffset: 0;    fill-opacity: .82; }
  82%  { stroke-dashoffset: 0;    fill-opacity: .82; }
  100% { stroke-dashoffset: -1500; fill-opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ihero__draw path { fill-opacity: .82; } }
.a11y-still .ihero__draw path { fill-opacity: .82 !important; }
/* the two lines under the title, a little bigger, in the same proportion */
.ihero__lead { font-size: clamp(30px, 3.8vw, 58px); }
.ihero__sub { max-width: 900px; font-size: clamp(19px, 1.75vw, 26px); }
/* the title fills with warm yellow (a little see-through) */
.ihero__draw path { fill: #ffd23f; }
.ihero__draw path { fill: #f6b81c; filter: drop-shadow(0 0 8px rgba(255, 200, 60, .35)); }
/* the yellow fill is more see-through */
@keyframes ihero-loop {
  0%   { stroke-dashoffset: 1500; fill-opacity: 0; }
  45%  { stroke-dashoffset: 0;    fill-opacity: 0; }
  60%  { stroke-dashoffset: 0;    fill-opacity: .55; }
  82%  { stroke-dashoffset: 0;    fill-opacity: .55; }
  100% { stroke-dashoffset: -1500; fill-opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ihero__draw path { fill-opacity: .55; } }
.a11y-still .ihero__draw path { fill-opacity: .55 !important; }
/* final: the title fills with white at 30% */
.ihero__draw path { fill: #fff; filter: drop-shadow(0 0 8px rgba(120, 220, 110, .35)); }
@keyframes ihero-loop {
  0%   { stroke-dashoffset: 1500; fill-opacity: 0; }
  45%  { stroke-dashoffset: 0;    fill-opacity: 0; }
  60%  { stroke-dashoffset: 0;    fill-opacity: .3; }
  82%  { stroke-dashoffset: 0;    fill-opacity: .3; }
  100% { stroke-dashoffset: -1500; fill-opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ihero__draw path { fill-opacity: .3; } }
.a11y-still .ihero__draw path { fill-opacity: .3 !important; }
/* the hero stays in place, and the rest of the page scrolls up over it */
.ihero { position: sticky; top: 0; z-index: 0; height: 100vh; height: 100svh; min-height: 560px; }
.page-imud main, .page-imud .footer { position: relative; z-index: 1; }
.page-imud .footer { background: #fff; }
.ipages, .iwhat { background: #fff; }
.icovers { box-shadow: 0 -18px 40px rgba(0, 0, 0, .35); }
/* only the background stays in place: the hero scrolls normally, its picture does not move */
.ihero { position: relative; height: auto; min-height: max(560px, 92vh); background-attachment: fixed, fixed, scroll; }
.icovers { box-shadow: none; }
@media (max-width: 900px), (hover: none) { .ihero { background-attachment: scroll; } }   /* phones: a fixed background jumps, so it scrolls */

/* ===== סרט נע של כריכות, מתחת להירו ===== */
.ireel {
  position: relative; z-index: 1; overflow: hidden; padding: 34px 0 30px;
  background: linear-gradient(180deg, #071a2e, #00405a);
  border-top: 2px solid transparent; border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #d0162d, #4eaa48 50%, #006482) 1;
}
.ireel__view { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ireel__track {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; width: max-content;
  animation: ireel-move 60s linear infinite;
}
.ireel__item { flex: none; width: clamp(130px, 13vw, 200px); }
.ireel__item img {
  display: block; width: 100%; height: auto; aspect-ratio: 800 / 1098; object-fit: cover; border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45); transition: transform .35s;
}
.ireel__item img:hover { transform: translateY(-6px) scale(1.04); }
/* RTL: the strip moves to the right; it moves by half its length, then starts again seamlessly */
@keyframes ireel-move { from { transform: translateX(0); } to { transform: translateX(50%); } }
.ireel:hover .ireel__track, .ireel.is-paused .ireel__track, .ireel:focus-within .ireel__track { animation-play-state: paused; }
.ireel__pause {
  position: absolute; top: 8px; left: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 30px;
  background: rgba(0, 0, 0, .35); color: #fff; font: inherit; font-size: 14px; cursor: pointer;
}
.ireel__pause:hover { background: rgba(0, 0, 0, .55); }
.ireel__pause:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ireel__ico { font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .ireel__track { animation: none; } }
.a11y-still .ireel__track { animation: none !important; }
/* the reel on a white background */
.ireel { background: #fff; }
.ireel__item img { box-shadow: 0 10px 22px rgba(0, 40, 60, .22); }
.ireel__pause { background: #fff; color: var(--blue); border-color: var(--blue); }
.ireel__pause:hover { background: #eef5f7; }
.ireel__pause:focus-visible { outline-color: var(--blue); }
.ireel { padding: 56px 0 34px; }

/* the reel shows the books themselves (no background): same height for all, a soft shadow under each book */
.ireel__track { align-items: flex-end; gap: 34px; }
.ireel__item { width: auto; }
.ireel__item img {
  width: auto; height: clamp(170px, 17vw, 260px); aspect-ratio: auto; object-fit: contain; border-radius: 0;
  box-shadow: none; filter: drop-shadow(0 12px 14px rgba(0, 40, 60, .25));
}

/* ===== the reel has no background of its own: it sits at the bottom of the hero, over the night sky ===== */
.ihero { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 40px; padding-bottom: 40px; }
.ihero__inner { align-self: center; }
.ireel { background: none; border: 0; border-image: none; padding: 46px 0 0; }
.ireel__track { align-items: stretch; gap: 26px; }
.ireel__item { width: clamp(120px, 11vw, 180px); }
.ireel__item img {
  width: 100%; height: auto; aspect-ratio: 800 / 1098; object-fit: cover; border-radius: 10px;
  filter: none; box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
}
.ireel__pause { top: 6px; background: rgba(0, 0, 0, .35); color: #fff; border-color: rgba(255, 255, 255, .55); }
.ireel__pause:hover { background: rgba(0, 0, 0, .55); }
.ireel__pause:focus-visible { outline-color: #fff; }
.ireel__pause { left: auto; right: 16px; }   /* away from the accessibility button in the left corner */
/* the gradient frame lines above and below the strip are back (the strip itself stays without a background) */
.ireel {
  padding: 46px 0 30px; margin-top: 10px;
  border-top: 2px solid transparent; border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #d0162d, #4eaa48 50%, #006482) 1;
}
/* the strip sits at the very bottom of the hero: its lower frame line is the hero's bottom edge */
.ihero { padding-bottom: 0; justify-content: flex-start; }
.ihero__inner { margin-block: auto; }
.ireel { margin-top: 40px; }

/* the strip shows the 3D mockups (transparent, with their own shadow and reflection) */
.ireel__track { gap: 0; align-items: flex-end; }
.ireel__item { width: clamp(150px, 14vw, 230px); margin-inline: -12px; }
.ireel__item img { width: 100%; height: auto; aspect-ratio: 1000 / 1360; object-fit: contain; border-radius: 0; box-shadow: none; filter: none; }
.ireel { padding-top: 40px; padding-bottom: 0; }
/* the hardcover books are 800x1098 pictures: same height as the booklets */
.ireel__item img[src*='maayanei'], .ireel__item img[src*='imrot'], .ireel__item img[src*='yarum'], .ireel__item img[src*='siftotav'], .ireel__item img[src*='hafachta'] { aspect-ratio: 800 / 1098; transform: translateY(-9%) scale(.88); transform-origin: 50% 100%; }

/* ===== התהליך: 7 ריבועים עם גלילה לרוחב, על רקע לבן ===== */
.iprocess { height: 1150vh; --cw: min(62vh, 560px, 84vw); --ch: min(62vh, 560px); background: #fff; }
@media (min-width: 901px) { .iprocess .hstep { aspect-ratio: 1; } }
.iprocess .hstep__inner p { font-size: clamp(16px, 1.15vw, 19px); line-height: 1.6; }
.iprocess .hstep__goal { padding-top: 6px; color: #c91f2c; }
.iprocess .hstep__goal strong { color: var(--blue); }
@media (min-width: 901px) {
  .iprocess { --cw: min(58vh, 540px, 84vw); --ch: min(58vh, 540px); }
  .iprocess .hstep__inner { height: 100%; display: flex; flex-direction: column; justify-content: center; }
  .iprocess .hstep__inner p { font-size: clamp(17px, 1.3vw, 21px); }
}
@media (max-width: 900px) { .iprocess .hstep { min-height: 0; } }

/* ===== כך זה נראה מבפנים: סוויצ'ר ספרים / חוברות ===== */
.iswitch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 26px;
  padding: 5px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #d0162d, #4eaa48 50%, #006482) border-box;
  box-shadow: 0 8px 22px -12px rgba(0, 60, 90, .35);
}
.iswitch__thumb { /* הכדור הצבעוני שזז בין שתי האפשרויות */
  position: absolute;
  top: 5px; bottom: 5px;
  right: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: linear-gradient(90deg, #b3122a, #3d8a39 50%, #006482);
  box-shadow: 0 6px 16px -6px rgba(0, 60, 90, .55);
  transition: transform .45s cubic-bezier(.65, 0, .25, 1.3);
}
.iswitch[data-kind="booklet"] .iswitch__thumb { transform: translateX(-100%); }
.iswitch__opt {
  position: relative;
  z-index: 1;
  min-height: 50px;
  padding: 0 clamp(20px, 2.4vw, 34px);
  border: 0;
  background: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: clamp(17px, 1.3vw, 20px);
  font-weight: 700;
  color: var(--blue);
  transition: color .3s;
}
.iswitch__opt[aria-checked="true"] { color: #fff; }
.iswitch__opt:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.iswitch + .itabs { margin-top: 4px; }
.ibook__pages { animation: ipages-in .45s ease; }
@keyframes ipages-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .iswitch__thumb { transition: none; } .ibook__pages { animation: none; } }

/* ===== כך זה נראה מבפנים: אותו רקע כהה כמו בתצוגת האתרים באתר הראשי ===== */
.ipages {
  position: relative;
  background:
    radial-gradient(ellipse 55% 30% at 50% 22%, rgba(40, 80, 110, .25), transparent 70%),
    linear-gradient(180deg, rgba(2, 8, 14, .88) 0%, rgba(4, 14, 24, .74) 35%, rgba(4, 12, 20, .62) 60%, rgba(2, 6, 12, .85) 100%),
    #050b12 url("../images/sites-bg-birds-on-wire.jpg") center / cover no-repeat;
  box-shadow: var(--shadow);
  text-align: center;
}
.ipages .section-title { color: #fff; text-align: center; }
.ipages .isec__sub--dark { color: rgba(255, 255, 255, .88); }
.ipages .itabs { justify-content: center; }
.ipages .ibook__pages { text-align: start; }
.ipages .itab:focus-visible, .ipages .iswitch__opt:focus-visible, .ipages .ibook:focus-visible { outline-color: #fff; }

/* ===== חוברת שמדפדפים בה ===== */
.iflip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 24px);
  margin-top: 6px;
}
.iflip__book {
  --bw: min(1240px, calc(100vw - 180px), calc((100vh - 150px) * 1428 / 1019));
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: var(--bw);
  aspect-ratio: 1428 / 1019;
  perspective: 2600px;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
.iflip__book.is-swap { animation: iflip-in .5s ease; }
@keyframes iflip-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.iflip__book:focus-visible { outline: 3px solid #fff; outline-offset: 8px; }
.iflip__page, .iflip__face { position: relative; overflow: hidden; background: #fff; }
.iflip__page--r { border-radius: 0 6px 6px 0; }
.iflip__page--l { border-radius: 6px 0 0 6px; }
.iflip__page img, .iflip__face img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.iflip__blank { display: block; width: 100%; height: 100%; background: #f4f6f7; }
/* צל עדין של השדרה באמצע */
.iflip__page::after, .iflip__face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.iflip__page--r::after { background: linear-gradient(to left, transparent 88%, rgba(0, 0, 0, .16)); }
.iflip__page--l::after { background: linear-gradient(to right, transparent 88%, rgba(0, 0, 0, .16)); }

/* הדף שמתהפך */
.iflip__leaf {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  z-index: 3;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.45, .05, .3, 1);
}
.iflip__leaf--l { left: 0; transform-origin: right center; }
.iflip__leaf--l.is-turn { transform: rotateY(180deg); }
.iflip__leaf--r { right: 0; transform-origin: left center; }
.iflip__leaf--r.is-turn { transform: rotateY(-180deg); }
.iflip__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.iflip__face--back { transform: rotateY(180deg); }
.iflip__leaf .iflip__face { box-shadow: 0 0 30px rgba(0, 0, 0, .25); }

.iflip__nav {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #d0162d, #4eaa48 50%, #006482) border-box;
  color: var(--blue);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s, opacity .2s;
}
.iflip__nav span { margin-top: -6px; }
.iflip__nav:hover:not(:disabled) { transform: scale(1.08); }
.iflip__nav:disabled { opacity: .3; cursor: default; }
.iflip__nav:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.iflip__info { margin: 18px 0 0; color: rgba(255, 255, 255, .88); font-size: 18px; }

/* טלפון: עמוד אחד, החצים מתחת */
@media (max-width: 700px) {
  .iflip { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 16px 34px; }
  .iflip__book { order: -1; grid-column: 1 / -1; justify-self: center; --bw: min(calc(100vw - 32px), calc((100vh - 230px) * 714 / 1019)); grid-template-columns: 1fr; aspect-ratio: 714 / 1019; }
  .iflip__page--r { border-radius: 6px; }
  .iflip__page--r::after { background: linear-gradient(to left, transparent 94%, rgba(0, 0, 0, .14)); }
  .iflip__page--l { display: none; }
  .iflip__leaf--one { left: 0; width: 100%; transform-origin: right center; }
  .iflip__leaf--one.is-turn { transform: rotateY(180deg); }
}
@media (prefers-reduced-motion: reduce) { .iflip__book.is-swap { animation: none; } .iflip__leaf { transition: none; } }
.iflip { margin-top: 34px; }
.iflip__blank { background: #fff; }

/* ===== תחומי התמחות: כרטיסים במניפה ===== */
.ispec { padding: clamp(70px, 9vw, 120px) 0 clamp(80px, 10vw, 140px); background: #fff; overflow: hidden; }
.ispec .section-title { text-align: center; }
.ispec__list {
  list-style: none;
  margin: clamp(40px, 5vw, 70px) 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
.ispec__card {
  --c: #006482;
  position: relative;
  flex: none;
  width: clamp(210px, 17vw, 260px);
  aspect-ratio: 3 / 4;
  margin-inline: clamp(-22px, -1.4vw, -12px); /* הכרטיסים חופפים מעט, כמו מניפה */
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  background: var(--c);
  border-radius: 20px;
  box-shadow: 0 18px 34px -16px rgba(0, 40, 60, .55);
  transform-origin: 50% 100%;
  will-change: transform;
  transition: box-shadow .3s;
}
.ispec__card::before { /* קו לבן עדין בתוך הכרטיס */
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid rgba(255, 255, 255, .45);
  border-radius: 14px;
  pointer-events: none;
}
/* המניפה: סיבוב וגובה לכל כרטיס (הכרטיסים שבקצוות נמוכים ומסובבים יותר) */
.ispec__card:nth-child(1) { --c: #006482; --rot: 12; --lift: 34; }
.ispec__card:nth-child(2) { --c: #2f7d2b; --rot: 4;  --lift: 0; }
.ispec__card:nth-child(3) { --c: #c91f2c; --rot: -4; --lift: 0; }
.ispec__card:nth-child(4) { --c: #236382; --rot: -12; --lift: 34; }
.ispec__icon { width: clamp(64px, 5.2vw, 84px); height: auto; margin: 6px 0 14px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ispec__card h3 { margin: 0 0 10px; font-size: clamp(21px, 1.6vw, 25px); line-height: 1.2; color: #fff; }
.ispec__card p { margin: 0; font-size: clamp(16px, 1.1vw, 18px); line-height: 1.5; color: rgba(255, 255, 255, .92); }
/* אחרי שהמניפה נפתחה: כרטיס מתרומם במעבר עכבר */
.ispec__list.is-open .ispec__card:hover { z-index: 5; box-shadow: 0 28px 44px -16px rgba(0, 40, 60, .6); }
.ispec__list.is-open .ispec__card:hover::before { border-color: #fff; }

/* טלפון וטבלט צר: שני כרטיסים בשורה, בלי סיבוב גדול */
@media (max-width: 760px) {
  .ispec__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ispec__card { width: auto; margin: 0; aspect-ratio: auto; min-height: 250px; padding: 20px 14px 18px; }
  .ispec__card:nth-child(1) { --rot: 3; --lift: 0; }
  .ispec__card:nth-child(2) { --rot: -3; --lift: 0; }
  .ispec__card:nth-child(3) { --rot: 2; --lift: 0; }
  .ispec__card:nth-child(4) { --rot: -2; --lift: 0; }
  .ispec__icon { width: 54px; margin: 2px 0 10px; }
  .ispec__card h3 { font-size: 19px; }
  .ispec__card p { font-size: 15px; }
}
/* החלק ננעל במסך בזמן שהמניפה נפתחת ונסגרת */
.ispec { height: 190vh; padding: 0; overflow: visible; }
.ispec__stage { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.ispec__stage .ispec__list { padding-bottom: 40px; }
@media (prefers-reduced-motion: reduce) {
  .ispec { height: auto; padding: clamp(70px, 9vw, 120px) 0; }
  .ispec__stage { position: static; height: auto; overflow: visible; }
}
/* סבב 2: פחות חלל לבן, כותרת קרובה לכרטיסים, כרטיסים גדולים יותר */
.ispec { height: 165vh; }
.ispec .section-title { margin-bottom: 0; }
.ispec__stage .ispec__list { margin-top: clamp(18px, 2.4vw, 34px); padding-bottom: 30px; }
@media (min-width: 761px) { .ispec__card { width: clamp(230px, 18.5vw, 290px); } }
.ispec .section-title { position: relative; z-index: 6; }

/* סבב 3: בלי נעילה – החלק בגובה התוכן, עם מעט רווח */
.ispec { height: auto; padding: clamp(36px, 4vw, 60px) 0 clamp(50px, 5vw, 80px); overflow-x: clip; overflow-y: visible; }
.ispec__stage { position: static; height: auto; overflow: visible; display: block; }
.ispec__stage .ispec__list { padding-bottom: 20px; }

/* פוטר צר: במחשב כפתור הנגישות בפינה ולא מסתיר את הטקסט, אז אין צורך במקום שמור מתחת */
.page-imud .footer { padding: 14px 0; }
@media (max-width: 760px) { .page-imud .footer { padding: 14px 70px 18px; } }

/* ===== תחומי התמחות מהניהול: כל מספר של כרטיסים ===== */
/* הסיבוב והגובה של כל כרטיס מחושבים בקוד (--rot-d, --lift-d), והצבעים מתחלפים בסבב */
.ispec__list .ispec__card:nth-child(n) { --rot: var(--rot-d, 0); --lift: var(--lift-d, 0); }
.ispec__list .ispec__card:nth-child(4n+1) { --c: #006482; }
.ispec__list .ispec__card:nth-child(4n+2) { --c: #2f7d2b; }
.ispec__list .ispec__card:nth-child(4n+3) { --c: #c91f2c; }
.ispec__list .ispec__card:nth-child(4n+4) { --c: #236382; }
@media (min-width: 761px) {
  .ispec__list .ispec__card { width: min(clamp(230px, 18.5vw, 290px), calc(94vw / var(--n, 4) + 24px)); }
}
@media (max-width: 760px) {
  .ispec__list .ispec__card:nth-child(odd) { --rot: 3; --lift: 0; }
  .ispec__list .ispec__card:nth-child(even) { --rot: -3; --lift: 0; }
}
/* מתחת לחוברת המדפדפת: השם, התיאור ומספרי העמודים */
.iflip__info { display: grid; gap: 4px; justify-items: center; }
.iflip__name { color: #fff; font-size: 20px; }
.iflip__desc { max-width: 680px; color: rgba(255, 255, 255, .9); font-size: 17px; line-height: 1.5; }
.iflip__count { color: rgba(255, 255, 255, .7); font-size: 15px; }

/* אייקון שהועלה בניהול (SVG או PNG): נצבע בלבן כמו שאר האייקונים */
.ispec__icon--img { aspect-ratio: 1; height: auto; object-fit: contain; filter: brightness(0) invert(1); }
.iprocess { height: calc(var(--n, 7) * 164vh); } /* אורך הגלילה לפי מספר השלבים */

/* the title is drawn as shapes (works in Safari too); the colours run along each line */
.ihero__l1 path { stroke: url(#drawGrad1); }
.ihero__l2 path { stroke: url(#drawGrad2); }
