/* =====================================================================
   ILLH page layout – styles for theme-templates/page.html.twig
   Every section sits in the same 1200px frame (.illh-wrap).
   ===================================================================== */
.illh-page {
  --w: 1200px; --navy: #1d2758; --gold: #f6b11f; --red: #d9272d;
  --ink: #2b3245; --muted: #6b7286; --line: #e7e9f0; --bg: #f7f8fb;
  background: var(--bg); min-height: 100vh; display: flex; flex-direction: column;
}
body { background: var(--bg) !important; margin: 0; }
.illh-page .illh-wrap {
  box-sizing: border-box; width: calc(100% - 32px); max-width: var(--w); margin-left: auto; margin-right: auto;
}
.illh-page .illh-wrap * { box-sizing: border-box; }
/* Neutralise theme grid wrappers inside our frame */
.illh-page .illh-wrap :is(.container, .container-fluid) { width: 100% !important; max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; margin: 0 !important; }
.illh-page .illh-wrap .row { margin-left: 0 !important; margin-right: 0 !important; }
.illh-page .illh-wrap .region { margin: 0; padding: 0; background: none; }

/* ---------- Header ---------- */
.illh-page .illh-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.illh-page .illh-header__top { display: flex; align-items: center; gap: 28px; padding: 18px 0; }
.illh-page .illh-brand { flex: 0 0 auto; display: block; line-height: 0; }
.illh-page .illh-brand img { height: 64px; width: auto; display: block; }
.illh-page .illh-sitename { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.illh-page .illh-sitename a { font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.2; color: var(--navy) !important; text-decoration: none; }
.illh-page .illh-sitename span { color: var(--muted); font-size: .95rem; }
.illh-page .illh-search { margin-left: auto; }
.illh-page .illh-nav-toggle { display: none; }

/* Menu: full frame width, divider line above spans the whole frame */
.illh-page .illh-nav { border-top: 1px solid var(--line); background: none !important; }
.illh-page .illh-nav > ul, .illh-page .illh-nav > div > ul, .illh-page .illh-nav ul.menu:not(ul ul) {
  display: flex !important; flex-wrap: wrap; gap: 4px 28px; margin: 0 !important; padding: 0 !important; list-style: none !important;
  background: none !important; border: 0 !important; float: none !important; width: auto !important;
}
.illh-page .illh-nav li { list-style: none !important; position: relative; float: none !important; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; }
.illh-page .illh-nav li::marker { content: none; }
.illh-page .illh-nav ul.menu:not(ul ul) > li > a {
  display: block; position: relative; padding: 18px 0 !important; color: var(--navy) !important; font-size: .98rem !important;
  text-decoration: none !important; text-transform: none !important; background: none !important; border: 0 !important; box-shadow: none !important;
}
.illh-page .illh-nav ul.menu:not(ul ul) > li > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 2px; border-radius: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.illh-page .illh-nav ul.menu:not(ul ul) > li > a:hover::after,
.illh-page .illh-nav ul.menu:not(ul ul) > li > a.is-active::after,
.illh-page .illh-nav ul.menu:not(ul ul) > li.menu-item--active-trail > a::after { transform: scaleX(1); }
.illh-page .illh-nav ul.menu:not(ul ul) > li > a:hover { color: var(--red) !important; }
/* Dropdown */
.illh-page .illh-nav ul ul {
  display: none; position: absolute; top: 100%; left: -14px; min-width: 240px; z-index: 60; list-style: none; margin: 0; padding: 8px !important;
  background: #fff !important; border: 1px solid var(--line) !important; border-radius: 10px; box-shadow: 0 16px 40px rgba(29,39,88,.12);
}
.illh-page .illh-nav li:hover > ul, .illh-page .illh-nav li:focus-within > ul { display: block; }
.illh-page .illh-nav ul ul a { display: block; padding: 8px 12px !important; border-radius: 6px; color: var(--ink) !important; text-decoration: none !important; font-size: .93rem; }
.illh-page .illh-nav ul ul a:hover { background: #fff6e0; color: var(--navy) !important; }

/* ---------- Slider & news ---------- */
.illh-page .illh-slider { margin-top: 28px; }
.illh-page .illh-slider .illh-hero { width: 100% !important; max-width: none !important; margin: 0 !important; }
.illh-page .illh-welcome { margin-top: 48px; }
.illh-page .illh-welcome .illh-cards { max-width: none !important; }
.illh-page .illh-top { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

/* ---------- Content card ---------- */
.illh-page .illh-body { margin-top: 32px; margin-bottom: 48px; }
.illh-page .illh-body.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.illh-page .illh-body.has-sidebar:has(.illh-sidebar--first) { grid-template-columns: 300px minmax(0, 1fr); }
.illh-page .illh-maincard {
  background: #fff !important; border-radius: 16px; padding: clamp(22px, 3.4vw, 44px);
  box-shadow: 0 1px 2px rgba(29,39,88,.04), 0 8px 24px rgba(29,39,88,.06); min-width: 0; overflow-wrap: anywhere;
}
.illh-page .illh-maincard :is(.node, article, .region, .block, .content, [class*="col-"]) {
  background: none !important; box-shadow: none !important; border-radius: 0; max-width: none !important;
}
.illh-page .illh-maincard [class*="col-"] { padding-left: 0 !important; padding-right: 0 !important; float: none !important; width: 100% !important; }
.illh-page .illh-maincard > :first-child, .illh-page .illh-maincard .region > :first-child { margin-top: 0 !important; }
.illh-page .illh-maincard h1 { margin: 6px 0 18px !important; }
.illh-page .illh-maincard hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.illh-page .illh-maincard :is(nav.breadcrumb, .breadcrumb) { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; background: none !important; }
.illh-page .illh-maincard img { max-width: 100%; height: auto; }
/* Front page: no page title above the About text */
.illh-page--front .illh-maincard :is(h1.page-title, .block-page-title-block, [id*="page-title"], nav.breadcrumb, .breadcrumb) { display: none !important; }
.illh-page .illh-sidebar .block { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 20px; }

/* ---------- Bottom cards ---------- */
.illh-page .illh-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-bottom: 56px; }
.illh-page .illh-bottom__col > .region, .illh-page .illh-bottom__col { height: 100%; }
.illh-page .illh-bottom .block {
  height: 100%; margin: 0 !important; background: #fff !important; border: 1px solid var(--line) !important; border-radius: 14px; padding: 24px !important; box-shadow: none !important;
}
.illh-page .illh-bottom iframe { width: 100% !important; height: 220px; border: 0; border-radius: 10px; }
.illh-page .illh-bottom p img { width: 18px !important; vertical-align: -3px; margin-right: 8px; }

/* ---------- Footer ---------- */
.illh-page .illh-footer { margin-top: auto; background: var(--navy) !important; border-top: 3px solid var(--gold); color: rgba(255,255,255,.78); }
.illh-page .illh-footer * { background-color: transparent !important; }
.illh-page .illh-footer a { color: #fff; }
.illh-page .illh-footer a:hover { color: var(--gold); }
.illh-page .illh-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding: 36px 0 8px; }
.illh-page .illh-footer__cols .block-title, .illh-page .illh-footer__cols h2 { color: #fff !important; border-color: rgba(255,255,255,.15) !important; }
.illh-page .illh-footer__copy { padding: 20px 0; font-size: .88rem; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .illh-page .illh-header__top { gap: 16px; padding: 14px 0; }
  .illh-page .illh-brand img { height: 46px; }
  .illh-page .illh-sitename span { display: none; }
  .illh-page .illh-nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px; margin-left: auto; width: 44px; height: 44px; padding: 0 11px !important;
    background: #fff !important; border: 1px solid var(--line) !important; border-radius: 10px !important; cursor: pointer;
  }
  .illh-page .illh-nav-toggle span:not(.visually-hidden) { display: block; height: 2px; background: var(--navy); border-radius: 2px; }
  .illh-page .illh-nav { display: none; }
  .illh-page .illh-nav.is-open { display: block; }
  .illh-page .illh-nav ul.menu:not(ul ul) { flex-direction: column; gap: 0; }
  .illh-page .illh-nav ul.menu:not(ul ul) > li > a { padding: 12px 0 !important; border-bottom: 1px solid var(--line) !important; }
  .illh-page .illh-nav ul.menu:not(ul ul) > li > a::after { display: none; }
  .illh-page .illh-nav ul ul { position: static; display: block; border: 0 !important; box-shadow: none; padding: 0 0 0 14px !important; }
  .illh-page .illh-body.has-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .illh-page .illh-wrap { width: calc(100% - 24px); } }

/* Every wrapper between a frame and its content fills the frame (theme columns, regions, blocks) */
.illh-page :is(.illh-slider, .illh-welcome, .illh-bottom__col, .illh-maincard) :is(div, section, article, nav):has(.illh-cards, .illh-hero),
.illh-page .illh-welcome .illh-cards,
.illh-page .illh-welcome .illh-more {
  width: 100% !important; max-width: none !important; min-width: 0 !important; flex: 1 1 100% !important; float: none !important;
  margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important;
}
.illh-page .illh-welcome .illh-cards { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 32px !important; }
@media (max-width: 991px) { .illh-page .illh-welcome .illh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { .illh-page .illh-welcome .illh-cards { grid-template-columns: 1fr !important; } }
