/* ==========================================================================
   Beit Midrash — Wix visual-fidelity layer
   Every value here traces to a measurement in /root/beitmidrash/design/.
   RTL: logical properties only (inline-start/end), never left/right.
   ========================================================================== */

:root {
  --bm-navy:        #1B2960;  /* Wix color_42, 45 CSS refs */
  --bm-navy-dark:   #0A0F23;  /* measured from header pixels, y=6..110 */
  --bm-cream:       #FFFCF3;  /* Wix color_43, 68 refs — dominant bg */
  --bm-cream-warm:  #FBF2E1;  /* Wix color_17 */
  --bm-ink:         #333231;  /* Wix color_20 */
  --bm-grey:        #6B6B6B;  /* Wix color_15, 64 refs */
  --bm-grey-warm:   #999792;  /* Wix color_18 */
  --bm-blue:        #7481B5;  /* Wix color_44 */
  --bm-measure:     40rem;    /* 640px — owner chose ours over Wix's 980px */
  --bm-ease:        cubic-bezier(.22,.61,.36,1);
}

/* ---------- 1. Header: navy, like the reference (ours was cream) ---------- */
.wp-site-blocks > header,
header.wp-block-template-part {
  background-color: var(--bm-navy) !important;
  border-bottom: 0 !important;
}
header.wp-block-template-part .wp-block-site-title a,
header.wp-block-template-part .wp-block-navigation a {
  color: var(--bm-cream) !important;
  text-decoration: none;
}
header.wp-block-template-part .wp-block-navigation a:hover,
header.wp-block-template-part .wp-block-site-title a:hover { color: var(--bm-blue) !important; }
header.wp-block-template-part .wp-block-navigation { --wp--style--block-gap: 1.75rem; }

/* ---------- 2. Alternating full-bleed bands (Wix's core rhythm) ---------- */
.bm-band { padding-block: clamp(2.5rem, 4.5vw, 4.25rem); }
.bm-band > * { max-inline-size: var(--bm-measure); margin-inline: auto;
               padding-inline: 1.25rem; }
.bm-band--wide > * { max-inline-size: 75rem; }

/* The light bands are TRANSLUCENT, not opaque. They tile the full page, so an
   opaque fill makes the fixed background artwork on <body> impossible to see —
   which is exactly what happened. At ~.72 alpha the band rhythm still reads and
   the artwork shows through, while body text keeps its contrast. */
.bm-band--cream { background-color: rgb(255 252 243 / .55); color: var(--bm-ink); }
.bm-band--warm  { background-color: rgb(247 242 232 / .55); color: var(--bm-ink); }
.bm-band--white { background-color: rgb(255 255 255 / .45); color: var(--bm-ink); }
.bm-band--navy  { background-color: var(--bm-navy); color: var(--bm-cream); }
.bm-band--navy :is(h1,h2,h3,h4,p,li,blockquote) { color: var(--bm-cream); }
.bm-band--navy a { color: var(--bm-cream); text-decoration-color: rgb(255 252 243 / .5); }
.bm-band--navy a:hover { color: var(--bm-blue); }

/* body copy sits at the reference's grey, not near-black */
.bm-band--cream p, .bm-band--warm p, .bm-band--white p { color: var(--bm-grey); }

/* ---------- 3. Hero ---------- */
.bm-hero {
  position: relative; min-block-size: clamp(320px, 42vw, 460px);
  display: grid; place-items: center; overflow: hidden;
  background-color: var(--bm-navy-dark);
}
.bm-hero__media {
  position: absolute; inset: 0; z-index: 0;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  will-change: transform;
}
.bm-hero::after { /* legibility scrim for the real text over the image */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgb(10 15 35 / .45), rgb(10 15 35 / .65));
}
.bm-hero__inner {
  position: relative; z-index: 2; text-align: center;
  padding-block: clamp(2.5rem, 6vw, 4rem); padding-inline: 1.25rem;
  max-inline-size: 48rem;
}
/* Headline is REAL TEXT over the image (Wix bakes it in) — better for SEO + a11y */
.bm-hero__title {
  color: var(--bm-cream) !important; margin: 0 0 .75rem;
  font-size: clamp(2rem, 5.2vw, 3.4rem); line-height: 1.15; font-weight: 700;
  text-shadow: 0 1px 24px rgb(10 15 35 / .55);
}
.bm-hero__sub { color: var(--bm-cream) !important; opacity: .92; margin: 0 0 1.75rem;
                font-size: clamp(1.05rem, 2vw, 1.3rem); }
.bm-hero__cta .wp-element-button,
.bm-hero__cta a {
  background: var(--bm-cream); color: var(--bm-navy) !important;
  padding: .85rem 2.25rem; border-radius: 2px; text-decoration: none;
  display: inline-block; font-weight: 500;
  transition: background .2s ease-out, transform .2s ease-out;
}
.bm-hero__cta a:hover { background: var(--bm-blue); color: var(--bm-cream) !important;
                        transform: translateY(-1px); }

/* ---------- 4. Thin banner strip (Wix 1440x400 background band) ---------- */
.bm-strip {
  min-block-size: clamp(150px, 22vw, 280px);
  background-position: center; background-size: cover; background-repeat: no-repeat;
}

/* ---------- 5. About + portrait ---------- */
/* The portrait column is a fixed 412px (the reference size), so the band must be wide
   enough that the prose beside it still gets a readable measure. Inside the 640px
   default column the text was collapsing to ~200px and the section ran 2,928px tall. */
.bm-about { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (min-width: 900px) {
  .bm-about { grid-template-columns: 412px minmax(0, 38rem); justify-content: center; }
}
.bm-about__portrait img { display: block; inline-size: 100%; block-size: auto; border-radius: 2px; }

/* ---------- 6. The two course cards ---------- */
.bm-cards { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
@media (min-width: 720px) { .bm-cards { grid-template-columns: 1fr 1fr; } }
.bm-card {
  background: #FFFFFF; padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid rgb(27 41 96 / .10); border-radius: 2px; text-align: center;
  transition: transform .22s ease-out, box-shadow .22s ease-out;
}
.bm-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgb(27 41 96 / .10); }
.bm-card__icon { inline-size: 57px; block-size: 66px; margin: 0 auto 1rem; display: block; }
.bm-card h3 { margin: 0 0 .5rem; }
.bm-card p { margin: 0 0 1.25rem; }
.bm-card__cta { font-weight: 500; text-decoration: none; border-block-end: 1px solid currentColor;
                padding-block-end: 2px; }

/* ---------- 7. Testimonials ---------- */
.bm-quote { text-align: center; }
.bm-quote p { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.6; margin: 0 0 1rem; }
.bm-quote cite { font-style: normal; color: var(--bm-grey-warm); font-size: 1rem; }
.bm-band--navy .bm-quote cite { color: rgb(255 252 243 / .75); }

/* ---------- 8. "קרא עוד" expander — grid-rows technique, animatable ---------- */
.bm-more__panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--bm-ease);
}
.bm-more__panel > div { overflow: hidden; }
.bm-more[open] .bm-more__panel,
.bm-more__panel.is-open { grid-template-rows: 1fr; }
.bm-more__toggle {
  display: inline-block; margin-block-start: 1rem; background: none; border: 0;
  padding: .35rem 0; cursor: pointer; font: inherit; font-weight: 500;
  color: var(--bm-navy); border-block-end: 1px solid currentColor;
}
.bm-band--navy .bm-more__toggle { color: var(--bm-cream); }
.bm-more__toggle:focus-visible { outline: 2px solid var(--bm-blue); outline-offset: 3px; }

/* ---------- 9. Pricing ---------- */
.bm-price { text-align: center; }
.bm-price__figure { font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 700;
                    color: var(--bm-navy); line-height: 1.1; margin: .25rem 0 .5rem; }
.bm-band--navy .bm-price__figure { color: var(--bm-cream); }
.bm-price__note { color: var(--bm-grey-warm); font-size: 1.05rem; }
.bm-price ul { list-style: none; padding-inline: 0; margin-block: 1.25rem; }
.bm-price li { margin-block: .4rem; }

/* ---------- 10. Scroll reveal (see design/motion.md — the reference has none) ------- */
.bm-reveal { opacity: 0; transform: translateY(18px);
             transition: opacity .65s var(--bm-ease), transform .65s var(--bm-ease); }
.bm-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .bm-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .bm-hero__media { transform: none !important; }
  .bm-card { transition: none; }
  .bm-more__panel { transition: none; }
}

/* numerals/prices must not be reordered by RTL */
.bm-price__figure, .bm-ltr { unicode-bidi: plaintext; }

/* ---------- Full-bleed safety net ----------
   WordPress's constrained layout caps direct children at contentSize (640px here),
   which squeezed the About grid to 412px + 140px. `alignfull` is the native opt-out;
   this reinforces it without vw math (vw would include the scrollbar and cause
   horizontal overflow in RTL). */
.bm-band, .bm-hero, .bm-strip { max-inline-size: none !important; }
.wp-site-blocks .bm-band.alignfull,
.wp-site-blocks .bm-hero.alignfull,
.wp-site-blocks .bm-strip.alignfull { inline-size: auto; }

/* ---------- Honeypot overflow fix ----------
   bm-contact-form hides its honeypot with `position:absolute; left:-9999px`. In an RTL
   document that does not collapse — it extends the scrollable area, giving the front page
   a scrollWidth of 11,439px against a 1440px viewport (measured). Replaced with the
   standard visually-hidden clip technique, which removes the element from layout without
   creating overflow. Overriding here rather than editing the plugin. */
.bm-contact-form .bm-cf-hp {
  position: absolute !important;
  inset-inline-start: auto !important;
  left: auto !important;
  inline-size: 1px !important; block-size: 1px !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important;
  overflow: hidden !important; white-space: nowrap !important;
  clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important;
}

/* belt and braces: nothing may create a horizontal scrollbar */
html, body { overflow-x: hidden; }

/* ---------------------------------------------------------------------------
   Site-wide page background (owner request: this image on ALL pages).

   Scoped with :not(.home) on purpose. The front page already carries the same
   artwork as an inline parallax layer that motion.js translates; painting it on
   <body> as well would show the image twice — one moving, one fixed — which
   reads as a rendering fault rather than a design.

   The image is a 6596x6294 PNG (336 KB) in uploads. We use the 1440-wide WebP
   derivative instead: 37 KB, same artwork.

   A cream veil sits over it so Hebrew body copy keeps its contrast; without it
   the text sits directly on artwork and fails AA in the busier areas.
   --------------------------------------------------------------------------- */
/* The cream ground moves to <html>. It CANNOT stay on <body>: a ::before with a
   negative z-index paints behind its own element's background, so an opaque
   background-color on body hides the artwork completely. That is exactly what
   happened - the layer was present in the CSS and invisible on screen. */
html {
	background-color: var(--wp--preset--color--base);
}

body {
	position: relative;
	/* must be transparent, or it covers its own ::before */
	background-color: transparent !important;
}

/* The artwork. position:fixed (not background-attachment:fixed, which is
   unreliable on iOS) so the content scrolls over a stationary image. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -2;
	background-image: url("../img/bg-page.webp");
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 1;
	pointer-events: none;
}

/* No veil. The artwork's DARKEST pixel is luminance 241/255, so body copy sits on a
   near-white ground and keeps its contrast without one. A veil here only cancelled the
   image out — which is why it was invisible. */

/* Content sits above both fixed layers. The site wrapper must NOT be opaque,
   or it hides the background just as body did. */
body .wp-site-blocks { position: relative; z-index: 1; background: transparent; }

/* Full-bleed coloured bands intentionally cover the artwork where they apply. */
body .bm-band, body .bm-strip { position: relative; z-index: 1; }

/* ---------------------------------------------------------------------------
   YouTube facade.

   A real <iframe> pulls ~1.3 MB of YouTube player JS per embed, on a page we
   just got from 13 MB to under 400 KB. Four embeds would undo that entirely.
   So we render a thumbnail + play button, and only build the iframe on click.
   Keyboard accessible: it is a <button>, not a div.
   --------------------------------------------------------------------------- */
.bm-yt { position: relative; display: block; width: 100%; aspect-ratio: 16/9;
	border: 0; padding: 0; cursor: pointer; overflow: hidden; border-radius: 6px;
	background: #000 center/cover no-repeat; }
.bm-yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-yt::after { content: ""; position: absolute; inset-inline-start: 50%; top: 50%;
	width: 68px; height: 48px; transform: translate(50%, -50%);
	background: rgba(0,0,0,.72); border-radius: 12px; transition: background .2s ease-out; }
.bm-yt::before { content: ""; position: absolute; inset-inline-start: 50%; top: 50%;
	transform: translate(50%, -50%); z-index: 2;
	border-style: solid; border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #fff; }
.bm-yt:hover::after, .bm-yt:focus-visible::after { background: #c00; }
.bm-yt:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 3px; }
.bm-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bm-yt-wrap { margin-block: var(--wp--preset--spacing--40); }
.bm-yt-wrap figcaption { margin-top: .5rem; font-size: .95rem;
	color: var(--wp--preset--color--contrast-2); text-align: center; }

/* ---------------------------------------------------------------------------
   Course row: video on the right, text on the left.

   This is an RTL document, so the INLINE-START side is the right. The media
   column is therefore first in the DOM and needs no direction juggling — the
   flex row lays it out on the right automatically. Using `order` or
   left/right offsets here would break the moment the page is viewed LTR.
   --------------------------------------------------------------------------- */
.bm-course-row {
	gap: var(--wp--preset--spacing--40);
	align-items: flex-start;
	margin-block: var(--wp--preset--spacing--40);
}

.bm-course-row__media { min-width: 0; }
.bm-course-row__media .bm-yt-wrap { margin-block: 0; }

/* Keep the video in view while the (usually longer) course text scrolls past. */
@media (min-width: 900px) {
	.bm-course-row__media { position: sticky; top: 2rem; }
}

.bm-course-row__text { min-width: 0; }
.bm-course-row__text > :first-child { margin-top: 0; }

/* Stacked on narrow screens: the course TITLE must come first, then the video.
   Leading with the video would push the heading below the fold on a phone. */
@media (max-width: 781px) {
	.bm-course-row { flex-wrap: wrap; }
	.bm-course-row__media { order: 2; flex-basis: 100% !important; }
	.bm-course-row__text  { order: 1; flex-basis: 100% !important; }
	.bm-course-row__media { position: static; }
}

/* ---------------------------------------------------------------------------
   #bm-contact — contact details and the enrolment form, side by side.

   RTL note: on a right-to-left page the inline-start side IS the right, so the
   form column is simply FIRST in the DOM and flex places it on the right.
   No floats, no absolute positioning, no left/right offsets — those would all
   invert incorrectly if the document direction ever changed.
   --------------------------------------------------------------------------- */
.bm-contact-row {
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: flex-start;
}

.bm-contact-row__details,
.bm-contact-row__form { min-width: 0; }

.bm-contact-row__details > :first-child,
.bm-contact-row__form > :first-child { margin-block-start: 0; }

.bm-contact-row__details > p { margin-block: .35rem; }

/* A hairline between the two columns, on the inline-start edge of the SECOND
   column — the details — so it sits between them in either direction. */
@media (min-width: 768px) {
	.bm-contact-row__details {
		border-inline-start: 1px solid rgb(27 41 96 / .14);
		padding-inline-start: clamp(1.5rem, 3vw, 3rem);
	}
}

/* Single column below 768px, form first. */
@media (max-width: 767px) {
	.bm-contact-row { flex-wrap: wrap; }
	.bm-contact-row__details,
	.bm-contact-row__form { flex-basis: 100% !important; }
	.bm-contact-row__details { border-inline-start: 0; padding-inline-start: 0; }
	.bm-contact-row__form { margin-block-end: 1.5rem; }
}

/* The pricing / payment / discounts copy now lives inside the details column of
   #bm-contact rather than in its own full-bleed band. Undo the centring the
   standalone band used and let it read as a column of prose. */
.bm-price--inline {
	text-align: start;
	padding-block-end: 1.5rem;
	margin-block-end: 1.5rem;
	border-block-end: 1px solid rgb(27 41 96 / .14);
}

.bm-price--inline h2 { margin-block-start: 0; }
.bm-price--inline h3 { margin-block: 1.25rem .35rem; }
.bm-price--inline p  { margin-block: .6rem; }
.bm-price--inline .bm-price__figure { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-block: .25rem; }
.bm-price--inline ul { list-style: disc; padding-inline-start: 1.25rem; margin-block: .5rem; }
.bm-price--inline .wp-element-button { display: inline-block; }

/* ==========================================================================
   Course cards — rendered by the bm-course-cards mu-plugin from the Tutor CPT.

   RTL: the media column is FIRST in the DOM, so flex puts it on the right,
   which is where the owner asked for the video. Recorded courses have no media
   (the source has no per-course artwork), so their card is typographic and the
   body spans the full width rather than leaving a hole.
   ========================================================================== */
.bm-course-list {
	display: flex;
	flex-direction: column;
	gap: clamp(3rem, 6vw, 5.5rem);
}

.bm-course-card {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: flex-start;
}

.bm-course-card__media { flex: 0 1 42%; min-inline-size: 16rem; }
.bm-course-card__body  { flex: 1 1 22rem; min-inline-size: 0; }
.bm-course-card--nomedia .bm-course-card__body { flex-basis: 100%; }

.bm-course-card__media .bm-yt-wrap { margin: 0; }

/* ---------- title: the display face, Hebrew only (see fonts.css) ---------- */
.bm-course-card__title {
	font-family: var(--wp--preset--font-family--yiddishkeit);
	font-weight: 700;
	font-size: clamp(2rem, 4.2vw, 3.1rem);
	line-height: 1.15;
	margin-block: 0 .35rem;
	color: var(--bm-navy);
}

.bm-course-card__title a { color: inherit; text-decoration: none; }
.bm-course-card__title a:hover { color: var(--bm-blue); }

.bm-course-card__subtitle {
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	color: var(--bm-grey);
	margin-block: 0 1.25rem;
}

.bm-course-card__prose > p { margin-block: .9rem; }
.bm-course-card__prose > p:first-child { margin-block-start: 0; }

.bm-course-card__meta {
	list-style: none;
	padding-inline: 0;
	margin-block: 1.5rem .75rem;
	font-weight: 500;
	color: var(--bm-ink);
}

.bm-course-card__meta li { margin-block: .25rem; }

.bm-course-card__price {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	color: var(--bm-navy);
	margin-block: .75rem 1.25rem;
	/* isolate, not plaintext: plaintext derives the block direction from the first
	   strong character, which for "2,200 ₪" is neutral and flushed the price to the
	   left of an RTL column. isolate keeps the block RTL and only isolates the run. */
	unicode-bidi: isolate;
	text-align: start;
}

.bm-course-card__price del { opacity: .55; font-weight: 400; margin-inline-end: .5rem; }
.bm-course-card__price ins { text-decoration: none; }

.bm-course-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem 1.5rem;
}

/* ==========================================================================
   One button system.

   Three used to coexist: theme.json's wp-element-button, .bm-hero__cta, and
   Tutor's tutor-btn-primary, plus WooCommerce's .button. They are mapped onto
   the same navy pill here so a buyer sees one language from the course card
   through the cart to checkout.
   ========================================================================== */
.bm-btn,
.bm-nav-cta .wp-block-button__link,
.tutor-btn.tutor-btn-primary,
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce .button.alt,
.woocommerce #respond input#submit {
	/* Neither this theme nor Twenty Twenty-Five sets a global border-box, so a
	   pill with an explicit width was sizing its CONTENT to that width and then
	   adding 2rem of padding on each side — 4rem wider than its container, which
	   is why a full-width button overflowed its card and sat on top of the one
	   beside it. Where no width is set this changes nothing. */
	box-sizing: border-box;
	display: inline-block;
	font-family: var(--wp--preset--font-family--heebo);
	font-weight: 500;
	font-size: 1.0625rem;
	line-height: 1.2;
	padding: .85rem 2rem;
	border-radius: 2px;
	border: 1px solid var(--bm-navy);
	background: var(--bm-navy);
	color: var(--bm-cream);
	text-decoration: none;
	cursor: pointer;
	transition: background .2s var(--bm-ease), color .2s var(--bm-ease), transform .2s var(--bm-ease);
}

.bm-btn:hover,
.bm-nav-cta .wp-block-button__link:hover,
.tutor-btn.tutor-btn-primary:hover,
.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce .button.alt:hover,
.woocommerce #respond input#submit:hover {
	background: var(--bm-navy-dark);
	border-color: var(--bm-navy-dark);
	color: var(--bm-cream);
	transform: translateY(-1px);
}

/* The quiet second action: same shape, no fill. */
.bm-btn--ghost {
	background: transparent;
	color: var(--bm-navy);
}

.bm-btn--ghost:hover {
	background: var(--bm-navy);
	color: var(--bm-cream);
}

/* Tutor renders its add-to-cart full width inside a narrow sidebar; keep that,
   but let it inherit the colours above rather than Tutor's own green. */
.tutor-btn.tutor-btn-primary.tutor-btn-block { inline-size: 100%; }

/* ---------- course cards stack below 768px ---------- */
@media (max-width: 767px) {
	.bm-course-card { flex-wrap: wrap; }
	.bm-course-card__media,
	.bm-course-card__body { flex-basis: 100% !important; }
	.bm-course-card__actions .bm-btn { inline-size: 100%; text-align: center; }
}

/* Student testimonial — sits with its own course, as on the reference, rather
   than pooled at the foot of the page. */
.bm-course-card__quote {
	margin: 1.75rem 0 1.25rem;
	padding-inline-start: 1.1rem;
	border-inline-start: 3px solid var(--bm-blue);
}

.bm-course-card__quote blockquote { margin: 0; }
.bm-course-card__quote blockquote p {
	font-style: italic;
	color: var(--bm-grey);
	margin-block: 0 .5rem;
}
.bm-course-card__quote figcaption { font-weight: 500; color: var(--bm-ink); }

/* The band layer clamps every direct child to the reading measure (40rem).
   Course cards carry a media column beside their text and need the wide track,
   so this opts just that wrapper out. */
.bm-course-wrap { max-inline-size: 75rem !important; }

/* Shown on cart and checkout only while no payment gateway is available. */
.bm-pay-notice {
	margin-block-end: 1.5rem;
	padding: 1rem 1.25rem;
	border-inline-start: 4px solid var(--bm-blue);
	background: rgb(247 242 232 / .8);
	color: var(--bm-ink);
	border-radius: 2px;
}
.bm-pay-notice a { color: var(--bm-navy); }

/* The same display face on every surface where a COURSE TITLE appears, so the
   card, the course page, the shop and the product page all agree. Tutor and
   WooCommerce own this markup, so these are overrides rather than theme.json. */
.tutor-course-details-title,
.tutor-course-name,
.tutor-course-name a,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce div.product .product_title,
.wc-block-components-product-name,
.wc-block-product-template .wp-block-post-title,
.wc-block-product-template .wp-block-post-title a,
li.wc-block-product .wp-block-post-title,
li.wc-block-product .wp-block-post-title a {
	font-family: var(--wp--preset--font-family--yiddishkeit) !important;
	font-weight: 700;
	color: var(--bm-navy);
}

.tutor-course-details-title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.6rem; }
.woocommerce div.product .product_title { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }

/* Eleven of the fifteen courses have no cover art — the source site never had any
   per-course imagery, and none will be invented. WooCommerce's grey placeholder
   makes those tiles look broken, so it is hidden and the tile reads as a
   deliberate typographic card instead. */
.woocommerce-placeholder,
.wc-block-components-product-image img[src*="woocommerce-placeholder"] { display: none !important; }

li.wc-block-product .wp-block-post-title { margin-block-start: 0; }

/* Social-login buttons injected into the WooCommerce forms. */
.bm-social-login { margin-block: 1.25rem; }
.bm-social-login .nsl-container { margin-block-end: 0; }

/* Every course is sold_individually, so the cart's quantity column can only ever
   read "1". It is shop furniture with nothing to say here, so it is removed
   rather than shown as a dead control. */
.woocommerce table.shop_table th.product-quantity,
.woocommerce table.shop_table td.product-quantity { display: none; }

/* ==========================================================================
   Header: the personal items, the CTA, and the basket.
   ========================================================================== */

/* The two personal items are a different kind of thing from the five content
   ones, so they read as their own group rather than as a seven-item run. The
   rule is on the FIRST personal item and uses a logical border, so it stays on
   the correct side if the document direction ever changes. */
.wp-block-navigation .bm-nav-personal {
	border-inline-start: 1px solid rgb(255 252 243 / .28);
	padding-inline-start: 1.4rem;
	margin-inline-start: .35rem;
}

/* Only the FIRST personal item carries the divider. Written as "any personal item
   preceded by another" rather than :first-of-type, because הקורסים שלי is removed
   server-side for logged-out visitors — so which item comes first changes. */
.wp-block-navigation .bm-nav-personal ~ .bm-nav-personal {
	border-inline-start: 0;
	padding-inline-start: 0;
	margin-inline-start: 0;
}

.wp-block-navigation .bm-nav-personal a { opacity: .88; }
.wp-block-navigation .bm-nav-personal a:hover { opacity: 1; }

/* Where you are. Custom-URL nav links never get this from WordPress, so the
   marker is applied in bm-nav.php and drawn here. */
header.wp-block-template-part .bm-nav-current > a {
	color: var(--bm-cream) !important;
	position: relative;
}

header.wp-block-template-part .bm-nav-current > a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: -.45rem;
	block-size: 2px;
	background: var(--bm-blue);
}

/* In the mobile overlay the items are stacked, so a side border and an
   underline both read as noise. */
@media (max-width: 599px) {
	.wp-block-navigation .bm-nav-personal,
	.wp-block-navigation .bm-nav-personal ~ .bm-nav-personal {
		border-inline-start: 0;
		padding-inline-start: 0;
		margin-inline-start: 0;
	}
	.wp-block-navigation .bm-nav-personal {
		border-block-start: 1px solid rgb(255 252 243 / .28);
		padding-block-start: .75rem;
		margin-block-start: .5rem;
	}
	.wp-block-navigation .bm-nav-personal ~ .bm-nav-personal {
		border-block-start: 0;
		padding-block-start: 0;
		margin-block-start: 0;
	}
	header.wp-block-template-part .bm-nav-current > a::after { display: none; }
}

/* ---------- the CTA ----------
   It was navy on a navy header — a button only visible on hover. Inverted here,
   the same way .bm-hero__cta is inverted on the navy hero. The !important is
   needed because the header rule at the top of this file forces cream on every
   link inside the nav chrome. */
.bm-nav-cta .wp-block-button__link,
.bm-nav-cta .wp-element-button {
	background: var(--bm-cream) !important;
	color: var(--bm-navy) !important;
	border-color: var(--bm-cream) !important;
}

.bm-nav-cta .wp-block-button__link:hover,
.bm-nav-cta .wp-element-button:hover {
	background: var(--bm-blue) !important;
	border-color: var(--bm-blue) !important;
	color: var(--bm-cream) !important;
}

/* The CTA now sits outside <nav>, so it survives below 600px. Keep it from
   crowding the bar on the narrowest screens. */
@media (max-width: 480px) {
	.bm-nav-cta .wp-block-button__link { padding: .6rem 1.1rem; font-size: .95rem; }
}

/* ---------- the basket ---------- */
.wc-block-mini-cart__button {
	color: var(--bm-cream);
	padding: .25rem;
	background: transparent;
	border: 0;
}

.wc-block-mini-cart__button:hover { color: var(--bm-blue); }
.bm-basket-icon { display: block; }

.wc-block-mini-cart__badge {
	background: var(--bm-cream) !important;
	color: var(--bm-navy) !important;
	font-family: var(--wp--preset--font-family--heebo);
	font-weight: 700;
}

/* ---------- the slide-out drawer ----------
   WooCommerce ships this unstyled by our standards; without these rules it is
   the one surface on the site that speaks a different visual language. */
.wc-block-mini-cart__drawer .wc-block-components-drawer__content {
	background: var(--bm-cream);
	font-family: var(--wp--preset--font-family--heebo);
	color: var(--bm-ink);
}

.wc-block-mini-cart__drawer .wc-block-mini-cart__title,
.wc-block-mini-cart__drawer .wc-block-components-product-name {
	color: var(--bm-navy);
	font-family: var(--wp--preset--font-family--heebo);
}

.wc-block-mini-cart__drawer .wc-block-components-button {
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--heebo);
	font-weight: 500;
}

.wc-block-mini-cart__drawer .wc-block-components-button:not(.is-link) {
	background: var(--bm-navy);
	border: 1px solid var(--bm-navy);
	color: var(--bm-cream);
}

.wc-block-mini-cart__drawer .wc-block-components-button:not(.is-link):hover {
	background: var(--bm-navy-dark);
	border-color: var(--bm-navy-dark);
}

.wc-block-mini-cart__drawer .wc-block-components-drawer__close {
	color: var(--bm-navy);
}

/* ---------- the logo ----------
   The mark is a single-colour navy PNG (measured: dominant rgb(32,32,96), max
   luminance 88/255) and the header has been navy since the Wix fidelity pass —
   so it has been invisible on its own site. It is monochrome, so inverting it to
   cream is lossless and needs no new asset. */
header.wp-block-template-part .custom-logo {
	filter: brightness(0) invert(1);
}

/* ==========================================================================
   Books — rendered by the bm-books mu-plugin from the ספרים product category.

   Deliberately NOT the course-card layout. A course card is a wide editorial
   row built around a video; a book is a cover, and nine covers read as a
   bibliography only if they are shown as a grid of equal objects. So this is a
   grid, sized from the cover rather than from the text.

   RTL: grid flows from the inline-start edge, which under dir="rtl" is the
   right, so no mirroring is needed here. Covers are photographs of physical
   objects and must never be flipped — hence no transform anywhere below.
   ========================================================================== */
.bm-books-wrap .bm-books-section {
	font-family: var(--wp--preset--font-family--yiddishkeit);
	font-weight: 700;
	font-size: clamp(1.7rem, 3.2vw, 2.4rem);
	color: var(--bm-navy);
	margin-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
}

.bm-books-wrap .bm-books-section:first-child { margin-block-start: 0; }

.bm-book-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: clamp(2rem, 4vw, 3.25rem) clamp(1.5rem, 3vw, 2.5rem);
	/* stretch, not start: cards in a row share a height, which is what lets the
	   price and the button below it sit on one line across the whole row. With
	   `start` each card was only as tall as its own blurb, so every price landed
	   at a different height. */
	align-items: stretch;
}

.bm-book-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	block-size: 100%;
}

/* The cover sits in a fixed-ratio box so nine covers of nine different
   proportions still line their titles up. object-fit: contain, never cover —
   cropping a book jacket cuts the author's name off. */
.bm-book-card__cover {
	aspect-ratio: 2 / 3;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: var(--bm-cream);
	border-radius: 2px;
	overflow: hidden;
}

.bm-book-card__img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: contain;
	display: block;
	filter: drop-shadow(0 6px 14px rgb(0 0 0 / 18%));
	transition: transform .25s var(--bm-ease);
}

.bm-book-card:hover .bm-book-card__img { transform: translateY(-3px); }

.bm-book-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: .4rem;
}

.bm-book-card__title {
	font-family: var(--wp--preset--font-family--frank-ruhl-libre);
	font-weight: 700;
	font-size: clamp(1.25rem, 2.2vw, 1.55rem);
	line-height: 1.25;
	color: var(--bm-navy);
	margin-block: 0;
}

/* Publisher, year. The year is wrapped in <bdi class="bm-ltr-num"> by the
   renderer so "עם עובד, 1997" does not get reordered. */
.bm-book-card__imprint {
	font-size: .9375rem;
	color: var(--bm-grey);
	margin-block: 0;
}

.bm-book-card__blurb {
	font-size: 1rem;
	line-height: 1.7;
	margin-block: .5rem 0;
}

/* The blurbs run to different lengths, so the price is pushed to the foot of the
   card rather than left to follow the text. margin-block-start:auto eats the
   slack ABOVE the price, which makes the price and the button beneath it one
   bottom-anchored pair — every price in a row on the same line, every button
   directly under its own price. */
.bm-book-card__price {
	margin-block-start: auto;
	margin-block-end: 0;
	padding-block-start: .85rem;
	font-weight: 500;
	color: var(--bm-navy);
	unicode-bidi: plaintext;
}

/* Push the button to the foot of the card so a row of cards ends level
   regardless of how long each blurb runs. */
.bm-book-card__actions { padding-block-start: .75rem; }

/* A book card is a narrow column, so the button is scaled to it: the page-level
   pill (1.0625rem / .85rem 2rem) is sized for an editorial course row and reads
   as a slab here. Full width is kept so nine cards end on a level line. */
.bm-book-card__actions .bm-btn {
	inline-size: 100%;
	text-align: center;
	font-size: .9375rem;
	padding-block: .6rem;
	padding-inline: 1rem;
}

/* Out of stock: the button keeps its shape so the grid does not jump, but it
   is plainly not a button. */
.bm-btn.is-disabled {
	background: transparent;
	border-color: var(--bm-grey);
	color: var(--bm-grey);
	cursor: not-allowed;
	pointer-events: none;
}

@media (max-width: 479px) {
	.bm-book-list { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	.bm-book-card__img,
	.bm-book-card:hover .bm-book-card__img { transition: none; transform: none; }
}

/* ==========================================================================
   Course curriculum — the syllabus, not a locked vault.

   Tutor ends every row of "תוכן הקורס" with a padlock for anyone who has not
   enrolled. On a course page that is the wrong message twice over: the list is
   the syllabus, which is exactly what a prospective student is here to read,
   and the padlock tells them they are shut out at the moment they are deciding
   whether to pay. The lessons are not links for a visitor anyway, so nothing is
   being hidden — the icon only made information look like a locked door.

   Scoped to the padlock itself, never to the status slot: an enrolled student's
   progress ticks live in the same span with a different icon class, and those
   must keep working.
   ========================================================================== */
.tutor-course-content-list-item-status.tutor-icon-lock-line {
	display: none;
}

/* With the padlock gone that column holds only an empty duration span, whose
   margins would otherwise leave a ragged gutter down the right of the list. */
.tutor-course-content-list-item-duration:empty {
	display: none;
}

/* Let the title use the width the padlock gave back, and keep the rows reading
   as a list: one line of information each, evenly spaced. */
.tutor-course-content-list-item {
	align-items: flex-start;
	gap: .5rem;
	padding-block: .55rem;
}

.tutor-course-content-list-item-title {
	line-height: 1.6;
	font-weight: 400;
}
