/* ================================================
   AMOTZ — BONUS COURSE  "קורס בונוס"  (Figma 570:571)
   ================================================
   band      1440x2443 · #F6F4EE · padding 100/60 — the tallest section in the design
   bursts    the SAME 895x945.856 sun as the video-proof section, twice
   head      806px · headline (2 lines) · intro · a "שווי הקורס" value chip
   learn     dark #472D00 card, radius 100 top-left / 100 bottom-right · hero image + 5 tiles
   syllabus  four 471px chapter cards in a scroll track, alternating dark / gold / light
   ================================================ */

.az-bonus {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 60px;
	padding: 100px 0;
	overflow: hidden;
	background-color: var(--az-cream);
}

/* Two of the design's three bursts are UNROTATED and exactly 895x945.856 — the same artwork
   already shipped for the video-proof section, so `burst.svg` is reused and simply placed at
   the design's own coordinates, offset from the band centre so they hold at any width.

   The THIRD burst (570:573) is rotated: its node reports a 1237x1213 bounding box for the
   same 895x945 artwork, and the rotation angle is not recoverable from the metadata. It is
   omitted rather than guessed — two of three still carry the motif, and an approximated
   rotation would be visibly wrong against the design rather than merely absent. */
.az-bonus__burst {
	position: absolute;
	z-index: 0;
	width: 895px;
	height: 945.856px;
	color: #EDE9DF;
	pointer-events: none;
}

.az-bonus__burst svg {
	display: block;
	width: 100%;
	height: 100%;
}

.az-bonus__burst--a {
	top: 305px;
	left: calc(50% + 159px); /* design x 879 - 720 */
}

.az-bonus__burst--b {
	top: 1503px;
	left: calc(50% - 1345px); /* design x -625 - 720 */
}

/* The gutter alone defines the column here — NO `max-width` as well.
   `box-sizing: border-box` means a 1320px max-width WITH 60px of padding leaves only 1200px of
   content, a gutter narrower than every other section. `padding-inline: var(--az-edge)` on a
   full-width box already centres a 1320 column, so the cap is not just redundant, it is wrong. */
.az-bonus__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 60px;
	width: 100%;
	padding: 0 var(--az-edge);
}

/* ------------------------------------------------
   HEAD
   ------------------------------------------------ */
.az-bonus__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	width: 100%;
	max-width: 806px;
	text-align: center;
}

.az-bonus__title {
	font-size: 54px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 1px;
	color: #152114;
}

.az-bonus__title span {
	display: block; /* two authored lines */
}

.az-bonus__intro {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.5;
	color: #4A4540;
}

/* The value chip. Label first, struck price last — under dir="rtl" that puts the label at the
   right and the price at the left, as the design has them. */
.az-bonus__value {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	background-color: rgba(221, 168, 51, 0.3);
	border: 1px solid rgba(221, 168, 51, 0.2);
	border-radius: 14px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--az-brown);
}

.az-bonus__value-price {
	font-size: 14px;
	line-height: 1.2;
	text-decoration: line-through;
	text-decoration-skip-ink: none;
	white-space: nowrap;
}

/* ------------------------------------------------
   WHAT YOU LEARN
   ------------------------------------------------ */
.az-bonus__learn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	width: 100%;
}

.az-bonus__subtitle {
	font-size: 36px;
	font-weight: 600;
	line-height: 1.2;
	color: #15130F;
	text-align: center;
}

.az-bonus__panel {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	padding: 24px;
	overflow: hidden;
	background-color: var(--az-brown);
	/* PHYSICAL corners: 100px top-left and bottom-right, 40px on the other diagonal. */
	border-radius: 100px 40px 100px 40px;
}

.az-section .az-bonus__panel-img {
	width: 100%;
	height: 500px;
	object-fit: cover;
	border-radius: 76px 16px 16px 16px;
}

.az-bonus__tiles {
	display: grid;
	gap: 24px;
	width: 100%;
}

/* The design lays these out as a row of three then a row of two, each tile flexing to fill.
   Expressed as two grids rather than one, so the second row's tiles are half-width instead of
   two thirds — matching the design rather than leaving a hole. */
.az-bonus__tiles--three { grid-template-columns: repeat(3, 1fr); }
.az-bonus__tiles--two { grid-template-columns: repeat(2, 1fr); }

.az-bonus__tile {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	padding: 24px;
	background-color: #FFFFFF;
	border-radius: 16px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	color: #4A4236;
	text-align: right;
}

/* One tile echoes the panel's 100px bottom-right corner with a 76px of its own — and it is the
   RIGHTMOST tile of the SECOND row, which is `:first-child` here, not `:last-child`.

   Under dir="rtl" the first grid item renders on the right, so `:last-child` selected the
   LEFTMOST tile — the opposite corner of the panel, where there is nothing to echo. It also
   fired on the first row, rounding a tile in the middle of the block. */
.az-bonus__tiles--two .az-bonus__tile:first-child {
	border-bottom-right-radius: 76px;
}

.az-bonus__note {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: #4A4540;
	text-align: center;
	max-width: 984px;
}

.az-bonus__note span {
	display: block;
}

/* ------------------------------------------------
   SYLLABUS
   ------------------------------------------------ */
.az-bonus__syllabus {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 60px;
	width: 100%;
}

.az-carousel--syllabus .az-carousel__track {
	padding: 4px 0;
	/* The 60px gutter is on .az-bonus__inner here, so the track itself has none and the
	   snapport must match. */
	scroll-padding-inline: 0;
}

.az-carousel--syllabus .az-carousel__item {
	flex: 0 0 471px;
	max-width: 88vw;
}

/* Chapters are written 01..04 and that is already correct: Figma lists them 04, 03, 02, 01
   because chapter 1 is the RIGHTMOST card on an LTR canvas, and dir="rtl" fills the track
   right-to-left. */
.az-bonus__chapter {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 40px;
	height: 100%;
	min-height: 512px;
	padding: 32px 24px;
	overflow: hidden;
	/* PHYSICAL: 100px on the top-left only, 24px elsewhere — the same shape on all four. */
	border-radius: 24px;
	border-top-left-radius: 100px;
	border: 2px solid transparent;
	text-align: right;
}

.az-bonus__chapter-num {
	font-size: 60px;
	font-weight: 700;
	line-height: 1.4;
	width: 100%;
}

.az-bonus__chapter-title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.4;
	width: 100%;
}

.az-bonus__chapter-body {
	margin-top: 16px;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.5;
	width: 100%;
}

/* Three tones, cycling across the row. */
.az-bonus__chapter--dark {
	background-color: var(--az-brown);
}
.az-bonus__chapter--dark .az-bonus__chapter-num,
.az-bonus__chapter--dark .az-bonus__chapter-title { color: var(--az-yellow); }
.az-bonus__chapter--dark .az-bonus__chapter-body { color: rgba(255, 255, 255, 0.8); }

.az-bonus__chapter--gold {
	background-color: var(--az-yellow);
}
.az-bonus__chapter--gold .az-bonus__chapter-num,
.az-bonus__chapter--gold .az-bonus__chapter-title { color: var(--az-brown); }
.az-bonus__chapter--gold .az-bonus__chapter-body { color: #15140F; }

.az-bonus__chapter--light {
	background-color: #E9E9E9;
	border-color: var(--az-brown);
}
.az-bonus__chapter--light .az-bonus__chapter-num,
.az-bonus__chapter--light .az-bonus__chapter-title { color: var(--az-brown); }
.az-bonus__chapter--light .az-bonus__chapter-body { color: #15140F; }

/* Foot: the paging buttons and the printable-bonus note.
   The design pushes BOTH to the right-hand end of the row with a 50px gap and leaves the rest
   of the row empty — the nav is the outermost element, with the note beside it.

   So: `flex-start` (which is the RIGHT under dir="rtl"), and the NAV written first so it lands
   outermost. `space-between` with the note first — which is what shipped — threw the note to
   the far right and the buttons to the far left, at opposite ends of a 1320px row. */
.az-bonus__foot {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 50px;
	width: 100%;
}

.az-bonus__foot-note {
	padding: 18px 20px;
	background-color: rgba(221, 168, 51, 0.3);
	border: 1px solid rgba(221, 168, 51, 0.2);
	border-radius: 14px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--az-brown);
	text-align: right;
}

.az-bonus__nav {
	display: flex;
	gap: 16px;
	align-items: center;
	flex-shrink: 0;
}

.az-bonus__nav button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.az-bonus__nav button:disabled {
	/* The FILL stays at full strength. The design draws both buttons solid, and dimming a
	   white disc to 35% on a #0C0C0C band reads as GREY rather than as disabled — which is
	   what it looked like on the live page. Only the chevron fades now, so the button keeps
	   the colour the design specifies and the affordance is still honest. */
	cursor: default;
}

.az-bonus__nav button:disabled svg {
	opacity: 0.45;
}
.az-bonus__nav button:not(:disabled):hover { filter: brightness(1.1); }
.az-bonus__nav svg { display: block; width: 18px; height: 18px; }

.az-bonus__prev {
	background-color: #FFFFFF;
	border: 1px solid var(--az-rule);
	color: #A28660;
}

.az-bonus__next {
	background-image: linear-gradient(to right, #CEAF83, #795D36);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #FFFFFF;
}

.az-bonus__next svg { transform: rotate(180deg); }

.az-carousel--static .az-bonus__nav { display: none; }

/* ------------------------------------------------
   RESPONSIVE
   ------------------------------------------------ */
@media (max-width: 1024px) {
	.az-bonus {
		padding: 72px 0;
		gap: 44px;
	}

	.az-bonus__inner {
		padding: 0 32px;
		gap: 44px;
	}

	.az-bonus__burst { display: none; }

	.az-bonus__panel {
		padding: 16px;
		border-radius: 56px 24px 56px 24px;
	}

	.az-section .az-bonus__panel-img { height: 320px; }

	.az-bonus__tiles--three { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.az-bonus {
		padding: 56px 0;
	}

	.az-bonus__inner {
		padding: 0 20px;
	}

	.az-bonus__tiles--three,
	.az-bonus__tiles--two {
		grid-template-columns: 1fr;
	}

	.az-section .az-bonus__panel-img { height: 220px; border-radius: 40px 12px 12px 12px; }

	.az-bonus__foot {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
	}

	.az-bonus__nav { justify-content: center; }

	/* See the !important note in amotz-announcement-bar.css. */
	.az-bonus__title {
		font-size: clamp(26px, 6.5vw, 34px) !important;
		letter-spacing: 0 !important;
	}

	.az-bonus__subtitle {
		font-size: clamp(22px, 5.5vw, 28px) !important;
	}

	.az-bonus__chapter-num { font-size: 44px; }
	.az-bonus__chapter-title { font-size: 20px; }
	.az-bonus__chapter-body { font-size: 17px; }
}
