/* =====================================================================================================
   reel v2 (8.11.2026, Tomer: "רכיב קרוסלה נוראי - גם החצים וגם הקו למטה התכלת").
   Every sideways row on tomaso.co.il becomes a wall you can see at once: no arrows, no cyan progress
   line, no swiping to find out what is there. Loaded only with ?tomaso_reel=2 until Tomer approves.
   - vertical videos: a tight grid like a TikTok profile (3 across on a phone), name on the frame
   - wide videos: a list of rows on a phone, three across on a desktop
   - text quotes and result cards: stacked on a phone
   reel-v2.js shows the first few and adds one "more" button under the wall.
   ===================================================================================================== */

/* the old position line and the arrows */
html body.v3-reel2 .v3-reel-bar,
html body.v3-reel2 .p5-reel-nav { display: none !important; }

/* ---------- the row becomes a wall inside the page width ---------- */
html body.v3-reel2 .v3-reel,
html body.v3-reel2 .v3.p5 .p5-reelbox .v3-reel {
	--gutter: 0px; width: min(1280px, calc(100% - 64px)); margin-inline: auto; overflow: visible; cursor: auto; scroll-snap-type: none;
}
html body.v3-reel2 .v3.p5 .p5-reelbox { width: auto; }
html body.v3-reel2 .v3-reel-track,
html body.v3-reel2 .v3.p5 .p5-reelbox .v3-reel-track {
	display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 16px; width: auto; padding-inline: 0;
}
html body.v3-reel2 .v3-reel-track li,
html body.v3-reel2 .v3.p5 .p5-reelbox .v3-reel-track li { flex: none; min-width: 0; scroll-snap-align: none; }
html body.v3-reel2 .v3-reel-track li.rv2-x { display: none; }

/* vertical video: a wrapping row so a short last row sits centred, not stranded on one side */
html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide),
html body.v3-reel2 .v3.p5 .p5-reelbox .v3-reel-track:not(.v3-reel-track--wide) {
	--rv2-cols: 6; --rv2-gap: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 28px var(--rv2-gap);
}
html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide) li,
html body.v3-reel2 .v3.p5 .p5-reelbox .v3-reel-track:not(.v3-reel-track--wide) li {
	flex: 0 0 calc((100% - (var(--rv2-cols) - 1) * var(--rv2-gap)) / var(--rv2-cols));
}
/* vertical video: the name sits on the bottom of the frame */
html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide) li { position: relative; }
html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide) .v3-reel-cap {
	position: absolute; inset-inline: 0; bottom: 0; margin: 0; padding: 48px 14px 14px; border-radius: 0 0 6px 6px;
	background: linear-gradient(to top, rgba(5, 5, 26, .92), rgba(5, 5, 26, 0)); color: #fff; font-size: 15px; font-weight: 700; line-height: 1.35;
	pointer-events: none;
}

/* wide video: three across */
html body.v3-reel2 .v3-reel-track--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 28px; }
html body.v3-reel2 .v3-reel-track--wide .v3-work-cat { margin-top: 16px; }

/* text quotes (recruitment): three across, the hairline stays on top of each */
html body.v3-reel2 .v3-rec-quotes .v3-reel-track { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
html body.v3-reel2 .v3-rec-quotes .v3-reel-track li { flex: none; }

/* the single "more" button under any wall */
html body.v3-reel2 .rv2-more {
	display: flex; align-items: center; justify-content: center; gap: 10px; width: min(1280px, calc(100% - 64px)); min-height: 52px; margin: 28px auto 0;
	border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: transparent; color: #fff;
	font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: border-color .25s, color .25s;
}
html body.v3-reel2 .rv2-more:hover, html body.v3-reel2 .rv2-more:focus-visible { border-color: var(--v3-cyan); color: var(--v3-cyan); }
html body.v3-reel2 .rv2-more[hidden] { display: none; }
html body.v3-reel2 .v3-wrap .rv2-more, html body.v3-reel2 .p5-reelbox .rv2-more { width: 100%; }

@media (max-width: 1100px) {
	html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide) { --rv2-cols: 4; }
	html body.v3-reel2 .v3-reel-track--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
	html body.v3-reel2 .v3-reel,
	html body.v3-reel2 .v3.p5 .p5-reelbox .v3-reel { width: calc(100% - 40px); }
	html body.v3-reel2 .rv2-more { width: calc(100% - 40px); margin-top: 20px; }

	/* vertical video: three across, edge to edge like a profile grid */
	html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide),
	html body.v3-reel2 .v3.p5 .p5-reelbox .v3-reel-track:not(.v3-reel-track--wide) { --rv2-cols: 3; --rv2-gap: 6px; gap: 6px; }
	html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide) .v3-frame { border-radius: 4px; }
	html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide) .v3-frame-play { top: 6px; left: 6px; width: 26px; height: 26px; }
	html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide) .v3-frame-play svg { width: 10px; height: 10px; }
	html body.v3-reel2 .v3-reel-track:not(.v3-reel-track--wide) .v3-reel-cap {
		padding: 30px 7px 7px; border-radius: 0 0 4px 4px; font-size: 12px; line-height: 1.3;
		display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	}

	/* wide video: a list of rows, picture beside the words */
	html body.v3-reel2 .v3-reel-track--wide { grid-template-columns: 1fr; gap: 0; }
	html body.v3-reel2 .v3-reel-track--wide li {
		display: grid; grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 14px;
		padding: 14px 0; border-top: 1px solid var(--v3-line);
	}
	html body.v3-reel2 .v3-reel-track--wide li:first-child { border-top: 0; padding-top: 0; }
	html body.v3-reel2 .v3-reel-track--wide .v3-frame { grid-row: 1 / span 3; border-radius: 4px; }
	html body.v3-reel2 .v3-reel-track--wide .v3-frame-play { top: 6px; left: 6px; width: 26px; height: 26px; }
	html body.v3-reel2 .v3-reel-track--wide .v3-frame-play svg { width: 10px; height: 10px; }
	html body.v3-reel2 .v3-reel-track--wide .v3-work-cat { margin-top: 0; font-size: 12.5px; }
	html body.v3-reel2 .v3-reel-track--wide .v3-work-title { margin-top: 2px; font-size: 16px; line-height: 1.35; }
	html body.v3-reel2 .v3-reel-track--wide .v3-work-desc {
		margin-top: 4px; font-size: 13.5px; line-height: 1.5;
		display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	}

	/* text quotes: stacked */
	html body.v3-reel2 .v3-rec-quotes .v3-reel-track { grid-template-columns: 1fr; gap: 28px; }

	/* result cards (service pages) and home results: stacked, not a swipe row */
	html body.v3-reel2 .v3.p5 .p5r { display: grid; grid-template-columns: 1fr; gap: 16px; margin-inline: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
	html body.v3-reel2 .v3.p5 .p5r-card { flex: none; }
	html body.v3-reel2 .v3.p5 .p5r .rv2-x,
	html body.v3-reel2 .v3-cases .rv2-x { display: none; }
	html body.v3-reel2 .v3-cases { display: grid; grid-template-columns: 1fr; gap: 40px; margin-inline: 0; padding-inline: 0; overflow: visible; scroll-snap-type: none; }
	html body.v3-reel2 .v3-case, html body.v3-reel2 .v3-case:first-of-type { flex: none; }
	html body.v3-reel2 .v3-case-media { aspect-ratio: 16 / 11; }
}
