/* =================================================
   EVENT DETAIL PAGE
------------------------------------------------- */

.event-detail-root {
  margin-top: 1.5rem;
}

/* On desktop the detail page becomes a wide two-column layout (poster left,
   info right) so it fills the page instead of a narrow reading column. Mobile
   keeps the single stacked column. The wider cap lets the two columns breathe
   without stretching edge to edge on very large screens. */
@media (min-width: 900px) {
  .event-detail-root {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Desktop layout, three regions:
       row 1  header                (full width)
       row 2  poster | booking facts  (the "at a glance" decision panel)
       row 3  reading content        (full width, comfortable measure)
     .event-detail-body is display:contents so its two children (facts, read)
     become grid items of the card directly. align-items:start keeps the poster
     and facts at their natural heights — neither clips the other. */
  .event-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas:
      "banner banner"
      "header header"
      "image  facts"
      "read   read";
    align-items: start;
  }
  .event-detail-marathon-banner { grid-area: banner; }
  .event-detail-header { grid-area: header; }
  .event-detail-image  { grid-area: image; }
  .event-detail-body   { display: contents; }
  .event-detail-facts  { grid-area: facts; }
  .event-detail-read   { grid-area: read; }

  /* Dividers between the regions, matching the card's ink framing. */
  .event-detail-header {
    border-bottom: 3px solid var(--ink);
  }

  /* Poster fills its column edge to edge (16:9), pinned to the top, with a
     vertical divider against the facts panel. */
  .event-detail-image {
    align-self: stretch;
    aspect-ratio: auto;
    border-top: none;
    border-bottom: none;
    border-right: 3px solid var(--ink);
  }
  .event-detail-image img {
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
  }

  /* Booking facts panel: comfortable padding, vertically centred against the
     poster so the date/CTA sit at a natural reading height. */
  .event-detail-facts {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 1.6rem 1.8rem;
  }

  /* Reading content spans the full width, separated from the facts row by an
     ink rule, with a capped measure so long copy stays readable. */
  .event-detail-read {
    grid-area: read;
    border-top: 3px solid var(--ink);
    padding: 1.8rem 1.8rem 2rem;
  }
  .event-detail-read .event-detail-sessions,
  .event-detail-read .event-detail-content,
  .event-detail-read .event-detail-expect {
    max-width: 68ch;
  }
  .event-detail-read .event-detail-content {
    font-size: 1.05rem;
  }

  /* The body's own padding is now carried by the facts/read regions. */
  .event-detail-body { padding: 0; }
}

/* The detail page leans into the brand's bold, hard-shadow card look: thick
   ink border, an offset block shadow tinted to the event type, and a colour
   accent that runs through the badge, meta strip and "what to expect" block.
   The --accent / --accent-soft / --accent-ink tokens are set per type on the
   shared .event-type-* classes (components.css), so the home hero and /events
   cards share the exact same look. */
.event-detail {
  position: relative;
  background: var(--card-bg);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--accent, var(--ink));
  border-radius: 14px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .event-detail { box-shadow: 5px 5px 0 var(--accent, var(--ink)); }
}

/* Header above the poster: type badge, then the title. Holds the card's side
   padding so it lines up with the body below the image. */
.event-detail-header {
  padding: 1rem 1.5rem 0.9rem;
}

/* Quiet text arrow above the card — a low-key way back, not a focal point. */
.event-detail-back {
  display: inline-block;
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-soft);
  text-decoration: none;
  transition: transform 0.15s ease, color 0.15s ease;
}

.event-detail-back:hover {
  color: var(--ink);
  transform: translateX(-3px);
}

/* In the header the badge sits on its own line above the title (colour comes
   from the shared .event-type-* accent rule). */
.event-detail-header .event-type-badge {
  display: block;
  width: fit-content;
}

.event-detail-image {
  position: relative;
  width: 100%;
  background: #f0f0f0;
  line-height: 0;
  aspect-ratio: 16 / 9;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

/* Posters are 16:9. With the detail card capped to the poster's width, the
   image fills it edge to edge at its natural ratio. No height cap or crop. */
.event-detail-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Add-to-calendar heart icon, sitting at the right end of the date row beside
   the date it adds. An ink-bordered chip so it reads as a tappable control. */
.event-detail-cal {
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--when-accent, var(--ink));
  line-height: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-detail-cal img {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
}

.event-detail-cal:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--when-accent, var(--ink));
}

.event-detail-body {
  padding: 1.4rem 1.5rem 1.8rem;
}

.event-detail-title {
  font-size: 1.7rem;
  line-height: 1.1;
  margin: 0.45rem 0 0;
  color: var(--ink);
}

/* Badges/pills sit just under the title in the header. */
.event-detail-header .library-pills {
  margin-top: 0.6rem;
}

@media (min-width: 900px) {
  .event-detail-title { font-size: 1.95rem; }
}

@media (min-width: 1200px) {
  .event-detail-title { font-size: 2.1rem; }
}

/* The When date uses the shared calendar-tile block (.event-when) from the
   /events cards. Give it a little more room on the detail page. */
.event-detail-when {
  margin-bottom: 1.1rem;
}

/* Info strip: Where / Price as labelled columns inside a tinted panel, so the
   supporting facts read at a glance. Wraps to a stack on narrow screens. */
.event-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.4rem;
  background: var(--accent-soft, var(--surface-warm));
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.event-detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.event-detail-meta-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink, var(--text-soft));
}

.event-detail-meta-item strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

/* Venue sits under the time in the date tile, smaller and quieter. It doubles
   as the Maps link: a small pin glyph and an underline on hover mark it as
   tappable without shouting. */
.event-detail-where-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.event-detail-where-link::after {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  flex-shrink: 0;
  background: currentColor;
  /* --pin-icon defined in base.css :root */
  -webkit-mask: var(--pin-icon) center / contain no-repeat;
  mask: var(--pin-icon) center / contain no-repeat;
}

.event-detail-where-link:hover {
  color: var(--accent-ink, var(--ink));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.event-detail-meta-empty {
  flex-direction: column;
  gap: 0.15rem;
  background: var(--surface-warm);
}

.event-detail-meta-empty strong {
  font-size: 1.05rem;
  color: var(--ink);
}

.event-detail-meta-empty span {
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* Multi-day workshop schedule. The feed carries only one date, so this block
   lists every session as the authoritative timetable. */
.event-detail-sessions {
  margin: 0 0 1.4rem;
  padding: 0.9rem 1rem;
  background: var(--surface-warm);
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.event-detail-sessions-heading {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink, var(--text-faint));
}

.event-detail-sessions-note {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.event-detail-sessions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.event-detail-sessions-list li {
  padding: 0.3rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
}

.event-detail-sessions-extra {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.event-detail-content {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
}

.event-detail-content p {
  margin: 0 0 0.9rem;
}

/* "What to expect" reads as a quote-style callout: a thick accent rule down
   the left edge keeps it tied to the event's colour. */
.event-detail-expect {
  margin-top: 1.6rem;
  padding: 1.1rem 1.2rem;
  background: var(--accent-soft, var(--surface-warm));
  border: 2px solid var(--ink);
  border-left-width: 8px;
  border-radius: 12px;
}

.event-detail-expect h2 {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink, var(--text-soft));
  margin: 0 0 0.5rem;
}

.event-detail-expect p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-body);
}

/* Actions now sit high (under the date/venue), so the spacing is tighter than
   the old bottom placement. */
.event-detail-actions {
  margin: 0.2rem 0 1.6rem;
}

/* Original listing: a quiet footnote sitting outside (below) the card. */
.event-detail-source {
  margin: 1rem 0 0;
  padding: 0 1.5rem;
  font-size: 0.78rem;
}

.event-detail-source a {
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted #d0d0d0;
}

.event-detail-source a:hover {
  color: var(--ink);
  border-bottom-color: var(--text-soft);
}

@media (max-width: 480px) {
  .event-detail-body { padding: 1.1rem 1.1rem 1.4rem; }
  .event-detail-title { font-size: 1.4rem; }
}

/* -------------------------------------------------
   HIGHLIGHTED MARATHON BANNER ON EVENT PAGES
------------------------------------------------- */
.event-detail-marathon-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.5rem;
  background: radial-gradient(130% 140% at 8% 50%, #158fb5 0%, #0c5778 50%, #06344d 100%);
  border-bottom: 3px solid var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.event-detail-marathon-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.12) 60%, transparent 100%);
  pointer-events: none;
}

.event-marathon-banner-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.95rem;
  min-width: 0;
}

.event-marathon-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: var(--yellow, #ffd600);
  color: var(--ink, #1a1a1a);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  line-height: 1.2;
  box-shadow: 1.5px 1.5px 0 var(--ink, #1a1a1a);
  flex-shrink: 0;
}

.event-marathon-banner-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: marathonPulse 2s infinite;
}

@keyframes marathonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

.event-marathon-banner-text {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
}

.event-marathon-banner-link {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--yellow, #ffd600);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.event-marathon-banner-link:hover {
  color: var(--yellow, #ffd600);
}

.event-marathon-banner-link--cta {
  color: var(--yellow, #ffd600);
  font-weight: 800;
}

.event-marathon-banner-link--cta:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.event-marathon-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.event-marathon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease;
  line-height: 1.25;
}

.event-marathon-btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
}

.event-marathon-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
  transform: translateY(-1px);
}

.event-marathon-btn--primary {
  background: var(--yellow, #ffd600);
  color: var(--ink, #1a1a1a);
  border: 1.5px solid var(--ink, #1a1a1a);
  box-shadow: 2px 2px 0 var(--ink, #1a1a1a);
}

.event-marathon-btn--primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink, #1a1a1a);
  background: #ffe033;
}

@media (max-width: 700px) {
  .event-detail-marathon-banner {
    padding: 0.85rem 1.15rem;
    gap: 0.75rem;
  }
  .event-marathon-banner-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .event-marathon-banner-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.2rem;
  }
  .event-marathon-btn {
    padding: 0.5rem 0.6rem;
    text-align: center;
  }
}
