/* Plaques cards (from plaques.docx via mammoth) — a card per plaque
   rather than a table, so a photo + number + description reads naturally
   on a narrow phone screen instead of forcing sideways scroll. */
.plaques-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .plaques-grid {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  }
}

.plaque-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Only cards with map coordinates get click-to-locate behaviour (added
   via JS, since that's where it's known whether a pin exists). */
.plaque-card--clickable {
  cursor: pointer;
}

.plaque-card--clickable:hover {
  border-color: var(--color-border);
}

.plaque-card--clickable:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.plaque-card.is-active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.15), var(--shadow);
}

.plaque-card-media {
  position: relative;
  height: 12rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

/* "contain" rather than "cover": a plaque photo's edges (and the wording
   near them) are part of the point, so the whole photo is always shown,
   letterboxed on a white background — matching the plaque photos' own
   background — if it doesn't fill the box, rather than cropped top/bottom
   or side-to-side to fill it exactly. */
.plaque-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.plaque-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
}

.plaque-card-media .plaque-number {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
}

/* No photo yet — show the number as a normal badge above the text
   instead of floating it over an image that isn't there. */
.plaque-card--no-image .plaque-number {
  align-self: flex-start;
}

.plaque-card-body p {
  margin: 0 0 0.5rem;
}

.plaque-card-body p:last-child {
  margin-bottom: 0;
}

/* Map */
.plaques-map {
  width: 100%;
  height: 24rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

/* Numbered "drop pin" marker on the map, built from a plain div so it can
   carry the plaque number as text rather than needing custom marker
   images. */
.plaque-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--color-accent);
  border: 2px solid var(--color-accent-dark);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, background 0.15s ease;
}

.plaque-pin span {
  transform: rotate(45deg);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-sans);
}

/* Selected from either side (card click or marker click) — bigger and a
   different colour so it's obvious which plaque is highlighted. */
.plaque-pin--active {
  background: var(--color-primary);
  border-color: var(--color-primary-dark);
  z-index: 1000;
}
