/*
 * HAR SHALOM CEMETERY — Interactive Cemetery Walkthrough & Walk-From-Gate Styles.
 *
 * File     public/harshalom/static/walk.css
 * Version  0.040.0 · 2026-12-04
 *
 * CHANGELOG (Rule 45)
 *   0.025.0 · 2026-11-27 — created.
 *   0.040.0 · 2026-12-04 · harshalom/0.040-walk-honest — .hs-wk__mm-turn (the overhead picture and its marks turned
 *     upright together, about their middle; the picture's box keeps its size; the corners show a soft, blurred
 *     copy of the photo, .hs-wk__minimap::before with --hs-wk-aerial); .hs-wk__kohen-note (the main drive is approximate, not a confirmed route for Kohanim);
 *     .hs-wk__dot--target (gold: the grave you are heading to).
 *
 * Light, bright cemetery palette (Law 6 — never dark themes). Full-width responsive layout
 * across desktop monitors, tablets, and mobile phones.
 */

.hs-wk {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 16px clamp(12px, 2.2vw, 28px) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  overflow-x: clip;
}

.hs-wk [hidden] {
  display: none !important;
}

.hs-wk__bar {
  background: #ffffff;
  border: 1.5px solid #d5ddd6;
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

@media (max-width: 960px) {
  .hs-wk__bar {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hs-wk__search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.hs-wk__lbl {
  font-size: 14px;
  font-weight: 700;
  color: #1f3d2f;
}

.hs-wk__srow {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.hs-wk__inp {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 9px 13px;
  border: 1.5px solid #bcc9bf;
  border-radius: 10px;
  font-size: 15px;
  background: #fbfaf6;
  color: #1a241e;
}

.hs-wk__inp:focus {
  outline: 2px solid #2c5e46;
  background: #ffffff;
}

.hs-wk__results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  margin: 4px 0 0;
  padding: 6px;
  list-style: none;
  background: #ffffff;
  border: 1.5px solid #b8c8bc;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(20, 38, 28, 0.14);
  max-height: 290px;
  overflow-y: auto;
}

.hs-wk__resbtn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 9px 11px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #1a241e;
  font-size: 14px;
}

.hs-wk__resbtn:hover,
.hs-wk__resbtn:focus {
  background: #eef5f0;
}

.hs-wk__toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.hs-wk__kohen {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-radius: 10px;
  background: #f2f7f3;
  border: 1px solid #c3d5c8;
  cursor: pointer;
  font-size: 13.5px;
  color: #1d3529;
  max-width: 100%;
  min-width: 0;
}

.hs-wk__kohen input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #265940;
}

.hs-wk__kohen span {
  display: grid;
  line-height: 1.25;
  min-width: 0;
}

.hs-wk__kohen small {
  color: #4b5b52;
  font-size: 12px;
}

.hs-wk__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hs-wk__route {
  background: #eef6f1;
  border: 1.5px solid #b3cebd;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.hs-wk__route-txt {
  font-size: 14.5px;
  color: #1b3528;
  min-width: 0;
  overflow-wrap: break-word;
}

.hs-wk__route-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.hs-wk__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, 0.95fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 1040px) {
  .hs-wk__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .hs-wk {
    padding: 10px 10px 28px;
    gap: 10px;
  }
  .hs-wk__bar,
  .hs-wk__route,
  .hs-wk__stage-card,
  .hs-wk__minimap-card,
  .hs-wk__sec-card {
    padding: 10px 12px;
  }
  .hs-wk__viewport {
    min-height: 240px;
  }
}

.hs-wk__stage-card,
.hs-wk__minimap-card,
.hs-wk__sec-card {
  background: #ffffff;
  border: 1.5px solid #d5ddd6;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(24, 42, 32, 0.04);
}

.hs-wk__side {
  display: grid;
  gap: 16px;
}

.hs-wk__stage-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hs-wk__spot-badge,
.hs-wk__mode-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
  margin-bottom: 4px;
}

.hs-wk__spot-badge {
  background: #e9f4ed;
  border: 1px solid #b4d1be;
  color: #1f4b35;
}

.hs-wk__mode-badge {
  background: #fbf4e4;
  border: 1px solid #e2ca95;
  color: #6b4e16;
}

.hs-wk__spot-title {
  margin: 2px 0 0;
  font-size: clamp(18px, 2.1vw, 22px);
  color: #1c3528;
}

.hs-wk__zoom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hs-wk__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 310px;
  max-height: 580px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid #c5d2c8;
  background: linear-gradient(180deg, #dcebf7 0%, #f3f6f0 54%, #dce6d5 100%);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.hs-wk__viewport:active {
  cursor: grabbing;
}

.hs-wk__canvas,
.hs-wk__pano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hs-wk__pano {
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 50% 50%;
}

.hs-wk__compass {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #c6d3c9;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1f3d2f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  white-space: nowrap;
}

.hs-wk__pins {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hs-wk__pin {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #2b5c44;
  border-radius: 10px;
  padding: 5px 9px;
  box-shadow: 0 4px 12px rgba(20, 38, 28, 0.16);
  color: #18261e;
  cursor: pointer;
  max-width: 210px;
  text-align: center;
  line-height: 1.25;
  transition: transform 0.12s ease;
}

.hs-wk__pin:hover,
.hs-wk__pin.is-target {
  background: #fff9e8;
  border-color: #b8821c;
  z-index: 8;
  transform: translate(-50%, -104%) scale(1.05);
}

.hs-wk__pin--mid {
  padding: 3px 7px;
  font-size: 11.5px;
  opacity: 0.92;
}

.hs-wk__pin-he {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: #1b382a;
}

.hs-wk__pin-en {
  display: block;
  font-size: 11.5px;
  color: #3d4d44;
}

.hs-wk__pin-meta {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #2b5c44;
}

.hs-wk__pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #2b5c44;
}

/* Dignified Photo-Rich Stone & Grounds Panoramic Stage (Ticket #1762 — zero cartoon shapes, zero overlapping cards) */
.hs-wk__viewport.is-gallery {
  aspect-ratio: auto;
  min-height: 320px;
  max-height: none;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #f6f4ed 0%, #eef3ee 100%);
}

.hs-wk__viewport.is-gallery .hs-wk__compass {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  z-index: 6;
}

.hs-wk__viewport.is-gallery .hs-wk__pins {
  position: relative;
  inset: auto;
  width: 100%;
  pointer-events: auto;
}

.hs-wk__viewport.is-gallery .hs-wk__steps {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
}

.hs-wk__gallery {
  width: 100%;
}

.hs-wk__sgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.hs-wk__scard.hs-wk__pin {
  position: relative;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1.5px solid #c9d6cd;
  box-shadow: 0 6px 18px rgba(20, 38, 28, 0.08);
  text-align: center;
}

.hs-wk__scard.hs-wk__pin::after {
  display: none;
}

.hs-wk__scard.hs-wk__pin:hover {
  border-color: #2b5c44;
  box-shadow: 0 8px 22px rgba(20, 38, 28, 0.14);
}

.hs-wk__scard.hs-wk__pin.is-target {
  background: #fffaf0;
  border: 2px solid #b8821c;
  box-shadow: 0 8px 24px rgba(184, 130, 28, 0.22);
}

.hs-wk__scard-media {
  display: block;
  width: 100%;
  height: 152px;
  background: #eae8e1;
  overflow: hidden;
  border-bottom: 1px solid #e0ddd2;
}

.hs-wk__scard-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.hs-wk__scard-crest {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 112px;
  background: linear-gradient(180deg, #f3f1ea 0%, #e5e2d7 100%);
  border-bottom: 1px solid #dad6c8;
  color: #2c3e34;
}

.hs-wk__scard-crest strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.hs-wk__scard-crest small {
  font-size: 12px;
  font-weight: 700;
  color: #54635a;
}

.hs-wk__scard-body {
  display: grid;
  gap: 3px;
  padding: 10px 12px 12px;
}

.hs-wk__sempty {
  margin: 18px auto;
  max-width: 520px;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #cad6ce;
  text-align: center;
  font-size: 14.5px;
  color: #253d30;
}

@media (max-width: 640px) {
  .hs-wk__sgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .hs-wk__scard-media {
    height: 118px;
  }
  .hs-wk__scard-crest {
    height: 86px;
  }
}

.hs-wk__steps {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.hs-wk__stepbtn {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #265940;
  color: #1b3b2b;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(18, 36, 26, 0.15);
}

.hs-wk__stepbtn:hover {
  background: #e9f5ee;
}

.hs-wk__stepbtn--route {
  background: #22543d;
  color: #ffffff;
  border-color: #1b4330;
}

.hs-wk__stepbtn--route:hover {
  background: #1b4330;
}

.hs-wk__gravecard {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdf8eb;
  border: 1.5px solid #e3c887;
}

.hs-wk__gc-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.hs-wk__gc-he {
  font-size: 17px;
  font-weight: 700;
  color: #1b3528;
}

.hs-wk__gc-en {
  font-size: 15px;
  font-weight: 600;
}

.hs-wk__gc-loc {
  font-size: 13px;
  color: #4c5951;
}

.hs-wk__gc-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hs-wk__nearby {
  margin-top: 16px;
}

.hs-wk__subh {
  margin: 0 0 8px;
  font-size: 16px;
  color: #1f3d2f;
}

.hs-wk__nearlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

.hs-wk__nearlink {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f8faf8;
  border: 1px solid #d5dfd7;
  text-decoration: none;
  color: #1b2620;
}

.hs-wk__nearlink:hover {
  background: #edf5ef;
  border-color: #9ec0aa;
}

.hs-wk__near-he {
  font-weight: 700;
  font-size: 14px;
  color: #1f3d2f;
}

.hs-wk__near-en {
  font-size: 12.5px;
  color: #3f4e45;
}

.hs-wk__near-dist {
  font-size: 11.5px;
  font-weight: 700;
  color: #2b5c44;
}

.hs-wk__mm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hs-wk__mm-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hs-wk__show-paths {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4f7f5;
  border: 1px solid #c6d4ca;
  font-size: 12.5px;
  font-weight: 600;
  color: #1f3d2f;
  cursor: pointer;
}

.hs-wk__show-paths input {
  width: 15px;
  height: 15px;
  accent-color: #265940;
}

.hs-wk__mm-hint {
  margin: 4px 0 10px;
  font-size: 13px;
  color: #4c5a51;
}

.hs-wk__minimap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #c7d4ca;
  background: #e7ede8;
  cursor: pointer;
}

.hs-wk__mm-img {
  display: block;
  width: 100%;
  height: auto;
}

.hs-wk__mm-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hs-wk__legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #3d4b42;
}

.hs-wk__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.hs-wk__dot--kohen {
  background: #1f7a4c;
}

.hs-wk__dot--aisle {
  background: #c98a1e;
}

.hs-wk__dot--route {
  background: #1d5bbf;
}

.hs-wk__secchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hs-wk__secchip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f3f7f4;
  border: 1px solid #c6d6cb;
  color: #1f3d2f;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.hs-wk__secchip:hover,
.hs-wk__secchip.is-active {
  background: #22543d;
  border-color: #22543d;
  color: #ffffff;
}

/* 0.040 — the overhead picture stands upright: the picture and everything drawn on it turn together */
.hs-wk__mm-turn {
  position: relative;
  z-index: 1;
  transform-origin: 50% 50%;
}

/* …and the corners the turn leaves show a soft, blurred copy of the same photo (no grey wedges; nothing of the
   cemetery is cut off, as enlarging the picture to cover them would) */
.hs-wk__minimap::before {
  content: '';
  position: absolute;
  inset: -12px;
  background-image: var(--hs-wk-aerial, none);
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(0.85) brightness(1.05);
}

.hs-wk__kohen-note {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7e6;
  border: 1px solid #ecd29a;
  font-size: 13px;
  line-height: 1.45;
  color: #5a4210;
}

.hs-wk__kohen-note a {
  font-weight: 700;
  color: #1f5f40;
  white-space: nowrap;
}

.hs-wk__dot--target {
  background: #f5b82e;
  border: 1px solid #6e4700;
}
