/* "עוד מאוצרות המייש״ר" — the strips of the site's sections at the foot of the homepage
   (templates/v2/sections/home-more.js, lib/home-more.js). Everything hangs off .hm, so nothing here touches the
   rest of the page. Brand colours: burgundy #7e022b, navy #081421, gold #b58b3c, cream #fbf7ef.
   On a phone nothing is cut at the screen edge (no carousels): cards stack, two to a row or picture beside text,
   and each strip's "לכל …" button closes it, after its content. */
.hm{
  --hm-navy:#081421; --hm-navy2:#12243c; --hm-navy-card:#0d1a2a;
  --hm-bord:#7e022b; --hm-bord2:#5c011f; --hm-bord3:#3d0114;
  --hm-gold:#b58b3c; --hm-gold-l:#d9b46a; --hm-ring:inset 0 0 0 1px rgba(201,162,74,.6);
  --hm-cream:#fbf7ef; --hm-cream-line:#e8dfcd;
  --hm-ink:#0d1526; --hm-ink2:#33405a; --hm-mut:#6b788d; --hm-paper2:#f6f8fc;
  --hm-on-dark:#eef3f8; --hm-on-dark-mut:#b9c6d4;
  --hm-title:'almoni-tzar',sans-serif; --hm-body:'Heebo','Open Sans Hebrew',system-ui,sans-serif;
  border-top:3px solid var(--hm-gold);
  direction:rtl; color:var(--hm-ink); font-family:var(--hm-body); font-size:16px; line-height:1.6; overflow-wrap:break-word;
}
.hm *,.hm *::before,.hm *::after{box-sizing:border-box}
.hm ul,.hm ol{list-style:none;margin:0;padding:0}
.hm h2,.hm h3{font-family:var(--hm-title);font-weight:600;margin:0;line-height:1.2;letter-spacing:0;color:inherit;text-align:inherit}
.hm p{margin:0}
.hm a{text-decoration:none;color:inherit}
.hm img{display:block;max-width:100%;border:0}
.hm-wrap{max-width:1200px;margin:0 auto;padding-inline:16px}
@media (min-width:768px){.hm-wrap{padding-inline:24px}}

/* a strip below the fold is laid out only when it nears the screen; the jump links land below the sticky header */
.hm-strip{padding:56px 0 60px;content-visibility:auto;contain-intrinsic-size:auto 760px;scroll-margin-top:150px}
@media (max-width:767px){.hm-strip{scroll-margin-top:96px}}

/* ---- the common parts ---- */
.hm-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px 32px;margin-bottom:26px}
.hm-head-txt{max-width:720px}
.hm-k{display:inline-flex;align-items:center;gap:8px;font:600 16px/1.3 var(--hm-title);color:var(--hm-gold);margin-bottom:8px}
.hm-k::before{content:"";width:22px;height:2px;background:currentColor;border-radius:2px}
.hm h2{font-size:40px}
.hm-sub{margin-top:10px!important;font-size:17px;color:var(--hm-ink2)}
.hm-acts{display:flex;flex-wrap:wrap;gap:10px}
.hm-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 22px;border-radius:999px;font:600 18px/1.2 var(--hm-title);text-align:center;transition:transform .15s,filter .15s}
.hm-btn:hover{transform:translateY(-1px);filter:brightness(1.08)}
.hm-btn--bord{background:var(--hm-bord);color:#fff!important;box-shadow:0 12px 26px -14px rgba(126,2,43,.95),var(--hm-ring)}
.hm-btn--cream{background:var(--hm-cream);color:var(--hm-bord2)!important;box-shadow:var(--hm-ring)}
.hm-btn--ghost-l{border:1px solid rgba(255,255,255,.45);color:#fff!important}
.hm-btn--ghost-b{border:1px solid var(--hm-bord);color:var(--hm-bord)!important}
.hm-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px!important}
.hm-chip{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:6px 14px;border-radius:999px;font:600 16px/1.2 var(--hm-title);border:1px solid var(--hm-cream-line);background:#fff;color:var(--hm-ink)}
.hm-chip b{font:600 13px/1 var(--hm-body);padding:3px 7px;border-radius:999px;background:var(--hm-cream);color:var(--hm-bord)}
.hm-chip.is-now{background:var(--hm-bord);border-color:var(--hm-bord);color:#fff}
.hm-chip.is-now b{background:rgba(255,255,255,.18);color:#fff}
.hm a.hm-more{display:inline-flex;align-items:center;min-height:38px;font:600 16px/1.2 var(--hm-title);color:var(--hm-bord);padding:6px 4px}

.hm-card{display:flex;flex-direction:column;border-radius:14px;overflow:hidden;background:#fff;color:var(--hm-ink);box-shadow:0 10px 30px -18px rgba(8,20,33,.45);transition:transform .2s}
.hm-card:hover{transform:translateY(-3px)}
.hm-ph{position:relative;display:block;aspect-ratio:16/10;background:#e9e3d6;overflow:hidden}
.hm-ph img{width:100%;height:100%;object-fit:cover}
.hm-ph.is-top img{object-position:top}
.hm-ph.is-contain{background:var(--hm-navy2)}
.hm-ph.is-contain img{object-fit:contain}
/* an article cover or a book picture: shown WHOLE, never cut at the sides, at every width — a chanukiah in a cover
   must always show its eight lights and the shamash. Covers are 16:9; any other shape is framed. */
.hm-ph.is-cover{aspect-ratio:16/9;background:var(--hm-navy2)}
.hm-ph.is-cover img{object-fit:contain;object-position:center}
.hm-season-cards .hm-ph{aspect-ratio:16/9}
.hm-noimg{display:grid;place-items:center;width:100%;height:100%;font:600 22px/1 var(--hm-title);color:var(--hm-gold);background:var(--hm-cream)}
.hm-tag{position:absolute;top:10px;right:10px;font:600 14px/1 var(--hm-title);padding:6px 10px;border-radius:999px;background:var(--hm-bord);color:#fff;box-shadow:var(--hm-ring)}
.hm-bd{display:flex;flex-direction:column;gap:6px;padding:14px 16px 16px;flex:1}
/* a card is an <a>: it takes the strip's colour (white on the dark strips), so its own text is coloured here */
.hm-card h3{font-size:22px;color:var(--hm-ink)}
.hm-card p{font-size:15px;color:var(--hm-ink2);line-height:1.55}
.hm-go{margin-top:auto;padding-top:6px;font:600 16px/1.3 var(--hm-title);color:var(--hm-bord)}

/* ---- the opening, with the jump links ---- */
.hm-intro{padding:46px 0 34px;background:linear-gradient(180deg,#fff,var(--hm-cream));text-align:center}
.hm-orn{display:flex;align-items:center;justify-content:center;gap:12px;color:var(--hm-gold);margin-bottom:14px}
.hm-orn::before,.hm-orn::after{content:"";width:70px;height:1px;background:currentColor}
.hm-intro h2{font-size:44px;color:var(--hm-navy)}
.hm-intro p{margin:10px auto 22px!important;max-width:640px;color:var(--hm-ink2);font-size:17px}
.hm-jump{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.hm-jump a{display:inline-flex;align-items:center;min-height:40px;padding:6px 16px;border-radius:999px;background:#fff;border:1px solid var(--hm-cream-line);font:600 17px/1.2 var(--hm-title);color:var(--hm-navy)}
.hm-jump a:hover{border-color:var(--hm-gold)}

/* ---- the season ---- */
/* the season's picture is a lazy <img> under a burgundy veil (a CSS background would load with the first view) */
.hm-season{position:relative;overflow:hidden;background:var(--hm-bord2);color:#fff}
.hm-season .hm-season-bg{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;z-index:0}
.hm-season::before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(61,1,20,.97) 0%,rgba(92,1,31,.93) 45%,rgba(92,1,31,.80) 100%)}
.hm-season > .hm-wrap{position:relative;z-index:2}
.hm-season .hm-k{color:var(--hm-gold-l)}
.hm-season .hm-sub{color:#f1dfe4}
.hm-season-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:32px;align-items:center}
.hm-season-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.hm-date{display:inline-block;margin:18px 0 22px!important;padding:10px 14px;border-radius:12px;background:rgba(255,255,255,.08);border:1px solid rgba(217,180,106,.5);font:600 18px/1.4 var(--hm-title);color:#fff}

/* ---- ask the rav ---- */
.hm-ask{background:var(--hm-cream)}
.hm-ask .hm-k{color:var(--hm-bord)}
.hm-ask-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.hm-q{display:flex;flex-direction:column;gap:10px;background:#fff;border:1px solid var(--hm-cream-line);border-top:3px solid var(--hm-gold);border-radius:14px;padding:20px 20px 18px;transition:transform .2s}
.hm-q:hover{transform:translateY(-3px)}
.hm-qk{font:600 14px/1.3 var(--hm-title);color:var(--hm-gold)}
.hm-q h3{font-size:23px;color:var(--hm-navy);line-height:1.3}
.hm-q h3::before{content:"ש:";color:var(--hm-bord);margin-inline-end:6px}
.hm-q p{font-size:15px;color:var(--hm-ink2);line-height:1.65}
.hm-q p::before{content:"ת:";font-family:var(--hm-title);font-weight:600;color:var(--hm-bord);margin-inline-end:6px;font-size:17px}
.hm-q .hm-go{margin-top:auto}

/* ---- segulot ---- */
.hm-segulot{background:linear-gradient(180deg,var(--hm-navy),var(--hm-navy2));color:var(--hm-on-dark)}
.hm-segulot .hm-sub{color:var(--hm-on-dark-mut)}
.hm-segulot .hm-k{color:var(--hm-gold-l)}
.hm-segulot .hm-chip{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.18);color:#fff}
.hm-segulot .hm-chip b{background:rgba(217,180,106,.18);color:var(--hm-gold-l)}
.hm-seg-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.hm-seg-grid .hm-ph{aspect-ratio:4/3.4;background:#f4efe3}
.hm-seg-grid .hm-tag{background:var(--hm-navy)}

/* ---- zohar ---- */
.hm-zohar{background:var(--hm-cream)}
.hm-zh-frame{border:1px solid var(--hm-gold);outline:1px solid rgba(181,139,60,.45);outline-offset:6px;border-radius:6px;padding:34px 34px 30px;background:#fffdf8}
.hm-zh-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:34px;align-items:start}
.hm-zohar .hm-k{color:var(--hm-gold)}
.hm-zh-near{margin:12px 0 18px!important;font:600 20px/1.4 var(--hm-title);color:var(--hm-bord)}
.hm-zh-near span{color:var(--hm-mut);font-weight:400}
.hm-zh-list{display:grid;gap:4px;margin:0 0 24px!important}
.hm-zh-list a{display:grid;grid-template-columns:38px 1fr;gap:10px;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--hm-cream-line);font:400 21px/1.45 var(--hm-title);color:var(--hm-ink)}
.hm-zh-list a:hover{color:var(--hm-bord)}
.hm-zh-list .n{font-weight:600;color:var(--hm-gold);font-size:22px}
.hm-zh-pic{display:block;border-radius:12px;overflow:hidden;aspect-ratio:4/5;background:var(--hm-navy)}
.hm-zh-pic img{width:100%;height:100%;object-fit:cover}
.hm-zh-pars{margin-top:26px;padding-top:20px;border-top:1px solid var(--hm-cream-line)}
.hm-zh-pars h3{font-size:19px;color:var(--hm-ink2);margin-bottom:12px}
.hm-zh-pars .hm-chips{margin:0!important}

/* ---- books ---- */
.hm-books{background:var(--hm-paper2)}
.hm-books .hm-k{color:var(--hm-bord)}
.hm-bk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.hm-bk-grid .hm-card h3{font-size:21px}

/* ---- today at the yeshiva ---- */
.hm-today{background:linear-gradient(180deg,var(--hm-navy2),var(--hm-navy));color:var(--hm-on-dark)}
.hm-today .hm-sub{color:var(--hm-on-dark-mut)}
.hm-today .hm-k{color:var(--hm-gold-l)}
.hm-td-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:28px;align-items:start}
.hm-td-grid.is-solo{grid-template-columns:minmax(0,1fr)}
.hm-td-day{font:600 22px/1.3 var(--hm-title);margin:0 0 12px!important;color:#fff}
.hm-td-list{border-top:1px solid rgba(255,255,255,.12)}
.hm-td-list li{display:grid;grid-template-columns:64px 1fr;gap:14px;padding:13px 0;border-bottom:1px solid rgba(255,255,255,.12)}
.hm-td-list time{font:600 21px/1.3 var(--hm-title);color:var(--hm-gold-l)}
.hm-td-list b{display:block;font:600 20px/1.3 var(--hm-title);color:#fff}
.hm-td-list span{font-size:15px;color:var(--hm-on-dark-mut)}
.hm-td-list li.is-featured b{color:var(--hm-gold-l)}
.hm-week{display:block;border-radius:16px;overflow:hidden;background:var(--hm-navy-card);border:1px solid rgba(217,180,106,.35);color:var(--hm-on-dark)}
.hm-week .hm-ph{aspect-ratio:16/9;background:var(--hm-navy2)}
.hm-week .hm-bd{padding:18px 20px 20px}
.hm-week h3{font-size:26px;color:#fff;margin:6px 0 8px}
.hm-week p{font-size:15px;color:var(--hm-on-dark-mut)}
.hm-week .hm-qk{color:var(--hm-gold-l)}
.hm-when{display:inline-block;align-self:flex-start;margin:12px 0 16px;padding:8px 12px;border-radius:10px;background:rgba(126,2,43,.55);box-shadow:var(--hm-ring);font:600 19px/1.3 var(--hm-title);color:#fff}
.hm-news{margin-top:30px}
.hm-news h3{font-size:24px;color:#fff;margin-bottom:14px}
.hm-news-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}

/* ---- tikunim and iluy neshama ---- */
.hm-tikunim{background:linear-gradient(180deg,var(--hm-bord2),var(--hm-bord3));color:#fff}
.hm-tikunim .hm-sub{color:#f1dfe4}
.hm-tikunim .hm-k{color:var(--hm-gold-l)}
.hm-tk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.hm-tk-grid .hm-tag{background:var(--hm-navy)}

/* ---- tablet ---- */
@media (max-width:1023px){
  .hm h2{font-size:34px}
  .hm-intro h2{font-size:38px}
  .hm-season-grid{grid-template-columns:1fr;gap:8px}
  .hm-ask-grid{grid-template-columns:1fr}
  .hm-seg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hm-zh-grid{gap:24px}
  .hm-td-grid{grid-template-columns:1fr}
  .hm-tk-grid,.hm-news-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:641px) and (max-width:1023px){
  .hm-week{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .hm-week .hm-ph{aspect-ratio:auto;height:100%;min-height:220px}
}

/* ---- phone ---- */
@media (max-width:640px){
  .hm-strip{padding:40px 0 44px}
  .hm h2{font-size:30px}
  .hm-intro{padding:36px 0 28px}
  .hm-intro h2{font-size:31px}
  .hm-sub{font-size:16px}
  .hm-jump a{font-size:16px;min-height:38px;padding:6px 13px}
  .hm-wide{display:none}
  /* each strip: heading, content, and its buttons last */
  .hm-strip > .hm-wrap{display:flex;flex-direction:column}
  .hm-head{display:contents}
  .hm-head-txt{margin-bottom:20px}
  .hm-head .hm-acts,.hm-season .hm-acts{order:10;margin-top:22px;width:100%}
  .hm-acts .hm-btn{flex:1 1 100%}
  .hm-news{order:11}
  .hm-season-grid{display:flex;flex-direction:column;align-items:stretch}
  .hm-season-txt{display:contents}
  .hm-season-cards{margin-top:18px}
  .hm-date{margin:14px 0 4px!important;align-self:flex-start}
  /* one card to a row; the season and the news cards keep their cover whole, full width (a small square beside the
     text would cut the cover's sides). Picture beside text only for tikunim, whose pictures hold no chanukiah. */
  .hm-season-cards,.hm-tk-grid,.hm-news-grid{grid-template-columns:1fr;gap:12px}
  .hm-tk-grid .hm-card{flex-direction:row;align-items:stretch}
  .hm-tk-grid .hm-ph{flex:0 0 118px;aspect-ratio:auto;min-height:118px}
  .hm-tk-grid .hm-tag{display:none}
  .hm-bd{padding:12px 14px}
  .hm-card h3{font-size:20px}
  .hm-seg-grid,.hm-bk-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .hm-seg-grid .hm-card h3,.hm-bk-grid .hm-card h3{font-size:19px}
  .hm-seg-grid .hm-card p,.hm-bk-grid .hm-card p{font-size:14px}
  .hm-seg-grid .hm-tag{font-size:13px;padding:5px 8px;top:8px;right:8px}
  .hm-chip{font-size:15px;min-height:36px;padding:5px 12px}
  .hm-zh-frame{padding:22px 16px 20px;outline-offset:4px}
  .hm-zh-grid{grid-template-columns:1fr;gap:18px}
  .hm-zh-pic{order:-1;aspect-ratio:16/9}
  .hm-zh-txt .hm-acts{width:100%}
  .hm-zh-list a{font-size:19px;grid-template-columns:30px 1fr}
  .hm-q{padding:16px}
  .hm-q h3{font-size:21px}
  .hm-td-list li{grid-template-columns:56px 1fr}
}
