/* =====================================================================
   ΓΝΖ theme — main stylesheet
   Mobile-first. WCAG 2.1 AA: contrast ratios noted next to the tokens,
   44px touch targets, visible focus, reduced motion, 200% zoom / reflow.
   Dark mode: follows the system; the toggle stores an explicit choice
   as <html data-theme="dark|light">.
   ===================================================================== */

/* ---------- Tokens: light ---------- */
:root {
  --blue:        #1a5fa8;  /* 6.3:1 on #fff */
  --blue-strong: #134a85;  /* 8.9:1 on #fff */
  --blue-soft:   #e8f0fb;
  --teal:        #0b7a7a;
  --text:        #1e2330;  /* 15.6:1 on #fff */
  --muted:       #52606f;  /* 6.4:1 on #fff, 6.0:1 on --bg */
  --border:      #d5dde8;
  --border-strong:#8796a8; /* 3.2:1 non-text contrast for inputs */
  --bg:          #f4f7fb;
  --surface:     #ffffff;
  --surface-2:   #eef3f9;
  --on-accent:   #ffffff;
  --focus:       #1a5fa8;
  --focus-halo:  #ffffff;
  --ok-bg:       #e3f4ea; --ok-fg: #0d5c32;      /* 7.0:1 */
  --closed-bg:   #edf0f4; --closed-fg: #4a5563; /* 6.6:1 */
  --pin-bg:      #fff1dc; --pin-fg: #7a3d00;     /* 7.3:1 */
  --warn-bg:     #fff4e0; --warn-fg: #6b3600; --warn-line: #e08a00;
  --danger:      #b42318;  /* 6.4:1 with white */
  --hero-a:      #134a85;
  --hero-b:      #1a5fa8;
  --hero-c:      #0b7a7a;
  --topbar-bg:   #0f3d6e;
  --footer-bg:   #0e1b2e;
  --footer-fg:   #c8d6e8;  /* 10.9:1 on footer */
  --footer-muted:#9db2c9;  /* 7.4:1 on footer */
  --shadow-sm:   0 1px 2px rgba(15, 35, 70, .06), 0 1px 3px rgba(15, 35, 70, .08);
  --shadow:      0 4px 16px rgba(15, 35, 70, .08);
  --shadow-lg:   0 12px 32px rgba(15, 35, 70, .16);
  --radius:      12px;
  --radius-sm:   8px;
  --gutter:      16px;
  --max:         1240px;
  --font:        system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* ---------- Tokens: dark ---------- */
:root[data-theme="dark"] {
  --blue:        #7cb4ff;  /* 7.6:1 on --surface */
  --blue-strong: #a9cdff;
  --blue-soft:   #1b2a48;
  --teal:        #4fd1c5;
  --text:        #e6ecf5;  /* 13.4:1 on --surface */
  --muted:       #b3c2d6;  /* 8.5:1 */
  --border:      #2c3b57;
  --border-strong:#6b7f9e;
  --bg:          #0d1424;
  --surface:     #162036;
  --surface-2:   #1c2843;
  --on-accent:   #0b1220;  /* dark text on light-blue buttons: 8.5:1 */
  --focus:       #ffd166;
  --focus-halo:  #0d1424;
  --ok-bg:       #12372a; --ok-fg: #8ee4b4;
  --closed-bg:   #242f45; --closed-fg: #c3cfde;
  --pin-bg:      #3a2604; --pin-fg: #ffd89a;
  --warn-bg:     #2f2105; --warn-fg: #ffd89a; --warn-line: #e0a100;
  --danger:      #a3261b;
  --hero-a:      #0f2547;
  --hero-b:      #12325c;
  --hero-c:      #0c3d44;
  --topbar-bg:   #0a1222;
  --footer-bg:   #0a1120;
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
  --shadow:      0 4px 16px rgba(0, 0, 0, .35);
  --shadow-lg:   0 12px 32px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #7cb4ff; --blue-strong: #a9cdff; --blue-soft: #1b2a48; --teal: #4fd1c5;
    --text: #e6ecf5; --muted: #b3c2d6; --border: #2c3b57; --border-strong: #6b7f9e;
    --bg: #0d1424; --surface: #162036; --surface-2: #1c2843; --on-accent: #0b1220;
    --focus: #ffd166; --focus-halo: #0d1424;
    --ok-bg: #12372a; --ok-fg: #8ee4b4; --closed-bg: #242f45; --closed-fg: #c3cfde;
    --pin-bg: #3a2604; --pin-fg: #ffd89a;
    --warn-bg: #2f2105; --warn-fg: #ffd89a; --warn-line: #e0a100; --danger: #a3261b;
    --hero-a: #0f2547; --hero-b: #12325c; --hero-c: #0c3d44;
    --topbar-bg: #0a1222; --footer-bg: #0a1120;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 4px 16px rgba(0,0,0,.35); --shadow-lg: 0 12px 32px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;      /* 17px: readable on phones */
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
abbr[title] { text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 24px; } }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; vertical-align: -.25em; }

/* ---------- Focus (WCAG 2.4.7 / 2.4.11) ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus-halo);
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }
#main:focus { outline: none; }
.top-bar :focus-visible, .hero :focus-visible, .page-hero :focus-visible, .site-footer :focus-visible, .alert-bar--danger :focus-visible {
  outline-color: #ffd166; box-shadow: 0 0 0 5px #0b1220;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10000;
  background: var(--blue); color: var(--on-accent); font-weight: 700;
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- Alert bar ---------- */
.alert-bar { font-size: .95rem; }
.alert-inner { display: flex; gap: .6rem; align-items: flex-start; padding-top: .7rem; padding-bottom: .7rem; }
.alert-inner p { margin: 0; }
.alert-inner .icon { margin-top: .15em; }
.alert-bar--info    { background: var(--blue-soft); color: var(--text); border-bottom: 3px solid var(--blue); }
.alert-bar--warning { background: var(--warn-bg); color: var(--warn-fg); border-bottom: 3px solid var(--warn-line); }
.alert-bar--warning a { color: inherit; font-weight: 700; }
.alert-bar--danger  { background: var(--danger); color: #fff; }
.alert-bar--danger a { color: #fff; font-weight: 700; }

/* ---------- Top bar ---------- */
.top-bar { background: var(--topbar-bg); color: #fff; font-size: .875rem; }
.top-bar a { color: #fff; text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; }
.top-contacts { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; min-width: 0; }
.top-contacts a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; white-space: nowrap; }
.top-emergency a { font-weight: 700; }
.top-phone, .top-mail { display: none; }
.tc-label { display: none; }
.top-emergency .tc-label { display: inline; }
@media (min-width: 560px) { .top-phone { display: list-item; } }
@media (min-width: 900px) { .top-mail { display: list-item; } .tc-label { display: inline; } }
.top-tools { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }

.lang-switch { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.lang-switch a, .lang-current {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 36px; padding: 0 .5rem; border-radius: 6px;
  font-weight: 700; font-size: .8125rem; letter-spacing: .04em;
}
.lang-switch a { color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.lang-switch a:hover { background: rgba(255, 255, 255, .14); text-decoration: none; }
.lang-current { background: #fff; color: #0f3d6e; }
:root[data-theme="dark"] .lang-current { color: #0a1222; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 36px; border-radius: 6px; padding: 0;
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35);
}
.theme-toggle:hover { background: rgba(255, 255, 255, .14); }
.theme-toggle .when-dark { display: none; }
.theme-toggle[aria-pressed="true"] .when-dark { display: block; }
.theme-toggle[aria-pressed="true"] .when-light { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: var(--surface); box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); min-width: 0; padding: .4rem 0; }
.brand-logo { width: 44px; height: auto; flex-shrink: 0; }
:root[data-theme="dark"] .brand-logo { background: #fff; border-radius: 50%; padding: 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background: #fff; border-radius: 50%; padding: 2px; } }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; font-size: .98rem; line-height: 1.2; color: var(--blue-strong); }
.brand-sub { font-size: .82rem; color: var(--muted); line-height: 1.3; }
@media (min-width: 768px) {
  .brand-logo { width: 52px; }
  .brand-name { font-size: 1.12rem; }
  .brand-sub { font-size: .9rem; }
}

.header-actions { display: flex; gap: .4rem; flex-shrink: 0; }
.hdr-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-width: 48px; min-height: 48px; padding: .25rem .4rem;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .7rem; font-weight: 700; line-height: 1;
}
.hdr-btn .icon { width: 22px; height: 22px; }
.hdr-btn:hover { border-color: var(--blue); color: var(--blue); }
.hdr-btn[aria-expanded="true"] { background: var(--blue); color: var(--on-accent); border-color: var(--blue); }
.menu-toggle .when-open { display: none; }
.menu-toggle[aria-expanded="true"] .when-open { display: block; }
.menu-toggle[aria-expanded="true"] .when-closed { display: none; }
html:not(.js) .header-actions { display: none; }

/* ---------- Search panel ---------- */
.site-search { background: var(--surface-2); border-top: 1px solid var(--border); padding: .9rem 0; }
.js .site-search { display: none; }
.js .site-search.is-open { display: block; }

.search-form { display: flex; gap: .5rem; width: 100%; }
.search-form input[type="search"] {
  flex: 1; min-width: 0; min-height: 48px; padding: .6rem .9rem;
  border: 2px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.search-form input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
.search-submit {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: 0 1rem;
  background: var(--blue); color: var(--on-accent); border: 0; border-radius: var(--radius-sm); font-weight: 700;
}
.search-submit:hover { background: var(--blue-strong); }
@media (max-width: 479px) {
  .search-submit-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Main navigation: mobile drawer ---------- */
.site-nav .menu { list-style: none; margin: 0; padding: 0; }
.js .site-nav { display: none; }
.js .site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); box-shadow: var(--shadow-lg); border-top: 1px solid var(--border);
  padding: .5rem 0 1.5rem;
}
body.nav-open { overflow: hidden; }
.menu-item { border-bottom: 1px solid var(--border); }
.menu-row { display: flex; align-items: stretch; }
.menu-link {
  flex: 1; display: flex; align-items: center; gap: .7rem;
  min-height: 52px; padding: .5rem .25rem; color: var(--text); text-decoration: none; font-weight: 700;
}
.menu-link .menu-icon { width: 22px; height: 22px; color: var(--blue); }
.menu-link:hover, .menu-link[aria-current] { color: var(--blue); }
.menu-item.is-active > .menu-row > .menu-link { color: var(--blue); }
.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; min-height: 52px; background: none; border: 0; border-left: 1px solid var(--border); color: var(--text);
}
.sub-toggle .icon { transition: transform .2s; }
.sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.js .sub-panel { display: none; }
.js .sub-panel.is-open { display: block; }
.sub-menu, .sub-sub { list-style: none; margin: 0; padding: 0; }
.sub-menu { padding: 0 0 .5rem 2.1rem; }
.sub-link {
  display: flex; align-items: center; min-height: 44px; padding: .35rem .5rem;
  color: var(--text); text-decoration: none; border-radius: 6px;
}
.sub-link:hover { background: var(--blue-soft); color: var(--blue); }
.sub-link[aria-current] { color: var(--blue); font-weight: 700; background: var(--blue-soft); }
.sub-heading { font-weight: 700; }
.sub-sub { padding-left: 1rem; border-left: 2px solid var(--border); margin: 0 0 .25rem .5rem; }
.sub-sub .sub-link { font-size: .95rem; min-height: 40px; }

/* ---------- Main navigation: desktop bar ---------- */
@media (min-width: 1080px) {
  .header-inner { min-height: 84px; }
  .menu-toggle { display: none; }
  .js .site-nav, .site-nav { display: block; position: static; box-shadow: none; padding: 0; max-height: none; overflow: visible; border-top: 1px solid var(--border); }
  .site-nav .menu { display: flex; gap: .15rem; }
  .menu-item { border: 0; position: relative; }
  .menu-link {
    gap: .45rem; min-height: 52px; padding: .25rem .7rem; font-size: .95rem;
    border-bottom: 3px solid transparent; white-space: nowrap;
  }
  .menu-link .menu-icon { width: 19px; height: 19px; }
  .menu-item.is-active > .menu-row > .menu-link { border-bottom-color: var(--blue); }
  .menu-link:hover { background: var(--blue-soft); }
  .has-sub .menu-link { padding-right: .2rem; }
  .sub-toggle { width: 30px; min-height: 52px; border: 0; border-bottom: 3px solid transparent; }
  .menu-item.is-active > .menu-row > .sub-toggle { border-bottom-color: var(--blue); }
  .sub-toggle:hover { background: var(--blue-soft); color: var(--blue); }
  .sub-toggle .icon { width: 16px; height: 16px; }

  .sub-panel {
    display: none; position: absolute; top: 100%; left: 0; z-index: 950; min-width: 280px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg); padding: .6rem;
  }
  .js .sub-panel.is-open,
  html:not(.js) .menu-item:hover > .sub-panel,
  html:not(.js) .menu-item:focus-within > .sub-panel { display: block; }
  .sub-menu { padding: 0; }
  .sub-link { font-size: .95rem; white-space: nowrap; }

  /* Mega panel: a section whose items have their own children (Υπηρεσίες). */
  .is-mega .sub-panel { width: min(760px, 92vw); }
  .is-mega .sub-menu { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0 1rem; }
  .is-mega .sub-menu > .has-children { grid-row: span 6; }
  .is-mega .sub-sub .sub-link { white-space: normal; }
  .site-nav .menu > .menu-item:nth-last-child(-n+2) .sub-panel { left: auto; right: 0; }
}
@media (min-width: 1080px) and (max-width: 1239px) {
  .menu-link .menu-icon { display: none; }
}

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%);
  color: #fff; padding: 2.25rem 0 2.5rem;
}
.hero h1 { font-size: clamp(1.55rem, 1.1rem + 2.2vw, 2.6rem); margin-bottom: .4rem; max-width: 22ch; }
.hero-lead { font-size: clamp(1rem, .95rem + .4vw, 1.2rem); opacity: .95; max-width: 52ch; margin-bottom: 1.25rem; }
.hero-search { max-width: 640px; }
.hero-search input[type="search"] { border-color: transparent; }
.hero-search .search-submit { background: #fff; color: #0f3d6e; }
.hero-search .search-submit:hover { background: #e8f0fb; }
@media (min-width: 768px) { .hero { padding: 3.5rem 0 3.75rem; } }

/* ---------- Quick access tiles ---------- */
.quick { margin-top: -1.25rem; position: relative; }
.quick-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 640px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .quick-grid { grid-template-columns: repeat(6, 1fr); gap: .8rem; } }
.quick-tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: .6rem;
  height: 100%; min-height: 96px; padding: .9rem; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-weight: 700; line-height: 1.3; font-size: .98rem;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.quick-tile .quick-icon { width: 30px; height: 30px; color: var(--blue); padding: 5px; background: var(--blue-soft); border-radius: 8px; box-sizing: content-box; }
.quick-tile:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--blue); }
@media (max-width: 639px) {
  .quick-tile { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 64px; padding: .6rem .7rem; gap: .55rem; font-size: .92rem; }
  .quick-tile .quick-icon { width: 24px; height: 24px; padding: 6px; flex-shrink: 0; }
}

/* ---------- Home layout ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 2.25rem; padding-bottom: 2.5rem; }
@media (min-width: 1080px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; border-bottom: 2px solid var(--border); padding-bottom: .5rem; }
.section-head h2 { margin: 0; font-size: 1.3rem; }
.more-link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .95rem; min-height: 44px; }
.more-link .icon { width: 18px; height: 18px; }

.home-side { display: grid; gap: 1rem; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.info-card h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin-bottom: .6rem; }
.info-card h2 .icon { color: var(--blue); }
.info-card--emergency { background: var(--danger); color: #fff; border: 0; }
.info-card--emergency h2 .icon { color: #fff; }
.info-card--emergency a { color: #fff; }
.big-phone { font-size: 1.7rem; font-weight: 800; letter-spacing: .01em; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.big-phone:hover { text-decoration: underline; }
.info-card .small { font-size: .9rem; margin: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: 0; }

/* ---------- Entry lists (news, tenders, search) ---------- */
.entry-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.entry-row { display: flex; gap: .9rem; padding: .95rem 0; border-bottom: 1px solid var(--border); }
.entry-row:last-child { border-bottom: 0; }
.entry-date { flex-shrink: 0; width: 6.3em; font-size: .875rem; color: var(--muted); padding-top: .15rem; font-variant-numeric: tabular-nums; }
.entry-body { min-width: 0; flex: 1; }
.entry-title { font-size: 1.02rem; font-weight: 700; margin: 0 0 .2rem; line-height: 1.4; }
.entry-title a { color: var(--text); text-decoration: none; }
.entry-title a:hover { color: var(--blue); text-decoration: underline; }
.entry-meta { font-size: .875rem; color: var(--muted); margin: 0; }
.entry-excerpt { font-size: .95rem; color: var(--muted); margin: .3rem 0 0; }
.entry-list--compact .entry-title { font-size: .98rem; }
.entry-list--compact .entry-title a { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 479px) {
  .entry-row { flex-direction: column; gap: .15rem; }
  .entry-date { width: auto; }
}
.layout-main > .entry-list, .layout-main > .current-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .25rem 1.1rem; }
.layout-main > .current-list { padding: 1.1rem 1.25rem; margin-bottom: 1.5rem; border-left: 4px solid var(--blue); }

.badge { display: inline-block; vertical-align: .1em; margin-left: .35rem; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge--open { background: var(--ok-bg); color: var(--ok-fg); }
.badge--closed { background: var(--closed-bg); color: var(--closed-fg); }
.badge--pin { background: var(--pin-bg); color: var(--pin-fg); }

/* ---------- Page header ---------- */
.page-hero { background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; padding: 1.25rem 0 1.6rem; }
.page-title { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.2rem); margin: 0; }
.page-lead { margin: .5rem 0 0; max-width: 70ch; opacity: .95; }
@media (min-width: 768px) { .page-hero { padding: 1.75rem 0 2.25rem; } }

.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 .5rem; padding: 0; font-size: .875rem; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: "›"; margin: 0 .45rem; opacity: .8; }
.breadcrumbs a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); }
.breadcrumbs a:hover { text-decoration-color: #fff; }
.breadcrumbs [aria-current] { opacity: .92; }
/* On phones show only the parent level, to keep the header short. */
@media (max-width: 559px) {
  .breadcrumbs li { display: none; }
  .breadcrumbs li:nth-last-child(2) { display: inline-flex; }
  .breadcrumbs li:nth-last-child(2)::before { content: "‹"; margin: 0 .4rem 0 0; }
}

/* ---------- Content layout ---------- */
.layout { padding-top: 1.75rem; padding-bottom: 3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.layout-main { min-width: 0; }
@media (min-width: 1080px) {
  .layout--with-nav { grid-template-columns: 280px minmax(0, 1fr); }
  .layout--with-nav .layout-side { grid-column: 1; grid-row: 1; }
  .layout--with-nav .layout-main { grid-column: 2; }
}

.section-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 1080px) { .section-nav { position: sticky; top: calc(84px + 52px + 1rem); max-height: calc(100vh - 160px); overflow-y: auto; } }
.section-nav-title { margin: 0; background: var(--blue); }
.section-nav-title a { display: block; padding: .8rem 1rem; color: var(--on-accent); font-weight: 800; text-decoration: none; }
.section-nav ul { list-style: none; margin: 0; padding: .35rem 0; }
.section-nav ul ul { padding: 0 0 .3rem .9rem; }
.section-nav li a { display: block; padding: .55rem 1rem; min-height: 44px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; line-height: 1.4; }
.section-nav li a:hover { background: var(--blue-soft); color: var(--blue); }
.section-nav li a[aria-current] { border-left-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.section-nav ul ul a { font-size: .95rem; min-height: 40px; padding: .45rem .9rem; }

/* ---------- Prose (editor content) ---------- */
.prose {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem var(--gutter) 1.5rem; box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) { .prose { padding: 2rem 2.25rem 2.25rem; } }
.prose > * { max-width: 78ch; }
.prose > .table-scroll, .prose > .wp-block-table, .prose > .alignwide, .prose > .alignfull, .prose > .card-grid, .prose > .child-pages, .prose > .fields-panel, .prose > figure, .prose > .wp-block-columns { max-width: none; }
.prose h2 { font-size: 1.4rem; margin: 2rem 0 .65rem; color: var(--blue-strong); }
.prose h3 { font-size: 1.18rem; margin: 1.6rem 0 .5rem; }
.prose h4 { font-size: 1.05rem; margin: 1.3rem 0 .4rem; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose li > ul, .prose li > ol { margin: .35em 0 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose blockquote { margin: 1.5rem 0; padding: .75rem 1.25rem; border-left: 4px solid var(--blue); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose img { border-radius: var(--radius-sm); }
.prose figure { margin: 1.5rem 0; }
.prose figcaption, .wp-element-caption { font-size: .875rem; color: var(--muted); margin-top: .4rem; }
.prose strong { font-weight: 700; }
.prose a { word-break: break-word; }

/* Tables: scroll sideways on phones instead of breaking the page. */
.table-scroll { position: relative; overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--border); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { box-shadow: 0 0 0 5px var(--focus-halo); }
.wp-block-table { margin: 1.25rem 0; }
.wp-block-table .table-scroll { margin: 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th, th[scope="col"] { background: var(--surface-2); font-weight: 700; color: var(--text); border-bottom: 2px solid var(--border-strong); }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
caption { caption-side: top; text-align: left; font-weight: 700; padding: .6rem .8rem; color: var(--text); }
td a[href^="tel:"] { white-space: nowrap; }

/* Accordions (converted from the old site's "spoilers"). Native <details>: keyboard and screen-reader friendly, no JS. */
.prose details, .wp-block-details {
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin: .75rem 0; background: var(--surface);
}
.prose details > summary, .wp-block-details > summary {
  display: flex; align-items: center; gap: .6rem; min-height: 52px; padding: .6rem 1rem;
  font-weight: 700; cursor: pointer; list-style: none; color: var(--blue-strong); border-radius: var(--radius-sm);
}
.prose details > summary::-webkit-details-marker { display: none; }
.prose details > summary::before {
  content: ""; flex-shrink: 0; width: .55em; height: .55em; margin: 0 .2rem 0 .1rem;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s;
}
.prose details[open] > summary::before { transform: rotate(45deg); }
.prose details[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--surface-2); }
.prose details > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.prose details > :nth-child(2) { margin-top: 1rem; }
.prose details > :last-child { margin-bottom: 1rem; }

.highlight-box, .is-style-highlight { background: var(--blue-soft); border-left: 4px solid var(--blue); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.2rem; margin: 1.25rem 0; }
.warning-box, .is-style-warning { background: var(--warn-bg); color: var(--warn-fg); border-left: 4px solid var(--warn-line); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.2rem; margin: 1.25rem 0; }
.warning-box a { color: inherit; }

.wp-block-button__link, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .6rem 1.3rem; border-radius: var(--radius-sm); border: 2px solid transparent;
  font-weight: 700; text-decoration: none; line-height: 1.2; text-align: center;
}
.wp-block-button__link, .btn-solid { background: var(--blue); color: var(--on-accent); }
.wp-block-button__link:hover, .btn-solid:hover { background: var(--blue-strong); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue-soft); }

.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.wp-block-file a:not(.wp-block-file__button) { font-weight: 700; }
.wp-block-file .wp-block-file__button { background: var(--blue); color: var(--on-accent); border-radius: 6px; padding: .45rem .9rem; text-decoration: none; font-weight: 700; font-size: .9rem; }
.wp-block-file__embed { display: none; }

.wp-block-columns { display: grid; gap: 1.25rem; }
@media (min-width: 782px) { .wp-block-columns { grid-auto-flow: column; grid-auto-columns: 1fr; } }

.wp-block-image img { height: auto; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: .3rem 1.25rem 1rem 0; max-width: 50%; }
.alignright { float: right; margin: .3rem 0 1rem 1.25rem; max-width: 50%; }
@media (max-width: 599px) { .alignleft, .alignright { float: none; margin: 1rem 0; max-width: 100%; } }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }

/* Editor palette classes */
.has-blue-color { color: var(--blue) !important; }
.has-blue-dark-color { color: var(--blue-strong) !important; }
.has-red-color { color: var(--danger) !important; }
.has-blue-light-background-color { background: var(--blue-soft) !important; }

/* Contact cards used in migrated content */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; margin: 1.25rem 0; padding: 0; list-style: none; }
.contact-grid > * { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .85rem 1rem; margin: 0; }

/* Fields panel (single tender/job/department) */
.fields-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; margin: 0 0 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.fields-panel > div { padding: .7rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.fields-panel dt { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fields-panel dd { margin: .15rem 0 0; font-weight: 600; }

.single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--muted); font-size: .95rem; }
.single-meta .icon { color: var(--blue); }
.single-meta .badge { margin-left: .2rem; }
.single-thumb img { width: 100%; }
.back-link { margin-top: 1.25rem; }
.back-link a { display: inline-flex; gap: .35rem; align-items: center; font-weight: 700; min-height: 44px; }
.updated { margin-top: 2rem; font-size: .875rem; color: var(--muted); }

/* Attachments */
.files { margin-top: 1.75rem; }
.files-title { font-size: 1.15rem !important; margin: 0 0 .6rem !important; color: var(--text) !important; }
.file-list { list-style: none !important; padding: 0 !important; margin: 0; display: grid; gap: .5rem; }
.file-list li { margin: 0; }
.file-link {
  display: flex; align-items: center; gap: .7rem; min-height: 56px; padding: .6rem .9rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none;
}
.file-link:hover { border-color: var(--blue); color: var(--blue); }
.file-link > .icon { color: var(--blue); }
.file-name { flex: 1; min-width: 0; font-weight: 600; }
.file-meta { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.file-dl { width: 20px; height: 20px; }

/* Child page cards */
.child-pages { margin-top: 2rem; }
.card-grid { list-style: none !important; padding: 0 !important; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; }
.card-grid li { margin: 0; }
.link-card {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; height: 100%;
  min-height: 60px; padding: .8rem 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-weight: 700; text-decoration: none; line-height: 1.35;
}
.link-card .icon { color: var(--blue); width: 20px; height: 20px; }
.link-card:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

/* ---------- Filters ---------- */
.filters {
  display: grid; gap: .8rem; margin-bottom: 1.25rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
@media (min-width: 640px) { .filters { grid-template-columns: repeat(2, 1fr); } .filter-field--q { grid-column: 1 / -1; } }
@media (min-width: 1080px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr; align-items: end; } .filter-field--q { grid-column: auto; } .filter-actions { grid-column: 1 / -1; } }
.filter-field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .25rem; }
.filters input, .filters select, .gnz-form input:not([type="checkbox"]), .gnz-form textarea {
  width: 100%; min-height: 48px; padding: .55rem .75rem; background: var(--surface); color: var(--text);
  border: 2px solid var(--border-strong); border-radius: var(--radius-sm);
}
.filters select {
  -webkit-appearance: none; appearance: none; padding-right: 2.4rem; line-height: 1.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352606f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 16px;
}
:root[data-theme="dark"] .filters select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3c2d6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .filters select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3c2d6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); } }
.filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.result-count { font-weight: 700; color: var(--muted); }
.year-nav ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0 0 1.25rem; padding: 0; }
.year-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 600; }
.year-nav a[aria-current] { background: var(--blue); color: var(--on-accent); border-color: var(--blue); }
.empty-state { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.search-again { margin-bottom: 1rem; }
.search-term { font-style: italic; }

/* ---------- Pagination ---------- */
.pagination ul { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.pagination a, .pagination span.current, .pagination span.dots {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .6rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 700;
}
.pagination span.current { background: var(--blue); color: var(--on-accent); border-color: var(--blue); }
.pagination span.dots { border: 0; background: none; }

/* ---------- Forms (contact) ---------- */
.gnz-form { max-width: 760px; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-weight: 700; margin-bottom: .3rem; }
.form-field--check { display: flex; gap: .6rem; align-items: flex-start; }
.form-field--check input { width: 24px; height: 24px; margin: .1rem 0 0; flex-shrink: 0; accent-color: var(--blue); }
.form-field--check label { font-weight: 400; margin: 0; }
.field-help, .form-note { font-size: .9rem; color: var(--muted); margin: .3rem 0 0; }
.form-note { margin-bottom: 1rem; }
.req { color: var(--danger); font-weight: 700; }
:root[data-theme="dark"] .req { color: #ff9b8f; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: var(--radius-sm); padding: .85rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.notice p { margin: 0; }
.notice--success { background: var(--ok-bg); color: var(--ok-fg); border-left: 4px solid currentColor; }
.notice--error { background: var(--warn-bg); color: var(--warn-fg); border-left: 4px solid var(--warn-line); }

/* ---------- EU co-funding ---------- */
.eu-funding { padding: 0 0 2.5rem; }
.eu-title { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.eu-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 768px) { .eu-grid { grid-template-columns: 1fr 1fr; } }
.eu-grid li { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; display: flex; align-items: center; }
.eu-grid img { width: 100%; height: auto; }
.eu-grid a { display: block; width: 100%; }
.eu-grid a:hover img { opacity: .92; }

/* Galleries (migrated) */
.wp-block-gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin: 1.5rem 0; }
.wp-block-gallery .wp-block-image { margin: 0; width: 100% !important; }
.wp-block-gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }

/* Sitemap page */
.sitemap ul { list-style: disc; padding-left: 1.3em; }
.sitemap > ul > li { margin-bottom: .6rem; font-weight: 700; }
.sitemap li li { font-weight: 400; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); margin-top: 0; font-size: .95rem; }
.site-footer a { color: var(--footer-fg); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }
.footer-name { color: #fff; font-weight: 800; font-size: 1.05rem; line-height: 1.35; }
.footer-contact { list-style: none; margin: 0 0 1rem; padding: 0; }
.footer-contact li { display: flex; gap: .55rem; align-items: flex-start; padding: .25rem 0; }
.footer-contact .icon { margin-top: .15em; color: var(--footer-muted); }
.footer-contact a { display: inline-flex; min-height: 32px; align-items: center; }
.footer-region { font-size: .875rem; color: var(--footer-muted); }
.footer-heading { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 40px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: .875rem; color: var(--footer-muted); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; padding-top: 1rem; padding-bottom: 1.25rem; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; margin: 0; padding: 0; }
.legal-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--footer-fg); }
.copyright { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Windows high contrast / forced colours ---------- */
@media (forced-colors: active) {
  .badge, .hdr-btn, .quick-tile, .link-card, .file-link, .lang-switch a, .theme-toggle { border: 1px solid CanvasText; }
  .menu-item.is-active > .menu-row > .menu-link { text-decoration: underline; }
}

/* ---------- Print ---------- */
@media print {
  .top-bar, .site-header, .alert-bar, .site-footer, .section-nav, .layout-side, .filters, .pagination, .skip-link, .quick, .hero-search { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .page-hero, .hero { background: none; color: #000; padding: 0 0 1rem; }
  .prose { border: 0; box-shadow: none; padding: 0; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
  details > * { display: block !important; }
}
