/* ============ NO TEXT UNDERLINE + LOCK COLOR ON LINKS (override theme defaults) ============ */
.imapac-events-cal a,
.imapac-events-cal a:hover,
.imapac-events-cal a:focus,
.imapac-events-cal a:active,
.imapac-events-cal a:visited {
  text-decoration: none !important;
  border-bottom: none !important;
}
.imapac-events-cal a:focus { outline: none; }
.imapac-events-cal a:link,
.imapac-events-cal a:visited { color: inherit; }

/* ============================================
   IMAPAC Events Calendar
   ============================================ */

.imapac-events-cal {
  font-family: inherit;
  position: relative;
}

.imapac-events-cal *,
.imapac-events-cal *::before,
.imapac-events-cal *::after {
  box-sizing: border-box;
}

.imapac-events-cal .iec-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ============ HEADER (premium card) ============ */
.imapac-events-cal .iec-header {
  position: relative;
  overflow: hidden;
  text-align: var(--iec-heading-align, center);
  /* Full-bleed banner: pull out of the section's padding to the top + side edges. */
  margin: calc(-1 * var(--iec-sec-pad-y, 80px)) calc(-1 * var(--iec-sec-pad-x, 24px)) 3.5rem;
  padding: 66px 48px 62px;
  border-radius: 0;
  color: #FFFFFF;
  background: linear-gradient(120deg, #2A2472 0%, #5B238F 30%, #8C3FA6 52%, #67259F 72%, #3350C2 100%);
  background-size: 220% 220%;
  animation: iec-bg-pan 16s ease-in-out infinite;
}
/* The animation now lives in the BACKGROUND — a slow drifting purple gradient */
@keyframes iec-bg-pan {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* Soft light + shade for depth on the purple */
.imapac-events-cal .iec-header::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 62% at 14% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
    radial-gradient(95% 70% at 100% 100%, rgba(0, 0, 0, 0.20), transparent 55%);
}
.imapac-events-cal .iec-header > * { position: relative; z-index: 1; }

/* Eyebrow / kicker with flanking hairlines */
.imapac-events-cal .iec-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 20px;
}
.imapac-events-cal .iec-eyebrow-line {
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 169, 59, 0.85));
}
.imapac-events-cal .iec-eyebrow-line:last-child {
  background: linear-gradient(90deg, rgba(242, 169, 59, 0.85), transparent);
}
.imapac-events-cal .iec-eyebrow-text {
  font-size: calc(var(--iec-scale, 1) * 12px);
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #F2A93B;
  white-space: nowrap;
}

/* Gradient title with a slow, tasteful sheen sweep */
.imapac-events-cal .iec-heading {
  font-size: calc(var(--iec-scale, 1) * var(--iec-heading-size, 38px));
  font-weight: var(--iec-heading-weight, 800);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.015em;
  color: #FFFFFF;
  text-shadow: 0 2px 14px rgba(15, 8, 40, 0.28);
}
.imapac-events-cal .iec-heading.iec-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Ornament divider: hairline — diamond — hairline */
.imapac-events-cal .iec-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 18px 0 16px;
}
.imapac-events-cal .iec-ornament span {
  width: 42px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6));
}
.imapac-events-cal .iec-ornament span:last-child {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), transparent);
}
.imapac-events-cal .iec-ornament i {
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #F2A93B, #E8823C);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.18);
}

.imapac-events-cal .iec-subheading {
  color: rgba(255, 255, 255, 0.85);
  font-size: calc(var(--iec-scale, 1) * var(--iec-subheading-size, 15px));
  margin: 0;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

/* ============ YEAR TABS ============ */
/* One pill per year, and only that year's events stay in view. The pill wears the same gold as
   the in-list year chip it replaces, so the eye reads it as the same marker moved to the top. */
.imapac-events-cal [hidden] { display: none !important; }

/* The bar sticks to the top of the viewport for as long as the calendar is on screen, so the
   year is always one click away. It lives outside .iec-inner and pulls out to the section's
   padding edges, so the background it puts on when stuck runs the full width of the page. */
.imapac-events-cal .iec-years {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 calc(-1 * var(--iec-sec-pad-x, 24px)) 28px;
  padding: 12px var(--iec-sec-pad-x, 24px);
  transition: background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

/* 1px marker at the bar's resting position: once it leaves the top of the viewport, module.js
   knows the bar is stuck. -1px margin keeps it out of the layout. */
.imapac-events-cal .iec-years-sentinel {
  height: 1px;
  margin-bottom: -1px;
  pointer-events: none;
}

/* Stuck: the bar needs a ground of its own, or cards slide underneath it in plain sight. It
   takes the brand sweep the region banners wear — white would swallow the resting pills, which
   are white themselves. */
.imapac-events-cal .iec-years.is-stuck {
  background: linear-gradient(100deg,
              rgba(51, 80, 194, 0.95) 0%,
              rgba(103, 37, 159, 0.95) 52%,
              rgba(164, 68, 201, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px -14px rgba(41, 24, 82, 0.55);
}
/* On the brand ground the resting pills lose their page-white border and shadow. */
.imapac-events-cal .iec-years.is-stuck .iec-year-tab {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}
.imapac-events-cal .iec-years.is-stuck .iec-year-tab.is-on {
  border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(20, 12, 40, 0.55);
}
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .imapac-events-cal .iec-years.is-stuck {
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
  }
}

.imapac-events-cal .iec-year-tab {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 11px 30px;
  border: 1.5px solid #E9E4F6;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFFFFF, #FAF7FE);
  box-shadow: 0 5px 16px rgba(41, 24, 82, 0.07);
  font-family: inherit;
  font-size: calc(var(--iec-scale, 1) * 15px);
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #67259F;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
              background 0.18s ease, color 0.18s ease;
}

.imapac-events-cal .iec-year-tab:hover {
  border-color: #D9CEF3;
  transform: translateY(-1px);
  box-shadow: 0 9px 22px -8px rgba(103, 37, 159, 0.34);
}

.imapac-events-cal .iec-year-tab:focus-visible {
  outline: 3px solid rgba(103, 37, 159, 0.35);
  outline-offset: 2px;
}

.imapac-events-cal .iec-year-tab.is-on {
  border-color: transparent;
  background: linear-gradient(120deg, #F2A93B 0%, #E8892B 100%);
  box-shadow: 0 8px 20px -6px rgba(232, 137, 43, 0.5);
  color: #2A1E08;
  transform: none;
}

/* With the tabs on, the in-list year chip would just repeat the pill above. */
.imapac-events-cal.iec-has-years .iec-year-label { display: none; }

/* ============ REGIONS ============ */
.imapac-events-cal .iec-regions {
  display: flex;
  flex-direction: column;
  gap: var(--iec-region-gap, 72px);
}

/* Region banner — a full-width brand-gradient box with the region name centred
   (replaces the old left-aligned name + long underline). */
.imapac-events-cal .iec-region-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  padding: 15px 26px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: linear-gradient(100deg, #3350C2 0%, #67259F 52%, #A444C9 100%);
  box-shadow: 0 12px 30px -14px rgba(103, 37, 159, 0.45);
}

.imapac-events-cal .iec-region-name {
  margin: 0;
  font-size: calc(var(--iec-scale, 1) * 25px);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.imapac-events-cal .iec-region-tag {
  color: rgba(255, 255, 255, 0.85);
  font-size: calc(var(--iec-scale, 1) * 13px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============ MONTH TIMELINE + EVENT LIST ============ */
.imapac-events-cal .iec-list {
  --iec-tl-pad: 40px;   /* left gutter that holds the timeline */
  --iec-tl-line: 14px;  /* x-position of the connecting line */
  display: flex;
  flex-direction: column;
  gap: var(--iec-event-gap, 14px);
  position: relative;
  padding-left: var(--iec-tl-pad);
}

/* The connecting "flow of time" line threading the whole month timeline */
.imapac-events-cal .iec-list::before {
  content: '';
  position: absolute;
  left: var(--iec-tl-line);
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #3350C2 0%, #67259F 55%, #A444C9 100%);
  opacity: 0.5;
}

/* Month as a rounded pill anchored on the timeline */
.imapac-events-cal .iec-month-label {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--iec-month-gap, 34px);
  margin-bottom: 4px;
  padding: 7px 18px;
  background: linear-gradient(135deg, #FFFFFF, #FAF7FE);
  border: 1.5px solid #E9E4F6;
  border-radius: 999px;
  box-shadow: 0 5px 16px rgba(41, 24, 82, 0.07);
}

.imapac-events-cal .iec-list > .iec-month-label:first-child {
  margin-top: 12px;
}

/* Node dot sitting on the timeline line */
.imapac-events-cal .iec-month-label::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(var(--iec-tl-line) - 6px - var(--iec-tl-pad));
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3350C2, #A444C9);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92),
              0 2px 6px rgba(103, 37, 159, 0.35);
}

/* Short connector from the timeline node to the pill */
.imapac-events-cal .iec-month-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(var(--iec-tl-line) + 6px - var(--iec-tl-pad));
  transform: translateY(-50%);
  width: calc(var(--iec-tl-pad) - var(--iec-tl-line) - 6px);
  height: 2px;
  background: linear-gradient(90deg, rgba(164, 68, 201, 0.75), rgba(233, 228, 246, 0.15));
}

/* the old dash is replaced by the timeline node */
.imapac-events-cal .iec-month-dash { display: none; }

.imapac-events-cal .iec-month-text {
  font-size: calc(var(--iec-scale, 1) * 14px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #67259F;
}

/* Year chip — a filled "chapter" marker that separates year sections on the timeline */
.imapac-events-cal .iec-year-label {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  margin: 42px 0 8px;
  padding: 8px 22px;
  border-radius: 999px;
  background: linear-gradient(120deg, #F2A93B 0%, #E8892B 100%);
  box-shadow: 0 8px 20px -6px rgba(232, 137, 43, 0.5);
}
.imapac-events-cal .iec-list > .iec-year-label:first-child { margin-top: 12px; }
.imapac-events-cal .iec-year-text {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #2A1E08;
}
/* Bigger node for the year marker */
.imapac-events-cal .iec-year-label::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(var(--iec-tl-line) - 8px - var(--iec-tl-pad));
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F2A93B, #E8823C);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92), 0 2px 8px rgba(232, 137, 43, 0.5);
}
.imapac-events-cal .iec-year-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(var(--iec-tl-line) + 8px - var(--iec-tl-pad));
  transform: translateY(-50%);
  width: calc(var(--iec-tl-pad) - var(--iec-tl-line) - 8px);
  height: 2.5px;
  background: linear-gradient(90deg, rgba(242, 169, 59, 0.9), rgba(232, 137, 43, 0.2));
}
/* Tighten the first month right after a year chip */
.imapac-events-cal .iec-year-label + .iec-month-label { margin-top: 12px; }

/* ============ EVENT ROW ============ */
.imapac-events-cal .iec-event {
  display: grid;
  grid-template-columns: calc(var(--iec-scale, 1) * 86px) calc(var(--iec-scale, 1) * var(--iec-logo-w, 140px)) 1fr auto;
  grid-template-areas: "rail logo body arrow";
  align-items: center;
  gap: calc(var(--iec-scale, 1) * 18px);
  background: var(--iec-card-bg, #FFFFFF);
  border: 1px solid rgba(31, 61, 122, 0.10);
  border-radius: var(--iec-card-radius, 16px);
  padding: calc(var(--iec-scale, 1) * 13px) calc(var(--iec-scale, 1) * 18px) calc(var(--iec-scale, 1) * 13px) calc(var(--iec-scale, 1) * 13px);
  position: relative;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.5s ease;
}

/* Left accent stripe — hidden at rest (keeps cards calm), a single royal-blue bar on hover */
.imapac-events-cal .iec-event::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: #3350C2;
  opacity: 0;
  transition: opacity 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.imapac-events-cal.iec-shadow .iec-event {
  box-shadow: 0 2px 5px rgba(41, 24, 82, 0.05),
              0 10px 26px rgba(41, 24, 82, 0.08);
}

a.iec-event { cursor: pointer; }

/* Own transition that out-specifies the reveal rule — otherwise the reveal's
   `transition-delay: var(--iec-delay)` lags the hover and its transition list
   (opacity/transform only) leaves the hover shadow snapping. Keeps opacity +
   transform so the scroll-reveal fade-up still animates. */
.imapac-events-cal a.iec-event {
  transition: opacity 0.5s ease,
              transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.5s ease;
  transition-delay: 0s;
}

/* Slow, aesthetic zoom on hover with a wide, soft shadow.
   Prefixed with .imapac-events-cal so this transform out-specifies the reveal's
   `.iec-reveal.is-in { transform: none }` — otherwise the zoom never shows once
   a card has been revealed on scroll. */
.imapac-events-cal a.iec-event:hover {
  transform: scale(1.035);
  box-shadow: 0 16px 40px rgba(41, 24, 82, 0.12),
              0 40px 92px rgba(103, 37, 159, 0.18);
}

/* --- Date rail: IMAPAC logo-gradient "ticket stub" (fixed hex, region-independent) ---
   Full brand sweep blue→indigo→purple→magenta→pink→orange at 135° (mirrors the wordmark).
   Day + month ride the purple→magenta band (white ~6.6–7.2:1); pink/orange are pushed to
   the text-free bottom-right corner and tamed by the ::before scrim. */
.imapac-events-cal .iec-rail {
  grid-area: rail;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: calc(var(--iec-scale, 1) * 11px) calc(var(--iec-scale, 1) * 12px) calc(var(--iec-scale, 1) * 10px);
  border-radius: 13px;
  min-height: calc(var(--iec-scale, 1) * 66px);
  background: linear-gradient(150deg,
              #3B2F8F 0%,     /* indigo */
              #67259F 52%,    /* purple — under the digits */
              #A444C9 100%);  /* magenta — far corner only */
  box-shadow: 0 6px 14px -4px rgba(29, 20, 66, 0.34),
              inset 0 1px 0 rgba(255, 255, 255, 0.26);
  overflow: hidden;
}

/* Soft gloss: top sheen → gentle bottom shade (keeps the magenta corner from washing white) */
.imapac-events-cal .iec-rail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg,
    rgba(255, 255, 255, 0.20) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.16) 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* Thin white glass rim along the top edge (premium sheen — replaces the gold cap) */
.imapac-events-cal .iec-rail::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg,
              rgba(255, 255, 255, 0.10),
              rgba(255, 255, 255, 0.55) 50%,
              rgba(255, 255, 255, 0.10));
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  pointer-events: none;
}

.imapac-events-cal .iec-rail-days {
  position: relative;
  z-index: 1;
  font-size: calc(var(--iec-scale, 1) * 21px);
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(8, 12, 28, 0.45);
}

.imapac-events-cal .iec-rail-mon {
  position: relative;
  z-index: 1;
  font-size: calc(var(--iec-scale, 1) * 12px);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(8, 12, 28, 0.42);
}

/* Month alone on the stub (a date still given as wording only, e.g. "March 2028") — sized to
   fill the space the day digits would have taken. Must stay AFTER .iec-rail-mon. */
.imapac-events-cal .iec-rail-mon-solo {
  font-size: calc(var(--iec-scale, 1) * 15px);
  letter-spacing: 0.1em;
}

/* --- Logo box --- */
.imapac-events-cal .iec-logo {
  grid-area: logo;
  width: calc(var(--iec-scale, 1) * var(--iec-logo-w, 140px));
  height: calc(var(--iec-scale, 1) * 66px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 1px solid rgba(31, 61, 122, 0.10);
  border-radius: 11px;
}

.imapac-events-cal .iec-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.imapac-events-cal .iec-logo-mono {
  font-size: calc(var(--iec-scale, 1) * 19px);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--region-color);
  opacity: 0.65;
}

/* --- Body: name + meta --- */
.imapac-events-cal .iec-body {
  grid-area: body;
  min-width: 0;
}

.imapac-events-cal .iec-name {
  margin: 0 0 6px;
  font-size: calc(var(--iec-scale, 1) * 16.5px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--iec-name-color, #1A1D26);
  letter-spacing: -0.005em;
}

.imapac-events-cal .iec-name sup,
.imapac-events-cal .iec-cat-ev-name sup {
  font-size: 0.55em;
  line-height: 0;
  position: relative;
  top: -0.45em;
  letter-spacing: 0.02em;
}

.imapac-events-cal .iec-badge sup {
  font-size: 0.68em;
  line-height: 0;
  position: relative;
  top: -0.34em;
  letter-spacing: 0.02em;
}

.imapac-events-cal .iec-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 9px;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: linear-gradient(120deg, #3350C2 0%, #67259F 100%);
  color: #FFFFFF;
  font-size: calc(var(--iec-scale, 1) * 9.5px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  top: -1.5px;
}

.imapac-events-cal .iec-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: calc(var(--iec-scale, 1) * 13px);
  color: var(--iec-meta-color, #5A5F6B);
  line-height: 1.4;
}

.imapac-events-cal .iec-date,
.imapac-events-cal .iec-loc {
  /* Flow venue + ", " + country as continuous inline text so the country stays
     attached to the venue when it wraps (mobile), with a hanging indent so wrapped
     lines align under the text instead of under the pin icon. */
  display: block;
  padding-left: calc(var(--iec-scale, 1) * 14px + 6px);
  text-indent: calc(-1 * (var(--iec-scale, 1) * 14px + 6px));
}

.imapac-events-cal .iec-date { font-weight: 600; }

.imapac-events-cal .iec-ic {
  width: calc(var(--iec-scale, 1) * 14px);
  height: calc(var(--iec-scale, 1) * 14px);
  color: #A444C9;
  opacity: 1;
  vertical-align: -0.2em;
  margin-right: 6px;
}

/* --- Arrow (linked rows only) --- */
.imapac-events-cal .iec-arrow {
  grid-area: arrow;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(51, 80, 194, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3350C2;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.imapac-events-cal .iec-arrow svg {
  width: 15px;
  height: 15px;
}

a.iec-event:hover .iec-arrow {
  background: #3350C2;
  border-color: #3350C2;
  color: #FFFFFF;
  transform: translateX(2px);
}

/* ============ AWARD-CATEGORY EVENTS STAND OUT ============ */
/* Any event whose Category contains "award" gets an accent ribbon + tint so awards
   pop out from the regular event rows (both the live calendar and, mirrored, the PDF).
   Colors come from the module Styles (Award Accent Color / Award Card Background). */
.imapac-events-cal .iec-event[data-category*="award" i] {
  border-color: color-mix(in srgb, var(--iec-award-accent, #F2A93B) 60%, transparent);
  background:
    linear-gradient(0deg, var(--iec-award-bg, rgba(242, 169, 59, 0.08)), var(--iec-award-bg, rgba(242, 169, 59, 0.08))),
    var(--iec-card-bg, #FFFFFF);
}
.imapac-events-cal .iec-event[data-category*="award" i]::before {
  opacity: 1;
  background: var(--iec-award-accent, #F2A93B);
}
.imapac-events-cal .iec-group-ev[data-category*="award" i] {
  background: var(--iec-award-bg, rgba(242, 169, 59, 0.12));
  border-color: color-mix(in srgb, var(--iec-award-accent, #F2A93B) 40%, transparent);
}

/* ============ MERGED / UMBRELLA GROUP CARD ============ */
/* Co-located events (e.g. all of Biopharma APAC Confex) collapse into one card:
   a shared header (group logo + one date/venue), then the member events listed inside. */
.imapac-events-cal .iec-group {
  background: var(--iec-card-bg, #FFFFFF);
  border: 1px solid rgba(31, 61, 122, 0.10);
  border-left: 4px solid var(--region-color, #1F3D7A);
  border-radius: var(--iec-card-radius, 16px);
  padding: calc(var(--iec-scale, 1) * 18px) calc(var(--iec-scale, 1) * 20px);
  position: relative;
}
.imapac-events-cal.iec-shadow .iec-group {
  box-shadow: 0 2px 5px rgba(41, 24, 82, 0.05),
              0 10px 26px rgba(41, 24, 82, 0.08);
}
.imapac-events-cal .iec-group-head {
  display: flex;
  align-items: center;
  gap: calc(var(--iec-scale, 1) * 18px);
}
.imapac-events-cal .iec-group-logo {
  flex: 0 0 auto;
  width: calc(var(--iec-scale, 1) * var(--iec-logo-w, 140px));
}
.imapac-events-cal .iec-group-headtext { min-width: 0; flex: 1 1 auto; }
.imapac-events-cal .iec-group-name {
  margin: 0 0 6px;
  font-size: calc(var(--iec-scale, 1) * 21px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--iec-name-color, #14224A);
}
.imapac-events-cal .iec-group-list {
  margin-top: calc(var(--iec-scale, 1) * 15px);
  padding-top: calc(var(--iec-scale, 1) * 15px);
  border-top: 1px dashed rgba(31, 61, 122, 0.16);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: calc(var(--iec-scale, 1) * 8px);
}
.imapac-events-cal .iec-group-ev {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(var(--iec-scale, 1) * 9px) calc(var(--iec-scale, 1) * 13px);
  border-radius: 10px;
  background: rgba(103, 37, 159, 0.05);
  border: 1px solid rgba(103, 37, 159, 0.10);
  color: inherit;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.imapac-events-cal a.iec-group-ev { cursor: pointer; }
.imapac-events-cal a.iec-group-ev:hover {
  background: rgba(103, 37, 159, 0.10);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(103, 37, 159, 0.14);
}
.imapac-events-cal .iec-group-ev-name {
  min-width: 0;
  font-size: calc(var(--iec-scale, 1) * 14.5px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--iec-name-color, #14224A);
}
.imapac-events-cal .iec-group-ev .iec-badge { margin-left: 8px; }
/* Compact chevron for member rows (reuses .iec-arrow, smaller + revealed on hover) */
.imapac-events-cal .iec-group-ev .iec-arrow {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  opacity: 0.55;
}
.imapac-events-cal .iec-group-ev .iec-arrow svg { width: 13px; height: 13px; }
.imapac-events-cal a.iec-group-ev:hover .iec-arrow {
  opacity: 1;
  background: #3350C2;
  border-color: #3350C2;
  color: #FFFFFF;
  transform: translateX(2px);
}
/* Clickable group header (when a Group Website URL is set) */
.imapac-events-cal a.iec-group-head { text-decoration: none; color: inherit; cursor: pointer; }
.imapac-events-cal .iec-group-arrow { flex: 0 0 auto; opacity: 0.6; transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease; }
.imapac-events-cal a.iec-group-head:hover .iec-group-name { color: var(--region-color, #1F3D7A); }
.imapac-events-cal a.iec-group-head:hover .iec-group-arrow { opacity: 1; background: #3350C2; border-color: #3350C2; color: #FFFFFF; transform: translateX(2px); }

/* ============ CATEGORY INDEX ============ */
.imapac-events-cal .iec-catindex {
  margin-top: calc(var(--iec-region-gap, 72px) + 8px);
  padding-top: 34px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.imapac-events-cal .iec-cat-head {
  text-align: center;
  margin-bottom: 30px;
}

.imapac-events-cal .iec-cat-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--iec-heading-color, #1F3D7A);
  letter-spacing: -0.005em;
}

.imapac-events-cal .iec-cat-rule {
  width: 54px;
  height: 3px;
  border-radius: 2px;
  margin: 0 auto;
  background: var(--iec-heading-color, #1F3D7A);
  opacity: 0.85;
}

.imapac-events-cal .iec-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  align-items: start;
}

.imapac-events-cal .iec-cat {
  background: var(--iec-card-bg, #FFFFFF);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--iec-card-radius, 14px);
  padding: 18px 20px;
}

.imapac-events-cal.iec-shadow .iec-cat {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.imapac-events-cal .iec-cat-name {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--iec-heading-color, #1F3D7A);
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.07);
}

.imapac-events-cal .iec-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.imapac-events-cal .iec-cat-ev {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.09);
}

.imapac-events-cal .iec-cat-ev:first-child {
  border-top: none;
}

.imapac-events-cal .iec-cat-ev-name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--iec-name-color, #1A1D26);
}

.imapac-events-cal .iec-cat-ev-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--iec-meta-color, #5A5F6B);
}

.imapac-events-cal .iec-cat-ev-region {
  position: relative;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--region-color, #1F3D7A);
  overflow: hidden;
}

.imapac-events-cal .iec-cat-ev-region::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0.1;
  border-radius: inherit;
}

/* =====================================================
   MOTION — scroll reveal + refined interactions
   ===================================================== */
/* Progressive enhancement: hidden state applies only when JS is active
   (module.js adds .iec-js). No JS → everything stays visible. */
.imapac-events-cal.iec-js .iec-reveal {
  opacity: 0;
  transform: translateY(18px);
}
.imapac-events-cal .iec-reveal {
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--iec-delay, 0ms);
  will-change: opacity, transform;
}
.imapac-events-cal .iec-reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .imapac-events-cal.iec-js .iec-reveal { opacity: 1 !important; transform: none !important; }
  .imapac-events-cal .iec-header { animation: none !important; }
  .imapac-events-cal .iec-years { transition: none !important; }
}

/* =====================================================
   CALENDAR VIEW (floating month-grid popup — JS-built, appended to <body>)
   Selectors are unprefixed because the panel lives outside .imapac-events-cal.
   ===================================================== */
.iec-cal-btnwrap { margin-top: 24px; display: flex; justify-content: center; }
.iec-cal-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 24px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em;
  color: #67259F;
  background: #FFFFFF;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.iec-cal-toggle svg { width: 17px; height: 17px; }
.iec-cal-toggle:hover { transform: translateY(-2px); box-shadow: 0 15px 34px -8px rgba(0, 0, 0, 0.5); background: #FBF7FF; }
.iec-cal-toggle:active { transform: translateY(0); }

/* Transparent overlay — only catches outside-clicks to close; no dim, no blur. */
.iec-cal-backdrop {
  position: fixed; inset: 0; z-index: 2147483000;
  background: transparent;
  visibility: hidden;
  transition: visibility 0.3s ease;
}
.iec-cal-backdrop.is-open { visibility: visible; }

.iec-cal-panel {
  position: fixed; z-index: 2147483001;
  top: 50%; right: clamp(16px, 5vw, 60px);
  transform: translateY(-50%) translateX(26px) scale(0.98);
  width: min(430px, 92vw); max-height: min(84vh, 760px);
  display: flex; flex-direction: column;
  background: #FFFFFF; border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(26, 17, 48, 0.55), 0 8px 26px rgba(26, 17, 48, 0.18);
  font-family: inherit; color: #241A4E;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              visibility 0.4s;
}
.iec-cal-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(-50%) translateX(0) scale(1); }

.iec-cal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 14px; }
.iec-cal-title { font-size: 17px; font-weight: 800; color: #241A4E; letter-spacing: -0.01em; }
.iec-cal-close {
  border: 0; background: #F2EEFA; color: #67259F; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.iec-cal-close:hover { background: #E7DEF6; transform: rotate(90deg); }

/* Scroll area with soft faded top/bottom edges */
.iec-cal-scroll {
  overflow-y: auto; overflow-x: hidden; padding: 8px 22px 26px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  scrollbar-width: thin; scrollbar-color: rgba(103, 37, 159, 0.3) transparent;
}
.iec-cal-scroll::-webkit-scrollbar { width: 7px; }
.iec-cal-scroll::-webkit-scrollbar-thumb { background: rgba(103, 37, 159, 0.22); border-radius: 8px; }

.iec-cal-month { margin-bottom: 22px; }
.iec-cal-mname { font-size: 14px; font-weight: 800; color: #3350C2; letter-spacing: 0.03em; margin: 8px 4px 12px; text-align: center; }
.iec-cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 6px; }
.iec-cal-wd span { text-align: center; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #A29ABC; }
.iec-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.iec-cal-cell {
  position: relative; aspect-ratio: 1 / 1; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: #F6F5FA; color: #6B6B80; font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.iec-cal-empty { background: transparent; }
.iec-cal-ev {
  background: var(--g, linear-gradient(150deg, #3350C2, #67259F));
  color: #FFFFFF; font-weight: 800; cursor: pointer; overflow: hidden;
  flex-direction: column; gap: 0;
  box-shadow: 0 5px 12px -3px rgba(26, 17, 48, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.iec-cal-ev:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 20px -4px rgba(26, 17, 48, 0.48); z-index: 2; }
.iec-cal-ev .iec-cal-dnum { position: absolute; top: 5px; left: 7px; font-size: 10.5px; opacity: 0.92; }
.iec-cal-logo {
  width: 62%; height: 62%; margin-top: 7px; border-radius: 7px; background: #FFFFFF;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.iec-cal-logo img { max-width: 86%; max-height: 86%; object-fit: contain; }
.iec-cal-init { font-size: 11px; font-weight: 900; color: #67259F; background: rgba(255, 255, 255, 0.94); }
.iec-cal-more { position: absolute; bottom: 3px; right: 5px; font-size: 8.5px; font-weight: 800; background: rgba(255, 255, 255, 0.28); border-radius: 6px; padding: 0 4px; }

/* Card highlight when jumped-to from the calendar view */
@keyframes iec-flash {
  0%   { box-shadow: 0 0 0 0 rgba(163, 68, 201, 0), 0 10px 26px rgba(41, 24, 82, 0.08); }
  10%  { box-shadow: 0 0 0 3px rgba(163, 68, 201, 0.55), 0 16px 36px rgba(103, 37, 159, 0.28); }
  62%  { box-shadow: 0 0 0 3px rgba(163, 68, 201, 0.55), 0 16px 36px rgba(103, 37, 159, 0.28); }
  100% { box-shadow: 0 2px 5px rgba(41, 24, 82, 0.05), 0 10px 26px rgba(41, 24, 82, 0.08); }
}
.imapac-events-cal .iec-event.iec-flash { animation: iec-flash 3s cubic-bezier(0.22, 0.61, 0.36, 1); }
@media (prefers-reduced-motion: reduce) { .imapac-events-cal .iec-event.iec-flash { animation: none; } }

@media (max-width: 560px) {
  .iec-cal-panel { right: 50%; transform: translate(50%, -50%) translateY(0) scale(0.98); width: 92vw; }
  .iec-cal-panel.is-open { transform: translate(50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .iec-cal-panel, .iec-cal-backdrop { transition: opacity 0.01s linear; }
  .iec-cal-close:hover { transform: none; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 880px) {
  .imapac-events-cal .iec-event {
    grid-template-columns: 76px 110px 1fr auto;
    gap: 14px;
  }
  .imapac-events-cal .iec-rail { padding: 10px 9px 8px; }
  .imapac-events-cal .iec-logo {
    width: 110px;
    height: 58px;
  }
}

@media (max-width: 700px) {
  .imapac-events-cal .iec-header { margin-bottom: 2.5rem; }
  .imapac-events-cal .iec-heading { font-size: calc(var(--iec-heading-size, 38px) * 0.72); }
  .imapac-events-cal .iec-region-name { font-size: 22px; }
  .imapac-events-cal .iec-regions { gap: calc(var(--iec-region-gap, 72px) * 0.7); }
  .imapac-events-cal .iec-list { --iec-tl-pad: 28px; --iec-tl-line: 10px; }
  .imapac-events-cal .iec-month-label { padding: 6px 14px; }

  /* Two-row card: rail + logo (+arrow) on top, name & meta full width below */
  .imapac-events-cal .iec-event {
    grid-template-columns: 62px 1fr 34px;
    grid-template-areas:
      "rail logo arrow"
      "body body body";
    row-gap: 10px;
    padding: 12px 14px;
  }
  .imapac-events-cal .iec-logo {
    justify-self: start;
    width: min(150px, 100%);
    height: 50px;
  }
  .imapac-events-cal .iec-rail { min-height: 50px; padding: 7px 9px 6px; }
  .imapac-events-cal .iec-rail-days { font-size: 16px; }
  .imapac-events-cal .iec-rail-mon { font-size: 9.5px; }
  .imapac-events-cal .iec-rail-mon-solo { font-size: 12px; }
  .imapac-events-cal .iec-years { gap: 9px; padding: 8px var(--iec-sec-pad-x, 24px); margin-bottom: 20px; }
  .imapac-events-cal .iec-year-tab { padding: 9px 20px; font-size: 13.5px; letter-spacing: 0.12em; }
  .imapac-events-cal .iec-name { font-size: 15px; }
  .imapac-events-cal .iec-badge { display: block; width: max-content; margin: 5px 0 0; top: 0; }

  /* Group card: stack logo above the heading, member list to a single column */
  .imapac-events-cal .iec-group-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .imapac-events-cal .iec-group-logo { width: min(150px, 100%); }
  .imapac-events-cal .iec-group-name { font-size: 18px; }
  .imapac-events-cal .iec-group-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .imapac-events-cal .iec-cat-grid { grid-template-columns: 1fr; }
  .imapac-events-cal .iec-meta { gap: 4px 12px; font-size: 12.5px; }
  .imapac-events-cal .iec-event { padding: 11px 12px; }
}

/* ============================================================================
   REGION JUMPS IN THE YEAR BAR
   Joyboy, 23 Sep 2026: the bar should not only switch years, it should let a reader jump to
   ASIA-PACIFIC or EUROPE. The year pills keep their own group so the bar still reads as
   "which year", then a rule, then "where to". module.js hides a jump whose region has nothing
   in the open year, so the bar never offers a jump that lands nowhere.
   ============================================================================ */
.imapac-events-cal .iec-yrs,
.imapac-events-cal .iec-jumps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.imapac-events-cal .iec-bar-sep {
  width: 1px;
  height: 26px;
  flex: none;
  background: rgba(41, 24, 82, 0.16);
}
.imapac-events-cal .iec-years.is-stuck .iec-bar-sep { background: rgba(255, 255, 255, 0.34); }

.imapac-events-cal .iec-jump {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 14px;
  border: 1.5px solid rgba(41, 24, 82, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #2C2C2A;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.imapac-events-cal .iec-jump[hidden] { display: none; }
.imapac-events-cal .iec-jump:hover {
  background: #fff;
  border-color: var(--iec-jump-hover, rgba(103, 37, 159, 0.55));
  color: #67259F;
  transform: translateY(-1px);
}
.imapac-events-cal .iec-jump:focus { outline: none; }
.imapac-events-cal .iec-jump:focus-visible { outline: 3px solid rgba(103, 37, 159, 0.55); outline-offset: 2px; }
.imapac-events-cal .iec-jump-ico { display: block; width: 14px; height: 14px; flex: none; opacity: 0.75; }
.imapac-events-cal .iec-jump-ico svg { width: 100%; height: 100%; display: block; }

/* on the stuck bar's brand ground the pills go outline-on-dark, like the resting year pills */
.imapac-events-cal .iec-years.is-stuck .iec-jump {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.imapac-events-cal .iec-years.is-stuck .iec-jump:hover {
  background: #fff;
  border-color: #fff;
  color: #67259F;
}

@media (max-width: 720px) {
  .imapac-events-cal .iec-yrs,
  .imapac-events-cal .iec-jumps { gap: 9px; }
  .imapac-events-cal .iec-bar-sep { display: none; }
  .imapac-events-cal .iec-jump { padding: 8px 14px 8px 11px; font-size: 12px; letter-spacing: 0.06em; }
}
@media (prefers-reduced-motion: reduce) {
  .imapac-events-cal .iec-jump { transition: none; }
  .imapac-events-cal .iec-jump:hover { transform: none; }
}
