/* ===================== SITE MAP PAGE ===================== */

.sitemap-intro {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 2rem 0.5rem;
  text-align: center;
  font-family: 'Arial Narrow', Arial, sans-serif;
}
.sitemap-intro p { font-size: 1.05rem; color: #555; line-height: 1.6; }

.sitemap-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem auto 0;
}
.sitemap-btn {
  text-decoration: none;
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 1.3rem;
  border: 2px solid #00b36b;
  color: #00b36b;
  transition: all 0.2s;
}
.sitemap-btn:hover { background: #00b36b; color: #fff; }

/* Interactive map */
.sitemap-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 1260px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
}
.sitemap-wrap {
  position: relative;
  max-width: 1000px;
  margin: 1.5rem auto 3rem;
  line-height: 0;
}
.sitemap-layout .sitemap-wrap { margin: 0; flex: 1 1 auto; min-width: 0; }
.sitemap-img { width: 100%; display: block; }

/* ---- Type legend (left of the map) ---- */
.sitemap-legend {
  width: 215px;
  flex-shrink: 0;
  font-family: 'Arial Narrow', Arial, sans-serif;
}
.legend-title {
  font-family: Garamond, Georgia, serif;
  font-size: 1.25rem;
  color: #222;
  margin: 0 0 0.6rem;
}
.legend-item,
.legend-reset {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 5px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  color: #333;
  transition: border-color 0.15s, background 0.15s;
}
.legend-item:hover,
.legend-reset:hover { border-color: #00b36b; background: #f6fbf8; }
.legend-item.active { border-color: #00b36b; background: #eef9f2; font-weight: bold; }
.legend-reset { justify-content: center; font-weight: bold; color: #00b36b; }
.legend-reset.active { background: #eef9f2; border-color: #00b36b; }
.legend-name { flex: 1; }
.legend-count {
  font-size: 0.8rem;
  color: #888;
  background: #f0f0f0;
  border-radius: 10px;
  padding: 0 0.45rem;
  min-width: 1.4rem;
  text-align: center;
}
.legend-item.active .legend-count { background: #d7f0e2; color: #1f7a4d; }
.legend-hint { font-size: 0.78rem; color: #999; margin: 0.6rem 0.2rem 0; line-height: 1.4; }
/* The selected type's pins just change colour (set inline by JS) — size stays the same. */

.sitemap-empty {
  max-width: 700px;
  margin: 2rem auto;
  text-align: center;
  font-family: 'Arial Narrow', Arial, sans-serif;
  color: #888;
  padding: 2rem;
}

/* Pins */
.site-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #00b36b;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.12s, background 0.12s;
}
.site-pin:hover, .site-pin:focus {
  background: #f39c12;
  transform: translate(-50%, -50%) scale(1.25);
  z-index: 5;
}

/* Site detail modal */
.site-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1500;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.site-modal.open { display: flex; }
.site-modal-box {
  background: #fff;
  max-width: 420px;
  width: 100%;
  border-top: 6px solid #00b36b;
  overflow: hidden;
  position: relative;
  font-family: 'Arial Narrow', Arial, sans-serif;
  max-height: 90vh;
  overflow-y: auto;
}
.site-modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}
.site-modal-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #eee;
  display: block;
}
.site-modal-body { padding: 1.1rem 1.3rem 1.4rem; }
.site-modal-num {
  font-family: Garamond, Georgia, serif;
  font-size: 1.7rem;
  color: #222;
  margin: 0 0 0.1rem;
}
.site-modal-type {
  color: #00b36b;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.site-modal-standard {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
  margin: 0.6rem 0 0.4rem;
}
.site-modal-subhead {
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
  margin: 0.8rem 0 0.3rem;
}
.site-modal-details {
  margin: 0 0 0.2rem;
  padding-left: 1.3rem;
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}
.site-modal-notes {
  font-size: 1rem;
  color: #444;
  line-height: 1.55;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid #eee;
}
.site-modal-book {
  display: inline-block;
  margin-top: 1rem;
  background: #00b36b;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 1.3rem;
}
.site-modal-book:hover { background: #009959; }

/* Stack the legend above the map and lay the types out as wrapping chips */
@media (max-width: 760px) {
  .sitemap-layout { flex-direction: column; gap: 0.8rem; }
  .sitemap-legend {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: stretch;
  }
  .legend-title { width: 100%; margin-bottom: 0.1rem; }
  .legend-reset { width: 100%; margin-bottom: 0.1rem; }
  .legend-item { width: auto; flex: 1 1 44%; margin-bottom: 0; }
  .legend-hint { width: 100%; margin-top: 0.2rem; }
}

@media (max-width: 600px) {
  .sitemap-wrap { margin: 1rem auto 2rem; }
  .site-pin { width: 22px; height: 22px; font-size: 0.66rem; }
}
