/* ═══════════════════════════════════════════════════════════════════════
   דף הבית — "היום" לכל הרוחב: חיפוש הלכה · הילולת היום · זמני היום
   ומדור "ערכים ולוח השנה" (פסיפס צבעוני מהמכלול). index.html + home-day.js
   ═══════════════════════════════════════════════════════════════════════ */
.dw, .dl { --g: #F0C668; --g2: #D4A843; --pk: #E70F57; --pp: #6c63ff; --ink: #E6EBF4; --mut: #8D99B3;
  max-width: 1240px; margin: 18px auto; padding: 0 clamp(12px, 3vw, 26px); font-family: 'Heebo', 'Rubik', system-ui, sans-serif; color: var(--ink); box-sizing: border-box; }
.dw *, .dl * { box-sizing: border-box; }
.dw { display: grid; gap: 16px; }
.dw-kick { display: block; font-size: .8rem; font-weight: 800; letter-spacing: .02em; color: var(--g); margin-bottom: 2px; }
.dw-head, .dl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dw-head h2, .dl-head h2 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 900; color: #fff; line-height: 1.25; }
.dw-head a, .dl-head > a, .dw-zm-tools > a { color: #C9D2E3; font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.dw-head a:hover, .dl-head > a:hover, .dw-zm-tools > a:hover { color: #fff; }
.dw :focus-visible, .dl :focus-visible { outline: 3px solid var(--g); outline-offset: 2px; }
.sk { position: relative; overflow: hidden; background: rgba(255, 255, 255, .06) !important; }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent); animation: dwSk 1.3s infinite; }
@keyframes dwSk { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* ── חיפוש הלכה — רצועה דקה ── */
.dw-hal { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px 12px 18px; border-radius: 20px;
  background: linear-gradient(100deg, #15224a, #0d1630); border: 1px solid rgba(240, 198, 104, .28); box-shadow: 0 10px 30px rgba(5, 10, 25, .3); }
.dw-hal-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dw-hal-t .dw-ic { font-size: 1.3rem; }
.dw-hal-t b { font-size: 1.12rem; font-weight: 900; color: #fff; }
.dw-hal-t small { color: var(--mut); font-weight: 600; font-size: .82rem; }
.dw-hal-f { flex: 1 1 320px; display: flex; gap: 8px; background: #fff; border-radius: 14px; padding: 5px; }
.dw-hal-f input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 1rem 'Heebo', sans-serif; color: #15203A; padding: 8px 10px; }
.dw-hal-f input:focus { outline: none; }
.dw-hal-f button { border: 0; border-radius: 10px; background: var(--pk); color: #fff; font: 800 .98rem 'Heebo', sans-serif; padding: 9px 18px; cursor: pointer; }
.dw-hal-f button:hover { background: #f01a62; }
.dw-hal-l { display: flex; gap: 8px; flex-wrap: wrap; }
.dw-hal-l a { padding: 9px 14px; border-radius: 12px; font-weight: 800; font-size: .9rem; text-decoration: none; color: #15203A; background: var(--g); white-space: nowrap; }
.dw-hal-l a + a { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.dw-hal-l a:hover { filter: brightness(1.08); }

/* ── קופסה כללית ── */
.dw-box { position: relative; border-radius: 26px; padding: clamp(16px, 2.2vw, 24px); overflow: hidden;
  background: radial-gradient(90% 120% at 100% 0%, rgba(240, 198, 104, .1), transparent 60%), linear-gradient(160deg, #131f40, #0b1326);
  border: 1px solid rgba(240, 198, 104, .22); box-shadow: 0 20px 50px rgba(5, 10, 25, .35); }
.dw-head-a { display: flex; align-items: center; gap: 8px; }
.dw-arr { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.dw-arr:hover { background: rgba(255, 255, 255, .14); }

/* ── הילולת היום ── */
.dw-hil-row { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px;
  scrollbar-width: thin; scrollbar-color: rgba(240, 198, 104, .4) transparent; overscroll-behavior-x: contain; }
.dw-hil-row::-webkit-scrollbar { height: 6px; } .dw-hil-row::-webkit-scrollbar-thumb { background: rgba(240, 198, 104, .4); border-radius: 6px; }
.dw-hc { scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 12px 14px; border-radius: 20px;
  text-decoration: none; color: #fff; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .08); transition: transform .18s, background .18s, border-color .18s; min-height: 236px; }
.dw-hc:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .08); border-color: rgba(240, 198, 104, .4); }
.dw-ph { width: 118px; height: 118px; border-radius: 50%; padding: 3px; flex: none; background: conic-gradient(from 200deg, #F0C668, #E70F57, #6c63ff, #F0C668); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.dw-ph > * { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; object-position: 50% 20%; background: #0d1630; }
.dw-ph .dw-candle { display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2a2350, #0d1630 70%); }
.dw-candle i { position: relative; width: 16px; height: 40px; margin-top: 18px; border-radius: 4px; background: linear-gradient(#fff6dd, #e9d6a7); }
.dw-candle i::before { content: ""; position: absolute; left: 50%; top: -22px; width: 14px; height: 22px; margin-left: -7px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff 0 18%, #ffd36b 30%, #ff8a2b 70%); box-shadow: 0 0 22px 8px rgba(255, 186, 77, .45); animation: dwFl 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes dwFl { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08, .94) rotate(2deg); } }
.dw-hc b { font-size: .95rem; font-weight: 800; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.dw-hc small { font-size: .76rem; color: var(--g); font-weight: 700; }
.dw-hc em { font-style: normal; font-size: .76rem; color: var(--mut); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dw-hc .br { font-size: .66rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(231, 15, 87, .2); color: #ffb3c9; }
.dw-hc.sk { min-height: 236px; border: 0; }
.dw-hc.more { justify-content: center; font-weight: 800; color: var(--g); }
.dw-empty { color: var(--mut); padding: 18px 4px; } .dw-empty a { color: var(--g); font-weight: 800; }

/* ── זמני היום ── */
.dw-zm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dw-city { position: relative; }
.dw-city input { width: 190px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); color: #fff; padding: 8px 12px; font: 500 .92rem 'Heebo', sans-serif; }
.dw-city input::placeholder { color: #9aa6bf; } .dw-city input:focus { outline: none; border-color: var(--g); }
.dw-sug { display: none; position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 30; width: 250px; max-height: 300px; overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); padding: 4px; }
.dw-sug.open { display: block; }
.dw-sug button { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: none; text-align: start; padding: 8px 10px; border-radius: 8px; font: 600 .92rem 'Heebo', sans-serif; color: #15203A; cursor: pointer; }
.dw-sug button span:last-child { color: #8a94a8; font-weight: 500; font-size: .8rem; direction: ltr; }
.dw-sug button:hover, .dw-sug button.on { background: #FFF5DA; }
.dw-sug .none { padding: 10px; color: #6b7385; font-size: .9rem; }
.dw-geo { border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); color: #fff; border-radius: 12px; padding: 8px 12px; font: 700 .9rem 'Heebo', sans-serif; cursor: pointer; }
.dw-geo:hover { background: rgba(255, 255, 255, .14); } .dw-geo:disabled { opacity: .6; }
.dw-tl { position: relative; height: 12px; border-radius: 12px; margin: 4px 4px 22px;
  background: linear-gradient(to left, #1d2557 0%, #6b4f9e 7%, #f59e6b 13%, #ffd27a 20%, #8fd3ff 40%, #8fd3ff 62%, #ffd27a 80%, #e8657a 88%, #5b3c8f 94%, #1d2557 100%); }
.dw-tl b { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px -4.5px 0 0; border-radius: 50%; background: #fff; border: 2px solid #0b1326; transform: translateX(50%); }
.dw-tl b.nx { background: var(--g); width: 13px; height: 13px; margin-top: -6.5px; }
.dw-tl-now { position: absolute; top: -7px; bottom: -7px; width: 4px; margin-inline-start: -2px; border-radius: 4px; background: var(--pk); box-shadow: 0 0 0 3px rgba(231, 15, 87, .3); display: none; }
.dw-tl-now::after { content: "עכשיו"; position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-size: .68rem; font-weight: 800; color: #ffb3c9; white-space: nowrap; }
.dw-zm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); gap: 9px; }
.dw-zc { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 11px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); min-height: 92px; transition: opacity .2s; }
.dw-zc i { font-style: normal; font-size: 1.25rem; line-height: 1; }
.dw-zc span { font-size: .8rem; font-weight: 700; color: #C9D2E3; margin-top: 4px; }
.dw-zc b { font-size: 1.45rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.dw-zc.past { opacity: .5; }
.dw-zc.next { background: linear-gradient(160deg, rgba(240, 198, 104, .22), rgba(240, 198, 104, .06)); border-color: rgba(240, 198, 104, .6); box-shadow: 0 0 0 3px rgba(240, 198, 104, .12); }
.dw-zc .cd { position: absolute; top: 9px; inset-inline-end: 9px; font-size: .68rem; font-weight: 800; color: #15203A; background: var(--g); border-radius: 999px; padding: 2px 8px; }
.dw-st { margin: 10px 2px 0; font-size: .82rem; color: var(--mut); min-height: 1em; }
.dw-st:empty { display: none; }

/* ── ערכים ולוח השנה — פסיפס ── */
.dl { margin-top: 26px; margin-bottom: 26px; }
.dl-head > div h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.dl-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 158px; gap: 14px; }
.dl-t { position: relative; overflow: hidden; border-radius: 24px; color: #fff; text-decoration: none; grid-row: span 2; grid-column: span 3; isolation: isolate;
  box-shadow: 0 18px 40px rgba(5, 10, 25, .3); border: 1px solid rgba(255, 255, 255, .1); display: flex; flex-direction: column; }
.dl-t.dl-today, .dl-t.dl-erech { grid-column: span 6; }
.dl-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transition: transform 6s ease, opacity .8s; }
.dl-t:hover .dl-bg { transform: scale(1.05); }
.dl-t::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.dl-in { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; height: 100%; }
.dl-k { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .28); backdrop-filter: blur(6px); color: #fff; }
.dl-t h3 { margin: 2px 0 0; font-size: 1.22rem; font-weight: 900; line-height: 1.3; }
.dl-t p { margin: 0; font-size: .9rem; line-height: 1.6; color: rgba(255, 255, 255, .88); }
.dl-more { margin-top: auto; align-self: flex-start; font-size: .84rem; font-weight: 800; color: #fff; text-decoration: none; border-bottom: 2px solid rgba(255, 255, 255, .5); }
.dl-more:hover { border-color: #fff; }
/* היום בלוח */
.dl-today::before { background: linear-gradient(135deg, rgba(108, 99, 255, .94) 0%, rgba(86, 52, 170, .9) 45%, rgba(231, 15, 87, .78) 100%); }
.dl-today .dl-in { flex-direction: row; gap: 20px; }
.dl-date { flex: none; width: 34%; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-inline-end: 18px; border-inline-end: 1px solid rgba(255, 255, 255, .25); }
.dl-date b { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 900; line-height: 1.05; }
.dl-date span { font-weight: 700; color: rgba(255, 255, 255, .85); }
.dl-date .hol { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.dl-date .hol i { font-style: normal; font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .2); }
.dl-ev { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dl-ev h3 { font-size: 1rem; color: #FFE7A8; }
.dl-ev ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.dl-ev li { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; line-height: 1.5; }
.dl-ev li em { flex: none; font-style: normal; font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .25); white-space: nowrap; margin-top: 2px; }
.dl-ev li span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-ev li a { color: #fff; }
/* נפטרו ביום הזה — תמונות מתחלפות */
.dl-died::before { background: linear-gradient(to top, rgba(8, 10, 24, .96) 0%, rgba(8, 10, 24, .55) 45%, rgba(8, 10, 24, .1) 75%); }
.dl-died .dl-bg { background-position: 50% 22%; }
.dl-died .dl-in { justify-content: flex-end; }
.dl-died h3 { font-size: 1.1rem; }
.dl-died small { color: var(--g); font-weight: 800; font-size: .8rem; }
.dl-dots { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.dl-dots button { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); overflow: hidden; background: #222 center/cover; cursor: pointer; opacity: .65; }
.dl-dots button.on { border-color: var(--g); opacity: 1; transform: scale(1.15); }
.dl-died .dl-k { position: absolute; top: 14px; inset-inline-start: 16px; }
/* פרשה */
.dl-parsha::before { background: linear-gradient(to top, rgba(74, 44, 6, .96) 0%, rgba(140, 92, 20, .78) 50%, rgba(212, 168, 67, .35) 100%); }
.dl-parsha p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dl-parsha .dl-in { justify-content: flex-end; }
.dl-parsha h3 { font-size: 1.5rem; }
/* ערך יומי */
.dl-erech { flex-direction: row; background: linear-gradient(135deg, #0f766e, #134e4a 70%); }
.dl-erech::before { display: none; }
.dl-erech .dl-img { flex: 0 0 42%; background: #0b2b29 center/cover; position: relative; }
.dl-erech .dl-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, transparent 60%, rgba(15, 118, 110, .9)); }
.dl-erech .dl-in { flex: 1; min-width: 0; }
.dl-erech h3 { font-size: 1.5rem; }
.dl-erech p { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
/* מועדים קרובים */
.dl-up { background: linear-gradient(150deg, #2563eb, #1e3a8a 70%); }
.dl-up::before { background: radial-gradient(circle at 15% 110%, rgba(240, 198, 104, .35), transparent 55%); }
.dl-up ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.dl-up li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 12px; background: rgba(255, 255, 255, .12); font-weight: 700; font-size: .9rem; }
.dl-up li b { flex: none; font-size: .78rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; background: #fff; color: #1e3a8a; }
.dl-up li.rc { background: rgba(255, 255, 255, .06); font-weight: 600; }
.dl-up li:first-child b { background: var(--g); color: #15203A; }
/* הידעת */
.dl-know::before { background: linear-gradient(to top, rgba(110, 8, 45, .97) 0%, rgba(231, 15, 87, .82) 60%, rgba(231, 15, 87, .55) 100%); }
.dl-know .dl-in { justify-content: flex-end; }
.dl-know .yrs { font-size: 2.1rem; font-weight: 900; line-height: 1; }
.dl-know .yrs small { font-size: .95rem; font-weight: 700; }
.dl-know p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.dl-know .dl-next { margin-top: auto; align-self: flex-start; border: 0; border-radius: 10px; padding: 7px 14px; background: rgba(255, 255, 255, .92); color: #7a0b33; font: 800 .84rem 'Heebo', sans-serif; cursor: pointer; }
.dl-know .dl-k { position: absolute; top: 14px; inset-inline-start: 16px; }
.dl-src { margin: 12px 4px 0; font-size: .78rem; color: var(--mut); }
.dl-src a { color: #C9D2E3; }
.dl-t.sk { border: 0; box-shadow: none; }
.dl-parsha .dl-in, .dl-know .dl-in, .dl-died .dl-in { padding-top: 50px; }

/* ── מסכים בינוניים וקטנים ── */
@media (max-width: 1000px) {
  .dl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .dl-t, .dl-t.dl-today, .dl-t.dl-erech { grid-column: span 3; }
  .dl-t.dl-today, .dl-t.dl-erech { grid-column: span 6; }
}
@media (max-width: 760px) {
  .dw-hal { padding: 12px; }
  .dw-hal-l { width: 100%; } .dw-hal-l a { flex: 1; text-align: center; }
  .dw-zm-tools { width: 100%; } .dw-city { flex: 1; } .dw-city input { width: 100%; }
  .dw-zm-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 112px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .dw-zc { scroll-snap-align: start; }
  .dw-hil-row { grid-auto-columns: 150px; }
  .dw-ph { width: 100px; height: 100px; }
  .dw-hc { min-height: 214px; }
  .dw-head-a .dw-arr { display: none; }
}
@media (max-width: 600px) {
  .dl-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .dl-t, .dl-t.dl-today, .dl-t.dl-erech { grid-column: auto; grid-row: auto; min-height: 260px; }
  .dl-today .dl-in { flex-direction: column; gap: 12px; }
  .dl-date { width: auto; border: 0; padding: 0 0 12px; border-bottom: 1px solid rgba(255, 255, 255, .25); }
  .dl-erech { flex-direction: column; } .dl-erech .dl-img { flex: none; height: 170px; }
  .dl-erech .dl-img::after { background: linear-gradient(to top, rgba(15, 118, 110, .95), transparent 55%); }
  .dl-died { min-height: 330px; }
}
@media (prefers-reduced-motion: reduce) { .dw *, .dl * { animation: none !important; transition: none !important; } }
