/* CBK-IMS Events widget (26 Nov 2026). CBK colours and type, square buttons like the rest of IMS. */

.imse {
    --navy-950: #081838;
    --navy-900: #194c9f; /* CBK blue (26 Nov 2026: "use the correct blue") */
    --blue-700: #194c9f;
    --blue-600: #2860bd;
    --blue-50: #f2f6fc;
    --gold-600: #A9821C;
    --gold-500: #CC9F26;
    --gold-100: #faf3dc;
    --ink: #0d1b2e;
    --muted: #5a6880;
    --line: #e1e7f0;
    --radius: 8px;
    --shadow: 0 6px 24px -8px rgba(10, 37, 82, .18);
    --shadow-lg: 0 22px 48px -18px rgba(10, 37, 82, .35);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    max-width: 1340px;
    margin: 0 auto;
}
.imse *, .imse *::before, .imse *::after { box-sizing: border-box; }
.imse .imsx-icon { width: 18px; height: 18px; flex: none; }
.imse a { text-decoration: none; }
.imse h2, .imse h3 { font-family: Poppins, Arial, sans-serif; margin: 0; }

/* Head + toolbar */
.imse-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.imse-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; color: var(--gold-600); font-family: Poppins, Arial, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.imse-eyebrow::before { content: ""; width: 36px; height: 2px; background: var(--gold-500); }
.imse-title { font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.15; color: var(--ink); }
.imse-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.imse-tabs, .imse-views { display: inline-flex; background: var(--blue-50); border: 1px solid var(--line); padding: 4px; gap: 4px; }
.imse .imse-tabs button, .imse .imse-views button {
    display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--navy-900);
    font: 600 15px/1 Poppins, Arial, sans-serif; padding: 11px 16px; cursor: pointer; border-radius: 0; transition: background .2s, color .2s, box-shadow .2s;
}
.imse .imse-tabs button:hover, .imse .imse-views button:hover { background: #fff; color: var(--navy-900); }
.imse .imse-tabs button[aria-selected="true"], .imse .imse-views button[aria-pressed="true"] { background: var(--navy-900); color: #fff; box-shadow: 0 6px 14px -8px rgba(11, 42, 94, .8); }
.imse .imse-tabs button:focus-visible, .imse .imse-views button:focus-visible, .imse a:focus-visible, .imse .imse-link:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.imse-count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; font-size: 12px; background: #fff; color: var(--navy-900); border: 1px solid var(--line); }
.imse .imse-tabs button[aria-selected="true"] .imse-count { background: var(--gold-500); color: var(--navy-950); border-color: var(--gold-500); }

/* Layout switch: one of the two renderings per panel */
.imse[data-view="cards"] .imse-only-list, .imse[data-view="list"] .imse-only-cards { display: none; }
.imse-panel[hidden] { display: none; }
.imse-panel { animation: imse-in .35s ease both; }
@keyframes imse-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .imse-panel { animation: none; } .imse * { transition: none !important; } }

/* Featured next event */
.imse-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg); margin-bottom: 40px; overflow: hidden; position: relative; }
.imse-feature::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--gold-500); }
.imse-feature__media { display: block; min-height: 320px; position: relative; }
.imse-feature__media .imse-img, .imse-feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imse-feature__body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.imse-feature__eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 13px/1.2 Poppins, Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-500); }
.imse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 0 0 rgba(204, 159, 38, .7); animation: imse-pulse 2s infinite; }
@keyframes imse-pulse { 70% { box-shadow: 0 0 0 10px rgba(204, 159, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(204, 159, 38, 0); } }
.imse-feature__title { font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; line-height: 1.2; }
.imse .imse-feature__title a { color: #fff; }
.imse .imse-feature__title a:hover { color: var(--gold-500); }
.imse-feature__text { margin: 0; color: rgba(255, 255, 255, .85); font-size: 17px; line-height: 1.6; }
.imse-feature .imse-meta { color: rgba(255, 255, 255, .8); }
.imse-feature .imse-meta .imsx-icon { color: var(--gold-500); }
.imse-feature__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* Buttons */
.imse .imse-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; font: 600 15px/1 Poppins, Arial, sans-serif; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.imse .imse-btn .imsx-icon { width: 16px; height: 16px; transition: transform .2s; }
.imse .imse-btn:hover .imsx-icon { transform: translateX(3px); }
.imse .imse-btn--gold { background: var(--gold-500); color: var(--navy-950); }
.imse .imse-btn--gold:hover { background: #e0b43a; color: var(--navy-950); }
.imse .imse-btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.imse .imse-btn--ghost:hover { background: #fff; color: var(--navy-900); }
.imse .imse-btn--blue { background: var(--blue-700); color: #fff; }
.imse .imse-btn--blue:hover { background: #123a7a; color: #fff; }

.imse-sub { font-size: 20px; font-weight: 600; margin: 0 0 18px; display: flex; align-items: center; gap: 14px; }
.imse-sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Cards */
.imse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.imse-card { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.imse-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.imse .imse-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.imse-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--blue-50); }
.imse-card__media .imse-img, .imse-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.imse-card:hover .imse-card__media img { transform: scale(1.05); }
.imse-card.is-past .imse-card__media img { filter: grayscale(.55); }
.imse-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.imse-card__title { font-family: Poppins, Arial, sans-serif; font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--ink); margin: 0; }
.imse-card:hover .imse-card__title { color: var(--blue-700); }
.imse-card__text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.imse-card__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.imse-card__date { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.imse-card__date .imsx-icon { width: 16px; height: 16px; color: var(--blue-700); }
.imse-more { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 Poppins, Arial, sans-serif; color: var(--blue-700); }
.imse-more .imsx-icon { width: 16px; height: 16px; transition: transform .2s; }
.imse-card:hover .imse-more .imsx-icon { transform: translateX(3px); }

/* Date chip */
.imse-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 8px 10px; background: var(--navy-900); color: #fff; font-family: Poppins, Arial, sans-serif; line-height: 1; text-align: center; }
.imse-chip b { font-size: 24px; font-weight: 700; }
.imse-chip span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-top: 5px; color: var(--gold-500); }
.imse-chip--month b { font-size: 18px; text-transform: uppercase; letter-spacing: .04em; }
.imse-card__media .imse-chip { position: absolute; left: 14px; top: 14px; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5); }
.imse-card.is-past .imse-chip { background: #4b5871; }

.imse-badge { position: absolute; right: 12px; top: 14px; padding: 6px 10px; background: var(--gold-500); color: var(--navy-950); font: 700 12px/1 Poppins, Arial, sans-serif; letter-spacing: .02em; }
.imse-badge--past { background: rgba(255, 255, 255, .92); color: var(--muted); }
.imse-badge--inline { position: static; display: inline-block; margin-left: 10px; vertical-align: middle; font-size: 11px; padding: 5px 8px; }

.imse-img--none { display: grid !important; place-items: center; width: 100%; height: 100%; color: var(--blue-700); background: linear-gradient(135deg, var(--blue-50), #dfe8f6); }
.imse-img--none .imsx-icon { width: 40px; height: 40px; opacity: .6; }

/* Meta line */
.imse-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.imse-meta__item { display: inline-flex; align-items: center; gap: 7px; }
.imse-meta .imsx-icon { width: 16px; height: 16px; color: var(--blue-700); }

/* List (agenda) */
.imse-agenda__year + .imse-agenda__year { margin-top: 34px; }
.imse-agenda__head { display: flex; align-items: baseline; gap: 12px; font-size: 26px; font-weight: 700; color: var(--navy-900); padding-bottom: 12px; margin-bottom: 6px; border-bottom: 2px solid var(--navy-900); }
.imse-agenda__head small { font: 500 14px/1 Arial, sans-serif; color: var(--muted); }
.imse-agenda__list { list-style: none; margin: 0; padding: 0; }
.imse-row { border-bottom: 1px solid var(--line); }
.imse .imse-row > a { display: grid; grid-template-columns: auto minmax(0, 1fr) 140px 28px; align-items: center; gap: 22px; padding: 20px 12px; color: inherit; transition: background .2s; }
.imse .imse-row > a:hover { background: var(--blue-50); }
.imse-row .imse-chip { min-width: 74px; padding: 12px 10px; }
.imse-row.is-past .imse-chip { background: #4b5871; }
.imse-row__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.imse-row__title { font: 600 19px/1.3 Poppins, Arial, sans-serif; color: var(--ink); }
.imse .imse-row > a:hover .imse-row__title { color: var(--blue-700); }
.imse-row__text { color: var(--muted); font-size: 15px; line-height: 1.5; }
.imse-row__thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--blue-50); }
.imse-row__thumb .imse-img, .imse-row__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.imse-row.is-past .imse-row__thumb img { filter: grayscale(.55); }
.imse-row__go { display: grid; place-items: center; color: var(--blue-700); transition: transform .2s; }
.imse .imse-row > a:hover .imse-row__go { transform: translateX(4px); }

/* Empty state + enquiry band */
.imse-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 56px 24px; border: 1px dashed #c9d8f1; background: var(--blue-50); color: var(--muted); }
.imse-empty .imsx-icon { width: 34px; height: 34px; color: var(--blue-700); }
.imse-empty p { margin: 0; max-width: 460px; line-height: 1.6; }
.imse-empty strong { display: block; color: var(--ink); font-family: Poppins, Arial, sans-serif; font-size: 18px; margin-bottom: 4px; }
.imse .imse-link { border: 0; background: none; padding: 0; color: var(--blue-700); font: 600 15px/1 Poppins, Arial, sans-serif; text-decoration: underline; cursor: pointer; }
.imse-cta { display: flex; align-items: center; gap: 18px; margin-top: 44px; padding: 22px 26px; background: var(--gold-100); border-left: 4px solid var(--gold-500); }
.imse-cta__icon { display: grid; place-items: center; width: 46px; height: 46px; background: #fff; color: var(--gold-600); flex: none; }
.imse-cta p { margin: 0; flex: 1; font: 600 18px/1.4 Poppins, Arial, sans-serif; color: var(--navy-900); }

@media (max-width: 900px) {
    .imse-feature { grid-template-columns: 1fr; }
    .imse-feature__media { min-height: 0; aspect-ratio: 16 / 9; }
    .imse .imse-row > a { grid-template-columns: auto minmax(0, 1fr) 24px; }
    .imse-row__thumb { display: none; }
}
@media (max-width: 640px) {
    .imse-top { align-items: stretch; }
    .imse-bar { width: 100%; }
    .imse-tabs { flex: 1; }
    .imse .imse-tabs button { flex: 1; justify-content: center; padding: 11px 10px; }
    .imse .imse-views button { padding: 11px 12px; }
    .imse .imse-views button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .imse .imse-row > a { gap: 14px; padding: 16px 4px; }
    .imse-row .imse-chip { min-width: 62px; padding: 10px 8px; }
    .imse-row__title { font-size: 17px; }
    .imse-cta { flex-direction: column; align-items: flex-start; }
    .imse-feature__text { font-size: 16px; }
}

/* Event cards in CBK blue like the featured event and the IMS home event cards (26 Nov 2026). */
.imse-card { background: var(--navy-900); border-color: var(--navy-900); }
.imse-card__title { color: #fff; }
.imse-card:hover .imse-card__title { color: var(--gold-500); }
.imse-card__text { color: rgba(255, 255, 255, .85); }
.imse-card__foot { border-top-color: rgba(255, 255, 255, .22); }
.imse-card__date { color: rgba(255, 255, 255, .85); }
.imse-card__date .imsx-icon { color: var(--gold-500); }
.imse-more { color: var(--gold-500); }
.imse-card__media .imse-chip { background: var(--navy-950); }
.imse-card.is-past { background: #4b5871; border-color: #4b5871; }
