/* BG27 media section: inherits the teaser's type, palette and page gutters. */
.event-media {
  max-width: 1552px;
  margin: 0 auto;
  padding: 0 56px 56px;
}
.media-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding-top: 34px;
  margin-bottom: 28px;
  border-top: 1px solid var(--border);
}
.media-eyebrow {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.media-heading h2 {
  margin: 0;
  font: 600 clamp(32px, 3.2vw, 44px)/1.15 var(--font-heading);
  letter-spacing: -.025em;
  text-wrap: balance;
}
.media-channel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.media-channel-link > svg {
  width: 20px;
  height: 20px;
}
.media-channel-link > svg:last-of-type { width: 16px; height: 16px; }
.media-channel-link:hover > span:not(.sr-only) {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.event-media svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}
.media-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 3px 12px rgb(58 52 46 / 3%);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.media-card:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 5px;
  border-radius: 8px;
}
.media-card-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  isolation: isolate;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--text-primary);
}
.media-cover-image,
.media-youtube-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-youtube-image {
  position: absolute;
  inset: 0;
  z-index: 1;
}
/* YouTube hqdefault is 4:3 with a letterboxed 16:9 frame. */
.media-youtube-image-hq { top: -16.667%; height: 133.334%; }
.media-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / 14%), transparent 55%, rgb(0 0 0 / 7%));
}
.media-service-badge {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  min-height: 30px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 5px;
  background: rgb(35 32 28 / 80%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.media-service-badge svg { width: 16px; height: 16px; }
.media-play {
  position: absolute;
  z-index: 3;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  background: rgb(255 255 255 / 94%);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgb(0 0 0 / 16%);
  transform: translate(-50%, -50%);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.media-play svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.media-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 220px;
  padding: 20px 22px 0;
}
.media-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.45;
}
.media-card-meta > :first-child {
  font-weight: 600;
}
.media-card-meta time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.media-card-meta [hidden] { display: none; }
.media-card h3 {
  margin: 0 0 18px;
  font: 600 22px/1.28 var(--font-heading);
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.media-card-description {
  margin: -6px 0 20px;
  max-width: 30ch;
  font-size: 15px;
  line-height: 1.55;
}
.media-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 61px;
  margin-top: auto;
  padding: 15px 0;
  border-top: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.media-card-footer svg {
  width: 19px;
  height: 19px;
  transition: transform .2s ease;
}
.media-card-gallery {
  background: #eef3ed;
  border-color: #dce5da;
}
.media-card-gallery .media-card-footer { border-color: #d6e1d3; }
.media-collage {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 3px;
  background: var(--background);
}
.media-collage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  object-fit: cover;
}
.media-collage-main { grid-row: 1 / -1; object-position: 44% 50%; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .media-card:hover {
    transform: translateY(-4px);
    border-color: #c9c0b5;
    box-shadow: 0 12px 24px rgb(58 52 46 / 8%);
  }
  .media-card-video:hover .media-play {
    transform: translate(-50%, -50%) scale(1.07);
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: #fff;
  }
  .media-card:hover .media-card-footer svg { transform: translate(2px, -2px); }
  .media-card-gallery:hover { border-color: var(--accent-secondary); }
}
@media (max-width: 1100px) { .event-media { padding-inline: 34px; } }
@media (max-width: 1000px) and (min-width: 641px) {
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-card-gallery { grid-column: 1 / -1; flex-direction: row; }
  .media-card-gallery .media-card-visual { width: calc(50% - 11px); aspect-ratio: 16 / 10; }
  .media-card-gallery .media-card-body { min-width: 0; min-height: 218px; }
}
@media (max-width: 900px) { .event-media { padding: 0 22px 34px; } }
@media (max-width: 640px) {
  .media-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
  .media-heading h2 { font-size: 34px; }
  .media-channel-link { min-height: 44px; }
  .media-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .media-card-body { min-height: 0; padding: 18px 18px 0; }
  .media-card h3 { font-size: 21px; margin-bottom: 20px; }
  .media-card-meta { margin-bottom: 9px; }
  .media-card-description { margin-top: -10px; margin-bottom: 20px; max-width: none; }
  .media-card-footer { min-height: 58px; }
  .media-service-badge { top: 12px; left: 12px; }
  .media-play { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .event-media *, .event-media *::after { transition: none !important; }
}
@media (forced-colors: active) {
  .media-card, .media-service-badge, .media-play { border-color: CanvasText; }
}
