/*
 * ULTRALUBRICO2D child template for Cassiopeia (Joomla 6). Recreates the original JA Morgan "style-3" look of
 * ultralubrico2d.chem.auth.gr without any third-party code (D-003). Values were measured on the old site's
 * local reference copy (D-002) and taken from its theme CSS (docs/migration/template-notes.md).
 * Mechanism class names "grafel-*" (menu hover intent, carousels, effects) come from the grafel project's user.js,
 * reused unchanged; do not rename them in CSS without changing user.js.
 * Loaded automatically by Cassiopeia as asset "template.user" (after template.css).
 */

/* ---------- 1. Design tokens and font ---------- */
@font-face { font-family: "PTRootUI"; src: url("../fonts/PT_Root_UI_Regular-webfont.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PTRootUI"; src: url("../fonts/PT_Root_UI_Medium-webfont.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "PTRootUI"; src: url("../fonts/PT_Root_UI_Bold-webfont.woff") format("woff"); font-weight: 600 700; font-style: normal; font-display: swap; }
:root {
  --ul-accent: #c5b48f;          /* style-3 primary (links, buttons, footer) */
  --ul-accent-dark: #a8956c;     /* hover (darker accent) */
  --ul-brown: #67615c;           /* style-3 secondary (category badge, contact form panel) */
  --ul-footer: #c5b490;          /* footer background (measured) */
  --ul-text: #777;               /* body text (measured) */
  --ul-text-strong: #333;        /* headings */
  --ul-text-muted: #999;
  --ul-line: #eaeaea;
  --ul-bg-light: #f2f3f7;
  --ul-font: "PTRootUI", Helvetica, Arial, sans-serif;
  --ul-header-h: 90px;

  --cassiopeia-color-primary: var(--ul-accent);
  --cassiopeia-color-link: var(--ul-accent);
  --cassiopeia-color-hover: var(--ul-accent-dark);
  --link-color: var(--ul-accent);
  --link-color-rgb: 197, 180, 143;
  --link-hover-color: var(--ul-accent-dark);
  --link-hover-color-rgb: 168, 149, 108;
  --cassiopeia-font-family-body: var(--ul-font);
  --cassiopeia-font-family-headings: var(--ul-font);
  --cassiopeia-font-weight-headings: 500;
  --body-color: var(--ul-text);
}
body.site { font-family: var(--ul-font); font-size: 16px; line-height: 25px; color: var(--ul-text); background: #fff; }
h1, h2, h3, h4, h5, h6 { font-family: var(--ul-font); font-weight: 500; line-height: 1.25; color: var(--ul-text-strong); letter-spacing: -0.6px; }
a, a:not([class]) { text-decoration: none; }
main a:not(.btn):is(:hover, :focus-visible) { text-decoration: underline; }
.btn-primary, .readmore .btn { --btn-bg: var(--ul-accent); --btn-border-color: var(--ul-accent); --btn-hover-bg: var(--ul-accent-dark);
  --btn-hover-border-color: var(--ul-accent-dark); --btn-color: #fff; --btn-hover-color: #fff; border-radius: 4px; font-weight: 600; }

/* ---------- 2. Header: full width, logo far left, menu right ----------
   Two looks, as on the old site:
   - pages WITH a banner (home hero, people/CV mastheads): header transparent OVER the banner, white menu;
   - pages WITHOUT a banner: white header with a light bottom line, grey menu. */
.container-header { position: relative; z-index: 1000; background: #fff; background-image: none; box-shadow: none;
  border-bottom: 1px solid var(--ul-line); display: flex; align-items: center; justify-content: space-between;
  min-height: var(--ul-header-h); padding: 0 15px; }
.container-header > .grid-child { max-width: none; width: auto; margin: 0; padding: 0; }
.container-header > .grid-child.container-nav { flex: 1 1 auto; justify-content: flex-end; padding: 0; }
.container-header .navbar-brand { padding: 0; margin: 0; }
.container-header .brand-logo img { display: block; height: 60px; width: auto; max-width: min(433px, 60vw); }
body:has(.container-banner) .container-header,
body.view-featured .container-header { position: absolute !important; /* beats Cassiopeia's "relative !important" below 992px */ top: 0; left: 0; right: 0; background: transparent; border-bottom: 0; }

.container-header .metismenu.mod-menu { margin: 0; }
.container-header .metismenu.mod-menu > li > a,
.container-header .metismenu.mod-menu > li > span,
.container-header .metismenu.mod-menu > li > button { font-size: 16px; font-weight: 700; line-height: 25px; padding: 10px 20px;
  color: var(--ul-text); transition: color 0.2s ease; text-decoration: none; }
.container-header .metismenu.mod-menu > li > a:hover, .container-header .metismenu.mod-menu > li.active > a,
.container-header .metismenu.mod-menu > li:hover > span, .container-header .metismenu.mod-menu > li:hover > button { color: var(--ul-accent); }
body:has(.container-banner) .container-header .metismenu.mod-menu > li > :is(a, span, button),
body.view-featured .container-header .metismenu.mod-menu > li > :is(a, span, button) { color: #fff; }
body:has(.container-banner) .container-header .metismenu.mod-menu > li:hover > :is(a, span, button),
body.view-featured .container-header .metismenu.mod-menu > li:hover > :is(a, span, button) { color: var(--ul-accent); }
/* active item: thin line under it (old site: white/accent underline on the current menu item) */
.container-header .metismenu.mod-menu > li.active { box-shadow: inset 0 -2px 0 currentColor; }
.container-header .metismenu.mod-menu > li.active { color: var(--ul-accent); }
body:has(.container-banner) .container-header .metismenu.mod-menu > li.active,
body.view-featured .container-header .metismenu.mod-menu > li.active { color: #fff; }
.container-header .metismenu.mod-menu > li > .mm-toggler { padding-left: 0; }
.container-header .metismenu.mod-menu > li > .mm-toggler::after { border-top-color: currentColor; }
.container-header .navbar-toggler { color: var(--ul-text); border-color: var(--ul-line); }
body:has(.container-banner) .container-header .navbar-toggler, body.view-featured .container-header .navbar-toggler { color: #fff; border-color: rgba(255,255,255,.4); }

/* dropdowns (old: white, 15px #333 items, 5px 20px, rounded bottom corners) */
.container-header .metismenu.mod-menu .mm-collapse { background: #fff; border-top: 0; border-radius: 0 0 4px 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12); min-width: 15rem; padding: 5px 0; }
.container-header .metismenu.mod-menu .mm-collapse > li { padding: 0; margin: 0; min-height: 0; }
.container-header .metismenu.mod-menu .mm-collapse > li > a,
.container-header .metismenu.mod-menu .mm-collapse > li > span { color: var(--ul-text-strong); font-size: 15px; font-weight: 400; line-height: 23.4px; padding: 5px 20px; }
/* R18: no underlines anywhere in the menu (specific enough to beat Cassiopeia's metismenu link rules) */
.container-header .metismenu.mod-menu li > a,
.container-header .metismenu.mod-menu li > a:hover,
.container-header .metismenu.mod-menu li > a:focus,
.container-header .metismenu.mod-menu .mm-collapse > li > a:hover,
.container-header .metismenu.mod-menu .mm-collapse > li > a:focus { text-decoration: none; }

/* R17: discreet carets - legacy Bootstrap caret is 4px (Cassiopeia draws 6px solid white) */
.container-header .metismenu.mod-menu .mm-toggler::after {
  border-top-width: 4px; border-left-width: 4px; border-right-width: 4px; opacity: 0.6; transition: opacity 0.2s ease;
}
.container-header .metismenu.mod-menu li:hover > .mm-toggler::after,
.container-header .metismenu.mod-menu li.grafel-hover-open > .mm-toggler::after,
.container-header .metismenu.mod-menu .mm-toggler:focus::after { opacity: 1; }
.container-header .mod-menu > li > button.mm-toggler { color: rgba(255, 255, 255, 0.8); }
/* header above the hero/banner so dropdowns are never painted underneath it (R1) */
.container-header { position: relative; z-index: 1000; }

/* dropdowns */
.container-header .metismenu.mod-menu .mm-collapse {
  background: #fff;
  border-top: 3px solid var(--ul-accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  min-width: 14rem;
}
/* legacy T3 dropdown items: 14px bold, 6px vertical padding, line-height 1.7143 (R9) */
.container-header .metismenu.mod-menu .mm-collapse { padding: 0.5rem 0; }
.container-header .metismenu.mod-menu .mm-collapse > li { padding: 0; margin: 0; min-height: 0; }
.container-header .metismenu.mod-menu .mm-collapse > li > a,
.container-header .metismenu.mod-menu .mm-collapse > li > span {
  color: #555;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7143;
  padding: 6px 20px;
}
.container-header .metismenu.mod-menu .mm-collapse > li > button { padding-top: 0; padding-bottom: 0; }

/* Submenu effects (R10/R21) - chosen in user.js CONFIG.menuEffect, which sets a class on <html>:
   grafel-menu-fade-roll (default: fade + roll down, legacy-like), -fade, -roll, -none. Duration: CONFIG.menuEffectMs.
   The roll's clip-path is only applied DURING the animation (fill-mode backwards), so it never clips the
   CV flyout afterwards. */
@keyframes grafel-fade-roll { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes grafel-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes grafel-roll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.grafel-menu-fade-roll .container-header .metismenu.mod-menu .mm-collapse.mm-show,
.grafel-menu-fade-roll .container-header .metismenu.mod-menu li.grafel-hover-open > .mm-collapse {
  animation: grafel-fade-roll var(--grafel-menu-effect-ms, 400ms) ease-out backwards; }
.grafel-menu-fade .container-header .metismenu.mod-menu .mm-collapse.mm-show,
.grafel-menu-fade .container-header .metismenu.mod-menu li.grafel-hover-open > .mm-collapse {
  animation: grafel-fade var(--grafel-menu-effect-ms, 400ms) ease-out backwards; }
.grafel-menu-roll .container-header .metismenu.mod-menu .mm-collapse.mm-show,
.grafel-menu-roll .container-header .metismenu.mod-menu li.grafel-hover-open > .mm-collapse {
  animation: grafel-roll var(--grafel-menu-effect-ms, 400ms) ease-out backwards; }
/* R16: legacy hover - light bar #f2f3f7 across the whole item width, green text, text slides 12px (350ms) */
/* R48: the hover highlight (background bar) appears at once; only the text colour and the right glide animate */
.container-header .metismenu.mod-menu .mm-collapse > li { transition: none; }
.container-header .metismenu.mod-menu .mm-collapse > li > a { display: block; transition: padding 0.35s ease, color 0.2s ease; }
.container-header .metismenu.mod-menu .mm-collapse > li:hover,
.container-header .metismenu.mod-menu .mm-collapse > li.grafel-hover-open { background-color: #f2f3f7; }
.container-header .metismenu.mod-menu .mm-collapse > li:hover > a,
.container-header .metismenu.mod-menu .mm-collapse > li.grafel-hover-open > a,
.container-header .metismenu.mod-menu .mm-collapse > li > a:focus { color: var(--ul-accent); padding-left: 32px; background: transparent; }
.container-header .metismenu.mod-menu .mm-collapse > li > .mm-toggler::after { border-top-color: #888; }
/* items with a flyout (e.g. a person -> CV) get a right-pointing caret, as on the legacy site (owner review R38) */
@media (min-width: 992px) {
  .container-header .metismenu.mod-menu .mm-collapse > li > .mm-toggler::after {
    border-style: solid; border-width: 4px 0 4px 4px; border-color: transparent transparent transparent #888; transform: none;
    transition: transform 350ms ease, border-color 0.2s ease, opacity 0.2s ease; }
  /* R43 (legacy: the link gained 12px right padding over 350 ms): while the flyout is open the caret slides 12px
     left and turns green; it slides back when the flyout closes */
  html:not(.grafel-js) .container-header .metismenu.mod-menu .mm-collapse > li.parent:hover > .mm-toggler::after,
  .container-header .metismenu.mod-menu .mm-collapse > li.parent.grafel-hover-open > .mm-toggler::after {
    transform: translateX(-12px); border-left-color: var(--ul-accent); opacity: 1; }
}
.container-header .metismenu.mod-menu .mm-collapse > li.divider:hover,
.container-header .metismenu.mod-menu .mm-collapse > li:has(> .nav-header):hover { background: none; }
.container-header .metismenu.mod-menu .mm-collapse .nav-header,
.container-header .metismenu.mod-menu .mm-collapse > li.divider > span {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ul-text-muted);
}

/* level-3 submenus (e.g. Staff > person > CV) open as a flyout to the right on desktop (R2) */
@media (min-width: 992px) {
  .container-header .metismenu.mod-menu .mm-collapse { z-index: 1001; }
  .container-header .metismenu.mod-menu .mm-collapse li { position: relative; }
  .container-header .metismenu.mod-menu .mm-collapse .mm-collapse { position: absolute; top: 0; left: 100%; margin-left: 0;
    background-color: #fff; min-width: 8rem; border-top: 3px solid var(--ul-accent); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); }
  .container-header .metismenu.mod-menu .mm-collapse > li.parent { display: flex; align-items: center; }
  .container-header .metismenu.mod-menu .mm-collapse > li.parent > a { flex: 1; }
  .container-header .metismenu.mod-menu .mm-collapse > li.parent > button { color: var(--ul-text-strong); }
  /* desktop: also open on hover, like the legacy T3 mega menu (click/keyboard still work). With JS, user.js adds
     .grafel-hover-open with a close delay ("hover intent", R19); without JS, plain :hover. */
  html:not(.grafel-js) .container-header .metismenu.mod-menu li.parent:hover > .mm-collapse,
  .container-header .metismenu.mod-menu li.parent.grafel-hover-open > .mm-collapse { display: block; }
  /* invisible bridge into the flyout so a slightly imprecise mouse path does not leave the item (R19) */
  .container-header .metismenu.mod-menu .mm-collapse .mm-collapse::before {
    content: ""; position: absolute; top: -8px; bottom: -8px; left: -14px; width: 14px; }
}
.container-header .metismenu.mod-menu .mm-collapse li.divider > span,
.container-header .metismenu.mod-menu .mm-collapse li:has(> .nav-header) > span { display: block; flex: 1 1 100%; width: 100%; padding: 8px 20px 2px; border-top: 1px solid #e3e6ea;
  font-size: 11px; font-weight: 600; line-height: 1.6; }

/* mobile: submenus open in place (accordion) instead of floating over the page */
@media (max-width: 991.98px) {
  .container-header .metismenu.mod-menu li.parent { display: flex; flex-wrap: wrap; align-items: center; }
  .container-header .metismenu.mod-menu li.parent > a,
  .container-header .metismenu.mod-menu li.parent > span { flex: 1 1 auto; }
  .container-header .metismenu.mod-menu .mm-collapse { position: static; min-width: 0; box-shadow: none; border-top: 0;
    background: rgba(255, 255, 255, 0.06); flex: 0 0 100%; width: 100%; }
  .container-header .metismenu.mod-menu .mm-collapse > li > a,
  .container-header .metismenu.mod-menu .mm-collapse > li > span { color: #fff; padding-left: 1.5rem; }
  .container-header .metismenu.mod-menu .mm-collapse .mm-collapse > li > a { padding-left: 2.5rem; }
  .container-header .metismenu.mod-menu .mm-collapse > li > button { color: #fff; }
  .container-header .metismenu.mod-menu .mm-collapse li.divider > span,
  .container-header .metismenu.mod-menu .mm-collapse li:has(> .nav-header) > span { color: rgba(255, 255, 255, 0.6); border-top-color: rgba(255, 255, 255, 0.15); }
}
/* mechanism block above copied from grafel (dropdown effects, hover intent, flyouts, mobile accordion).
   Overrides of its grafel-specific colours: top-level heading buttons (Research, Resources) take the menu colour,
   and Cassiopeia's own underline of the current item is replaced by ours (one line under the whole item). */
.container-header .metismenu.mod-menu > li > button.mm-toggler { color: inherit; }
.container-header .metismenu.mod-menu > li { color: var(--ul-text); }
body:has(.container-banner) .container-header .metismenu.mod-menu > li, body.view-featured .container-header .metismenu.mod-menu > li { color: #fff; }
.container-header .metismenu.mod-menu > li > :is(a, span, button) { color: inherit !important; }
.container-header .metismenu.mod-menu > li:hover, .container-header .metismenu.mod-menu > li.active { color: var(--ul-accent) !important; }
body:has(.container-banner) .container-header .metismenu.mod-menu > li.active, body.view-featured .container-header .metismenu.mod-menu > li.active { color: #fff !important; }
.container-header .metismenu > li > a::after, .container-header .metismenu > li > button::before { display: none !important; }
.container-header .mod-menu { flex: 0 1 auto; }
/* mobile colours: */
@media (max-width: 991.98px) {
  .container-header { flex-wrap: wrap; }
  .container-header .metismenu.mod-menu .mm-collapse { background: var(--ul-bg-light); }
  .container-header .metismenu.mod-menu .mm-collapse > li > a,
  .container-header .metismenu.mod-menu .mm-collapse > li > span,
  .container-header .metismenu.mod-menu .mm-collapse > li > button { color: var(--ul-text-strong); }
  body:has(.container-banner) .container-header .navbar-collapse.show,
  body.view-featured .container-header .navbar-collapse.show { background: rgba(0, 0, 0, 0.75); padding: 0.5rem; border-radius: 4px; }
}

/* ---------- 3. Banners (old JA Masthead: 308px, title 60px/600 white near the bottom, description 20px .75) ---------- */
.container-banner .banner-overlay { position: relative; min-height: 308px; height: auto; background-size: cover;
  background-position: center; background-attachment: scroll; display: flex; align-items: flex-end; }
.container-banner .banner-overlay .overlay { position: relative; inset: auto; background: linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.18));
  width: 100%; min-height: 308px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 120px max(15px, calc((100% - 1230px) / 2 + 215px)) 22px; color: #fff; text-align: left; }
.container-banner .banner-overlay :is(h1, h2, .ul2d-masthead-title, .grafel-masthead-title) { color: #fff; font-size: 60px; font-weight: 600;
  line-height: 75px; letter-spacing: -0.6px; margin: 0; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25); }
.container-banner .banner-overlay :is(p, .ul2d-masthead-subtitle, .grafel-masthead-subtitle) { color: #fff; opacity: 0.75; font-size: 20px; margin: 10px 0 0; }
@media (max-width: 767.98px) {
  .container-banner .banner-overlay .overlay { padding: 110px 15px 18px; }
  .container-banner .banner-overlay :is(h1, h2, .grafel-masthead-title) { font-size: 36px; line-height: 44px; }
  .container-banner .banner-overlay :is(p, .grafel-masthead-subtitle) { font-size: 16px; }
}

/* ---------- 4. Page body (old: container 1230px content, 75px top padding on pages without banner) ---------- */
@media (min-width: 992px) {
  .site-grid { column-gap: 0; grid-template-columns: [full-start] minmax(15px, 1fr) [main-start] repeat(4, minmax(0, 307.5px)) [main-end] minmax(15px, 1fr) [full-end]; }
}
.article-info .article-info-term { display: none; }
main { padding-top: 75px; padding-bottom: 60px; }
body:has(.container-banner) main { padding-top: 60px; }
main .page-header h1, main .page-header h2, main h1.page-title { font-size: 60px; line-height: 60px; font-weight: 500; color: var(--ul-text-strong);
  letter-spacing: -0.6px; margin: 0 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--ul-line); }
@media (max-width: 767.98px) { main .page-header h1, main .page-header h2, main h1.page-title { font-size: 38px; line-height: 44px; } }
main p { margin: 0 0 25px; }
/* category shown as the old badge (11px bold uppercase, white on #67615c, rounded); "Category:" label hidden */
.article-info .category-name { font-size: 0; }
.article-info .category-name a, .article-info .category-name span:not([class*="icon"]) { display: inline-block; font-size: 11px; font-weight: 700;
  line-height: 17px; letter-spacing: 0; text-transform: uppercase; color: #fff; background: var(--ul-brown); border-radius: 4px; padding: 6.5px 15px; text-decoration: none; }
.article-info .category-name [class*="icon-"] { display: none; }
.article-info { margin: 0 0 25px; font-size: 12px; color: var(--ul-text-muted); }
.article-info .published, .article-info .create { font-size: 12px; }

/* ---------- 5. People page /staff (pageclass ul2d-people): card grid like the old news cards ---------- */
.ul2d-people .blog-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; column-count: initial; }
.ul2d-people .blog-items > .blog-item { margin: 0; break-inside: auto; }
@media (max-width: 991.98px) { .ul2d-people .blog-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .ul2d-people .blog-items { grid-template-columns: 1fr; } }
.ul2d-people .blog-item { position: relative; background: #fff; border: 1px solid var(--ul-line); border-radius: 4px; padding: 0 0 20px;
  text-align: center; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.ul2d-people .blog-item:hover, .ul2d-people .blog-item:focus-within { box-shadow: 0 0 18px rgba(0, 0, 0, 0.1); transform: translateY(-3px); }
.ul2d-people .blog-item .item-image { margin: 0 0 16px; float: none; }
.ul2d-people .blog-item .item-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; border-radius: 4px 4px 0 0; }
.ul2d-people .blog-item .page-header h2 { font-size: 20px; margin: 0 0 6px; padding: 0 15px; border: 0; }
.ul2d-people .blog-item .page-header h2 a { color: var(--ul-text-strong); }
.ul2d-people .blog-item .page-header h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole card = link */
.ul2d-people .blog-item .item-content > :not(.page-header):not(.fields-container) { display: none; }
.ul2d-people .blog-item .fields-container { font-size: 14px; padding: 0 15px; }
.ul2d-people .blog-item .fields-container a { position: relative; z-index: 2; }
.ul2d-people .blog-item .fields-container .field-entry:not(.role) { display: none; }
.ul2d-people .blog-item .field-label { display: none; }

/* ---------- 6. Person page (pageclass ul2d-profile): photo floated left as on the old site (400px), fields above ---------- */
.ul2d-profile .item-page > .item-image, .ul2d-profile .com-content-article > .item-image { float: left; margin: 5px 25px 15px 0; max-width: 400px; }
.ul2d-profile .item-image img { width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 575.98px) { .ul2d-profile .item-image { float: none; margin: 0 0 20px; max-width: 100%; } }
.fields-container { list-style: none; padding: 0; margin: 0 0 25px; font-size: 15px; }
.fields-container .field-entry { margin: 0 0 4px; }
.fields-container .field-label { font-weight: 700; color: var(--ul-text-strong); }
/* person page: Position is in the banner and the old text already ends with the "Full CV" link */
.ul2d-profile .fields-container .field-entry:is(.role, .cv) { display: none; }  /* role is in the banner */

/* ---------- 7. News listing: two columns of bordered cards with the category badge (old site) ---------- */
.blog-items:not(.ul2d-people *) { gap: 30px; }
body:not(.ul2d-people) .com-content-category-blog .blog-item { border: 1px solid var(--ul-line); border-radius: 4px; padding: 20px 15px; }
body:not(.ul2d-people) .com-content-category-blog .blog-item .page-header h2 { font-size: 16px; font-weight: 500; line-height: 25px; border: 0; padding: 0; margin: 10px 0; }
body:not(.ul2d-people) .com-content-category-blog .blog-item .page-header h2 a { color: var(--ul-text-strong); }
body:not(.ul2d-people) .com-content-category-blog .blog-item .page-header h2 a:hover { color: var(--ul-accent); text-decoration: none; }
.com-content-category-blog > h1, .com-content-category-blog .page-header h1 { font-size: 60px; line-height: 60px; }

/* ---------- 8. Contact (owner review 1, UL3: the old page's look, measured on the reference copy) ----------
   Grey section: small "Contact." label, the name as heading, the position, 4 white cards (Address, Email, Phone,
   Website; override html/com_contact/contact/default_address.php groups them); then full width: the contact photo
   (left half) beside a brown panel (right half) with the e-mail invitation (the old contact form is not kept). */
body.ul2d-contact .site-grid > .container-component { grid-column: full-start / full-end; }  /* beats Cassiopeia body:not(.has-sidebar-*) */
.ul2d-contact main { padding: 0; margin-top: 0; }  /* grey section starts right under the header */
.ul2d-contact .com-contact { display: grid; grid-template-columns: 1fr 1fr; text-align: left; }
.ul2d-contact .com-contact__container { display: contents; }
.ul2d-contact .com-contact > h2, .ul2d-contact .com-contact__container > h2 { display: none; }
.ul2d-contact .com-contact > .page-header, .ul2d-contact .com-contact__position, .ul2d-contact .com-contact__info {
  grid-column: 1 / -1; background: var(--ul-bg-light); margin: 0;
  padding-left: max(15px, calc((100% - 1230px) / 2)); padding-right: max(15px, calc((100% - 1230px) / 2)); }
.ul2d-contact .com-contact > .page-header { grid-row: 1; padding-top: 150px; padding-bottom: 50px; text-align: center; border: 0; }
.ul2d-contact .com-contact > .page-header::before { content: "Contact."; display: block; color: var(--ul-accent); font-size: 14px;
  font-weight: 500; margin-bottom: 10px; }
.ul2d-contact .com-contact > .page-header :is(h1, h2) { font-size: 36px; line-height: 45px; font-weight: 500; letter-spacing: -0.6px;
  color: var(--ul-text-strong); margin: 0; padding: 0; border: 0; }
.ul2d-contact .com-contact__position { grid-row: 2; display: block; padding-bottom: 10px; }
.ul2d-contact .com-contact__position dt { display: none; }
.ul2d-contact .com-contact__position dd { margin: 0; }
.ul2d-contact .com-contact__info { grid-row: 3; padding-bottom: 150px; }
.ul2d-contact .ul2d-contact-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; padding: 0 15px; }
.ul2d-contact .ul2d-contact-card { background: #fff; border-radius: 4px; padding: 50px 30px; margin: 0; text-align: center; min-height: 354px; }
.ul2d-contact .ul2d-contact-card dt { margin: 0 0 20px; color: var(--ul-text-strong); font-weight: 500; font-size: 20px; }
.ul2d-contact .ul2d-contact-card dt [class^="icon-"] { display: block; font-size: 30px; color: #555; margin: 0 auto 25px; }
.ul2d-contact .ul2d-contact-card dt .visually-hidden { position: static !important; width: auto !important; height: auto !important;
  clip: auto !important; margin: 0 !important; overflow: visible !important; white-space: normal !important; }
.ul2d-contact .ul2d-contact-card dd { margin: 0; font-size: 14px; line-height: 25px; color: var(--ul-text); }
.ul2d-contact .ul2d-contact-card a { overflow-wrap: anywhere; }
.ul2d-contact .com-contact__thumbnail { grid-row: 4; grid-column: 1; margin: 0; }
.ul2d-contact .com-contact__thumbnail img { display: block; width: 100%; height: 100%; min-height: 960px; object-fit: cover; }  /* old: 960px row */
.ul2d-contact .com-contact__miscinfo { grid-row: 4; grid-column: 2; background: var(--ul-brown); color: #fff; padding: 90px;
  display: flex; align-items: center; }
.ul2d-contact .com-contact__miscinfo dl, .ul2d-contact .com-contact__miscinfo dd { margin: 0; }
.ul2d-contact .com-contact__miscinfo dt { display: none; }
.ul2d-contact .com-contact__miscinfo h3 { color: #fff; font-size: 36px; font-weight: 500; letter-spacing: -0.6px; margin: 0 0 15px; }
.ul2d-contact .com-contact__miscinfo p { color: rgba(255, 255, 255, 0.85); margin: 0 0 30px; max-width: 507px; }
.ul2d-contact .com-contact__miscinfo .btn { padding: 20px 30px; font-weight: 600; }
.ul2d-contact .com-contact__miscinfo .btn::after { content: " \2192"; }
.ul2d-contact .container-component + * , .ul2d-contact .footer { margin-top: 0; }
@media (max-width: 991.98px) {
  .ul2d-contact .ul2d-contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ul2d-contact .com-contact { grid-template-columns: 1fr; }
  .ul2d-contact .com-contact__thumbnail, .ul2d-contact .com-contact__miscinfo { grid-column: 1; grid-row: auto; }
  .ul2d-contact .com-contact__thumbnail img { min-height: 0; aspect-ratio: 1; }
  .ul2d-contact .com-contact__miscinfo { padding: 50px 20px; }
  .ul2d-contact .com-contact > .page-header { padding-top: 80px; }
  .ul2d-contact .com-contact__info { padding-bottom: 80px; }
}
@media (max-width: 575.98px) { .ul2d-contact .ul2d-contact-cards { grid-template-columns: 1fr; } .ul2d-contact .ul2d-contact-card { min-height: 0; } }

/* ---------- 9. Footer (old: #c5b490 background; funding statement 22px #333 centred; logos on a white strip) ---------- */
.container-footer { background: var(--ul-footer); background-image: none; color: var(--ul-text-strong); }
.container-footer .grid-child { padding-top: 60px; padding-bottom: 60px; display: block; }
.container-footer a { color: var(--ul-text-strong); }
.ul2d-funding { text-align: center; }
.ul2d-funding p { font-size: 22px; line-height: 32px; color: var(--ul-text-strong); margin: 0 auto 10px; max-width: 1230px; }
.ul2d-funding-strip { position: relative; max-width: 1230px; margin: 0 auto; }
.ul2d-funding-strip img { display: block; width: 100%; height: auto; background: #fff; }
/* the old image map used fixed pixel coordinates on a scaled image (misaligned); percentage links instead:
   HFRI = 0-17.7 % of the strip (400 of 2260 px), Greece 2.0 = the rest (as the old map) */
.ul2d-funding-strip a { position: absolute; top: 0; bottom: 0; }
.ul2d-funding-hfri { left: 0; width: 17.7%; }
.ul2d-funding-greece { left: 17.7%; right: 0; }
.ul2d-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px;
  padding-top: 15px; border-top: 1px solid rgba(0, 0, 0, 0.12); font-size: 14px; }
.ul2d-footer-bottom a:hover span { text-decoration: underline; }
.ul2d-credit a { display: inline-flex; align-items: center; gap: 10px; }
.ul2d-credit img { width: 36px; height: 36px; }

/* ---------- 10. Home page (old JA ACM blocks rebuilt as core modules, tools/newsite/home_modules.py) ---------- */
.view-featured main { padding: 0; }
.view-featured .container-component { display: none; }
.view-featured :is(.container-top-a, .container-top-b, .container-bottom-a, .container-bottom-b) { grid-column: full-start / full-end; display: block; }
.view-featured :is(.container-top-a, .container-top-b, .container-bottom-a, .container-bottom-b) > * { margin: 0; }
.view-featured .site-grid .card { border: 0; background: transparent; box-shadow: none; border-radius: 0; }
.view-featured .site-grid .card-body { padding: 0; }
.ul2d-wrap { max-width: 1230px; margin: 0 auto; padding: 0 15px; }

/* hero (old: 785px, title 60/700 white 700px wide at the content edge, description 18/30, primary button) */
.ul2d-hero { min-height: 785px; display: flex; align-items: center; background: var(--hero-bg) center / cover no-repeat; }
.ul2d-hero-inner { width: 100%; max-width: 1230px; margin: 0 auto; padding: 120px 15px 80px; }
.ul2d-hero h1 { max-width: 700px; color: #fff; font-size: 60px; font-weight: 700; line-height: 75px; margin: 0 0 30px; }
.ul2d-hero p { max-width: 700px; color: #fff; font-size: 18px; line-height: 30px; margin: 0 0 40px; }
.ul2d-hero .btn { padding: 12px 22px; font-size: 16px; }
@media (max-width: 767.98px) {
  .ul2d-hero { min-height: 560px; background-image: var(--hero-bg-xs); }
  .ul2d-hero h1 { font-size: 36px; line-height: 44px; }
}

/* section label (small accent text above a heading, old JA style) */
.ul2d-label { color: var(--ul-accent); font-size: 14px; font-weight: 500; margin: 0 0 10px; text-align: center; }

/* mission statement (old: 150px top padding, italic 30px statement, decorative image) */
.view-featured .container-top-a { background: url("../images/mask-map.png") 50% 0 no-repeat; }
.ul2d-mission { max-width: 810px; margin: 0 auto; padding: 150px 15px 100px; text-align: center; }
.ul2d-mission-text { font-size: 30px; font-style: italic; font-weight: 700; line-height: 1.45; color: var(--ul-text-strong); margin: 0 0 40px; }
.ul2d-mission-deco { display: inline-block; max-width: 90px; height: auto; }
@media (max-width: 767.98px) { .ul2d-mission { padding: 80px 15px 60px; } .ul2d-mission-text { font-size: 22px; } }

/* resource tiles (old style-4: 2 per row, each = coloured text half + photo half; lv-1..4 colours) */
.ul2d-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ul2d-tile { display: flex; min-height: 617px; }
.ul2d-tile.content-left { flex-direction: row-reverse; }
.ul2d-tile > div { width: 50%; }
/* owner review 1 (UL5): text contained as the old one - 60px padding, 60px icon, white 16/25 text (measured) */
.ul2d-tile-text { padding: 60px; color: #fff; font-size: 16px; line-height: 25px; }
.ul2d-tile-text h3 { color: #fff; font-size: 20px; line-height: 30px; font-weight: 500; margin: 30px 0 25px; }
.ul2d-tile-text p { margin: 0 0 25px; }
.ul2d-tile-icon { width: 60px; height: auto; }
.ul2d-tile-more { color: #fff; font-weight: 700; }
.ul2d-tile-more:hover { color: #fff; text-decoration: underline; }
.ul2d-tile-photo { background: var(--tile-bg) center / cover no-repeat; min-height: 300px; }
.ul2d-tile.bg-lv-1 .ul2d-tile-text { background: #c5b48f; }
.ul2d-tile.bg-lv-2 .ul2d-tile-text { background: #336666; }
.ul2d-tile.bg-lv-3 .ul2d-tile-text { background: #67615c; }
.ul2d-tile.bg-lv-4 .ul2d-tile-text { background: #979eb1; }
@media (max-width: 1199.98px) { .ul2d-tiles { grid-template-columns: 1fr; } }
@media (max-width: 767.98px) { .ul2d-tile, .ul2d-tile.content-left { flex-direction: column; } .ul2d-tile > div { width: 100%; } .ul2d-tile-photo { min-height: 260px; } }

/* institutions (old style-42: photo half + beige text half) */
.ul2d-split { display: flex; min-height: 727px; }
.ul2d-split.content-right { flex-direction: row-reverse; }
.ul2d-split > div { width: 50%; }
.ul2d-split-photo { background: var(--split-bg) center / cover no-repeat; min-height: 360px; }
.ul2d-split-text { background: var(--ul-accent); color: rgba(255, 255, 255, 0.85); padding: 60px max(30px, calc((100vw - 1230px) / 2 * 0.5 + 30px)) 60px 60px; font-size: 15px; line-height: 25px; }
.ul2d-split.content-right .ul2d-split-text { padding: 60px 60px 60px max(30px, calc((100vw - 1230px) / 2 + 15px)); }
.ul2d-split-text h3 { color: #fff; font-size: 20px; font-weight: 600; margin: 0 0 25px; }
.ul2d-split-text p { margin: 0 0 25px; }
@media (max-width: 767.98px) { .ul2d-split, .ul2d-split.content-right { flex-direction: column; } .ul2d-split > div { width: 100%; }
  .ul2d-split-text, .ul2d-split.content-right .ul2d-split-text { padding: 40px 20px; } }

/* "Meet our team" (old testimonials style-1: label + big heading; white cards: photo, dark name tag over the photo,
   role, short text, small square arrow button; dots below) - carousel engine from grafel user.js */
.ul2d-team { padding: 150px 0; border-top: 1px solid var(--ul-line); max-width: 1260px; margin: 0 auto !important; }
.ul2d-team > .card-header, .ul2d-team > h2 { text-align: center; font-size: 46px; font-weight: 600; color: var(--ul-text-strong);
  background: none; border: 0; padding: 0 15px 50px; }
.ul2d-team > .card-header::before, .ul2d-team > h2::before { content: "Research Team"; display: block; color: var(--ul-accent);
  font-size: 14px; font-weight: 500; letter-spacing: 0; margin-bottom: 15px; }
.ul2d-team .mod-articles-items.mod-articles-grid { display: grid; grid-template-columns: none; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 60px) / 3); gap: 30px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 15px 20px;
  list-style: none; margin: 0; }
@media (max-width: 991.98px) { .ul2d-team .mod-articles-items.mod-articles-grid { grid-auto-columns: calc((100% - 30px) / 2); } }
@media (max-width: 575.98px) { .ul2d-team .mod-articles-items.mod-articles-grid { grid-auto-columns: 85%; } }
.ul2d-team .mod-articles-items > li { scroll-snap-align: start; position: relative; background: #fff; border: 1px solid var(--ul-line);
  border-radius: 4px; text-align: center; transition: box-shadow 400ms; }
.ul2d-team .mod-articles-items > li:hover { box-shadow: 0 0 18px rgba(0, 0, 0, 0.1); }
.ul2d-team .mod-articles-item-content { display: flex; flex-direction: column; height: 100%; padding: 0 0 30px; }
.ul2d-team .mod-articles-image { order: -2; float: none; margin: 0; width: 100%; }
.ul2d-team .mod-articles-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; border-radius: 4px 4px 0 0; }
.ul2d-team h3 { order: -1; align-self: center; margin: -15px 0 25px; } /* not positioned: the link's ::after must cover the whole card (li) */
.ul2d-team h3 a { display: inline-block; background: var(--ul-brown); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px;
  text-transform: uppercase; letter-spacing: 0; padding: 6.5px 15px; border-radius: 4px; }
.ul2d-team h3 a::after { content: ""; position: absolute; inset: 0; }
.ul2d-team .mod-articles-item { height: 100%; }
.ul2d-team .fields-container { order: 0; margin: 0 15px 15px; }
.ul2d-team .fields-container .field-entry:not(.role) { display: none; }
.ul2d-team .fields-container .field-label { display: none; }
.ul2d-team .fields-container .field-value { color: var(--ul-text-strong); font-size: 20px; font-weight: 500; }
.ul2d-team .mod-articles-item-content > p:not(.readmore) { order: 1; color: var(--ul-text); font-size: 14px; line-height: 25px; margin: 0 25px 25px; }
.ul2d-team .mod-articles-item-content > p:not(.readmore) b, .ul2d-team .mod-articles-item-content > p:not(.readmore) strong { font-weight: inherit; }
.ul2d-team .readmore { order: 2; margin-top: auto; position: relative; z-index: 2; }
.ul2d-team .readmore .btn { width: 22px; height: 22px; padding: 0; font-size: 0; border-radius: 3px; position: relative; }
.ul2d-team .readmore .btn::after { content: "\2192"; font-size: 13px; line-height: 22px; color: #fff; }
.ul2d-team .readmore .btn [class*="icon"] { display: none; }

/* carousel controls (from grafel; dots only, as the old team carousel) */
.is-enhanced > .grafel-track, .grafel-carousel-list.is-enhanced ul { scrollbar-width: none; cursor: grab; }
.is-enhanced > .grafel-track::-webkit-scrollbar, .grafel-carousel-list.is-enhanced ul::-webkit-scrollbar { display: none; }
.is-dragging { scroll-snap-type: none !important; scroll-behavior: auto !important; cursor: grabbing !important; user-select: none; }
.grafel-glide, .is-gliding { scroll-snap-type: none !important; scroll-behavior: auto !important; }
.grafel-carousel-nav { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 30px; }
.grafel-carousel-nav[hidden] { display: none; }
.grafel-dots { display: inline-flex; gap: 8px; }
.grafel-carousel-nav .grafel-prev, .grafel-carousel-nav .grafel-next { display: none; }
.grafel-carousel-nav .grafel-dot { width: 8px; height: 8px; border-radius: 50%; padding: 0; border: 0; background: #d6d6d6; cursor: pointer; }
.grafel-carousel-nav .grafel-dot[aria-current="true"] { background: transparent; box-shadow: inset 0 0 0 2px var(--ul-text-strong); }

/* Pylons (old style-2 boxes: 3 columns of white cards on beige, icon, title, short text) */
.view-featured .container-bottom-b { background: var(--ul-footer); }
.view-featured .container-bottom-b > .card { max-width: 1260px; margin: 0 auto !important; padding: 100px 0 60px; }
.view-featured .container-bottom-b .card-header { text-align: center; font-size: 46px; font-weight: 600; color: var(--ul-text-strong); background: none;
  border: 0; padding: 0 15px 40px; }
.ul2d-pylons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; padding: 0 15px; }
/* owner review 1 (UL8): the old sizes (measured): 380px tall cards, padding 60/30/30, 128px icons, 20/30 titles,
   16/25 #888 text */
.ul2d-pylon { background: #fff; border-radius: 4px; padding: 60px 30px 30px; text-align: center; min-height: 380px; }
.ul2d-pylon img { display: block; width: 128px; height: 128px; margin: 0 auto 25px; }
.ul2d-pylon h3 { font-size: 20px; line-height: 30px; font-weight: 500; color: var(--ul-text-strong); margin: 0 0 30px; letter-spacing: 0; }
.ul2d-pylon p { font-size: 16px; line-height: 25px; color: #888; margin: 0 0 25px; }
@media (max-width: 991.98px) { .ul2d-pylons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .ul2d-pylons { grid-template-columns: 1fr; } }
.view-featured .container-footer .grid-child { border-top: 1px solid rgba(0, 0, 0, 0.08); }
.view-featured .footer { margin-top: 0; }

/* ---------- 11. Pasted content safety (CVs pasted from Word: tables, long URLs and e-mail addresses) ----------
   The old site overflowed sideways on 3 CV pages (e.g. 1581px wide on desktop). The &nbsp;-joined sentences are
   fixed in the data (migrate.py tidy_pasted); long links/addresses may break anywhere (lowers the tables'
   min-content width so they fit the column); plain text keeps normal word wrapping. */
main .com-content-article__body, main .item-content { overflow-wrap: break-word; }
main .com-content-article__body :is(a, strong, b) { overflow-wrap: anywhere; }
main .com-content-article__body table { max-width: 100%; }
main .com-content-article__body img { max-width: 100%; height: auto; }

/* ---------- 12. Desktop menu position (owner review 1): as the old site, the menu is centred in the space between
   the logo and the old 90px off-canvas button area at the right edge, and items are only text + 20px each side
   (Cassiopeia's extra .5em 1em item padding removed; a submenu caret sits tight to its label). ---------- */
@media (min-width: 992px) {
  .container-header > .grid-child.container-nav { justify-content: center; padding-right: 55px; }
  /* current item: a 1px line at the very bottom of the 90px header (old site), instead of under the text */
  .container-header .metismenu.mod-menu > li.active { box-shadow: none; }
  .container-header .metismenu.mod-menu > li:not(.active):hover::after { background: none; }  /* no Cassiopeia hover line */
  .container-header .metismenu.mod-menu > li.active::after { content: ""; position: absolute; left: 0; right: 0; margin: 0;
    bottom: -19.5px; height: 1px; opacity: 1; transition: none; background: currentColor; }  /* item box ends at y 71.5 */
  .container-header .metismenu.mod-menu > li.metismenu-item { padding: 0; }
  /* link + separate caret button (Staff): no gap between them */
  .container-header .metismenu.mod-menu > li.parent > a { padding-right: 0; }
  .container-header .metismenu.mod-menu > li.parent > button.mm-toggler-link { padding: 10px 20px 10px 0; }
  /* heading button with its own label (Research, Resources): normal 20px each side */
  .container-header .metismenu.mod-menu > li.parent > button.mm-toggler-nolink { padding: 10px 20px; }
  .container-header .metismenu.mod-menu > li > .mm-toggler::after { margin-inline-start: 3px; }
}

/* ---------- 13. Menu hover (owner review 1, UL2) ----------
   Over a photo (home hero, banners) the old menu does not change colour on hover: the text stays white and the
   1px line appears under the item (as for the current item). The beige hover text was hard to read on the photo.
   On the white header the hover stays beige, as the old site. */
body:has(.container-banner) .container-header .metismenu.mod-menu > li:hover,
body.view-featured .container-header .metismenu.mod-menu > li:hover { color: #fff !important; }
@media (min-width: 992px) {
  body:has(.container-banner) .container-header .metismenu.mod-menu > li:hover::after,
  body.view-featured .container-header .metismenu.mod-menu > li:hover::after { content: ""; position: absolute; left: 0; right: 0;
    margin: 0; bottom: -19.5px; height: 1px; opacity: 1; transition: none; background: currentColor; }
}

/* ---------- 14. Posters (Publications, D-005): as grafel - the poster at up to 1024px, linked to the full size ---------- */
.ul2d-poster { margin: 25px 0 0; }
.ul2d-poster img { display: block; width: min(100%, 1024px); height: auto; margin: 0 auto; border: 1px solid var(--ul-line); }
