/* The learning stories page (Figma 14573-10): the story of the week, the video strip on its dark
   stage, the stories' mosaic and "גם לך יש סיפור?". The page's header is the catalogue's
   (catalogue-pages/assets/page.css); the windows are overlays.css. Logical properties, brand tokens. */

.cil-st *, .cil-st *::before, .cil-st *::after { box-sizing: border-box; }
.cil-st { --st-ease: cubic-bezier(.4, 0, .2, 1); padding-bottom: 96px; }
.cil-st p, .cil-st h2, .cil-st h3, .cil-st blockquote { margin: 0; }

/* ---- Shared pieces ---- */
.cil-st-tag { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; max-width: 100%; padding: 3px 8px; border-radius: 6px; font-size: 14px; font-weight: 600; line-height: 1.2; }
.cil-st-tag--white { background: var(--cil-white); color: var(--cil-black); }
.cil-st-tag--yellow { background: var(--cil-yellow-light-2); color: var(--cil-black); }
.cil-st-tag--blue { background: var(--cil-blue-light-1); }
.cil-st .cil-st-tag--course { color: var(--cil-blue-dark-1); text-decoration: none; }
.cil-st .cil-st-tag--course span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Its hover -- the outline drawn in, the book stepping forward -- is hovers.css. */
.cil-st .cil-st-tag--course:is(:hover, :focus-visible) { color: var(--cil-blue-dark-1); outline: none; }

.cil-st-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cil-st-person__avatar { flex: none; width: var(--size, 52px); height: var(--size, 52px); border-radius: 50%; object-fit: cover; }
.cil-st-person__avatar--initials { display: grid; place-items: center; background: var(--cil-white); color: var(--cil-blue-dark-1); font-size: 18px; font-weight: 700; }
.cil-st-person__avatar--initials.is-blue { background: var(--cil-blue-light-1); }
.cil-st-person__avatar--initials.is-green { background: var(--cil-green-light-1); }
.cil-st-person__avatar--initials.is-red { background: var(--cil-red-light-1); }
.cil-st-person__words { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.2; }
.cil-st-person__name { color: var(--cil-black); font-size: 18px; font-weight: 700; }
.cil-st-person__role { color: var(--cil-black-regular-7); font-size: 14px; }

.cil-st .cil-st-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding-inline: 32px;
    border: 1px solid var(--cil-black); border-radius: 24px; background: var(--cil-white); color: var(--cil-black);
    font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: transform .2s var(--st-ease);
}
.cil-st .cil-st-btn--primary { border-color: var(--cil-blue-dark-1); background: var(--cil-blue); }
.cil-st .cil-st-btn--small { height: 44px; }
.cil-st .cil-st-btn--wide { width: 100%; }
.cil-st .cil-st-btn[hidden] { display: none; }
/* Each button's own hover and the focus ring are hovers.css (Oren, 2026-10-09: no shared ring). */
.cil-st .cil-st-btn:is(:hover, :focus-visible) { color: var(--cil-black); outline: none; }
.cil-st .cil-st-btn--primary:is(:hover, :focus-visible) { background: var(--cil-blue); }
.cil-st .cil-st-btn--secondary:is(:hover, :focus-visible) { background: var(--cil-white); }
.cil-st .cil-st-btn:active { transform: scale(.98); }
.cil-st .cil-st-btn:disabled { border-color: var(--cil-black-light-6); background: var(--cil-black-light-3); color: var(--cil-black-regular-7); box-shadow: none; cursor: progress; }
.cil-st .cil-st-link { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 0; border: 0; background: none; color: var(--cil-blue-dark-1); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.cil-st .cil-st-link img { transition: transform .25s var(--st-ease); }
.cil-st .cil-st-link:is(:hover, :focus-visible) { color: var(--cil-blue-dark-1); text-decoration: underline; text-underline-offset: 3px; outline: none; }
.cil-st .cil-st-link:is(:hover, :focus-visible) img { transform: translateX(-3px); }
.lang-to-css-ltr .cil-st :is(.cil-st-link, .cil-st-stage__all, .cil-st-course__go) img { transform: scaleX(-1); }

/* ---- The story of the week ---- */
/* Figma 14603:947: 24 under the page header (14603:946), 1396 of the 1420 wide, from the reading start;
   then 56 to the video stage. */
.cil-st-hero-wrap { padding-block: 24px 56px; }
.cil-st-hero { display: flex; align-items: stretch; overflow: hidden; margin-inline-end: 24px; border-radius: 32px; background: var(--cil-yellow-light-2); }
.cil-st-hero__text { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; min-width: 0; padding-block: 64px 56px; padding-inline: 64px 32px; }
.cil-st-hero__line { display: -webkit-box; overflow: hidden; color: var(--cil-black); font-size: clamp(32px, 2.5vw + 1rem, 64px); font-weight: 700; line-height: 1.2; text-wrap: balance; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cil-st-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cil-st-hero__art { position: relative; flex: none; width: 610px; min-height: 560px; }
.cil-st-hero__ring { position: absolute; top: 60px; left: 0; width: 340px; height: 340px; }
.cil-st-hero__dot { position: absolute; }
.cil-st-hero__dot--red { top: 96px; right: 16px; }
.cil-st-hero__dot--green { bottom: 70px; left: 160px; }
.cil-st-hero__dot--teal { bottom: 76px; right: 6px; }
.cil-st-hero__photo { position: absolute; bottom: 0; right: 25px; width: 380px; height: 460px; border-radius: 190px 190px 0 0; object-fit: cover; animation: cil-st-lift .6s var(--st-ease); }
.cil-st-hero__photo--initials { display: grid; place-items: center; background: var(--cil-blue-light-1); color: var(--cil-blue-dark-1); font-size: 120px; font-weight: 700; }
.cil-st-hero__ring { animation: cil-st-turn 1.2s var(--st-ease) both; }
@keyframes cil-st-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes cil-st-lift { from { transform: translateY(24px); } }
@keyframes cil-st-turn { from { opacity: 0; transform: rotate(-30deg) scale(.9); } }

/* ---- The video strip, on its dark stage ---- */
/* clip: a card gliding in or out of the strip (reels.js) never widens or lengthens the page. */
.cil-st-stage { overflow: clip; padding-block: 64px 72px; background: var(--cil-black); color: var(--cil-white); }
.cil-st-stage__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.cil-st-stage__words { display: flex; flex-direction: column; gap: 6px; }
.cil-st-stage__title { color: var(--cil-white); font-size: 48px; font-weight: 700; line-height: 1.2; }
.cil-st-stage__lead { color: var(--cil-black-light-4); font-size: 16px; }
.cil-st .cil-st-stage__all { display: inline-flex; align-items: center; gap: 4px; color: var(--cil-yellow); font-size: 14px; font-weight: 600; text-decoration: none; }
/* The strip's heading left empty on the screen: the link alone keeps its place at the end. */
.cil-st .cil-st-stage__all:only-child { margin-inline-start: auto; }
.cil-st .cil-st-stage__all:is(:hover, :focus-visible) { color: var(--cil-yellow); text-decoration: underline; text-underline-offset: 3px; }

/* ---- The mosaic ---- */
/* Figma 14603:1071: 56 from the stage, then 28 between the toolbar, the mosaic, the count with "more"
   and the invitation. */
.cil-st-stories { display: flex; flex-direction: column; gap: 28px; padding-block: 56px 28px; scroll-margin-top: 90px; }
.cil-st-stories:focus { outline: none; }
.cil-st-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cil-st-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cil-st .cil-st-filter { padding: 8px 18px; border: 1px solid var(--cil-black-light-3); border-radius: 20px; background: var(--cil-white); color: var(--cil-black); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
.cil-st .cil-st-filter:is(:hover, :focus-visible) { border-color: var(--cil-blue-dark-1); color: var(--cil-black); outline: none; }
.cil-st .cil-st-filter.is-on { border-color: var(--cil-blue-dark-1); background: var(--cil-blue-dark-1); color: var(--cil-white); font-weight: 700; animation: cil-st-press .3s var(--st-ease); }
@keyframes cil-st-press { 40% { transform: scale(.94); } }
.cil-st-count { color: var(--cil-black-regular-6); font-size: 14px; font-weight: 600; line-height: 1.2; }
.cil-st-empty { padding: 40px; border: 1px solid var(--cil-black-light-3); border-radius: 20px; background: var(--cil-white); color: var(--cil-black-regular-7); text-align: center; }
.cil-st-empty[hidden] { display: none; }
/* The stories could not be read (templates/failed.php; Figma 14573-10 row "Error", 14615:935), and no
   stories yet (grid.php) in the same card: what is so, and the way on. */
.cil-st.is-failed { padding-bottom: 0; }
.cil-st-failed { padding-block: 24px 80px; }
.cil-st-failed:focus { outline: none; }
.cil-st-state { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 40px; border: 1px solid var(--cil-black-light-3); border-radius: 20px; background: var(--cil-white); text-align: center; }
.cil-st-state__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 32px; background: var(--cil-red-light-1); }
.cil-st-state__icon img { display: block; width: 30px; height: 30px; }
.cil-st-state__mark { display: block; }
.cil-st-state__title { color: var(--cil-black); font-size: 24px; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.cil-st-state__text { max-width: 520px; color: var(--cil-black-regular-7); font-size: 16px; line-height: 1.2; }
.cil-st .cil-st-state .cil-st-btn { text-decoration: none; }

/* Rows of three; on "הכל" the first row is the wide story (924 of 1420) beside the count of learners,
   which takes the rest and keeps its own height (Figma 14603:1086). A row's tiles share its height. */
.cil-st-grid { --st-third: calc((100% - 48px) / 3); display: flex; flex-wrap: wrap; gap: 24px; }
.cil-st-grid > * { flex: 0 0 var(--st-third); min-width: 0; }
.cil-st-stat { order: -1; container-type: inline-size; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 40px; border-radius: 24px; background: var(--cil-blue-dark-1); color: var(--cil-white); }
.cil-st-grid > .cil-st-stat { flex: 1 1 var(--st-third); align-self: flex-start; }
.cil-st-stat[hidden] { display: none; }
.cil-st-stat__prefix { font-size: 28px; font-weight: 700; line-height: 1.2; }
/* As large as the design asks, and smaller as the number grows, to fit the box's width (--st-chars, templates/grid.php):
   about .6em a character in this face; words too long even so break onto the next line (Oren 2026-10-15). */
.cil-st-stat__number { color: var(--cil-yellow); font-size: min(clamp(72px, 7.5vw, 144px), calc(100cqi / (var(--st-chars, 4) * .62))); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.cil-st-stat__text { font-size: 18px; line-height: 1.2; }

.cil-st-card { display: flex; flex-direction: column; min-height: 303px; overflow: hidden; border-radius: 24px; transition: transform .3s var(--st-ease), box-shadow .3s var(--st-ease); }
.cil-st-card[hidden] { display: none; }
.cil-st-card.is-entering, .cil-st-stat.is-entering { animation: cil-st-rise .4s var(--st-ease) backwards; }
.cil-st-card:hover { transform: translateY(-4px); box-shadow: 0 14px 22px color-mix(in srgb, var(--cil-black) 12%, transparent); }
.cil-st-card.is-blue { background: var(--cil-blue-light-1); }
.cil-st-card.is-green { background: var(--cil-green-light-1); }
.cil-st-card.is-red { background: var(--cil-red-light-1); }
/* A quote tile (Figma 14603:1145): the mark and the line at the top (12 apart), the person and the
   course at the foot; three lines of the quote at most, so a row of them is 303 high. */
.cil-st-card__text { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 32px; }
.cil-st-card__quotes { flex: none; margin-bottom: 12px; }
.cil-st-card__quotes--yellow, .cil-st-card__photo { display: none; }
/* The words (Oren, 2026-10-09): the title -- the text's first sentence, three lines at most -- and the rest
   under it, two lines at most, each cut with "…"; the block takes the room the foot leaves, so every
   tile is one height whatever its words (the tile's min-height holds the longest case). */
.cil-st-card__words { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
/* Every tile one height, quote and video alike (Oren, 2026-10-09; feedback: identical card heights): the
   video tile's 420. A quote tile spends the room on up to four lines under its title. */
.cil-st-card:not(.is-wide) { min-height: 420px; }
.cil-st-card:not(.is-wide):not(.is-video-tile) .cil-st-card__rest { -webkit-line-clamp: 4; }
.cil-st-card__line { flex: none; color: var(--cil-black); font-size: 28px; font-weight: 700; line-height: 1.2; }
.cil-st-card__line p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cil-st-card__rest { display: -webkit-box; overflow: hidden; margin: 0; color: var(--cil-black-regular-7); font-size: 16px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cil-st-card__foot { display: flex; flex-direction: column; gap: 10px; }
/* A quote tile shows no "read story" (the whole tile opens it), yet the button stays the tile's one stop for
   the keyboard: out of sight and out of the layout, the tile itself showing the focus (below). */
.cil-st-card:not(.is-wide) .cil-st-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The wide one: white, its photo at the far side, the quote mark in yellow, the way to the whole story. */
.cil-st-grid > .cil-st-card.is-wide { order: -2; flex-basis: 65.07%; flex-direction: row; min-height: 480px; border: 1px solid var(--cil-black-light-3); background: var(--cil-white); }
/* No number beside it (the screen left all three lines empty): the wide story has the row to itself. */
.cil-st-grid--no-stat > .cil-st-card.is-wide { flex-basis: 100%; }
.cil-st-card.is-wide .cil-st-card__text { justify-content: center; gap: 18px; padding-block: 48px; padding-inline: 48px 40px; }
.cil-st-card.is-wide .cil-st-card__quotes { margin-bottom: 0; }
.cil-st-card.is-wide .cil-st-card__words { flex: none; gap: 12px; }
.cil-st-card.is-wide .cil-st-card__quotes--teal { display: none; }
.cil-st-card.is-wide .cil-st-card__quotes--yellow { display: block; }
.cil-st-card.is-wide .cil-st-card__photo { display: block; flex: none; width: 440px; max-width: 48%; height: auto; object-fit: cover; }
.cil-st-card.is-wide .cil-st-card__line p { -webkit-line-clamp: 4; }
.cil-st-card.is-wide .cil-st-card__rest { font-size: 18px; -webkit-line-clamp: 4; }
.cil-st-card.is-wide .cil-st-tag--course { background: var(--cil-blue-light-1); }
/* A tile is a button to its story: the whole of it opens the reader. Reached by the keyboard, it rises as
   under the pointer, with a ring round it (a video tile's play has its own, below). */
.cil-st-card { cursor: pointer; }
.cil-st-card:has(.cil-st-link:focus-visible) { transform: translateY(-4px); box-shadow: 0 14px 22px color-mix(in srgb, var(--cil-black) 12%, transparent); outline: 2px solid var(--cil-blue-dark-1); outline-offset: 3px; }

/* A story with a video, unless it is the wide one (Figma 14603:4057): its picture under a shade, play in
   the upper middle, the captions and length at the far top, the line and the person at the foot. */
.cil-st-card__video { display: none; }
.cil-st-card[data-video="1"]:not(.is-wide) { position: relative; min-height: 420px; background: var(--cil-black-dark-2); }
.cil-st-card[data-video="1"]:not(.is-wide) .cil-st-card__text { visibility: hidden; }
.cil-st-card[data-video="1"]:not(.is-wide) .cil-st-card__video { display: block; position: absolute; inset: 0; }
.cil-st-card__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cil-st-card__shade { position: absolute; inset-inline: 0; bottom: 0; height: 55%; background: color-mix(in srgb, var(--cil-black) 55%, transparent); }
.cil-st-card__meta { position: absolute; top: 16px; inset-inline-end: 16px; display: flex; gap: 6px; }
.cil-st .cil-st-card__play {
    position: absolute; top: 43%; left: 50%; display: grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%;
    background: var(--cil-white); cursor: pointer; transform: translate(-50%, -50%); transition: transform .25s var(--st-ease), box-shadow .25s ease;
}
.cil-st .cil-st-card__play:is(:hover, :focus-visible) { background: var(--cil-white); box-shadow: 0 0 0 6px color-mix(in srgb, var(--cil-white) 35%, transparent); transform: translate(-50%, -50%) scale(1.06); outline: none; }
.cil-st-card__caption { position: absolute; inset-inline: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.cil-st-card__vline { display: -webkit-box; overflow: hidden; margin: 0; color: var(--cil-white); font-size: 24px; font-weight: 700; line-height: 1.2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cil-st-card__vrest { display: -webkit-box; overflow: hidden; margin: 0; color: var(--cil-black-light-4); font-size: 14px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cil-st-card__video .cil-st-person__name { color: var(--cil-white); }
.cil-st-card__video .cil-st-person__role { color: var(--cil-black-light-4); }
/* Playing in the tile (reels.js tilePlay): the whole video over the tile, with the player's own controls;
   a spinner until it starts; the strip's "הסרטון לא נטען" card in the middle if it cannot load. */
.cil-st-card__media { position: absolute; z-index: 2; inset: 0; background: var(--cil-black-dark-2); }
/* The platform's player fills the tile; it shows a video of another shape whole, on black (a framed
   player cannot be trimmed to cover as a file could). */
.cil-st-card__media > iframe { display: block; width: 100%; height: 100%; border: 0; }
.cil-st .cil-st-card__video .cil-st-card__close { position: absolute; z-index: 3; top: 12px; inset-inline-end: 12px; display: none; }
.cil-st .cil-st-card.is-playing .cil-st-card__close { display: grid; }
.cil-st-card.is-loading .cil-st-card__media::after { content: ""; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; background: var(--cil-white); -webkit-mask: url("../../../images/stories-page/spinner.svg") center / contain no-repeat; mask: url("../../../images/stories-page/spinner.svg") center / contain no-repeat; animation: cil-st-spin 1s linear infinite; }
.cil-st-card.is-playing { cursor: default; }
.cil-st-card.is-playing:hover { transform: none; }
.cil-st-card .cil-st-reel__failed { transform: translate(-50%, -50%); }
@media (prefers-reduced-motion: reduce) { .cil-st-card.is-loading .cil-st-card__media::after { animation-duration: 2.4s; } }

/* "מוצגים 7 מתוך 120 סיפורים" and "הצגת סיפורים נוספים" on one row centred under the list, as on the podcasts
   page (Oren 2026-10-15, over the design's stacked pair, Figma 14603:1160): the site's "show more", its row
   layout (design-system/load-more.css). Its words step back 6px here, as they always did on this page. */
.cil-st .cil-st-more { --cil-more-shift: 6px; align-self: stretch; }

/* ---- "גם לך יש סיפור?" ---- */
.cil-st-share { display: flex; align-items: center; gap: 28px; padding: 36px 48px; border-radius: 24px; background: var(--cil-yellow-light-2); }
.cil-st-share__icon { flex: none; }
.cil-st-share__text { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cil-st-share__title { color: var(--cil-black); font-size: 40px; font-weight: 700; line-height: 1.2; }
.cil-st-share__lead { color: var(--cil-black-regular-7); font-size: 18px; }
/* The hand waves by itself: a short wave, then a rest, every 4s (Oren, 2026-10-09). */
.cil-st-share__icon { animation: cil-st-wave 4s ease-in-out 1s infinite; transform-origin: 70% 80%; }
@keyframes cil-st-wave { 0%, 22%, 100% { transform: none; } 5% { transform: rotate(-14deg); } 11% { transform: rotate(10deg); } 17% { transform: rotate(-6deg); } }

@media (prefers-reduced-motion: reduce) {
    .cil-st-hero__photo, .cil-st-hero__ring, .cil-st-card.is-entering, .cil-st .cil-st-filter.is-on, .cil-st-share__icon { animation: none; }
    .cil-st-card, .cil-st .cil-st-btn, .cil-st .cil-st-filter, .cil-st .cil-st-link img { transition: none; }
    .cil-st-card:is(:hover, :has(.cil-st-link:focus-visible)) { transform: none; }
}
