/* Partner Gyms, the public map (templates/training_gyms_map.html): Training's HillerFit Black (static/training_look.css's
   colours, its own copies of Barlow Condensed and Inter), dark whatever the site's theme; the top bar keeps the site's.
   Fits a 320 px screen. */

body:has(main.pgm-main) { background: #0B0B0C; }
main.pgm-main { background: #0B0B0C; color: #F2F2F2; }
.pgm {
  --pgm-panel: #141416; --pgm-line: #26262A; --pgm-muted: #A1A1A8; --pgm-crimson: #CC0022; --pgm-red: #E11B22;
  --pgm-glow: #5E0714; --pgm-edge: #3A0A14; --pgm-link: #FF4D5E; --pgm-display: "Barlow Condensed HF", "Barlow Condensed", sans-serif;
  max-width: 1100px; margin: 0 auto; min-width: 0; font-family: Inter, system-ui, sans-serif; color: #F2F2F2;
}
.pgm :is(h1, h2, h3) { font-family: var(--pgm-display); font-style: italic; font-weight: 800; text-transform: uppercase; color: #fff; }

/* the band: black, edge to edge of the page, the crimson glow at its top right, a crimson line under it */
.pgm-band {
  position: relative; overflow: hidden; margin: -24px -24px 20px; padding: 32px 24px 26px;
  background: radial-gradient(420px 300px at calc(100% + 40px) -40px, var(--pgm-glow), rgba(94, 7, 20, 0) 100%), #000;
  border-bottom: 2px solid var(--pgm-crimson);
}
.pgm-title { margin: 0; font-size: clamp(40px, 7vw, 64px); line-height: 0.95; }
.pgm-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; padding: 16px 18px;
  background: linear-gradient(90deg, #1A0207, #0B0B0C); border: 1px solid var(--pgm-edge); border-radius: 14px;
}
.pgm-cta > div { min-width: 0; }
.pgm-cta h2 { margin: 0; font-size: 26px; line-height: 1; }
.pgm-cta p { margin: 4px 0 0; color: var(--pgm-muted); font-size: 14px; }
.pgm-apply {
  margin-left: auto; padding: 11px 22px; border-radius: 10px; background: var(--pgm-crimson); color: #fff; text-decoration: none;
  font: italic 800 18px/1.2 var(--pgm-display); text-transform: uppercase; letter-spacing: .04em;
}
.pgm-apply:hover { background: var(--pgm-red); color: #fff; }
.pgm-apply:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* the map */
/* the 3D feel (his ask, 2026-10-30: "slightly 3d, not crazy"): the map leans back like a board on a table, a soft red glow
   under it and a dark fade at its edges; the pins drop in and pulse */
.pgm-stage { perspective: 1100px; perspective-origin: 50% -20%; }
.pgm-board { position: relative; transform: rotateX(14deg); transform-origin: 50% 100%; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--pgm-edge); box-shadow: 0 30px 50px -20px rgba(225, 27, 34, .35), 0 18px 40px rgba(0, 0, 0, .8); }
.pgm-board::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 500;
  background: radial-gradient(ellipse at 50% 45%, transparent 62%, rgba(0, 0, 0, .5) 100%), linear-gradient(to bottom, rgba(0, 0, 0, .3), transparent 20%); }
.pgm-map { height: min(62vh, 520px); background: #000; z-index: 0; }
.pgm-map .leaflet-tile-pane {
  filter: grayscale(1) invert(1) contrast(1.8) brightness(1.1) sepia(.7) hue-rotate(-50deg) saturate(3);  /* map D: mostly black, thin red lines (his pick, 2026-10-30) */
}
.pgm-map.leaflet-container { font-family: Inter, system-ui, sans-serif; background: #000; }
.pgm-map .leaflet-control-attribution { background: rgba(0, 0, 0, .7); color: #888; }
.pgm-map .leaflet-control-attribution a { color: #bbb; }
.pgm-map .leaflet-bar { border-color: #333; }
.pgm-map .leaflet-bar a { background: var(--pgm-panel); color: #fff; border-bottom-color: #333; }
.pgm-map .leaflet-bar a:is(:hover, :focus) { background: #222226; color: #fff; }
.pgm-map .leaflet-bar a.leaflet-disabled { background: #0B0B0C; color: #555; }
.pgm-map .leaflet-popup-content-wrapper, .pgm-map .leaflet-popup-tip { background: var(--pgm-panel); color: #F2F2F2; border: 1px solid var(--pgm-edge); }
.pgm-map .leaflet-popup-content { font-size: 14px; }
.pgm-map a.leaflet-popup-close-button { color: #bbb; }
.pgm-pop-name { display: block; font: italic 800 20px/1.1 var(--pgm-display); text-transform: uppercase; color: #fff; }
.pgm-pop-place { color: var(--pgm-muted); }
.pgm-map .leaflet-popup-content a { color: var(--pgm-link); }

/* the gyms */
.pgm-count { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 22px 0 10px; }
.pgm-count h2 { margin: 0; font-size: 26px; }
.pgm-count span { flex: none; color: var(--pgm-muted); font-size: 14px; }
.pgm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pgm-list li {
  min-width: 0; padding: 14px; border-radius: 12px; background: var(--pgm-panel); border: 1px solid var(--pgm-line);
  border-left: 3px solid var(--pgm-crimson); overflow-wrap: anywhere;
}
.pgm-list h3 { margin: 0; font-size: 21px; line-height: 1.1; }
.pgm-list p { margin: 2px 0 0; color: var(--pgm-muted); font-size: 14px; }
.pgm-tag { display: inline-block; margin-top: 8px; padding: 2px 9px; border: 1px solid var(--pgm-glow); border-radius: 99px; color: var(--pgm-link); font-size: 12px; }
.pgm-empty { margin: 0; color: var(--pgm-muted); font-size: 15px; }

@media (max-width: 720px) {
  .pgm-band { margin: -16px -16px 16px; padding: 24px 16px 20px; }
  .pgm-cta { padding: 14px; }
  .pgm-cta h2 { font-size: 22px; }
}

/* the pins: glossy red, the H, a shadow on the ground with a slow pulse; they drop in one by one */
.pgm-pin3 { position: relative; width: 36px; height: 52px; }
.pgm-pin3 .pgm-head { position: absolute; left: 1px; top: 0; width: 34px; height: 34px; box-sizing: border-box; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: radial-gradient(circle at 32% 28%, #FF8A8F 0, #FF2B33 22%, #CC0022 60%, #7A0012 100%);
  border: 2px solid #fff; box-shadow: 4px 6px 10px rgba(0, 0, 0, .6), 0 0 20px rgba(255, 40, 50, .8); display: grid; place-items: center; }
.pgm-pin3 .pgm-head span { transform: rotate(45deg); font: italic 800 17px/1 var(--pgm-display); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pgm-pin3 .pgm-ground { position: absolute; left: 6px; bottom: 0; width: 24px; height: 8px; border-radius: 50%; background: rgba(255, 30, 40, .55);
  box-shadow: 0 0 10px rgba(255, 30, 40, .8); animation: pgm-pulse 2.4s ease-out infinite; }
.pgm-pin3 .pgm-ground::after { content: ""; position: absolute; inset: -6px -10px; border-radius: 50%; border: 2px solid rgba(255, 40, 50, .6);
  animation: pgm-ring 2.4s ease-out infinite; }
.pgm-pin3.pgm-drop { animation: pgm-drop .7s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pgm-drop { from { transform: translateY(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pgm-ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
@keyframes pgm-pulse { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) {
  .pgm-pin3.pgm-drop, .pgm-pin3 .pgm-ground, .pgm-pin3 .pgm-ground::after { animation: none; }
  .pgm-board { transform: none; }
}
