/* Guide video widget — player left, text right. Sits directly under the map. */

.pg-gv {
  display: grid;
  /* Capped rather than proportional: on a wide guide column a 5fr player grew
     to ~400px and 225px tall, which dominated everything above the trail. */
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  /* Must match the heading's margin-top below: adjacent margins collapse to
     the larger of the two, so lowering only one side has no effect. */
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

/* aspect-ratio holds the box before the lazy iframe loads, so nothing shifts. */
.pg-gv__player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.pg-gv__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Hidden until JS enables it. The poster is only clickable because a script
   starts playback on click, so showing it without JS would put an inert cover
   over the iframe and make the video unplayable. No JS = YouTube's own poster,
   which still works. */
.pg-gv__poster { display: none; }

.pg-gv__player.is-posterable .pg-gv__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  display: block;
  line-height: 0;
}

.pg-gv__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pg-gv__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  line-height: 0;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .35));
  transition: transform .15s ease;
}

.pg-gv__poster:hover .pg-gv__play { transform: translate(-50%, -50%) scale(1.06); }
.pg-gv__poster:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* Heading directly after the widget: equal gap either side, replacing the
   global 36px top margin. line-height is tightened too — at 26px the default
   leading adds several px of optical space above the glyphs, so equal margins
   alone would still read as a bigger gap on top. */
.pg-gv + .guide-sec-heading {
  margin-top: 16px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.pg-gv__body { min-width: 0; }

.pg-gv__kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #d8442b;
  margin-bottom: 6px;
}

.pg-gv__kicker svg { flex: none; }

.pg-gv__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 5px;
  text-wrap: balance;
}

.pg-gv__blurb {
  margin: 0 0 7px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.pg-gv__meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.pg-gv__meta a { color: var(--muted); text-decoration: underline; }
.pg-gv__meta a:hover { color: var(--coral); }
.pg-gv__meta strong { color: var(--ink); font-weight: 600; }

/* Mobile keeps the split, but proportional rather than capped — a fixed 300px
   player leaves no room for text at phone widths. Top-aligned so the title
   starts level with the top of the frame instead of floating mid-height. */
@media (max-width: 720px) {
  .pg-gv {
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    align-items: start;
  }

  .pg-gv__kicker {
    font-size: 9px;
    letter-spacing: .04em;
    margin-bottom: 4px;
    gap: 4px;
  }

  .pg-gv__title { font-size: 13.5px; line-height: 1.25; margin-bottom: 4px; }
  .pg-gv__blurb { font-size: 12.5px; line-height: 1.4; margin-bottom: 5px; }
  .pg-gv__meta { font-size: 11px; }
}

/* Narrow phones: clamp rather than hide, so the text stays in the document
   and readable — a hidden blurb is content lost for no layout gain. */
@media (max-width: 520px) {
  .pg-gv { grid-template-columns: minmax(0, 45%) minmax(0, 1fr); }

  .pg-gv__title,
  .pg-gv__blurb {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .pg-gv__title { -webkit-line-clamp: 3; line-clamp: 3; }
  .pg-gv__blurb { -webkit-line-clamp: 2; line-clamp: 2; }
}
