/* [norban_events] — NorBAN design system values (norban_design-system_v1.md). Scoped to .nb-events. */
.nb-events {
  --nb-navy: #00205B;
  --nb-blue: #19559E;
  --nb-red: #BA0C2F;
  --nb-red-light: #EA0F3B;
  --nb-gold-dark: #B09D0C;
  --nb-text: #333333;
  --nb-muted: #5F6470;
  --nb-line: #E3E6EC;
  --nb-tint: #F4F6FA;
  font-family: inherit;
  color: var(--nb-text);
}
.nb-events ol { list-style: none; margin: 0; padding: 0; }
.nb-events [hidden] { display: none !important; }
.nb-events a,
.nb-events a:visited { text-decoration: none !important; }   /* Astra underlines content links */
.nb-events a:focus-visible { outline: 2px solid var(--nb-blue); outline-offset: 2px; border-radius: 4px; }

/* search: label, field and button in the site's form style */
.nb-ev-search { margin: 0 0 36px; max-width: 560px; }
.nb-ev-search-label { display: block; margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--nb-navy); }
.nb-ev-search-row { display: flex; gap: 8px; }
.nb-ev-search input[type="search"] {
  flex: 1; min-width: 0; box-sizing: border-box; height: 46px;
  padding: 10px 14px; font: inherit; font-size: 16px;
  border: 1px solid #CDD5E0; border-radius: 4px; background: #fff; color: var(--nb-text);
}
.nb-ev-search input[type="search"]:focus { outline: 2px solid var(--nb-blue); outline-offset: 1px; border-color: var(--nb-blue); }
/* The Elementor kit styles every <button> red: scope this one to the information blue. */
.nb-events .nb-ev-search .nb-ev-search-btn {
  height: 46px; padding: 0 22px !important; border: 0 !important; border-radius: 4px !important;
  background: var(--nb-blue) !important; color: #fff !important; font: inherit; font-size: 15px !important; font-weight: 600 !important;
  cursor: pointer; line-height: 46px !important;
}
.nb-events .nb-ev-search .nb-ev-search-btn:hover,
.nb-events .nb-ev-search .nb-ev-search-btn:focus-visible { background: var(--nb-navy) !important; }
.nb-ev-search-help { margin: 8px 0 0; font-size: 13px; color: var(--nb-muted); }
.nb-ev-nomatch { margin: 14px 0 0; padding: 10px 14px; background: #EEF2F7; border-radius: 4px; color: var(--nb-navy); font-size: 15px; }
.nb-ev-empty { color: var(--nb-muted); margin: 12px 0 0; }
.nb-ev-tab-count { font-weight: 500; }

/* tabs: upcoming / past (shown only once events.js runs) */
.nb-ev-tabs { display: flex; gap: 4px; margin: 0 0 28px; border-bottom: 2px solid var(--nb-line); }
.nb-events .nb-ev-tabs .nb-ev-tab {
  margin: 0 0 -2px !important; padding: 10px 18px !important; border: 0 !important; border-bottom: 3px solid transparent !important;
  border-radius: 0 !important; background: transparent !important; color: var(--nb-muted) !important;
  font: inherit; font-size: 16px !important; font-weight: 600 !important; line-height: 1.3 !important; cursor: pointer;
}
.nb-events .nb-ev-tabs .nb-ev-tab:hover { color: var(--nb-navy) !important; }
.nb-events .nb-ev-tabs .nb-ev-tab[aria-selected="true"] { color: var(--nb-navy) !important; border-bottom-color: var(--nb-navy) !important; }
.nb-events .nb-ev-tabs .nb-ev-tab:focus-visible { outline: 2px solid var(--nb-blue); outline-offset: -2px; }
.nb-ev-has-tabs .nb-ev-pastblock { margin-top: 0; }
.nb-ev-has-tabs .nb-ev-past-h { position: absolute; left: -9999px; }

/* month heading */
.nb-ev-month { margin: 0 0 32px; }
.nb-ev-month-h {
  font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--nb-navy); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--nb-navy);
}

/* date tag (full view): light grey box, red month, navy day */
.nb-ev-tag {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-sizing: border-box; background: #E6EBF2; border-radius: 8px; width: 64px; padding: 9px 4px; align-self: start;
  line-height: 1.1; text-align: center;
}
.nb-ev-tag-m { color: var(--nb-red); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.nb-ev-tag-d { color: var(--nb-navy); font-size: 22px; font-weight: 700; white-space: nowrap; }

/* card */
.nb-ev-card { margin: 0 0 14px; }
.nb-ev-card article {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px;
  background: #FAFBFD; border: 1px solid #E6EAF0; border-radius: 12px; padding: 18px;
  transition: box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.nb-ev-card.has-img article { grid-template-columns: 64px minmax(0, 1fr) 200px; }
.nb-ev-card article:hover { background: #fff; border-color: #D5DCE6; box-shadow: 0 4px 16px rgba(0, 32, 91, .06); }
.nb-ev-when { margin: 0; font-size: 14px; color: var(--nb-muted); }
.nb-ev-title { margin: 4px 0 6px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.nb-ev-title a { color: var(--nb-navy); }
.nb-ev-title a:hover { color: var(--nb-blue); }
.nb-ev-meta { margin: 0 0 6px; font-size: 14px; color: var(--nb-text); }
.nb-ev-excerpt {
  margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: #515151;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nb-ev-actions { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.nb-events .nb-ev-btn {
  display: inline-block; background: var(--nb-blue); color: #fff; font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: 4px; line-height: 1.3;
}
.nb-events .nb-ev-btn:hover { background: var(--nb-navy); color: #fff; }   /* blue = information (design system, 20 Nov) */
.nb-events .nb-ev-more { color: var(--nb-blue); font-size: 14px; font-weight: 500; }
.nb-events .nb-ev-more:hover { color: var(--nb-navy); text-decoration: underline !important; }
.nb-ev-img { display: block; align-self: start; }
.nb-ev-img img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: transparent; border-radius: 8px;
  filter: saturate(.7) brightness(1.03); opacity: .82; transition: filter .2s ease, opacity .2s ease;
}
.nb-ev-card article:hover .nb-ev-img img { filter: none; opacity: 1; }

.nb-ev-badge {
  display: inline-block; margin-left: 8px; padding: 1px 7px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--nb-navy); color: var(--nb-navy); border-radius: 4px; vertical-align: 1px;
}
.nb-ev-badge--alert { border-color: var(--nb-red); color: var(--nb-red); }
.nb-ev-card.is-locked article { background: transparent; border-style: dashed; }
.nb-ev-card.is-locked article:hover { box-shadow: none; }
.nb-ev-card.is-canceled .nb-ev-title a { text-decoration: line-through; color: var(--nb-muted); }

/* past events, Luma-style rows */
.nb-ev-pastblock { margin-top: 48px; }
.nb-ev-past { border-bottom: 1px solid var(--nb-line); }
.nb-ev-past a { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 4px; color: var(--nb-text); }
.nb-ev-past a:hover { background: var(--nb-tint); }
.nb-ev-past-date { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; color: var(--nb-muted); }
.nb-ev-past-date span:first-child { font-weight: 600; color: var(--nb-navy); }
.nb-ev-past-body { display: flex; flex-direction: column; min-width: 0; }
.nb-ev-past-title { font-weight: 600; color: var(--nb-navy); }
.nb-ev-past-meta { font-size: 13px; color: var(--nb-muted); }
/* Whole image, scaled to fit a 112 × 63 (16:9) slot — no square crop. */
.nb-ev-past-img { display: flex; align-items: center; justify-content: center; width: 112px; height: 63px; }
.nb-ev-past-img img { display: block; width: auto; height: auto; max-width: 112px; max-height: 63px; border-radius: 4px; filter: grayscale(.35); opacity: .85; }
.nb-ev-showmore { margin: 16px 0 0; }

/* compact (front page) — matches the former Events List widget */
.nb-events--compact { --nb-c-month: var(--nb-red); --nb-c-day: var(--nb-navy); --nb-c-time: var(--nb-muted); --nb-c-title: var(--nb-navy); --nb-c-link: var(--nb-blue); }
.nb-events--dark    { --nb-c-month: #ECD91A; --nb-c-day: #D7E3F2; --nb-c-time: #C4D8F2; --nb-c-title: #FFFFFF; --nb-c-link: #D7E3F2; }
.nb-ev-rows { margin: 0; }
.nb-ev-row { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; margin: 0 0 18px; padding-left: 4px; }
.nb-ev-row.is-featured::before { content: ""; position: absolute; left: -12px; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: var(--nb-gold-dark); }
.nb-ev-row-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.nb-ev-ctag { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.nb-ev-ctag-m { color: var(--nb-c-month); font-size: 15px; font-weight: 400; text-transform: uppercase; }
.nb-ev-ctag-d { color: var(--nb-c-day); font-size: 32px; font-weight: 700; }
.nb-ev-ctime { display: flex; align-items: center; gap: 8px; color: var(--nb-c-time); font-size: 15px; line-height: 1.4; }
.nb-ev-feat-icon { flex: none; color: var(--nb-c-day); }
.nb-events a.nb-ev-ctitle { color: var(--nb-c-title); font-size: 21px; font-weight: 700; line-height: 1.25; }
.nb-events a.nb-ev-ctitle:hover { color: var(--nb-c-month); }
.nb-ev-viewall { margin: 8px 0 0; }
.nb-events .nb-ev-viewall a { color: var(--nb-c-link); font-size: 16px; font-weight: 500; font-style: italic; }
.nb-events .nb-ev-viewall a:hover { text-decoration: underline !important; }

@media (max-width: 760px) {
  .nb-ev-card.has-img article { grid-template-columns: 56px minmax(0, 1fr); }
  .nb-ev-card.has-img .nb-ev-img { grid-column: 1 / -1; grid-row: 1; }
  .nb-ev-card article { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .nb-ev-tag { width: 56px; }
  .nb-ev-title { font-size: 17px; }
  .nb-ev-past a { grid-template-columns: 60px minmax(0, 1fr); }
  .nb-ev-past-img { display: none; }
  .nb-ev-row { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .nb-ev-ctag-d { font-size: 28px; }
  .nb-events a.nb-ev-ctitle { font-size: 18px; }
  .nb-ev-ctime { font-size: 14px; }
}
