/* grp-rlb: "our rabbis" pages (/רבותינו/..., /en/our-leaders/...), the yeshiva staff pages (/leaders/..., /en/leaders/...) and the book pages
   (/books/..., /en/books/...) plus their list pages. Every rule is scoped with a body class added by inc/grp-rlb.php:
   rlb (all of them), rlb-rl (the two rabbi list pages), rlb-grid (card grids of staff / books), rlb-enbooks (English books list),
   rlb-bk (the books page of Rabbi Raanan), rlb-empty (the three empty sub-pages of Rabbi Raanan). */

/* The original loads Heebo 400 from heebo-regular and 700 from heebo-extrabold (its weight-500 file is a 404, so h4/h5 fall back to the
   browser default font) and sets text-rendering:optimizeLegibility: same line breaks as the original need the same font files. */
@font-face{font-family:"HeeboRlb";font-weight:400;font-style:normal;src:url(grp-rlb-heebo-400.ttf) format("truetype")}
@font-face{font-family:"HeeboRlb";font-weight:700;font-style:normal;src:url(grp-rlb-heebo-800.ttf) format("truetype")}
body.rlb{text-rendering:optimizeLegibility;word-wrap:break-word}
body.rlb .entry :is(p,li,h6,blockquote,td,th,figcaption){font-family:HeeboRlb,Heebo,Arial,sans-serif}
/* DECISION 2026-11-05 (user): the original's Heebo Medium file answers 404, so its h4/h5 headings fall back to the browser's serif font. Here the real Heebo Medium (assets/fonts/heebo-500.ttf) is used instead. See chapter 'Fonts' of the differences document. */
body.rlb .entry :is(h4,h5){font-family:Heebo,Arial,sans-serif}
body.rlb .entry :is(h4,h5) :is(strong,b){font-family:HeeboRlb,Heebo,Arial,sans-serif}

/* portrait of the rabbi in the side menu: natural size, never stretched (the original has no width rule on it) */
@media(max-width:575px){body.rlb .side .profile img{width:auto;max-width:100%}}

/* video in the gallery tab: the original's block rules make it vertical-align:middle (no gap under it) */
body.rlb .entry figure>video{vertical-align:middle}

/* floated portrait on the staff pages is followed by a clearing div, as in the original */
body.rlb .entry .clearfix::after{display:block;clear:both;content:""}
body.rlb .entry>img.float-right{float:right}

/* an almost empty content box (a book with only a title) is not held at 72px between 576 and 767px */
@media(min-width:576px) and (max-width:767px){body.rlb .wrap.site-main .entry{min-height:0}}

/* the three empty sub-pages of Rabbi Raanan: an empty content box is 40px high below 768px (72px above) */
@media(max-width:767px){body.rlb-empty .entry{min-height:0;padding-top:20px;padding-bottom:20px}}

/* ---- list of rabbis (/רבותינו/, /en/our-leaders/): float cards of the original (image 200x200 beside the text) ---- */
body.rlb-rl .entry.tight.full{padding-top:16px;padding-bottom:16px}
body.rlb-rl .mh-c-inst{display:block;flex:none;width:100%;border-top:5px solid #A48453;margin:0 0 16px;padding:0}
body.rlb-rl .mh-c-inst>img{float:inline-start;width:200px;height:200px;margin:0;margin-inline-end:16px;object-fit:fill}
body.rlb-rl .mh-c-inst .mh-cb{display:block;padding:0;margin-left:8px;flex:none}
body.rlb-rl .mh-c-inst .mh-ct{margin:12px 0 8px}
body.rlb-rl .mh-c-inst .mh-cx{margin:0 0 16px}
body.rlb-rl .mh-c-inst .mh-more{margin-top:0;font-weight:700;color:#000}
body.rlb-rl .wrap.site-main{padding-bottom:56px}
@media(max-width:767px){body.rlb-rl .entry.tight.full{padding:0}}
@media(max-width:575px){body.rlb-rl .entry.tight.full{margin-inline-start:0;margin-inline-end:30px}body.rlb-rl .wrap.site-main{padding-top:16px}}

/* ---- card grids of staff / books (/leaders/, /en/leaders/, /books/, /en/books/) ---- */
body.rlb-grid .mh-people{margin:0 -15px;padding-top:20px}
body.rlb-grid .person{flex:0 1 23%;margin:0 0 16px;padding:16px 24px;border:1px solid #dee2e6;border-top:3px solid #A48453;box-shadow:0 .125rem .25rem rgba(0,0,0,.075);background:#fff;min-width:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;line-height:24px}
body.rlb-grid .person .pic{display:block;margin:8px 8px 0}
body.rlb-grid .person .pic img{display:inline;vertical-align:middle;max-width:100%;height:150px;min-height:150px;object-fit:cover}
body.rlb-grid .person h6{margin:0 8px;font:700 18px/25px HeeboRlb,Heebo,Arial,sans-serif}
body.rlb-grid .person h6 a{color:#343a40}
body.rlb-grid .person p{margin:0 8px 8px;padding:4px;line-height:24px;font-family:inherit}
body.rlb-grid .person:not(:has(p))::after{content:"";display:block;height:8px;margin:0 8px 8px}
body.rlb-grid .mh-pager{display:flex;justify-content:center;align-items:normal;flex-wrap:nowrap;gap:0;margin:0 -15px;padding:32px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif}
body.rlb-grid .mh-pager>*{display:block;min-width:30px;padding:10px;border:1px solid #000;margin:0 10px;font:400 16px/24px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;color:#000;background:none;text-decoration:none;text-align:start}
body.rlb-grid .mh-pager>.cur{color:#212529}
body.rlb-grid .mh-pager>:is(.prev,.next){min-width:70px;text-align:center}
/* white band behind the cards and the pager (the original's .row.bg-white), the page itself is #f8f8f8 */
body.rlb-grid .wrap.site-main{padding-bottom:32px;background:#fff}
/* the original's row is 70px wider than the page between 576 and 1199px */
@media(min-width:576px) and (max-width:1199px){body.rlb-grid .wrap.site-main{margin-inline:-35px}}
@media(max-width:767px){body.rlb-grid .person{padding:0}}
@media(max-width:575px){
 body.rlb-grid .wrap.site-main{background-clip:content-box}
 body.rlb-grid .mh-people{margin-inline:0}
 body.rlb-grid .mh-pager{margin-inline:0}
 body.rlb-grid .person{flex-basis:100%}
 body.rlb-grid .person .pic{margin:0}
 body.rlb-grid .person .pic img{width:100%!important;height:auto;min-height:150px}
 body.rlb-grid .person h6{margin:0;padding:8px}
 body.rlb-grid .person p{margin:0;padding:4px}
 body.rlb-grid .person:not(:has(p))::after{margin:0}
}
/* English books page: the list is printed inside the page content, without the white content box */
body.rlb-enbooks .wrap.site-main:not(.with-side)>.entry{width:auto;max-width:none;margin:0;padding:0;background:none;min-height:0}
body.rlb-enbooks .wrap.site-main>.entry>h6.entry-title,body.rlb-enbooks .wrap.site-main>.children{display:none}

/* ---- books list of Rabbi Raanan: cards in a column below 768px, as in the original ---- */
@media(max-width:767px){body.rlb-bk .mh-list{flex-direction:column}body.rlb-bk .mh-c-book{flex:0 1 31%;display:flex;flex-direction:column;min-width:1px}body.rlb-bk .mh-c-book>a{display:block}body.rlb-bk .mh-c-book .mh-cb{flex:1 1 auto}}
@media(min-width:768px){body.rlb-bk .mh-c-book{display:flex;flex-direction:column;min-width:1px}}
@media(max-width:575px){body.rlb-bk .mh-c-book .mh-cb{padding:0}}
body.rlb-bk .mh-ct,body.rlb-bk .mh-cx{font-family:HeeboRlb,Heebo,Arial,sans-serif}
