/* Shared internal-page opening.
   Reference: 478px wide, banner y=88, 18px side margins, 42px corners.
   The 94px logo and 112px cream plate share a centre at y=65. The banner
   subtracts that same circle (centre 23px above its edge); no per-page notch.
   Page content remains in its original files. */
@media (min-width:1025px) {
  body.internal-page { --internal-banner-width:min(1465px,calc(100% - 48px)); }
  /* Pages without the activity fit-canvas flow naturally. The four activity
     pages keep their Figma fit-to-screen canvas (activity-hero.css/js): the
     whole first area scales so it ends inside the first screen. */
  body.internal-page:not(:has(.ah-fit-canvas)) .ah { margin:0 !important; padding:0 !important; }
  body.internal-page:not(:has(.ah-fit-canvas)) :is(.ah-fit-shell,.ah-fit-canvas) { position:relative !important; inset:auto !important; width:100% !important; height:auto !important; transform:none !important; margin-inline:auto !important; }
  /* Inside the scaled canvas the banner is authored in design px: divide by the
     scale so the visible width, notch radius and notch offset stay identical
     to the other internal pages. */
  body.internal-page:has(.ah-fit-canvas) { --iph-d-notch-r:calc((var(--iph-d-plate) / 2 + 1px + var(--iph-d-ring)) / var(--ah-fit-scale,1)); --iph-d-notch-y:calc((-27px + var(--iph-d-raise)) / var(--ah-fit-scale,1)); --iph-d-clear:calc(12px / var(--ah-fit-scale,1)); }
  body.internal-page:has(.ah-fit-canvas) { --iph-fit-w:calc(var(--internal-banner-width) / var(--ah-fit-scale,1)); }
  /* 15.9.2026: ברירות המחדל של activity-hero.css (36px ו-92px) שייכות
     לפריסה הישנה. עד שהסקריפט רץ, הבאנר צויר 56px נמוך מדי והחיתוך
     לא ישב על הלוגו. אלה בדיוק הערכים שהסקריפט מחשב בדסקטופ (גובה
     ההידר 100px), כך שהפריים הראשון כבר נכון. ה-inline style של
     הסקריפט עדיין גובר עליהם. */
  html:has(> body.internal-page .ah-fit-canvas) { --ah-lift:100px; --ah-clear:100px; }
  /* Room for the partners strip under the canvas: on very short screens the
     area grows past 100svh instead of the strip overlapping the carousel. */
  body.internal-page:has(.ah-fit-canvas) .ah { padding-block-end:50px !important; }
  /* The banner is wider than the unscaled canvas, so "auto" margins cannot
     centre it (RTL start-aligns the overflow). Explicit symmetric margins can
     go negative and keep it centred at any scale. */
  /* 15.9.2026: בלי גובה מינימלי קבוע. ה-294px מירכזו את התוכן והוסיפו
     ריווח ריק מעליו ומתחתיו; עכשיו הגובה נקבע לפי התוכן, כמו בשאר העמודים. */
  body.internal-page:has(.ah-fit-canvas) .internal-hero { width:var(--iph-fit-w) !important; min-height:0 !important; margin:calc((4px - var(--iph-d-raise)) / var(--ah-fit-scale,1)) calc((100% - var(--iph-fit-w)) / 2) 0 !important; left:auto !important; translate:none; }
  /* בקנבס המוקטן 8px היו נהיים 5px בלבד על המסך, ולכן הרווחים כאן מעט גדולים יותר. */
  body.internal-page:has(.ah-fit-canvas) .internal-hero__content { gap:12px !important; padding-bottom:36px !important; }
  /* שורת הכותרת בעמודי הפעילות צפופה, והאותיות חורגות ממנה כלפי מטה.
     בלי התוספת הזו הכותרת כמעט נגעה במספרים שמתחתיה. */
  body.internal-page:has(.ah-fit-canvas) .internal-hero__content > .internal-hero__stats { margin-top:10px !important; }
  /* Desktop notch (10.9.2026): the banner sits 4px under the header and the
     cutout is exactly the logo plate (logo 128 → plate 152.7, i.e. 56/94 of
     the logo, same ratio as mobile), centred on the logo 27px above the
     banner edge. No cream ring wider than the plate. */
  /* 14.9.2026: the logo is now an SVG that fills its whole box, so the plate
     is the logo plus a 7px cream ring on each side. The earlier formula still
     subtracted the transparent padding the old PNG carried, which made the
     plate smaller than the logo and let the banner bite into the artwork. */
  /* 14.9.2026: הלוגו והידר הפנימי קטנים ב-20px — הלוגו היה כבד מדי
     ביחס לדף הבית, והרצועה נדחפה נמוך. הירידה של הלוגו מתעדכנת יחד
     איתם, ולכן מרכז החיתוך נשאר -27px בדיוק כמו קודם. */
  body.internal-page { --hd-logo:108px; }
  body.internal-page .site-header:not(.is-stuck) { min-height:100px !important; }
  /* רצועת הקרם של ההידר נגמרת בדיוק בקצה העליון של הבאנר (100 + 4 − ההרמה).
     בגובה 100px היא כיסתה את ה-20px שהבאנר עלה, וחתכה את הפינות המעוגלות. */
  body.internal-page .site-header:not(.is-stuck)::before { height:calc(104px - var(--iph-d-raise, 0px)) !important; }
  /* 15.9.2026: הבאנר עולה 20px אל מתחת להידר (ההידר שקוף כשאינו דביק).
     הלוגו לא זז, ולכן מרכז החיתוך עולה יחד עם הבאנר ונשאר על הלוגו,
     והחיתוך עצמו נעשה עמוק יותר. הריפוד העליון של התוכן נגזר מתחתית
     החיתוך + 12px, כך שפירורי הלחם תמיד יושבים ממש מתחתיו. */
  /* 15.9.2026 (סבב שלישי): הרווח בין הלוגו לבאנר גדול ב-5px מהמקור
     (היה 10px בסבב הקודם). רק רדיוס החיתוך משתנה; מרכזו נשאר על הלוגו,
     ופירורי הלחם זזים יחד איתו. */
  body.internal-page { --iph-d-raise:20px; --iph-d-clear:12px; --iph-d-ring:5px; }
  body.internal-page { --iph-d-plate:calc(var(--hd-logo) + 14px); --iph-d-notch-r:calc(var(--iph-d-plate) / 2 + 1px + var(--iph-d-ring)); --iph-d-notch-y:calc(-27px + var(--iph-d-raise)); }
  body.internal-page .site-header:not(.is-stuck) .logo-plate { width:var(--iph-d-plate) !important; height:var(--iph-d-plate) !important; margin:calc(var(--iph-d-plate) / -2) 0 0 calc(var(--iph-d-plate) / -2) !important; }
  /* The header grid (site-refinements.css) already centres the logo cell, but
     every page stylesheet still applies the legacy translate(-50%) from the
     absolute layout, shifting the logo half its width to the left of the
     notch. Keep only the intended 37.15px vertical drop. */
  body.internal-page .site-header:not(.is-stuck) .logo-badge { transform:translateY(27px) !important; }
  body.internal-page .internal-hero { position:relative !important; inset:auto !important; width:var(--internal-banner-width) !important; max-width:none !important; min-height:0 !important; height:auto !important; aspect-ratio:auto !important; margin:calc(4px - var(--iph-d-raise)) auto 36px !important; padding:0 !important; transform:none !important; border-radius:40px !important; overflow:hidden; isolation:isolate; background:#3a2015; color:#fffdf9; -webkit-mask-image:radial-gradient(circle var(--iph-d-notch-r) at 50% var(--iph-d-notch-y),transparent calc(var(--iph-d-notch-r) - .5px),#000 calc(var(--iph-d-notch-r) + .5px)) !important; mask-image:radial-gradient(circle var(--iph-d-notch-r) at 50% var(--iph-d-notch-y),transparent calc(var(--iph-d-notch-r) - .5px),#000 calc(var(--iph-d-notch-r) + .5px)) !important; }
  /* 15.9.2026: רווח של 8px בין פירורי הלחם, הכותרת והטקסט (היה 18px),
     וריפוד תחתון של 28px. הבאנר מתכווץ לפי מה שיש בו: כותרת בלבד יוצאת
     נמוכה, וכותרת עם טקסט גבוהה בדיוק בגובה הטקסט. */
  body.internal-page .internal-hero__content { position:relative !important; inset:auto !important; width:100% !important; height:auto !important; margin:0 !important; padding:calc(var(--iph-d-notch-y) + var(--iph-d-notch-r) + var(--iph-d-clear)) 32px 28px !important; transform:none !important; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; }
  /* טקסט הפתיחה שמתחת לכותרת הגיע עם מרווחים משלו בכל עמוד (14px
     בתקשורת, 6px באודות). הריווח נקבע עכשיו רק ב-gap שלמעלה. */
  body.internal-page .internal-hero__content > .internal-hero__title ~ * { margin-block:0 !important; }
  body.internal-page .internal-hero__content > .internal-hero__title + :not(.internal-hero__stats) { line-height:1.35 !important; }
  body.internal-page .internal-hero__image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform var(--motion-slow) var(--ease-emphasis); }
  body.internal-page :is(.internal-hero__title,.internal-hero__crumbs,.internal-hero__stats) { position:static !important; inset:auto !important; margin:0 !important; transform:none !important; }
  body.internal-page .internal-hero__title { font-size:64px !important; line-height:1.1 !important; font-weight:800 !important; text-align:center; color:#fffdf9; }
  body.internal-page .internal-hero__crumbs { font-size:17px !important; line-height:1.3 !important; color:#fffdf9; width:auto !important; max-width:none !important; white-space:nowrap !important; }
  body.internal-page .internal-hero__crumbs :is(a,span,i) { font:inherit; color:inherit; }
  body.internal-page:not(:has(.ah-fit-canvas)) .ah-stage { width:var(--internal-banner-width) !important; max-width:none !important; margin-inline:auto !important; }
  /* Activity pages: the carousel spans exactly the banner's width above it
     (same design-px width and the same symmetric margins), keeping its
     1920:536.85 proportion. */
  body.internal-page:has(.ah-fit-canvas) .ah-stage {
    width:var(--iph-fit-w) !important; max-width:none !important; height:auto !important;
    margin-inline:calc((100% - var(--iph-fit-w)) / 2) !important;
    /* The five columns are stretched so the outer cards touch the stage edges
       (the Figma composition spanned 82.29% of the stage; ×1.21516). The stage
       is taller by the same factor, so every card keeps its proportions. */
    aspect-ratio:1920 / 600 !important;
    --x1:0%; --x2:20.293%; --xv:39.827%; --x4:60.862%; --x5:81.094%;
    --w-card:18.905%; --w-vid:20.406%;
    --x-off-r:97.54%; --x-off-l:-14.87%;
  }
  body.internal-page .internal-hero__title .is-accent { background:var(--grad-accent); background-clip:text; -webkit-background-clip:text; color:transparent; -webkit-text-fill-color:transparent; }
}
@media (min-width:1025px) and (hover:hover) and (pointer:fine) {
  body.internal-page .internal-hero:hover .internal-hero__image,
  body.internal-page .about-hero:hover::before { transform:scale(1.035); }
  body.internal-page .about-hero::before { transition:transform var(--motion-slow) var(--ease-emphasis); }
}
@media screen and (max-width:1024px) {
  body.internal-page:not(.desktop-preview) {
    --iph-unit:min(100vw / 478, 1px);
    --iph-header-height:calc(88 * var(--iph-unit));
    --iph-logo-size:calc(94 * var(--iph-unit));
    --iph-plate-size:calc(112 * var(--iph-unit));
    --iph-notch-radius:calc(56 * var(--iph-unit));
    --iph-notch-y:calc(-23 * var(--iph-unit));
    background-color:var(--cream);
  }

  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) {
    position:relative !important;
    inset:0 auto auto !important;
    width:100% !important;
    max-width:none !important;
    height:var(--iph-header-height) !important;
    min-height:var(--iph-header-height) !important;
    margin:0 !important;
    padding:0 !important;
    border:0;
    border-radius:0;
    background:transparent !important;
    box-shadow:none;
    overflow:visible;
    transform:none !important;
  }
  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck)::before { opacity:0; }

  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) .logo-badge {
    position:absolute !important;
    top:calc(18 * var(--iph-unit)) !important;
    left:50% !important;
    right:auto !important;
    bottom:auto !important;
    width:var(--iph-logo-size) !important;
    height:var(--iph-logo-size) !important;
    margin:0 !important;
    padding:0 !important;
    border:0;
    background:none;
    box-shadow:none;
    transform:translateX(-50%) !important;
    transition:none !important;
  }
  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) .logo-badge img {
    display:block;
    width:100% !important;
    height:100% !important;
    margin:0 !important;
    object-fit:contain;
    transform:none !important;
  }
  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) .logo-plate {
    top:50% !important;
    left:50% !important;
    width:var(--iph-plate-size) !important;
    height:var(--iph-plate-size) !important;
    margin:0 !important;
    border:0;
    border-radius:50%;
    background:var(--cream) !important;
    box-shadow:none;
    transform:translate(-50%, -50%) !important;
    transition:none !important;
  }

  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) .donate-pill {
    top:calc(36 * var(--iph-unit)) !important;
    left:calc(18 * var(--iph-unit)) !important;
    right:auto !important;
    /* 5.10.2026: היה 141×38 יחידות עם טקסט של 21 ולב של 12 — הטקסט יצא 17px
       והלב 10px, כמעט פי שניים זה מזה, ובעמודים הפנימיים הכפתור נראה גדול
       בהרבה מאשר בדף הבית. עכשיו אותן מידות בדיוק כמו שם, והלב נגזר מגודל
       הטקסט כדי שהשניים תמיד יתאימו. */
    width:96px !important;
    height:27px !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 9px !important;
    gap:4px !important;
    justify-content:center;
    align-items:center;
    font-size:9px !important;
    font-weight:700;
    line-height:1;
    white-space:nowrap;
    transform:none !important;
  }
  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) .donate-pill svg {
    flex:none;
    width:1.2em !important;
    height:1.2em !important;
  }
  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) .donate-pill::after {
    top:50%; bottom:auto; height:44px; transform:translateY(-50%);
  }
  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) .nav-toggle {
    top:calc(52 * var(--iph-unit) - 22px) !important;
    right:calc(40 * var(--iph-unit) - 22px) !important;
    left:auto !important;
    width:44px !important;
    height:44px !important;
    margin:0 !important;
    padding:0;
    border:0 !important;
    border-radius:0;
    background:none !important;
    box-shadow:none !important;
    transform:none !important;
  }
  body.internal-page:not(.desktop-preview) .site-header:not(.is-stuck) .nav-toggle-icon {
    width:calc(24 * var(--iph-unit)) !important;
    height:calc(24 * var(--iph-unit)) !important;
  }
  /* 5.10.2026: the inner pages used to swap Chen's icon for a generic three-bar
     drawing that turned into an X when open, so the button looked different from
     one page to the next. They now use the same icon and the same 180° turn as
     the home and activity pages. */
  body.internal-page:not(.desktop-preview) .site-header .nav-toggle-icon {
    background: none;
    fill: var(--ink);
    transition: transform .34s cubic-bezier(.22,.9,.3,1), fill .2s ease;
  }
  body.internal-page:not(.desktop-preview) .site-header .nav-toggle-icon path { display: inline; }
  body.internal-page:not(.desktop-preview) .site-header.nav-open .nav-toggle-icon {
    transform: rotate(180deg);
    fill: var(--orange);
  }
  @media (prefers-reduced-motion: reduce){
    body.internal-page:not(.desktop-preview) .site-header .nav-toggle-icon { transition: none; }
  }

  /* Neutralise only the old offsets above the banner, not later sections. */
  body.internal-page:not(.desktop-preview) #mainContent {
    display:flow-root;
    margin-top:0 !important;
    padding-top:0 !important;
  }
  body.internal-page:not(.desktop-preview) :is(.ah, .ah-fit-shell, .ah-fit-canvas, .blog-shell) {
    margin-top:0 !important;
    padding-top:0 !important;
    transform:none !important;
  }
  body.internal-page:not(.desktop-preview) :is(.ah-fit-shell, .ah-fit-canvas) { height:auto !important; }
  body.internal-page:not(.desktop-preview) .ah-stage { width:calc(100% - 36 * var(--iph-unit)) !important; max-width:none !important; margin-inline:auto !important; }

  body.internal-page:not(.desktop-preview) .internal-hero {
    position:relative !important;
    inset:auto !important;
    display:flex;
    align-items:stretch;
    width:calc(100% - 36 * var(--iph-unit)) !important;
    max-width:none !important;
    height:auto !important;
    min-height:calc(178 * var(--iph-unit)) !important;
    aspect-ratio:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    border:0;
    border-radius:calc(42 * var(--iph-unit)) !important;
    overflow:hidden;
    isolation:isolate;
    transform:none !important;
    clip-path:none !important;
    -webkit-mask-image:radial-gradient(circle var(--iph-notch-radius) at 50% var(--iph-notch-y), transparent calc(var(--iph-notch-radius) - .4px), #000 calc(var(--iph-notch-radius) + .4px)) !important;
    mask-image:radial-gradient(circle var(--iph-notch-radius) at 50% var(--iph-notch-y), transparent calc(var(--iph-notch-radius) - .4px), #000 calc(var(--iph-notch-radius) + .4px)) !important;
    -webkit-mask-size:100% 100%;
    mask-size:100% 100%;
    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;
  }
  /* About uses ::before for its photograph; other legacy ::before circles go. */
  body.internal-page:not(.desktop-preview) .internal-hero:not(.about-hero)::before { content:none !important; display:none !important; }
  body.internal-page:not(.desktop-preview) .internal-hero__image {
    display:block !important;
    position:absolute;
    inset:0;
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    transition:transform var(--motion-slow) var(--ease-emphasis);
  }
  body.internal-page:not(.desktop-preview) .internal-hero__content {
    position:relative !important;
    inset:auto !important;
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    align-items:stretch;
    gap:calc(16 * var(--iph-unit));
    width:100% !important;
    max-width:none !important;
    min-width:0;
    height:auto !important;
    margin:0 !important;
    padding:calc(60 * var(--iph-unit)) calc(16 * var(--iph-unit)) calc(28 * var(--iph-unit)) !important;
    transform:none !important;
    text-align:center;
  }
  body.internal-page:not(.desktop-preview) :is(.internal-hero__crumbs, .internal-hero__title, .internal-hero__stats) {
    position:static !important;
    inset:auto !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    transform:none !important;
    letter-spacing:normal;
    word-spacing:normal;
  }
  body.internal-page:not(.desktop-preview) .internal-hero__crumbs {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:calc(2 * var(--iph-unit)) calc(4 * var(--iph-unit));
    font-family:'Afek',sans-serif;
    font-size:calc(16 * var(--iph-unit)) !important;
    font-weight:400;
    line-height:1.25 !important;
    color:rgba(255,254,251,.68);
    opacity:1 !important;
    white-space:normal !important;
  }
  body.internal-page:not(.desktop-preview) .internal-hero__crumbs :is(a, i, span) { margin:0 !important; padding:0; font:inherit; color:inherit; }
  body.internal-page:not(.desktop-preview) .internal-hero__crumbs [aria-current="page"] { color:#fffefb; opacity:1; }
  body.internal-page:not(.desktop-preview) .internal-hero__crumbs a:hover { color:#fffefb; }
  body.internal-page:not(.desktop-preview) .internal-hero__title {
    color:#fffefb;
    font-family:'Afek',sans-serif;
    font-size:calc(44 * var(--iph-unit)) !important;
    font-weight:800 !important;
    line-height:1.1 !important;
    text-align:center;
    white-space:normal !important;
    overflow-wrap:normal;
  }
  body.internal-page:not(.desktop-preview) .internal-hero__title .is-accent {
    display:inline;
    padding:0;
    font:inherit;
    background:var(--grad-accent);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
    -webkit-text-fill-color:transparent;
  }
  body.internal-page:not(.desktop-preview) .internal-hero__stats {
    display:grid;
    grid-template-columns:minmax(0,1fr) 1px minmax(0,1fr);
    align-items:center;
    gap:calc(24 * var(--iph-unit));
  }
  body.internal-page:not(.desktop-preview) .internal-hero__stats .ah-stat { padding:0; }
  body.internal-page:not(.desktop-preview) .internal-hero__stats b { font-size:calc(28 * var(--iph-unit)); line-height:1.2; }
  body.internal-page:not(.desktop-preview) .internal-hero__stats .ah-stat span { margin-top:calc(3 * var(--iph-unit)); font-size:calc(12 * var(--iph-unit)); line-height:1.25; white-space:normal; }
  body.internal-page:not(.desktop-preview) .internal-hero__stats .ah-divider { width:1px; height:100%; min-height:calc(44 * var(--iph-unit)); }
}
@media (prefers-reduced-motion:reduce) {
  body.internal-page .internal-hero__image,
  body.internal-page .about-hero::before { transition:none !important; transform:none !important; }
}

/* ===================================================================
   פירורי לחם — מראה מודרני (14.9.2026)
   ===================================================================
   במקום חץ בין הפריטים, נקודה עגולה קטנה. העמוד הנוכחי בלבן מלא,
   והשלבים שקדמו לו בלבן בחצי שקיפות. חל בדסקטופ ובמובייל כאחד. */
body.internal-page .internal-hero__crumbs :is(i, span[aria-hidden="true"]) {
  display: inline-flex !important;
  align-items: center;
  margin: 0 9px !important;
  font-size: 0 !important;
  line-height: 0;
}
body.internal-page .internal-hero__crumbs :is(i, span[aria-hidden="true"])::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fffefb;
  opacity: .42;
}
body.internal-page .internal-hero__crumbs a {
  color: #fffefb !important;
  opacity: .5;
  text-decoration: none;
  transition: opacity .18s ease;
}
body.internal-page .internal-hero__crumbs a:hover,
body.internal-page .internal-hero__crumbs a:focus-visible { opacity: .85; }
body.internal-page .internal-hero__crumbs [aria-current="page"] {
  color: #fffefb !important;
  opacity: 1;
  font-weight: 600;
}
