/* ════════════════════════════════════════════════════════════
   main.css  ·  Project Theme
   Inspired by FESB ZEN — clean, academic, minimal
   ────────────────────────────────────────────────────────────
   Quick-find labels:
     0. Design tokens (colours, fonts, spacing)
     1. Reset & base
     2. Layout utility
     3. Navigation (transparent → solid on scroll)
     4. Hero (full-screen banner)
     5. Buttons
     6. Page content & section wrappers
     7. Prose (rendered markdown)
     8. Cards & work-package cards
     9. Inner-page hero (News etc.)
    10. Inner page body
    11. Footer (EU strip · main grid · copyright)
    12. Responsive breakpoints
    13. Focus / accessibility
   ════════════════════════════════════════════════════════════ */


/* ── 0. DESIGN TOKENS ───────────────────────────────────────
   LIGHT MODE  ·  override in custom.css
   ────────────────────────────────────────────────────────── */
:root {
  /* ── ACCENT — derived from project_banner_animated.svg ── */
  --c-accent:        #1D9E75;
  --c-accent-hover:  #177A5B;

  /* ── BACKGROUND / TEXT ── */
  --c-bg:            #ffffff;
  --c-bg-alt:        #f2f8f6;
  --c-bg-nav:        rgba(255, 255, 255, 0.94);
  --c-text:          #0e1e18;
  --c-text-muted:    #526b62;
  --c-border:        #d6e3de;

  /* ── CHANGE FONT HERE ──
     Replace the Google Fonts import in baseof.html too  */
  --font:            'Inter', system-ui, -apple-system, sans-serif;

  /* ── CHANGE BANNER / HERO IMAGE HERE ──
     Place image in static/images/ and update the filename */
  /* Banner image is set inline by layouts/index.html from hugo.toml → params.bannerImage.
     The CSS variable below is a fallback only — change the image in hugo.toml, not here. */
  --banner:          url('/images/banner.jpg');   /* FALLBACK — set in hugo.toml */

  /* ── Layout constants (rarely need changing) ── */
  --nav-h:           64px;
  --max-w:           1100px;
  --pad:             clamp(1rem, 5vw, 2.5rem);
  --radius:          8px;
  --radius-sm:       5px;
  --ease:            cubic-bezier(0.4, 0, 0.2, 1);
}


/* ── DARK MODE TOKENS ───────────────────────────────────────
   Applied when <html data-theme="dark">
   ────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --c-accent:        #5DCAA5;
  --c-accent-hover:  #9FE1CB;
  --c-bg:            #041f17;
  --c-bg-alt:        #0a2e23;
  --c-bg-nav:        rgba(4, 31, 23, 0.94);
  --c-text:          #e2efe9;
  --c-text-muted:    #82a99a;
  --c-border:        #1a3d30;
}


/* ══════════════════════════════════════════════════════════
   1. RESET & BASE
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.25rem);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-text);
  background-color: var(--c-bg);
  overflow-x: hidden;
  /* Smooth colour swap when theme changes */
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--c-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul, ol { list-style: none; }
address { font-style: normal; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--c-text);
}


/* ══════════════════════════════════════════════════════════
   2. LAYOUT UTILITY
   ══════════════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ══════════════════════════════════════════════════════════
   3. NAVIGATION
   ══════════════════════════════════════════════════════════ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
}

/* ── Base state: transparent (sits over hero) ── */
#site-nav {
  height: var(--nav-h);
  background: transparent;
  transition:
    background 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
}

/* ── Scrolled state: frosted glass panel ── */
#site-nav.scrolled {
  background: var(--c-bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--c-border);
}

/* Inner flex row */
.nav__inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
  gap: 1rem;
}

/* ─── Logo ─────────────────────────────────── */
.nav__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  /* Pushes nav list + controls to the right */
  margin-right: auto;
  text-decoration: none;
}
.nav__logo img {
  /* Override global img { display:block } */
  display: inline-block;
  height: 38px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  /* Uncomment if logo is dark-coloured and needs inverting on the transparent hero:
  filter: brightness(0) invert(1);
  transition: filter 0.3s; */
}
/* When scrolled restore logo to its natural colours:
#site-nav.scrolled .nav__logo img { filter: none; } */

.nav__logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
/* On transparent nav the logo-text needs to be white */
/* Remove these two rules if your logo is always readable */
#site-nav:not(.scrolled) .nav__logo-text { color: #fff; }

/* ─── Main nav list ────────────────────────── */
.nav__list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav__link {
  display: block;
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  /* White on transparent hero */
  color: rgba(255, 255, 255, 0.88);
}
.nav__link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
}
/* Recolour on solid/scrolled nav */
#site-nav.scrolled .nav__link {
  color: var(--c-text);
}
#site-nav.scrolled .nav__link:hover {
  background: var(--c-bg-alt);
  color: var(--c-text);
}

/* ─── Right-side controls wrapper ─────────── */
.nav__right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* ─── Theme toggle pills ───────────────────── */
.nav__theme {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 3px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  transition: background 0.3s, border-color 0.3s;
}
#site-nav.scrolled .nav__theme {
  background: var(--c-bg-alt);
  border-color: var(--c-border);
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  transition: background 0.15s, color 0.15s;
}
.theme-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.theme-btn.active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
#site-nav.scrolled .theme-btn       { color: var(--c-text-muted); }
#site-nav.scrolled .theme-btn:hover { background: var(--c-border); color: var(--c-text); }
#site-nav.scrolled .theme-btn.active {
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ─── Language switcher ────────────────────── */
.nav__lang {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.lang-btn {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.15s;
  cursor: pointer;
}
.lang-btn:hover {
  color: #fff;
  text-decoration: none;
}
.lang-btn--active {
  color: #fff;
  cursor: default;
  font-weight: 700;
}
.lang-sep {
  color: rgba(255, 255, 255, 0.3);
  user-select: none;
}

/* Recolour on solid nav */
#site-nav.scrolled .lang-btn        { color: var(--c-text-muted); }
#site-nav.scrolled .lang-btn:hover  { color: var(--c-text); }
#site-nav.scrolled .lang-btn--active{ color: var(--c-accent); }
#site-nav.scrolled .lang-sep        { color: var(--c-border); }

/* ─── Mobile hamburger ─────────────────────── */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 10;
}
.nav__hamburger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.25s var(--ease), opacity 0.2s, background 0.3s;
}
#site-nav.scrolled .nav__hamburger span { background: var(--c-text); }

/* Animate to × when open */
.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile drawer ────────────────────────── */
.nav__drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 800;
  background: var(--c-bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  padding: 1.5rem var(--pad) 2rem;
}
.nav__drawer.open { display: block; }

.nav__drawer ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 1.25rem;
}
/* Override white colour on drawer — it has a solid background */
.nav__drawer .nav__link {
  color: var(--c-text);
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
}
.nav__drawer .nav__link:hover {
  background: var(--c-bg-alt);
  color: var(--c-text);
}

.nav__drawer-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-border);
}
/* Override white colour inside drawer */
.nav__drawer .lang-btn        { color: var(--c-text-muted); }
.nav__drawer .lang-btn:hover  { color: var(--c-text); }
.nav__drawer .lang-btn--active{ color: var(--c-accent); }
.nav__drawer .lang-sep        { color: var(--c-border); }


/* ══════════════════════════════════════════════════════════
   4. HERO  (full-screen banner)
   ══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Banner image set inline from hugo.toml → do not change here */
  background-image: var(--banner);
  background-size: cover;
  background-position: center;
  /* Disable parallax on mobile — causes blur/jank */
  background-attachment: fixed;
  overflow: hidden;
}

/* Gradient overlay — tinted to match banner navy/teal palette */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(4, 44, 83, 0.60) 0%,
    rgba(4, 52, 44, 0.40) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: calc(var(--nav-h) + 3rem) var(--pad) 5rem;
  max-width: 820px;
  width: 100%;
}

.hero__overline {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2rem, 6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 2.75rem;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Animated scroll-down line */
.hero__scroll {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero__scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scroll-line 2.2s ease-in-out infinite;
}
@keyframes scroll-line {
  0%, 100% { opacity: 1;   transform: scaleY(1); }
  50%       { opacity: 0.3; transform: scaleY(0.6); }
}


/* ══════════════════════════════════════════════════════════
   5. BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1.6rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease);
  text-decoration: none;
}

.btn--primary {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.btn--primary:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29, 158, 117, 0.35);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}


/* ══════════════════════════════════════════════════════════
   6. PAGE CONTENT  (home page section wrappers)
   ══════════════════════════════════════════════════════════ */
.page-content {
  background: var(--c-bg);
}

/* Wrapper around each home section (from markdown) */
.content-section {
  padding: 5.5rem 0;
  border-bottom: 1px solid var(--c-border);
  transition: background 0.25s var(--ease);
}
.content-section:last-child {
  border-bottom: none;
}
.content-section:nth-child(even) {
  background: var(--c-bg-alt);
}

/* Inner max-width container inside each section */
.section__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Small all-caps label above section headings */
.section-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 0.7rem;
}


/* ══════════════════════════════════════════════════════════
   7. PROSE  (rendered markdown)
   ══════════════════════════════════════════════════════════ */
/* Applied to .page-body__content and news/inner pages */
.prose > * + * { margin-top: 1.1rem; }

.prose h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.85rem);
  margin-top: 2.75rem;
  margin-bottom: 0.5rem;
}
.prose h3 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}
.prose h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.3rem;
}

.prose p { color: var(--c-text); line-height: 1.75; }

.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
}
.prose ol {
  list-style: decimal;
  padding-left: 1.5rem;
}
.prose li { margin-bottom: 0.3rem; }

.prose strong { font-weight: 600; }
.prose em     { font-style: italic; }
.prose a      { color: var(--c-accent); }
.prose a:hover { text-decoration: underline; }

.prose blockquote {
  border-left: 3px solid var(--c-border);
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--c-text-muted);
  font-style: italic;
  margin-block: 1.75rem;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin-block: 2.75rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-block: 1.5rem;
}
.prose th {
  text-align: left;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  background: var(--c-bg-alt);
  border-bottom: 2px solid var(--c-border);
}
.prose td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.prose tr:last-child td { border-bottom: none; }

.prose code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85em;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
}
.prose pre {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-block: 1.5rem;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
}


/* ══════════════════════════════════════════════════════════
   8. CARDS  (partner / team / work-package)
   ══════════════════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

/* Partner / team card */
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}
.card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
[data-theme="dark"] .card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.card__title    { font-size: 0.975rem; font-weight: 600; margin-bottom: 0.3rem; }
.card__subtitle { font-size: 0.8rem;   color: var(--c-text-muted); margin-bottom: 0.6rem; }
.card__body     { font-size: 0.875rem; color: var(--c-text-muted); line-height: 1.6; }

/* Work-package grid — max 3 columns */
.wp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Work-package card — vertical layout */
.wp-card {
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}
.wp-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
  transform: translateY(-3px);
}
[data-theme="dark"] .wp-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.wp-card__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--c-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
}
.wp-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--c-text);
}
.wp-card__desc {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.65;
}

/* Tablet: 2 columns */
@media (max-width: 900px) {
  .wp-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Mobile: 1 column */
@media (max-width: 600px) {
  .wp-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .wp-card { padding: 1.5rem; }
}


/* ══════════════════════════════════════════════════════════
   9. INNER-PAGE HERO  (News / single pages)
   ══════════════════════════════════════════════════════════ */
.page-hero {
  padding: calc(var(--nav-h) + 3rem) 0 3rem;
  background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-border);
}
.page-hero__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
  max-width: 760px;
}
.page-hero__meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 0.65rem;
}
.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 0.75rem;
}
.page-hero__subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--c-text-muted);
  line-height: 1.6;
}


/* ══════════════════════════════════════════════════════════
   10. INNER-PAGE BODY
   ══════════════════════════════════════════════════════════ */
.page-body {
  max-width: 800px;
  margin-inline: auto;
  padding: 4rem var(--pad) 5rem;
}
.page-body__content { margin-bottom: 0; }

.page-body__back {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}
.back-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  transition: color 0.15s;
}
.back-link:hover {
  color: var(--c-accent);
  text-decoration: none;
}


/* ══════════════════════════════════════════════════════════
   12. RESPONSIVE
   ══════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --nav-h: 58px; }

  /* Hide desktop nav, show hamburger */
  .nav__list      { display: none; }
  .nav__theme     { display: none; }
  .nav__hamburger { display: flex; }

  /* Disable fixed background on mobile */
  .hero { background-attachment: scroll; }

  /* Footer: single column */
  .footer__inner          { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer__eu-img--right  { margin-left: 0; }
  .footer__bottom         { flex-direction: column; text-align: center; }

  /* Cards: single column */
  .card-grid { grid-template-columns: 1fr; }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; }
  .footer__eu-inner { flex-direction: column; align-items: flex-start; }
  .footer__eu-img--right { display: none; }
}


/* ══════════════════════════════════════════════════════════
   13. FOCUS / ACCESSIBILITY
   ══════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Remove default focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}


/* ── Inner pages: nav is always solid (no hero behind it) ── */
body[data-page="inner"] #site-nav {
  background: var(--c-bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--c-border);
}
/* Nav links always use text colour on inner pages */
body[data-page="inner"] #site-nav .nav__link        { color: var(--c-text); }
body[data-page="inner"] #site-nav .nav__link:hover   { background: var(--c-bg-alt); color: var(--c-text); }
body[data-page="inner"] #site-nav .nav__logo-text    { color: var(--c-text); }
body[data-page="inner"] #site-nav .nav__theme        { background: var(--c-bg-alt); border-color: var(--c-border); }
body[data-page="inner"] #site-nav .theme-btn         { color: var(--c-text-muted); }
body[data-page="inner"] #site-nav .theme-btn:hover   { background: var(--c-border); color: var(--c-text); }
body[data-page="inner"] #site-nav .theme-btn.active  { background: var(--c-bg); color: var(--c-text); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
body[data-page="inner"] #site-nav .lang-btn          { color: var(--c-text-muted); }
body[data-page="inner"] #site-nav .lang-btn:hover    { color: var(--c-text); }
body[data-page="inner"] #site-nav .lang-btn--active  { color: var(--c-accent); }
body[data-page="inner"] #site-nav .lang-sep          { color: var(--c-border); }
body[data-page="inner"] #site-nav .nav__hamburger span { background: var(--c-text); }


/* ══════════════════════════════════════════════════════════
   INSTITUTIONAL CREDITS — University of Split & FESB
   ══════════════════════════════════════════════════════════ */
.footer__credits {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 2rem 0;
}

.footer__credits-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__credits-logos {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-shrink: 0;
}

.footer__credits-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s;
}

.footer__credits-logo:hover {
  opacity: 0.75;
}

[data-theme="dark"] .footer__credits-logo {
  filter: brightness(0) invert(1);
}

.footer__credits-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--c-text-muted);
  max-width: 520px;
}

.footer__credits-text strong {
  color: var(--c-text);
  font-weight: 600;
}

@media (max-width: 600px) {
  .footer__credits-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer__credits-logos { gap: 1.5rem; }
  .footer__credits-logo  { height: 48px; }
  .footer__credits-text  { font-size: 0.8rem; }
}


/* ══════════════════════════════════════════════════════════
   FOOTER — EU block only (main grid removed)
   ══════════════════════════════════════════════════════════ */
#site-footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  margin-top: 5rem;
}

/* Override old footer__main/footer__inner rules — no longer used */
.footer__main  { display: none; }

/* EU block: white bg always, even dark mode */
.footer__eu-block {
  background: #ffffff;
  border-top: 3px solid #003399;
  border-bottom: 1px solid #e0e0e0;
  padding: 2.5rem 0;
}
[data-theme="dark"] .footer__eu-block {
  background: #ffffff;
  border-bottom-color: #cccccc;
}

.footer__eu-block-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.footer__eu-disclaimer {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 400;
  line-height: 1.7;
  color: #111111;
  max-width: 860px;
}

.footer__eu-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer__eu-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  filter: none !important;
}

/* Copyright bar */
.footer__bottom {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--c-border);
  font-size: 0.775rem;
  color: var(--c-text-muted);
  background: var(--c-bg);
}
.footer__bottom a { color: var(--c-text-muted); }
.footer__bottom a:hover { color: var(--c-text); }

@media (max-width: 600px) {
  .footer__eu-logos  { gap: 1.5rem; }
  .footer__eu-logo   { height: 60px; }
  .footer__bottom    { flex-direction: column; text-align: center; }
}


/* ══════════════════════════════════════════════════════════
   HERO — PAGE MODIFIER  (news / list / single pages)
   ══════════════════════════════════════════════════════════ */
.hero--page {
  min-height: 55vh;
  align-items: flex-end;
  padding-bottom: 4rem;
}
.hero--page .hero__content {
  padding-top: 2rem;
  padding-bottom: 0;
}
.hero--page .hero__title {
  font-size: clamp(1.75rem, 4vw, 3rem);
}
.hero--page .hero__scroll { display: none; }

@media (max-width: 768px) {
  .hero--page {
    min-height: 45vh;
    background-attachment: scroll;
  }
}


/* ══════════════════════════════════════════════════════════
   IMPROVEMENT 1 — Active nav link highlight
   ══════════════════════════════════════════════════════════ */
.nav__link--active {
  color: var(--c-accent) !important;
  font-weight: 600;
}
#site-nav.scrolled .nav__link--active {
  color: var(--c-accent) !important;
}

/* ══════════════════════════════════════════════════════════
   IMPROVEMENT 2 — News article images
   ══════════════════════════════════════════════════════════ */
.prose img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-block: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
[data-theme="dark"] .prose img {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ══════════════════════════════════════════════════════════
   IMPROVEMENT 3 — News empty state
   ══════════════════════════════════════════════════════════ */
.news-empty {
  color: var(--c-text-muted);
  font-style: italic;
  padding: 3rem 0;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   IMPROVEMENT 4 — Single article navigation (prev/next)
   ══════════════════════════════════════════════════════════ */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.article-nav__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text-muted);
  transition: color 0.15s;
  max-width: 45%;
}
.article-nav__link:hover { color: var(--c-accent); text-decoration: none; }
.article-nav__link--next { margin-left: auto; text-align: right; }
.article-nav__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
  margin-bottom: 0.25rem;
}

/* ══════════════════════════════════════════════════════════
   IMPROVEMENT 5 — Breadcrumb on article pages
   ══════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-accent); text-decoration: none; }
.breadcrumb__sep { color: var(--c-border); }

/* ══════════════════════════════════════════════════════════
   IMPROVEMENT 6 — Scroll-to-top button
   ══════════════════════════════════════════════════════════ */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  z-index: 500;
}
#scroll-top.visible {
  opacity: 1;
  visibility: visible;
}
#scroll-top:hover { transform: translateY(-2px); }

@media (max-width: 480px) {
  #scroll-top { bottom: 1rem; right: 1rem; }
}

/* Article meta (date on single article page) */
.article-meta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 2rem;
}


/* ══════════════════════════════════════════════════════════
   NEWS PAGE  (single-file system with tag filtering)
   ══════════════════════════════════════════════════════════ */

.news-page {
  padding-top: 3rem;
  padding-bottom: 5rem;
}

/* ── Tag filter bar ──────────────────────────────────────── */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--c-border);
}

.news-filter__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.news-filter__btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.news-filter__btn.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

/* ── News item card ──────────────────────────────────────── */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--c-border);
  transition: opacity 0.2s;
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child  { border-bottom: none; }

/* Header row: date + tags */
.news-item__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.news-item__date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* Tag pills */
.news-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.news-tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 100px;
  background: var(--c-bg-alt);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.news-tag:hover {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

/* Title */
.news-item__title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 0.85rem;
  color: var(--c-text);
}
.news-item__title a {
  color: var(--c-text);
  text-decoration: none;
}
.news-item__title a:hover { color: var(--c-accent); }

/* Body */
.news-item__body { margin-bottom: 0.75rem; }
.news-item__body p {
  font-size: 0.95rem;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.news-item__body img {
  max-width: min(480px, 100%);
  border-radius: var(--radius);
  margin-block: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* External link */
.news-item__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-accent);
  transition: gap 0.15s;
}
.news-item__link:hover { gap: 0.5rem; text-decoration: none; }

/* Empty state */
.news-empty {
  padding: 4rem 0;
  text-align: center;
  color: var(--c-text-muted);
  font-style: italic;
}

/* Mobile */
@media (max-width: 600px) {
  .news-filter { gap: 0.4rem; }
  .news-filter__btn { font-size: 0.75rem; padding: 0.35rem 0.8rem; }
  .news-item { padding: 1.75rem 0; }
}
