/* ============================================================
   mod_pacege
   ------------------------------------------------------------
   כל הסלקטורים ממודרים תחת .pacege כדי לא להתנגש בתבנית.
   .btn שוּנה ל-.pacege-btn — Bootstrap של ג'ומלה 3 תופסת אותו.

   דסקטופ — 6 עמודות. כל עמודה = מסגרת ברקע --c-bg (הצבע ב-66%)
   ובתוכה שני מוצרים: כרטיס לבן (בלי אקסטרה) ובלוק כתום (עם אקסטרה).

   מובייל (≤780px) — אקורדיון. פס צבעוני מקופל לכל חבילה,
   ולחיצה פותחת: ימין = בלי אקסטרה, שמאל = עם אקסטרה.
   ============================================================ */

.pacege,
.pacege *,
.pacege *::before,
.pacege *::after { box-sizing: border-box; }

.pacege {
	--grad-extra: radial-gradient(circle at 50% 35%, #FF6600 0%, #EF4726 85%);
	--btn-top:    #EF4726;   /* כפתור הכרטיס הלבן */
	--btn-bottom: #127CBA;   /* כפתור בלוק האקסטרה */
	--ink:        #17233F;   /* טקסט בתוך הכרטיס הלבן */
	--ink-soft:   #5A6478;   /* סכום מצטבר / משנה */

	position: relative;
	direction: rtl;
	color: #fff;
	font-family: 'Heebo', Arial, sans-serif;

	/* חותך אופקית, כדי שהפסים המסובבים לא ייצרו גלילה לרוחב */
	overflow: hidden;
}

.pacege p { margin: 0; }

/* ---------- השכבה הכהה ----------
   הרקע יושב כאן ולא על .pacege, כדי שהתמונה תתחיל מתחת לכותרת הלבנה.
   flow-root מונע קריסת margin עם הילד הראשון — בלעדיו ה-margin-top
   השלילי של .pacege-ticker-zone היה מזיז את כל הרקע כלפי מעלה
   במקום רק את הפסים. אין overflow, כדי שקצות הפסים יגלשו אל הלבן.

   התמונה נפרשת ברוחב מלא בראש הבלוק; מתחתיה ממשיך background-color
   באותו גוון שאליו התמונה דוהה — לכן אין תפר גם בבלוק ארוך.
   ה-linear-gradient הוא fallback אם bg-stars.jpg חסר. */
.pacege-stage {
	position: relative;
	display: flow-root;
	background-color: #05060F;
	background-image:
		url('../images/bg-stars.jpg'),
		linear-gradient(180deg, #10121F 0%, #07080F 55%, #05060F 100%);
	background-repeat: no-repeat, no-repeat;
	background-position: top center, top center;
	background-size: 100% auto, cover;
}

/* ---------- כותרת עליונה על רקע לבן ---------- */
.pacege-hero {
	position: relative;
	background: #fff;
	text-align: center;
	padding: 3rem 1rem 7.5rem;   /* התחתון גבוה כדי לפנות מקום לפסים שנכנסים לתוכו */
	/* רצפה, כדי שהלבן לא ייבלע ע"י הפסים אם תמונת הכותרת חסרה */
	min-height: 250px;
	/* מבטיח שהלבן נצבע מעל .pacege-stage גם אם התבנית משנה משהו בפריסה */
	z-index: 1;
}
/* הכותרת כתמונה — מוצגת אם images/hero-title.png קיים */
.pacege-hero__img {
	display: block;
	width: auto;
	max-width: min(100%, 640px);
	height: auto;
	margin: 0 auto;
}
.pacege-hero__line1 {
	margin: 0 0 .35rem;
	color: #111;
	font-size: clamp(1.05rem, 2.4vw, 1.85rem);
	font-weight: 600;
	line-height: 1.25;
}
.pacege-hero__line2 {
	margin: 0;
	color: #1FADFF;
	font-size: clamp(1.6rem, 4.4vw, 3rem);
	font-weight: 900;
	line-height: 1.1;
}

/* ---------- פס מרקי אלכסוני ---------- */
/* האזור תופס 10px בלבד בזרימה; הפסים עצמם מוזזים כלפי מעלה עם top שלילי.
   בכוונה בלי margin שלילי — margin שלילי על הילד הראשון עלול לקרוס עם
   .pacege-stage ולמשוך את כל הרקע הכהה מעל הכותרת הלבנה. */
.pacege-ticker-zone {
	position: relative;
	height: 10px;
	z-index: 3;
}
.pacege-ticker {
	position: absolute;
	inset-inline: -8%;
	width: 116%;
	overflow: hidden;
	padding: .45rem 0;
	font-weight: 700;
	font-size: 1rem;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
/* top שלילי = כמה הפס עולה אל תוך הכותרת הלבנה */
.pacege-ticker--yellow { top: -74px; transform: rotate(3.2deg);  background: #FBDC1B; color: #12245A; z-index: 1; }
.pacege-ticker--blue   { top: -54px; transform: rotate(-3.2deg); background: #1FADFF; color: #fff;    z-index: 2; }

.pacege-ticker__track {
	display: inline-flex;
	will-change: transform;
	animation: pacege-ticker-scroll 28s linear infinite;
}
.pacege-ticker--blue .pacege-ticker__track { animation-direction: reverse; }
.pacege-ticker__item { padding-inline-end: 2.5rem; }

@keyframes pacege-ticker-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(50%); }
}

/* ---------- Grid ---------- */
.pacege-plans { position: relative; z-index: 2; padding: .5rem 1rem 3rem; }
.pacege-plans__grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: .9rem;
	max-width: 1400px;
	margin: 0 auto;
	align-items: stretch;   /* כל שש המסגרות בגובה הגבוהה ביותר */
}

/* ---------- Plan ---------- */
/* --c    = צבע העמודה — הכותרת
   --c-bg = אותו צבע ב-66% שקיפות (A8) — המסגרת שעוטפת את כל העמודה */
.pacege .plan {
	display: flex;
	flex-direction: column;
	text-align: center;
	background: var(--c-bg);
	border-radius: 16px;
	padding: .9rem .9rem 1.2rem;   /* המסגרת נראית מסביב להכל, כולל צדי הכותרת */
	overflow: visible;
}
.pacege .plan[data-plan="1"]  { --c:#EF4726; --c-bg:#EF4726A8; }
.pacege .plan[data-plan="3"]  { --c:#29ABE2; --c-bg:#29ABE2A8; }
.pacege .plan[data-plan="6"]  { --c:#EF4D75; --c-bg:#EF4D75A8; }
.pacege .plan[data-plan="9"]  { --c:#B9D531; --c-bg:#B9D531A8; }
.pacege .plan[data-plan="15"] { --c:#FFC74F; --c-bg:#FFC74FA8; }
.pacege .plan[data-plan="25"] { --c:#A3156C; --c-bg:#A3156CA8; }

/* הכותרת היא <button> כדי שתהיה לחיצה נגישה במובייל.
   בדסקטופ היא מאופסת ונראית כמו כותרת רגילה. */
.pacege .plan__head {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	outline-offset: 2px;
	width: 100%;
	background: var(--c);
	background-image: none;
	box-shadow: none;
	text-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.2;
	padding: .55rem .4rem;
	border-radius: 10px 10px 0 0;   /* יחידה אחת עם הכרטיס הלבן שמתחת */
	margin: 0;
	cursor: default;
	text-align: center;
}
.pacege .plan__head-sub { display: none; }   /* מופיע רק במובייל, על הפס המקופל */

.pacege .plan__body {
	display: flex;
	flex-direction: column;
}

/* ===== מוצר עליון — בלי אקסטרה. כרטיס לבן בתוך המסגרת ===== */
.pacege .plan__card {
	background: #fff;
	color: var(--ink);
	border-radius: 0 0 10px 10px;   /* צמוד לכותרת, בלי רווח ביניהן */
	margin: 0;
	padding: 1rem .9rem 1.7rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}

.pacege .plan__years {
	font-size: 1.12rem;
	font-weight: 600;
	line-height: 1.2;
	margin: 0;
	min-height: 3.6em;
}
.pacege .plan__years-sub {
	display: block;
	font-size: .78rem;
	font-weight: 400;
	line-height: 1.2;
	margin-top: .2rem;
	color: var(--ink-soft);
}

.pacege .plan__donate {
	font-size: .74rem;
	font-weight: 400;
	line-height: 1.3;
	margin: .5rem 0 .8rem;
	min-height: 3.9em;
}
.pacege .plan__donate strong { font-weight: 700; }

.pacege .plan__price { direction: ltr; margin-top: auto; }
.pacege .plan__price-main {
	display: block;
	font-size: 1.3rem;
	font-weight: 900;
	line-height: 1;
}
.pacege .plan__price-note {
	display: block;
	font-size: .8rem;
	font-weight: 400;
	margin-top: .15rem;
	color: var(--ink-soft);
}

.pacege .pacege-btn {
	position: absolute;
	bottom: -13px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--btn-top);
	background-image: none;
	border: 0;
	color: #fff;
	font-size: .8rem;
	font-weight: 700;
	text-decoration: none;
	padding: .38rem 1rem;
	border-radius: 30px;
	white-space: nowrap;
	box-shadow: 0 3px 8px rgba(0,0,0,.35);
	transition: filter .2s;
	z-index: 5;
}
.pacege .pacege-btn:hover,
.pacege .pacege-btn:focus { filter: brightness(1.15); color: #fff; text-decoration: none; }

/* ---------- מחיצה בין שני המוצרים ---------- */
.pacege .plan__divider { display: flex; justify-content: center; padding: 1.1rem 0 .5rem; }
.pacege .plan__divider span {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--c);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.pacege .plan__divider svg { width: 10px; height: 6px; }
.pacege .plan__divider path { stroke: #fff; stroke-width: 2.2; fill: none; }

/* ===== מוצר תחתון — עם אקסטרה. כתום בכל שש העמודות ===== */
.pacege .plan__bonus {
	background: var(--grad-extra);
	border-radius: 10px;
	margin: 0;
	padding: 1rem .9rem 1.7rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	box-shadow: 0 6px 16px -6px rgba(0,0,0,.5);
}
.pacege .plan__bonus-count {
	font-size: 1.1rem;
	font-weight: 800;
	line-height: 1.15;
	margin: 0;
	color: #fff;
}
.pacege .plan__bonus-label {
	font-size: .82rem;
	font-weight: 600;
	line-height: 1.25;
	margin: .1rem 0 0;
	color: #fff;
	min-height: 3.2em;
}
.pacege .plan__extra-logo { width: calc(100% + 1.8rem); max-width: none; margin: .6rem 0 .5rem;
	position: relative; z-index: 2; }
.pacege .plan__extra-logo img { width: 100%; max-width: 100%; height: auto; display: block; }

.pacege .plan__bonus .plan__price-main { color: #fff; }
.pacege .plan__bonus .plan__price-note { color: #FFE0D2; }
.pacege .plan__bonus .pacege-btn { background: var(--btn-bottom); }

/* טקסט התרומה התחתון — שייך למוצר עם האקסטרה, יושב על המסגרת */
.pacege .plan__donate--footer {
	font-size: .7rem;
	line-height: 1.3;
	color: #fff;
	margin: 1.1rem .15rem 0;
	min-height: 4.2em;
}

/* ---------- סרגל תחתון ---------- */
/* סדר ב-RTL מימין לשמאל: לוגו ← כותרת צהובה ← פסקה */
.pacege-extra-info {
	position: relative;
	z-index: 2;
	max-width: 1150px;
	margin: 0 auto;
	padding: 2rem 1.5rem 5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1.8rem;
	align-items: center;
	justify-content: center;
}
.pacege-extra-info__logo { flex: 0 0 250px; max-width: 250px; }
.pacege-extra-info__logo img { width: 100%; height: auto; display: block; }

.pacege-extra-info__title {
	flex: 0 0 auto;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
	padding: 0;
	border: 0;
	color: #FFD400;
	white-space: nowrap;
}
.pacege-extra-info__text {
	flex: 0 1 400px;
	font-size: 1rem;
	line-height: 1.45;
	margin: 0;
	color: #fff;
}

/* ---------- טאבלט ---------- */
@media (max-width: 1150px) {
	.pacege-plans__grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
}

/* ============================================================
   מובייל — אקורדיון + פריסה מאוזנת
   ============================================================ */
@media (max-width: 780px) {
	.pacege-plans { padding: .5rem .6rem 2rem; }

	.pacege-plans__grid {
		display: flex;
		flex-direction: column;
		gap: .6rem;
		max-width: 520px;
	}

	/* המסגרת עוברת ל-.plan__body, כדי שהפס הצבעוני יעמוד בפני עצמו */
	.pacege .plan {
		display: block;
		background: transparent;
		border-radius: 0;
		padding: 0;
	}

	/* ----- הפס המקופל ----- */
	.pacege .plan__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: .7rem;
		font-size: 1.4rem;
		font-weight: 800;
		padding: .6rem 1rem;
		border-radius: 12px;
		text-align: start;
		transition: box-shadow .2s;
	}
	.pacege--is-ready .plan__head { cursor: pointer; }
	.pacege .plan__head-sub {
		display: block;
		font-size: .7rem;
		font-weight: 700;
		line-height: 1.15;
		text-align: center;
		white-space: nowrap;
	}
	.pacege .plan__head:focus-visible { outline: 3px solid #fff; }

	/* חץ — בנוי משתי מסגרות, מסתובב בפתיחה.
	   מופיע רק אם ה-JS עלה, אחרת הוא היה מצביע למטה על תוכן פתוח. */
	.pacege--is-ready .plan__head::after {
		content: "";
		flex: 0 0 auto;
		width: 11px;
		height: 11px;
		margin-block-end: 5px;
		border-inline-end: 3px solid currentColor;
		border-block-end: 3px solid currentColor;
		transform: rotate(45deg);
		transition: transform .25s ease;
	}
	.pacege .plan.is-open .plan__head::after {
		margin-block-end: 0;
		margin-block-start: 5px;
		transform: rotate(-135deg);
	}

	.pacege .plan.is-open .plan__head {
		box-shadow: 0 0 0 3px rgba(255,255,255,.5);
		margin-bottom: .55rem;
	}

	/* ----- התוכן הנפתח -----
	   הפריסה המאוזנת חלה תמיד. הקיפול עצמו מותנה ב-pacege--is-ready,
	   שה-JS מוסיף — כך שאם ה-JS לא עלה, הכל פשוט נשאר פתוח. */
	.pacege--is-ready .plan:not(.is-open) .plan__body { display: none; }

	.pacege .plan__body {
		display: grid;
		grid-template-columns: 1fr 1fr;   /* ב-RTL עמודה 1 היא הימנית */
		grid-template-areas:
			"card bonus"
			"...  foot";
		column-gap: .5rem;
		row-gap: .7rem;
		background: var(--c-bg);
		border-radius: 14px;
		padding: .6rem;
	}

	.pacege .plan__card  { grid-area: card;  align-self: start; border-radius: 10px; }
	.pacege .plan__bonus { grid-area: bonus; align-self: start; }
	.pacege .plan__divider { display: none; }
	.pacege .plan__donate--footer { grid-area: foot; margin: 0; min-height: 0; }

	/* בחצי רוחב הטקסט צריך קצת אוויר */
	.pacege .plan__years       { font-size: .95rem; min-height: 0; margin-bottom: .35rem; }
	.pacege .plan__donate      { min-height: 0; }
	.pacege .plan__bonus-label { min-height: 0; }
	.pacege .plan__extra-logo  { width: calc(100% + 1.2rem); max-width: none; }

	.pacege-hero { padding: 2rem 1rem 5rem; min-height: 170px; }
	.pacege-ticker-zone { height: 16px; }
	.pacege-ticker--yellow { top: -44px; }
	.pacege-ticker--blue   { top: -24px; }
	.pacege-extra-info { flex-direction: column; text-align: center; }
	.pacege-extra-info__title { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
	.pacege-ticker__track { animation: none !important; }
	.pacege .plan__head::after { transition: none !important; }
}

.pacege :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
