/* ========================================
   Event Detail Page Styles
   - Scoped under #MainZone
   - Mirrors locations.css sidebar-card vocabulary
   ======================================== */

/* ---- Sidebar Event Details Card ----
   Matches .location-details treatment in locations.css:
   white bg, green border, rounded, box-shadow. */
#MainZone .side-zone .event-details.side-details {
  background-color: #fff;
  border: 1px solid var(--allied-green);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 0;
}

/* Each info block inside the card — Address / Event Dates / Register —
   sits in its own padded section with a divider between them. */
#MainZone .side-zone .event-details.side-details > .aside-margin,
#MainZone .side-zone .event-details.side-details > .event-dates,
#MainZone .side-zone .event-details.side-details > .ui-repeater {
  padding: 20px 24px;
  margin: 0;
  border-top: 1px solid rgba(1, 103, 62, 0.2); /* allied-green at 20% */
}

#MainZone .side-zone .event-details.side-details > .aside-margin:first-child,
#MainZone .side-zone .event-details.side-details > .event-dates:first-child,
#MainZone .side-zone .event-details.side-details > .ui-repeater:first-child {
  border-top: none;
}

/* Clean list reset inside the card */
#MainZone .side-zone .event-details.side-details ul.items-1 {
  list-style: none;
  margin: 0;
  padding: 0;
}

#MainZone .side-zone .event-details.side-details ul.items-1 li {
  padding: 0;
  margin: 0;
}

/* ---- Section Headers (Address / Event Dates) ---- */
#MainZone .side-zone .event-details.side-details header {
  margin-bottom: 12px;
}

#MainZone .side-zone .event-details.side-details .title-style-3,
#MainZone .side-zone .event-details.side-details .title-style-5 {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--allied-blue);
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0 0 4px;
  padding: 0;
  text-transform: none;
  background: none;
}

/* ---- Map Containers ----
   Inline height:200px; width:100%; border-radius:4px is set on the elements
   via JS/template inline styles. Styling by ID takes over cleanly. */
#MainZone #eventMap {
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ---- Location Name + Get Directions ---- */
#MainZone .side-zone .event-details.side-details .loc-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--allied-blue);
  line-height: 1.4;
  margin-bottom: 8px;
}

#MainZone .side-zone .event-details.side-details .link-style-1 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--allied-blue);
  text-decoration: none;
  padding: 8px 18px;
  margin: 0; /* Override template inline margin-top if present */
  border: 2px solid var(--allied-blue);
  border-radius: 6px;
  background-color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#MainZone .side-zone .event-details.side-details .link-style-1:hover,
#MainZone .side-zone .event-details.side-details .link-style-1:focus {
  background-color: var(--allied-blue);
  color: #fff;
  text-decoration: none;
}

/* ---- Event Dates Time Display ---- */
#MainZone .side-zone .event-details.side-details .event-dates time {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: #333;
  line-height: 1.5;
}

#MainZone .side-zone .event-details.side-details .event-dates .label-style {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #000;
  margin: 0;
}

#MainZone .side-zone .event-details.side-details .event-dates .pad-l-1 {
  padding-left: 0;
  color: var(--allied-blue-light);
  font-weight: 600;
}

/* ---- Register Button (inside sidebar card) ---- */
#MainZone .side-zone .event-details.side-details .button-style-1 {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--allied-blue);
  border: 2px solid var(--allied-blue);
  border-radius: 6px;
  padding: 12px 24px;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#MainZone .side-zone .event-details.side-details .button-style-1:hover,
#MainZone .side-zone .event-details.side-details .button-style-1:focus {
  background-color: #fff;
  color: var(--allied-blue);
  border-color: var(--allied-blue);
  text-decoration: none;
}

/* ---- Register Button (inside main content, below Registration section) ---- */
#MainZone .registration-info .button-style-1 {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--allied-blue);
  border: 2px solid var(--allied-blue);
  border-radius: 6px;
  padding: 12px 32px;
  margin-top: 12px;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#MainZone .registration-info .button-style-1:hover,
#MainZone .registration-info .button-style-1:focus {
  background-color: #fff;
  color: var(--allied-blue);
  text-decoration: none;
}

/* ---- Event Layout Grid ----
   Overrides the default flex two-column layout on .two-col-container.
   Header spans both columns; content-zone + side-zone fall into row 2.
   Scoped to event detail via the .event-layout class. */
#MainZone .two-col-container.event-layout {
  display: grid;
  grid-template-columns: 1fr 393px;
  column-gap: 3rem;
  row-gap: 24px;
  align-items: start;
}

#MainZone .two-col-container.event-layout > .event-page-header {
  grid-column: 1 / -1;
}

/* Neutralize the legacy flex-basis widths on
   static_page.css .two-col-container .content-zone / .side-zone under grid —
   let grid-template-columns size the tracks. */
#MainZone .two-col-container.event-layout > .content-zone,
#MainZone .two-col-container.event-layout > .side-zone {
  width: auto;
}

@media (max-width: 1024px) {
  #MainZone .two-col-container.event-layout {
    grid-template-columns: 1fr;
  }
}

/* ---- Page Header (above two-column row) ----
   Wraps the eyebrow h1, event-title h2, and optional categories ul.
   Sits inside .two-col-container.event-layout, above the grid row that
   holds banner + sidebar. Bottom spacing comes from the grid row-gap
   (24px) — no own margin. */
#MainZone .event-page-header {
  margin: 0;
}

/* Zero last child's bottom margin so the header-to-grid gap is the grid
   row-gap (24px), not stacked with h2/ul bottom margin. */
#MainZone .event-page-header > *:last-child {
  margin-bottom: 0;
}

/* Zero top margin on the first child of the content column so the
   grid row-gap is the only space above the banner image. */
#MainZone .two-col-container.event-layout > #SubZoneLeft > .column-layout-content > .content-style > article.event-details > :first-child,
#MainZone .two-col-container.event-layout > #SubZoneLeft > .column-layout-content > .content-style > article.event-details > :first-child.img-fluid {
  margin-top: 0;
}

/* ---- Event Title Eyebrow (h1) ---- */
#MainZone .event-page-header > h1 {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--allied-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin: 0 0 8px;
  /* Legacy markup has <h1>Event Details</h1> then actual title as <h2>.
     Render h1 as a small eyebrow label so the h2 reads as the visual title. */
}

/* ---- Event Title (h2) ---- */
#MainZone .event-page-header > h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

/* ---- Categories / Event Type Inline Items ---- */
#MainZone .event-page-header > .inline-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

#MainZone .event-page-header > .inline-items li {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: #333;
  line-height: 1.5;
  padding: 0;
  margin: 0;
}

#MainZone .event-details .label-style {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #555;
}

/* ---- Content Section Headings ----
   Three-tier hierarchy:
   - Tier 1: event title h2 (36px) — biggest
   - Tier 2: top-level section h3 + Details: label (28px) — section headers
   - Tier 3: subsection h3 inside .details (20px) — subsections */
#MainZone #MainContent .event-details > .content-style > h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--allied-blue);
  line-height: 1.3;
  /* Top margin zeroed — static_page.css .content-style { margin-top: 1.5rem }
     is the single source of vertical rhythm between the featured image and this h3. */
  margin: 0 0 0.75rem;
}

/* Subsection h3s inside .details block (e.g. "Meeting Location") —
   smaller than the top-level section header. */
#MainZone #MainContent .event-details .details h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--allied-blue);
  line-height: 1.3;
  margin: 1.25rem 0 0.5rem;
}

/* Registration / Contact Information section headers use .title-style-3 */
#MainZone .event-details .content-style > .title-style-3 {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--allied-blue);
  line-height: 1.3;
  margin: 1.5rem 0 0.75rem;
  padding: 0;
  background: none;
  letter-spacing: 0;
  text-transform: none;
}

/* ---- Registration / Contact blocks in main content ---- */
#MainZone .event-details .registration-info,
#MainZone .event-details .content-style[data-item="i"] {
  margin-top: 24px;
}

#MainZone .event-details .registration-info {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(5, 93, 151, 0.12);
}

/* ---- Details Body ---- */
/* Scope-tighten the .inline-items bottom margin inside event-details — keeps
   .details margin-top as the single source of the gap to the Details heading
   (otherwise margins stack because the flex-column ul establishes a formatting
   context that prevents margin collapse with its siblings). */
#MainZone .event-details .inline-items {
  margin-bottom: 0;
}

#MainZone .event-details .details {
  margin-top: 24px;
}

/* Legacy markup uses <span class="label-style">Details:</span> as the
   section header for the main event body. Promote to heading-level
   visual weight to match the adjacent h3 / .title-style-3 vocabulary. */
#MainZone #MainContent .event-details .details > .label-style {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--allied-blue);
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 0.75rem;
}

@media (max-width: 768px) {
  #MainZone #MainContent .event-details .details > .label-style {
    font-size: 1.5rem;
  }
}

/* ---- Featured Event Image ---- */
#MainZone .event-details > img.img-fluid {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  /* No external spacing — the adjacent static_page.css .content-style
     { margin-top: 1.5rem } is the single source of the gap to the following h3. */
  margin: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  /* Stacked order follows DOM order: header → content → address card. */
  #MainZone .side-zone .event-details.side-details {
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  #MainZone .event-page-header > h2 {
    font-size: 1.75rem;
  }

  #MainZone #MainContent .event-details > .content-style > h3,
  #MainZone .event-details .content-style > .title-style-3 {
    font-size: 1.5rem;
  }

  #MainZone #MainContent .event-details .details h3 {
    font-size: 1.125rem;
  }

  /* Match grid row-gap (header ↔ content ↔ address) to the Event Type →
     Details gap (12px) for consistent section rhythm on narrow viewports. */
  #MainZone .two-col-container.event-layout {
    row-gap: 12px;
  }

  /* unify all event-article section gaps at 12px below 768 — same rhythm as grid row-gap */
  #MainZone .event-details .details,
  #MainZone .event-details .content-style[data-item="i"],
  #MainZone .event-details .registration-info {
    margin-top: 12px;
  }

  #MainZone .side-zone .event-details.side-details > .aside-margin,
  #MainZone .side-zone .event-details.side-details > .event-dates,
  #MainZone .side-zone .event-details.side-details > .ui-repeater {
    padding: 16px 20px;
  }

  #MainZone .event-details > img.img-fluid {
    max-height: 280px;
  }
}

@media (max-width: 480px) {
  #MainZone .event-page-header > h1 {
    font-size: 0.75rem;
  }

  #MainZone .event-page-header > h2 {
    font-size: 1.5rem;
  }

  #MainZone .side-zone .event-details.side-details .loc-name {
    font-size: 0.9375rem;
  }

  #MainZone .side-zone .event-details.side-details .link-style-1,
  #MainZone .side-zone .event-details.side-details .button-style-1,
  #MainZone .registration-info .button-style-1 {
    font-size: 0.875rem;
    padding: 10px 20px;
  }

  #MainZone .event-details > img.img-fluid {
    max-height: 220px;
    border-radius: 4px;
  }
}
