/* לוגואים בכרטיסי המוסדות: מלבן לבן מעוגל, כדי שלוגו רחב ייראה במלואו */
.card[data-mosad] { cursor: pointer; }
.card .card__logo { width: auto; height: 92px; max-width: 190px; border-radius: 16px; padding: 8px 12px; object-fit: contain; }
.card .card__logo--round { width: 92px; padding: 0; border-radius: 50%; }
.card__more { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 18px; padding: 10px 18px; min-height: 44px; border: 1px solid color-mix(in srgb, var(--gold) 70%, transparent); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-weight: 800; cursor: pointer; transition: background .25s, color .25s; }
.card__more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.card__more:hover { background: var(--gold); color: var(--ink); }
.card__more + .card__link { margin-top: 10px; }

/* החלון */
.md { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.md[hidden] { display: none; }
.md__back { position: absolute; inset: 0; background: rgb(14 8 3 / .72); backdrop-filter: blur(6px); animation: mdFade .3s ease; }
.md__sheet { position: relative; width: min(860px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 26px; background: #fffaf1; color: var(--ink); box-shadow: 0 40px 100px -30px rgb(0 0 0 / .8); animation: mdIn .4s cubic-bezier(.2,.8,.2,1); }
.md__x { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .9); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgb(0 0 0 / .2); }
.md__head { display: flex; align-items: center; gap: 22px; padding: 34px 34px 26px; background: linear-gradient(160deg, var(--night), var(--night-2)); color: #fff; border-radius: 26px 26px 0 0; }
.md__logo { flex: 0 0 auto; height: 104px; width: auto; max-width: 210px; object-fit: contain; background: #fff; border-radius: 18px; padding: 8px 12px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 60%, transparent); }
.md__logo--round { width: 104px; padding: 0; border-radius: 50%; }
.md__age { margin: 0; font-size: 14px; font-weight: 800; color: var(--gold); }
.md__name { margin: 4px 0 0; font-size: clamp(26px, 4vw, 38px); font-weight: 900; line-height: 1.15; }
.md__body { padding: 28px 34px 34px; }
.md__desc { margin: 0 0 20px; font-size: 18px; line-height: 1.75; }
.md__points { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.md__points li { position: relative; padding: 12px 16px 12px 14px; padding-inline-start: 40px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .07); font-weight: 700; font-size: 15px; }
.md__points li::before { content: ''; position: absolute; inset-inline-start: 14px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--sun-l, #ffe7a6), var(--gold)); }
.md__h { margin: 0 0 12px; font-size: 20px; font-weight: 900; }
.md__gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 28px; }
.md__gallery button { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #000; cursor: zoom-in; }
.md__gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.md__gallery button:hover img { transform: scale(1.06); }
.md__gallery span { position: absolute; inset-inline: 0; bottom: 0; padding: 18px 10px 8px; font-size: 13px; font-weight: 700; color: #fff; text-align: start; background: linear-gradient(transparent, rgb(0 0 0 / .7)); }
.md__gallery.is-empty { display: block; padding: 26px; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--gold) 55%, transparent); text-align: center; color: var(--muted, #6b5a48); font-weight: 700; }
.md__gallery.is-empty p { margin: 0; }
.md__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.md__btn { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 800; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgb(0 0 0 / .12); }
.md__btn--gold { background: var(--gold); box-shadow: none; direction: ltr; unicode-bidi: isolate; }
.md__btn:hover { filter: brightness(1.05); }
.md__lb { position: fixed; inset: 0; z-index: 3; display: grid; place-items: center; align-content: center; gap: 10px; background: rgb(0 0 0 / .92); cursor: zoom-out; }
.md__lb[hidden] { display: none; }
.md__lb img { max-width: 94vw; max-height: 82vh; border-radius: 12px; }
.md__lb p { margin: 0; color: #fff; font-weight: 700; }
.md__lbx { position: absolute; top: 16px; inset-inline-start: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 26px; cursor: pointer; }
html.md-open { overflow: hidden; }
@keyframes mdFade { from { opacity: 0; } }
@keyframes mdIn { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@media (max-width: 640px) {
  .md { padding: 0; place-items: end stretch; }
  .md__sheet { max-height: 92vh; border-radius: 22px 22px 0 0; }
  .md__head { flex-direction: column; text-align: center; padding: 26px 20px 20px; border-radius: 22px 22px 0 0; gap: 12px; }
  .md__logo { height: 84px; }
  .md__logo--round { width: 84px; }
  .md__body { padding: 20px 18px 28px; }
  .md__desc { font-size: 16px; }
  .md__acts .md__btn { flex: 1 1 100%; justify-content: center; }
}

.md__more p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.8; color: color-mix(in srgb, var(--ink) 88%, #fff); }
.md__more { margin-bottom: 22px; }
.md__lbn { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .9); font-size: 30px; line-height: 1; cursor: pointer; }
.md__lbn--prev { right: 16px; }
.md__lbn--next { left: 16px; }
