/* =====================================================================
   ILLH site-wide layout (loaded on every public page by illh_front)
   ===================================================================== */
:root { --illh-page: 1200px; --illh-navy: #1d2758; --illh-gold: #f6b11f; --illh-red: #d9272d;
  --illh-ink: #2b3245; --illh-muted: #6b7286; --illh-line: #e7e9f0; --illh-bg: #f7f8fb; }

/* ---------- 1. One page width = 1200px (same as the slider) ---------- */
.container, .main-container {
  width: calc(100% - 32px) !important; max-width: var(--illh-page) !important;
  padding-left: 0 !important; padding-right: 0 !important; margin-left: auto !important; margin-right: auto !important;
}
.container > .row, .container > div > .row { margin-left: 0 !important; margin-right: 0 !important; }
.row > [class*="col-"]:only-child, .row > .col-md-12, .row > .col-sm-12, .row > .col-lg-12, .row > .col-xs-12 {
  width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; float: none !important;
  padding-left: 0 !important; padding-right: 0 !important;
}
.row > aside:not(:has(.block)), .row > [class*="sidebar"]:not(:has(.block)) { display: none !important; }
@media (max-width: 640px) { .container, .main-container { width: calc(100% - 24px) !important; } }

/* ---------- 2. Header: full-width menu + line ---------- */
.illh-header-row--flex { flex-wrap: wrap !important; align-items: center; }
.illh-menu-full {
  flex: 0 0 100% !important; width: 100% !important; max-width: none !important; float: none !important; clear: both;
  margin: 14px 0 0 !important; padding: 0 !important; border: 0 !important; border-top: 1px solid var(--illh-line) !important;
  background: #fff !important; order: 99;
}
.illh-header-row > :not(.illh-menu-full) { border-bottom: 0 !important; }
.illh-menu-full ul:has(> li > a) {
  display: flex !important; flex-wrap: wrap; justify-content: space-between; width: 100% !important;
  margin: 0 !important; padding: 0 !important; float: none !important; border: 0 !important;
}
.illh-menu-full ul:has(> li > a) > li { float: none !important; flex: 1 1 auto; text-align: center; list-style: none !important; }
.illh-menu-full ul:has(> li > a) > li:first-child { text-align: left; }
.illh-menu-full ul:has(> li > a) > li:last-child { text-align: right; }
.illh-menu-full ul ul li { text-align: left !important; }
@media (max-width: 767px) {
  .illh-menu-full ul:has(> li > a) { flex-direction: column; }
  .illh-menu-full ul:has(> li > a) > li { text-align: left !important; }
}

/* ---------- 3. Duplicate title / breadcrumb ---------- */
.illh-dup { display: none !important; }

/* ---------- 4. Modern tables ---------- */
:is(main, .region-content, article, .node) table:not(:has(td img)) {
  width: 100% !important; border-collapse: separate !important; border-spacing: 0 !important;
  border: 1px solid var(--illh-line) !important; border-radius: 14px; overflow: hidden; background: #fff; margin: 8px 0 32px !important;
}
:is(main, .region-content, article, .node) table:not(:has(td img)) :is(td, th) {
  border: 0 !important; border-bottom: 1px solid var(--illh-line) !important; padding: 12px 18px !important;
  font-family: inherit !important; font-size: .97rem !important; color: var(--illh-ink) !important; vertical-align: top; text-align: left;
}
:is(main, .region-content, article, .node) table:not(:has(td img)) tr:last-child td { border-bottom: 0 !important; }
:is(main, .region-content, article, .node) table:not(:has(td img)) th,
:is(main, .region-content, article, .node) table:not(:has(td img)) thead td { background: var(--illh-bg) !important; color: var(--illh-navy) !important; font-weight: 400; }
:is(main, .region-content, article, .node) table:not(:has(td img)) tbody tr:hover td { background: #fbfbfd; }
/* Normalise pasted fonts/colours inside table cells */
:is(main, .region-content, article, .node) table :is(p, span, font, a, strong) { font-family: inherit !important; font-size: inherit !important; line-height: 1.55 !important; }
:is(main, .region-content, article, .node) table :is(p, span, font):not(a *) { color: inherit !important; }
:is(main, .region-content, article, .node) table td p { margin: 0 0 4px !important; text-align: left !important; }

/* Single-column tables (e.g. Partners) → tile grid */
:is(main, .region-content, article, .node) table:not(:has(td img)):not(:has(td + td)) { border: 0 !important; background: none !important; overflow: visible; }
:is(main, .region-content, article, .node) table:not(:has(td img)):not(:has(td + td)) tbody {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
:is(main, .region-content, article, .node) table:not(:has(td img)):not(:has(td + td)) tr { display: block; }
:is(main, .region-content, article, .node) table:not(:has(td img)):not(:has(td + td)) td {
  display: flex; align-items: center; height: 100%; min-height: 58px; background: #fff;
  border: 1px solid var(--illh-line) !important; border-left: 3px solid var(--illh-gold) !important; border-radius: 10px;
  transition: box-shadow .2s, transform .2s;
}
:is(main, .region-content, article, .node) table:not(:has(td img)):not(:has(td + td)) td:hover { box-shadow: 0 8px 24px rgba(29,39,88,.08); transform: translateY(-2px); }
/* …and when the whole list sits in ONE cell as paragraphs */
:is(main, .region-content, article, .node) table:not(:has(td img)):not(:has(td + td)):not(:has(tr + tr)) :is(tbody, tr) { display: block !important; width: 100%; }
:is(main, .region-content, article, .node) table:not(:has(td img)):not(:has(td + td)):not(:has(tr + tr)) td { display: block; width: 100%; }
:is(main, .region-content, article, .node) table:not(:has(td img)):not(:has(td + td)):not(:has(tr + tr)) td:has(> p + p) {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
  border: 0 !important; background: none; padding: 0 !important; min-height: 0;
}
:is(main, .region-content, article, .node) table:not(:has(td + td)):not(:has(tr + tr)) td:has(> p + p) > p {
  display: flex; align-items: center; margin: 0 !important; padding: 12px 18px !important; min-height: 54px; background: #fff;
  border: 1px solid var(--illh-line); border-left: 3px solid var(--illh-gold); border-radius: 10px;
}
:is(main, .region-content, article, .node) table:not(:has(td + td)):not(:has(tr + tr)) td:has(> p + p) > p:empty { display: none; }
:is(main, .region-content, article, .node) table:not(:has(td + td)):not(:has(tr + tr)) td:has(> p + p) { background: none !important; }
:is(main, .region-content, article, .node) table:not(:has(td + td)):not(:has(tr + tr)) td:has(> p + p):hover { box-shadow: none; transform: none; }

/* ---------- 5. Staff profiles (rebuilt by illh-site.js) ---------- */
table.illh-staff, table.illh-staff tbody, table.illh-staff tr, table.illh-staff td { border: 0 !important; background: none !important; }
table.illh-staff { width: 100% !important; margin: 8px 0 40px !important; display: block !important; }
table.illh-staff tbody { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 28px !important; }
table.illh-staff tr { display: contents !important; }
table.illh-staff td.illh-staff__empty { display: none !important; }
table.illh-staff td {
  display: flex !important; flex-direction: column; width: auto !important; padding: 0 0 22px !important; overflow: hidden;
  background: #fff !important; border: 1px solid var(--illh-line) !important; border-radius: 16px !important;
  text-align: center !important; transition: box-shadow .25s, transform .25s;
}
table.illh-staff td:hover { box-shadow: 0 16px 40px rgba(29,39,88,.12) !important; transform: translateY(-4px); }
.illh-staff__photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--illh-bg); margin: 0 0 18px; }
.illh-staff__photo img {
  width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important;
  object-position: center 18% !important; display: block; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
.illh-staff__name, .illh-staff__role, .illh-staff__link {
  font-family: var(--font, 'Ropa Soft Pro', system-ui, sans-serif) !important; font-size: 1.02rem !important; line-height: 1.4 !important;
  padding: 0 18px; text-align: center !important;
}
.illh-staff__name { color: var(--illh-navy) !important; }
.illh-staff__role { color: var(--illh-muted) !important; margin-top: 2px; }
.illh-staff__link { margin-top: 10px; color: var(--illh-red) !important; text-decoration: none !important; font-size: .92rem !important; }

/* Clean list (converted single-column tables, e.g. Partners) */
.illh-list {
  list-style: none !important; margin: 8px 0 36px !important; padding: 0 !important;
  columns: 2 320px; column-gap: 40px; border-top: 1px solid var(--illh-line);
}
.illh-list li {
  break-inside: avoid; position: relative; margin: 0 !important; padding: 13px 4px 13px 22px !important;
  border-bottom: 1px solid var(--illh-line); color: var(--illh-ink) !important; font-size: .98rem !important; line-height: 1.5 !important;
  font-family: var(--font, 'Ropa Soft Pro', system-ui, sans-serif) !important; background: none !important;
}
.illh-list li::before { content: ""; position: absolute; left: 2px; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--illh-gold); }
.illh-list li :is(p, span, a) { font: inherit !important; color: inherit !important; margin: 0 !important; }
.illh-list li a { color: var(--illh-navy) !important; }

/* ---------- 6. Bottom info blocks (Contact / Location / Tags) on every page ---------- */
[id^="block-illh-front-"]:not(#block-illh-front-news):not(#block-illh-front-slider) {
  background: #fff !important; border: 1px solid var(--illh-line) !important; border-radius: 14px; padding: 24px !important;
  height: 100%; margin: 0 0 24px !important; box-shadow: none !important;
}
[id^="block-illh-front-"] iframe { width: 100% !important; height: 220px; border: 0; border-radius: 10px; }
[id^="block-illh-front-"] p img { width: 18px !important; vertical-align: -3px; margin-right: 8px; }

/* ---------- 7. Archive of events: year accordions + date | event rows ---------- */
.illh-archive__heading, .illh-archive__heading * { text-transform: none !important; font-size: 1.6rem !important; color: var(--illh-navy) !important; font-weight: 400 !important; margin: 32px 0 16px !important; }
.illh-archive { display: grid; gap: 12px; margin: 0 0 40px; }
.illh-archive__year { background: #fff; border: 1px solid var(--illh-line); border-radius: 14px; overflow: hidden; }
.illh-archive__year > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 22px; user-select: none;
}
.illh-archive__year > summary::-webkit-details-marker { display: none; }
.illh-archive__year > summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--illh-navy); transition: transform .2s; }
.illh-archive__year[open] > summary::after { content: "\2212"; }
.illh-archive__year > summary:hover { background: var(--illh-bg); }
.illh-archive__y { background: var(--illh-gold); color: var(--illh-navy); border-radius: 999px; padding: 3px 14px; font-size: 1.05rem; }
.illh-archive__n { color: var(--illh-muted); font-size: .9rem; }
.illh-archive__rows { border-top: 1px solid var(--illh-line); }
.illh-archive__row { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 16px 22px; border-bottom: 1px solid var(--illh-line); }
.illh-archive__row:last-child { border-bottom: 0; }
.illh-archive__row:nth-child(even) { background: #fbfbfd; }
.illh-archive__date { color: var(--illh-muted); font-size: .9rem; line-height: 1.5; padding-top: 2px; }
.illh-archive__title, .illh-archive__title * { color: var(--illh-navy) !important; font-size: 1.05rem !important; font-weight: 400 !important; line-height: 1.4; }
.illh-archive__desc { margin-top: 6px; color: var(--illh-ink); font-size: .95rem; line-height: 1.6; }
.illh-archive__desc a, .illh-archive__title a { color: var(--illh-red) !important; }
@media (max-width: 640px) { .illh-archive__row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- 8. Research: timeline per year ---------- */
.illh-years { text-align: left; }
.illh-years__heading { text-align: left !important; font-size: 1.4rem !important; color: var(--illh-navy) !important; margin: 32px 0 8px !important; letter-spacing: .02em; }
.illh-years__heading * { font-size: inherit !important; }
.illh-year { display: grid; grid-template-columns: 110px 1fr; gap: 24px; position: relative; padding: 20px 0; }
.illh-year + .illh-year { border-top: 1px solid var(--illh-line); }
.illh-year__label {
  position: sticky; top: 90px; align-self: start; margin: 0 !important; text-align: center !important;
  font-size: 1.3rem !important; color: var(--illh-navy) !important; background: var(--illh-gold); border-radius: 999px; padding: 6px 0 !important;
}
.illh-year__list { display: grid; gap: 14px; }
.illh-project {
  margin: 0 !important; background: #fff; border: 1px solid var(--illh-line); border-radius: 12px;
  padding: 18px 22px !important; line-height: 1.65 !important; font-size: .97rem; text-align: left !important;
  transition: box-shadow .2s, border-color .2s;
}
.illh-project:hover { box-shadow: 0 10px 30px rgba(29,39,88,.08); border-color: transparent; }
.illh-project > a:first-child, .illh-project > strong:first-child, .illh-project > b:first-child {
  font-size: 1.08rem; color: var(--illh-navy) !important; text-decoration: none;
}
.illh-project > a:first-child:hover { color: var(--illh-red) !important; }
@media (max-width: 700px) {
  .illh-year { grid-template-columns: 1fr; gap: 12px; }
  .illh-year__label { position: static; width: 90px; }
}

/* ---------- 9. 1200px frame (set by illh-site.js → layout()) ---------- */
.illh-frame {
  box-sizing: border-box !important; width: 100% !important; max-width: min(var(--illh-page), calc(100vw - 32px)) !important;
  margin-left: auto !important; margin-right: auto !important; float: none !important; flex: none;
}
.illh-unbox { max-width: none !important; width: auto !important; float: none !important; }
.illh-hero.illh-frame { width: calc(100% - 32px) !important; }
/* Content box: one white card, 1200 wide, generous padding */
.illh-content-card {
  background: #fff !important; border-radius: 16px; padding: clamp(22px, 3vw, 44px) !important; margin-top: 28px !important; margin-bottom: 40px !important;
  box-shadow: 0 1px 2px rgba(29,39,88,.04), 0 8px 24px rgba(29,39,88,.06) !important;
}
.illh-plain { background: transparent !important; background-color: transparent !important; box-shadow: none !important; border-color: transparent !important; }
body { background: var(--illh-bg) !important; }
.illh-content-card :is(.region-content, main, .main-content, .container):not(.illh-content-card *  *) { width: 100% !important; max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; background: transparent !important; box-shadow: none !important; }
/* Bottom info cards: equal 3-up (2-up on inner pages) row */
.illh-info-row { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; padding: 8px 0 56px !important; }
.illh-info-row > * { width: auto !important; max-width: none !important; float: none !important; padding: 0 !important; margin: 0 !important; }
.illh-info-row > :not(:has([id^="block-illh-front-"])):not([id^="block-illh-front-"]) { display: none !important; }
@media (max-width: 640px) { .illh-frame { max-width: calc(100vw - 24px) !important; } }
@media (max-width: 640px) { .illh-hero { width: calc(100% - 24px) !important; } }
.illh-info-row::before, .illh-info-row::after, .illh-cards::before, .illh-cards::after { display: none !important; content: none !important; }
/* Nothing card-like inside the content card */
body .illh-content-card :is(.node, article) { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; border-radius: 0 !important; max-width: none !important; }
.illh-content-card > :last-child { margin-bottom: 0 !important; }

/* ---------- 10. Clean-ups ---------- */
.illh-noline { border-top-color: transparent !important; border-bottom-color: transparent !important; box-shadow: none !important; }
hr.illh-noline { display: none !important; }
.illh-hide { display: none !important; }
/* Footer: copyright text sits on the same footer navy (no darker strip) */
footer, #footer, .footer, [class*="copyright"] { background-color: #1d2758 !important; }
footer *:not(a), #footer *:not(a), .footer *:not(a), [class*="copyright"] *:not(a) { background-color: transparent !important; }
footer :is(.container, .row, .region, [class*="col-"]), [class*="copyright"] :is(.container, .row) { background: transparent !important; }

.illh-content-card .illh-plain, .illh-content-card > * { width: auto !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; float: none !important; }
.illh-content-card .row { margin-left: 0 !important; margin-right: 0 !important; }
.illh-content-card [class*="col-"] { padding-left: 0 !important; padding-right: 0 !important; width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; float: none !important; }
.illh-content-card, .illh-content-card * { box-sizing: border-box; }
.illh-content-card { overflow: hidden; }
