/* ternYpe website — shared styles
   Brand colors are picked straight from the real ternYpe logo
   (img/logo.png: red / green / blue dots above the "Y").
   2026-11 update (client's "Website Update Clear Instructions"): cleaner,
   whiter background instead of the earlier cream, larger logo, dark navy
   hero/strategy panels and a dark green lower homepage + footer, following
   the client's own mockups. */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f4f7fb;   /* light, cool section wash (replaces the old cream) */
  --color-surface: #ffffff;
  --color-text: #18202e;
  --color-text-muted: #5b6474;
  --color-primary: #1c4e9c;   /* blue, from logo */
  --color-primary-dark: #123564;
  --color-primary-tint: #eaf1fb;
  --color-navy: #18214a;      /* dark navy panels, from the client's mockups */
  --color-navy-soft: #243068;
  --color-secondary: #2e8b57; /* green, from logo */
  --color-secondary-tint: #e7f3ec;
  --color-green-dark: #114a33;   /* lower homepage area */
  --color-green-deeper: #0c3826; /* footer */
  --color-accent: #d1361f;    /* red, from logo */
  --color-accent-dark: #a82912;
  --color-accent-tint: #fbe9e5;
  --color-border: #e3e8ef;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --max-width: 1200px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Poppins", var(--font-body);
  --shadow-sm: 0 1px 3px rgba(20,33,58,.06);
  --shadow-md: 0 8px 24px rgba(20,33,58,.10);
  --shadow-lg: 0 16px 40px rgba(20,33,58,.16);
  --ease: cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--color-primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  color: var(--color-text);
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-weight: 700; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 6px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--color-accent);
  display: inline-block;
}
.lead { font-size: 1.12rem; color: var(--color-text-muted); max-width: 70ch; }

/* Text that comes from the admin panel (hero, page copy) stays hidden until
   the saved version has loaded, so the old default never flashes on refresh.
   The animation is a CSS-only safety net: if the database can't be reached
   the default text still appears after 2.5s. js/main.js adds .cms-ready. */
.cms-wait { visibility: hidden; animation: cmsReveal 0s linear 2.5s forwards; }
body.cms-ready .cms-wait { visibility: visible; animation: cmsFade .25s var(--ease); }
@keyframes cmsReveal { to { visibility: visible; } }
@keyframes cmsFade { from { opacity: 0; } to { opacity: 1; } }

/* Header / nav */
/* The header partial is loaded into #site-header, so the wrapper is what
   sticks to the top of the page (a sticky element only sticks inside its
   parent, and the wrapper is exactly as tall as the header). */
#site-header { position: sticky; top: 0; z-index: 50; }
header.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
header.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0 33.33%, var(--color-secondary) 33.33% 66.66%, var(--color-primary) 66.66% 100%);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 78px; width: auto; }
nav.main-nav { display: flex; align-items: center; gap: 14px; }
nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
}
nav.main-nav a {
  display: inline-block;
  color: var(--color-text);
  font-weight: 600;
  font-size: .93rem;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease);
}
nav.main-nav a:hover { background: rgba(28,78,156,.08); color: var(--color-primary); text-decoration: none; }
nav.main-nav a[aria-current="page"] { background: var(--color-primary); color: #fff; }
nav.main-nav a.nav-cta { border: 2px solid var(--color-primary); color: var(--color-primary); padding: 6px 18px; }
nav.main-nav a.nav-cta:hover, nav.main-nav a.nav-cta[aria-current="page"] { background: var(--color-primary); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1.4rem;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--color-text);
}

@media (max-width: 1080px) {
  .logo img { height: 68px; }
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 6px;
  }
  nav.main-nav.open { display: flex; animation: slideDown .18s var(--ease); }
  nav.main-nav ul { flex-direction: column; gap: 2px; }
  nav.main-nav a { display: block; }
  nav.main-nav a.nav-cta { text-align: center; }
  .nav-toggle { display: inline-block; }
}
@media (max-width: 480px) { .logo img { height: 64px; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* Homepage hero: headline left on dark navy, real group photo right
   (client's preferred "Option 1"). */
.hero-split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 520px;
  background: var(--color-navy);
  color: #fff;
  overflow: hidden;
}
.hero-split .hero-copy {
  position: relative;
  z-index: 2;
  padding: 72px 48px 110px max(24px, calc((100vw - var(--max-width)) / 2 + 24px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-split .hero-label {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: clamp(.8rem, 1.2vw, .98rem);
  margin: 0 0 14px;
}
.hero-split .hero-label::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--color-accent);
  margin-top: 14px;
}
.hero-split h1 {
  color: #fff;
  text-transform: uppercase;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.005em;
  margin-bottom: .45em;
}
.hero-split .hero-text { font-size: 1.12rem; color: rgba(255,255,255,.9); max-width: 50ch; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.hero-actions .btn { padding: 14px 28px; font-size: 1rem; }
.link-arrow {
  color: #fff;
  font-weight: 700;
  border-bottom: 2px solid rgba(255,255,255,.7);
  padding-bottom: 2px;
}
.link-arrow:hover { color: #fff; text-decoration: none; border-color: #fff; }
.hero-photo { position: relative; z-index: 1; }
.hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
}
/* Decorative wheel + brand-coloured arcs, echoing the Roma flag's chakra. */
.hero-deco { position: absolute; pointer-events: none; z-index: 1; }
.hero-deco.wheel { left: -70px; top: -60px; width: 230px; opacity: .14; }
.hero-deco.wheel-2 { left: 40%; bottom: -60px; width: 160px; opacity: .1; }
.hero-deco.arc-red { left: -90px; bottom: -150px; width: 300px; height: 300px; border-radius: 50%; border: 12px solid var(--color-accent); opacity: .85; }
.hero-deco.arc-green { left: 120px; bottom: -150px; width: 200px; height: 200px; border-radius: 50%; border: 10px solid var(--color-secondary); opacity: .85; }
.hero-deco.arc-blue { left: 44%; top: -90px; width: 170px; height: 170px; border-radius: 50%; border: 9px solid #3c63c7; opacity: .9; z-index: 0; }

.hero-stats {
  position: relative;
  z-index: 5;
  margin: -46px auto 0;
  max-width: 1000px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 18px 26px;
}
.hero-stats div {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-weight: 700; font-size: 1.02rem; padding: 4px 12px;
}
.hero-stats div + div { border-left: 1px solid var(--color-border); }
.hero-stats svg { width: 28px; height: 28px; flex-shrink: 0; }

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split .hero-copy { padding: 48px 24px 40px; }
  .hero-photo { height: 300px; }
  .hero-photo img { clip-path: none; }
  .hero-deco.arc-blue, .hero-deco.wheel-2 { display: none; }
  .hero-stats { margin: -30px 16px 0; border-radius: var(--radius); grid-template-columns: 1fr; padding: 10px 18px; }
  .hero-stats div { justify-content: flex-start; padding: 10px 4px; }
  .hero-stats div + div { border-left: none; border-top: 1px solid var(--color-border); }
}

/* Simple page header used by the inner pages */
.page-hero { padding: 56px 0 28px; }
.page-hero h1 { margin-bottom: .3em; }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--color-bg-soft); }
section.navy { background: var(--color-navy); color: #fff; }
section.navy h2, section.navy h3 { color: #fff; }
section.green { background: var(--color-green-dark); color: #fff; }
section.green h2, section.green h3 { color: #fff; }
section.green .section-head > a, section.navy .section-head > a { color: #fff; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 0; }
.section-head > a { font-weight: 700; white-space: nowrap; }
.section-intro { color: var(--color-text-muted); max-width: 75ch; margin: -12px 0 28px; }

/* Cards / grids */
.grid { display: grid; gap: 24px; }
/* minmax(min(Npx, 100%), 1fr): caps the column floor at the container width
   so very narrow phones never scroll sideways. */
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
@media (min-width: 960px) {
  .grid.fixed-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d3dae4; }
.card > img, .card .card-media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.card-body h3 { font-size: 1.08rem; margin: 0; }
.card-body h3 a { color: var(--color-text); }
.card-body h3 a:hover { color: var(--color-primary); text-decoration: none; }
.card-body p { margin: 0; }
.card-foot { margin-top: auto; padding-top: 6px; }

.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(28,78,156,.1);
  color: var(--color-primary);
  width: fit-content;
}
.tag.status-open, .tag.status-current { background: rgba(46,139,87,.13); color: var(--color-secondary); }
.tag.status-closed, .tag.status-past { background: rgba(0,0,0,.06); color: var(--color-text-muted); }
.tag.tag-red { background: rgba(209,54,31,.1); color: var(--color-accent); }
.tag.tag-green { background: rgba(46,139,87,.12); color: var(--color-secondary); }
.tag.tag-blue { background: rgba(28,78,156,.1); color: var(--color-primary); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--color-accent-dark); color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn.outline { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); box-shadow: none; padding: 9px 20px; }
.btn.outline:hover { background: var(--color-primary); color: #fff; }
.btn.blue { background: var(--color-primary); }
.btn.blue:hover { background: var(--color-primary-dark); }
.btn.small { padding: 7px 16px; font-size: .85rem; }
.btn.outline.small { padding: 5px 14px; }
.btn.light { background: #fff; color: var(--color-navy); }
.btn.light:hover { background: #eef2f8; color: var(--color-navy); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.text-link { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.text-link::after { content: "\2192"; transition: transform .15s var(--ease); }
.text-link:hover { text-decoration: none; }
.text-link:hover::after { transform: translateX(3px); }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; }

/* Priority cards (homepage + Our work), six themes with icons */
.priority-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
@media (min-width: 960px) { .priority-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.priority-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.priority-card:hover { text-decoration: none; color: var(--color-text); transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d3dae4; }
.priority-card.active { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.priority-card h3 { font-size: 1.05rem; margin: 0; }
.priority-card p { margin: 0; color: var(--color-text-muted); font-size: .93rem; }
.priority-card .text-link { margin-top: auto; font-size: .88rem; }
.icon-badge {
  width: 46px; height: 46px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-badge svg { width: 24px; height: 24px; }
.icon-badge.blue { background: var(--color-primary-tint); color: var(--color-primary); }
.icon-badge.red { background: var(--color-accent-tint); color: var(--color-accent); }
.icon-badge.green { background: var(--color-secondary-tint); color: var(--color-secondary); }

/* Project cards */
.project-card .card-media { position: relative; }
.project-card .card-media .tag { position: absolute; top: 12px; left: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.project-card .card-media .tag.status-current { color: var(--color-secondary); }
.project-card .card-media .tag.status-past { color: var(--color-text-muted); }
.project-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .86rem; color: var(--color-text-muted); }
.project-meta li { display: flex; gap: 8px; align-items: baseline; }
.project-meta strong { color: var(--color-text); font-weight: 600; min-width: 74px; }
.project-card .project-desc { color: var(--color-text-muted); font-size: .93rem; }
.filter-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 22px; font-weight: 600; }

/* Member logos */
.logo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.logo-tile {
  display: flex; align-items: center; justify-content: center;
  height: 112px; padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--color-border);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.logo-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.logo-tile img { max-height: 84px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.logo-tile .logo-fallback { font-weight: 700; font-size: .85rem; text-align: center; color: var(--color-text); }

/* Compact horizontal member row (membership page) */
.row-card { display: flex; gap: 20px; align-items: flex-start; padding: 20px; }
.row-card .row-logo { width: 120px; height: 96px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.row-card .row-logo img { max-width: 120px; max-height: 96px; width: auto; height: auto; object-fit: contain; }
.row-card .card-body { padding: 0; gap: 6px; }
.row-card h3 { font-size: 1rem; }
@media (max-width: 520px) { .row-card { flex-direction: column; } }
.link-pill {
  display: inline-flex; align-items: center; gap: 4px; width: fit-content;
  padding: 6px 14px; margin-top: 2px; border-radius: 999px;
  background: var(--color-primary-tint); color: var(--color-primary) !important;
  font-weight: 700; font-size: .85rem;
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.link-pill:hover { background: var(--color-primary); color: #fff !important; text-decoration: none; transform: translateX(2px); }

/* People cards (board, team) */
/* People grids: cards centred so an odd last row (e.g. 5 board members)
   sits in the middle instead of leaving one card alone on the left. */
.people-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.people-grid > .card { flex: 0 1 calc((100% - 48px) / 3); min-width: min(260px, 100%); }
.people-grid > .empty-state { flex: 1 1 100%; }
.avatar-card { text-align: center; padding: 26px 18px; align-items: center; }
.avatar-card img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; box-shadow: var(--shadow-sm); }
.avatar-card h3 { font-size: 1rem; margin-bottom: 2px; }
.avatar-card .tag { margin: 0 auto 8px; }
.avatar-card p { font-size: .9rem; margin: 0; }

.empty-state {
  color: var(--color-text-muted);
  font-style: normal;
  padding: 28px 20px;
  text-align: center;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
  background: rgba(0,0,0,.015);
  grid-column: 1 / -1;
  margin: 0;
}
section.green .empty-state { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); }

/* Dark green "latest news" cards */
section.green .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }
section.green .card:hover { background: rgba(255,255,255,.1); box-shadow: none; }
section.green .card h3, section.green .card h3 a { color: #fff; }
section.green .card .text-muted { color: rgba(255,255,255,.75); }
section.green .tag { background: rgba(255,255,255,.14); color: #fff; }
section.green .text-link { color: #c9f0d8; }

/* Who we are: sticky sub-navigation */
.subnav { position: sticky; top: 99px; z-index: 20; background: #fff; border-bottom: 1px solid var(--color-border); }
.subnav ul { list-style: none; margin: 0 auto; padding: 10px 24px; max-width: var(--max-width); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: inline-block; white-space: nowrap; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .86rem; color: var(--color-text); background: var(--color-bg-soft); }
.subnav a:hover { background: var(--color-primary-tint); color: var(--color-primary); text-decoration: none; }
@media (max-width: 1080px) { .subnav { top: 89px; } }
@media (max-width: 480px) { .subnav { top: 85px; } }
[id] { scroll-margin-top: 110px; }
.has-subnav [id] { scroll-margin-top: 165px; }

/* Vision, mission & values: "connected layers" */
.vmv { display: flex; flex-direction: column; align-items: center; }
.vmv-layer { width: 100%; display: flex; gap: 22px; align-items: flex-start; border-radius: var(--radius-lg); padding: 30px 34px; }
.vmv-layer .vmv-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vmv-layer .vmv-icon svg { width: 30px; height: 30px; }
.vmv-layer .vmv-label { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .78rem; margin: 6px 0 10px; }
.vmv-layer .vmv-text { font-family: var(--font-heading); font-weight: 700; line-height: 1.4; margin: 0; }
.vmv-vision { background: var(--color-navy); color: #fff; }
.vmv-vision .vmv-icon { background: #3352b0; color: #fff; }
.vmv-vision .vmv-label { color: #aeb9e6; }
.vmv-vision .vmv-text { font-size: clamp(1.1rem, 2vw, 1.45rem); }
.vmv-mission { background: #fff; border: 1px solid var(--color-border); width: calc(100% - 15%); box-shadow: var(--shadow-sm); }
.vmv-mission .vmv-icon { background: var(--color-accent-tint); color: var(--color-accent); }
.vmv-mission .vmv-label { color: var(--color-accent); }
.vmv-mission .vmv-text { font-size: clamp(1.02rem, 1.6vw, 1.22rem); }
.vmv-link { width: 3px; height: 40px; background: var(--color-primary); position: relative; }
.vmv-link::after { content: ""; position: absolute; bottom: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--color-accent); }
.vmv-branch { width: calc(100% - 15%); height: 36px; position: relative; }
.vmv-branch::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 22px; background: #b7c1d6; }
.vmv-branch::after { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: #b7c1d6; }
.vmv-branch i { position: absolute; left: 50%; top: 16px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--color-secondary); z-index: 1; }
.values-title { align-self: flex-start; margin: 22px 0 18px; }
.values-grid { width: 100%; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); }
@media (min-width: 960px) { .values-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.value-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; }
.value-card .value-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.value-card .value-num { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.value-card:nth-child(3n+1) .value-num { background: var(--color-primary-tint); color: var(--color-primary); }
.value-card:nth-child(3n+2) .value-num { background: var(--color-accent-tint); color: var(--color-accent); }
.value-card:nth-child(3n+3) .value-num { background: var(--color-secondary-tint); color: var(--color-secondary); }
.value-card h3 { font-size: .98rem; margin: 0; }
.value-card p { font-size: .88rem; color: var(--color-text-muted); margin: 0; }
@media (max-width: 700px) {
  .vmv-layer { flex-direction: column; gap: 12px; padding: 24px; }
  .vmv-mission, .vmv-branch { width: 100%; }
  .vmv-branch::after, .vmv-branch i { display: none; }
}

/* Strategic Vision 2026-2030: dark blue circular diagram */
.strategy { background: var(--color-navy); color: #fff; }
.strategy h2 { color: #fff; }
.strategy .section-intro { color: rgba(255,255,255,.82); }
.strategy-wheel { position: relative; width: min(100%, 640px); aspect-ratio: 1; margin: 30px auto 10px; --n: 5; }
.strategy-ring { position: absolute; inset: 15%; border-radius: 50%; background: var(--color-navy-soft); border: 2px solid #4f5f9e; }
.strategy-core {
  position: absolute; inset: 33%; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center;
  box-shadow: 0 0 0 14px rgba(255,255,255,.06);
}
.strategy-core-inner { width: 74%; aspect-ratio: 1; border-radius: 50%; background: #f6f3ea; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; }
.strategy-core strong { font-family: var(--font-heading); font-size: clamp(1.1rem, 3vw, 1.6rem); color: var(--color-navy); line-height: 1.1; }
.strategy-core span { display: block; color: var(--color-primary); font-weight: 700; font-size: clamp(.72rem, 1.8vw, .98rem); margin-top: 4px; }
.strategy-core small { display: block; color: var(--color-text-muted); font-size: clamp(.6rem, 1.4vw, .78rem); margin-top: 6px; }
.strategy-nodes { position: absolute; inset: 0; }
.strategy-node {
  --angle: calc(-162deg + 360deg / var(--n) * var(--i));
  position: absolute;
  left: calc(50% + cos(var(--angle)) * 35%);
  top: calc(50% + sin(var(--angle)) * 35%);
  width: 34%;
  transform: translate(-50%, -24%);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: none; border: none; padding: 0; color: #fff; cursor: pointer; font: inherit;
}
.strategy-node .node-dot {
  width: clamp(58px, 13vw, 92px); aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  margin-bottom: 10px;
}
.strategy-node .node-dot svg { width: 44%; height: 44%; color: #fff; }
.strategy-node:nth-child(3n+1) .node-dot { background: #3552b5; }
.strategy-node:nth-child(3n+2) .node-dot { background: var(--color-accent); }
.strategy-node:nth-child(3n+3) .node-dot { background: var(--color-secondary); }
.strategy-node strong { font-size: clamp(.82rem, 1.8vw, 1.02rem); line-height: 1.25; background: var(--color-navy); padding: 0 6px; border-radius: 6px; }
.strategy-node small { font-size: clamp(.7rem, 1.4vw, .82rem); color: #c8cfea; line-height: 1.3; margin-top: 3px; background: var(--color-navy); padding: 0 6px; border-radius: 6px; }
.strategy-node:hover .node-dot, .strategy-node:focus-visible .node-dot { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(255,255,255,.18), 0 8px 22px rgba(0,0,0,.3); }
.strategy-node:focus-visible { outline: none; }
.strategy-hint { text-align: center; color: #c8cfea; font-size: .88rem; margin: 0; }
/* Phones: the circle gets too crowded, so the five directions stack as a list */
@media (max-width: 700px) {
  .strategy-wheel { aspect-ratio: auto; width: 100%; }
  .strategy-ring, .strategy-core { display: none; }
  .strategy-nodes { position: static; display: grid; gap: 12px; }
  .strategy-node {
    position: static; transform: none; width: 100%;
    flex-direction: row; text-align: left; gap: 14px;
    background: var(--color-navy-soft); border-radius: var(--radius-sm); padding: 12px 14px;
    display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 14px;
  }
  .strategy-node .node-dot { width: 56px; margin: 0; grid-row: 1 / 3; }
  .strategy-node strong, .strategy-node small { background: none; padding: 0; }
  .strategy-node strong { align-self: end; }
  .strategy-node small { align-self: start; }
}

/* Working groups */
.wg-card { position: relative; }
.wg-card .card-media { position: relative; overflow: hidden; }
.wg-card .card-media img { aspect-ratio: 16/9; }
.wg-card .wg-num { position: absolute; top: 14px; left: 14px; width: 40px; height: 40px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; box-shadow: var(--shadow-sm); }
.wg-card .card-body { padding: 22px 24px 24px; }
.wg-card h3 { font-size: 1.15rem; }
.wg-card p { color: var(--color-text-muted); font-size: .93rem; }
.wg-card .text-link { margin-top: auto; padding-top: 8px; background: none; border: none; padding-left: 0; cursor: pointer; font: inherit; font-weight: 700; color: var(--color-primary); }
.cta-panel {
  margin-top: 36px; background: var(--color-navy); color: #fff; border-radius: var(--radius-lg);
  padding: 32px 38px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.cta-panel h3 { color: #fff; font-size: 1.4rem; margin: 0 0 6px; }
.cta-panel p { margin: 0; color: rgba(255,255,255,.85); max-width: 60ch; }

/* Modal (strategic directions, working groups, calls, document preview) */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,14,30,.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease);
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: #fff; border-radius: var(--radius-lg); width: min(100%, 680px); max-height: calc(100vh - 40px);
  overflow: auto; box-shadow: var(--shadow-lg); position: relative;
  transform: translateY(10px); transition: transform .2s var(--ease);
}
.modal.wide .modal-box { width: min(100%, 1000px); }
.modal.open .modal-box { transform: none; }
.modal-media img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.modal-content { padding: 30px 32px 32px; overflow-wrap: anywhere; }
.modal-content h2 { font-size: 1.6rem; margin-bottom: .4em; }
.modal-content p { margin: 0 0 1em; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); box-shadow: var(--shadow-md); font-size: 1.4rem; line-height: 1; color: var(--color-text);
}
.modal-close:hover { background: #fff; }
.modal-frame { width: 100%; height: min(75vh, 900px); border: none; display: block; background: #f1f3f6; }
.modal-pending { color: var(--color-text-muted); font-style: italic; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 18px; font-size: .93rem; }
.detail-list dt { font-weight: 700; }
.detail-list dd { margin: 0; color: var(--color-text-muted); }
body.modal-open { overflow: hidden; }

/* Calls & opportunities */
.calls-hero { background: var(--color-bg-soft); padding: 56px 0; }
.calls-hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.calls-hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.calls-hero .calls-lead { font-size: 1.15rem; margin: 0 0 14px; }
.calls-hero .calls-sub { color: var(--color-text-muted); margin: 0 0 24px; }
.calls-hero figure { margin: 0; position: relative; }
.calls-hero figure img { border-radius: var(--radius-lg); aspect-ratio: 5/3; object-fit: cover; width: 100%; box-shadow: var(--shadow-md); }
.calls-hero figcaption { position: absolute; left: 22px; bottom: 18px; background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: .88rem; box-shadow: var(--shadow-md); }
@media (max-width: 860px) { .calls-hero .container { grid-template-columns: 1fr; gap: 28px; } }
.notice-card {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 30px 34px;
}
.notice-card .notice-icon { width: 92px; height: 92px; border-radius: 50%; background: var(--color-accent-tint); color: var(--color-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notice-card .notice-icon svg { width: 44px; height: 44px; }
.notice-card .notice-body { flex: 1 1 300px; }
.notice-card h3 { font-size: 1.3rem; margin: 0 0 6px; }
.notice-card p { margin: 0; color: var(--color-text-muted); }
.featured-call { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px; align-items: stretch; }
.featured-call > img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; border-radius: var(--radius-lg); }
.featured-call .featured-body { background: var(--color-navy); color: #fff; border-radius: var(--radius-lg); padding: 34px 38px; display: flex; flex-direction: column; gap: 12px; }
.featured-call h3 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0; }
.featured-call .featured-meta { color: rgba(255,255,255,.85); margin: 0; }
.featured-call .featured-actions { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.featured-call .tag { background: var(--color-secondary); color: #fff; }
@media (max-width: 860px) { .featured-call { grid-template-columns: 1fr; } }
.call-card .call-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: .88rem; color: var(--color-text-muted); }
.call-card .call-meta li { display: flex; gap: 8px; align-items: flex-start; }
.call-card .call-meta svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--color-primary); }
.call-card .card-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar input {
  font: inherit; font-size: .9rem; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--color-border); background: #fff; color: var(--color-text);
}
.center { text-align: center; }

/* News & resources library */
.library { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.lib-filters { position: sticky; top: 110px; background: var(--color-bg-soft); border-radius: var(--radius); padding: 22px; display: grid; gap: 20px; }
.lib-filters h4 { font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.lib-search { position: relative; }
.lib-search input { width: 100%; font: inherit; padding: 10px 12px 10px 36px; border-radius: var(--radius-sm); border: 1px solid #cdd5e1; background: #fff; }
.lib-search svg { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--color-text-muted); }
.lib-check { display: flex; align-items: center; gap: 9px; font-size: .92rem; padding: 3px 0; cursor: pointer; }
.lib-check input { width: 16px; height: 16px; accent-color: var(--color-primary); }
.lib-check .count { margin-left: auto; color: var(--color-text-muted); font-size: .8rem; }
.lib-filters select { width: 100%; font: inherit; padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid #cdd5e1; background: #fff; }
.lib-results-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; color: var(--color-text-muted); font-size: .92rem; }
.lib-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.lib-card .doc-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--color-navy); }
.lib-card .doc-cover img { width: 100%; height: 100%; object-fit: cover; }
.lib-card .doc-cover .tag { position: absolute; left: 12px; top: 12px; background: #fff; color: var(--color-text); box-shadow: var(--shadow-sm); }
/* Standard cover for documents without their own image */
.doc-cover.standard { display: flex; align-items: center; justify-content: center; }
.doc-cover.standard .doc-sheet {
  width: 42%; aspect-ratio: 3/4; background: #fff; border-radius: 6px; box-shadow: 0 10px 24px rgba(0,0,0,.3);
  display: flex; flex-direction: column; padding: 10% 9%; gap: 6%; transform: translateY(8%);
}
.doc-cover.standard .doc-sheet img { width: 70%; height: auto; object-fit: contain; }
.doc-cover.standard .doc-sheet i { display: block; height: 5px; border-radius: 3px; background: #dfe4ec; }
.doc-cover.standard .doc-sheet i:nth-child(2) { width: 90%; background: var(--color-primary); opacity: .7; }
.doc-cover.standard .doc-sheet i:nth-child(3) { width: 60%; }
.doc-cover.standard .doc-sheet i:nth-child(4) { width: 80%; }
.doc-cover.cat-news { background: #1f5ea8; }
.doc-cover.cat-statement { background: var(--color-accent); }
.doc-cover.cat-advocacy { background: #3552b5; }
.doc-cover.cat-annualReport { background: var(--color-secondary); }
.doc-cover.cat-publication { background: var(--color-navy); }
.doc-cover.cat-learning { background: #7a4bb5; }
.lib-card .lib-meta { font-size: .82rem; color: var(--color-primary); font-weight: 600; margin: 0; }
.lib-card .doc-cover img.doc-thumb { height: 86%; aspect-ratio: 3/4; width: auto; object-fit: cover; border-radius: 4px; box-shadow: 0 10px 24px rgba(0,0,0,.3); transform: translateY(8%); }
.lib-card .card-foot { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .library { grid-template-columns: 1fr; }
  .lib-filters { position: static; }
}

/* Partners & funders */
.partner-card .partner-logo { height: 120px; display: flex; align-items: center; justify-content: center; padding: 18px 24px; border-bottom: 1px solid var(--color-border); background: #fff; }
.partner-card .partner-logo img { max-height: 84px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.partner-card p.text-muted { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.partner-card p.text-muted.expanded { -webkit-line-clamp: unset; }

/* Footer: darker green, per the client's request */
footer.site-footer {
  background: var(--color-green-deeper);
  color: #d3e6da;
  padding: 56px 0 24px;
  position: relative;
}
footer.site-footer::before {
  content: "";
  display: block;
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0 33.33%, var(--color-secondary) 33.33% 66.66%, var(--color-primary) 66.66% 100%);
}
footer.site-footer h4 { color: #fff; }
footer.site-footer a { color: #c4e0cf; }
footer.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; margin-bottom: 30px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); } }
.footer-logo { background: #fff; border-radius: var(--radius-sm); padding: 8px 12px; display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 54px; width: auto; }
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.footer-grid p { margin: 0 0 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  font-size: .85rem;
  font-weight: 600;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.social-links a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.45); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; font-size: .85rem; color: #9fc2ad; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.footer-bottom a { color: #9fc2ad; }

/* Europe member map. Base map: "Blank map of Europe (cropped)" by Maix /
   Tintazul, CC BY-SA 3.0, via Wikimedia Commons. Every country is its own
   SVG group, found by its ISO 3166-1 alpha-3 code (js/main.js). */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } }
.europe-map-wrap { position: relative; }
.europe-map-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: radial-gradient(ellipse at 50% 40%, #e6f1f8 0%, #d8e8f2 60%, #cbdfec 100%);
  touch-action: none;
  cursor: grab;
}
.europe-map-viewport.dragging { cursor: grabbing; }
.europe-map { width: 100%; height: auto; display: block; transform-origin: 0 0; will-change: transform; }
.europe-map .country { fill: var(--country-fill, #ddd6c6); transition: fill .15s var(--ease), filter .15s var(--ease); }
.europe-map .country path { fill: inherit; stroke: #fff; stroke-width: .6; } /* beats the map file's own per-region colours; lakes keep their inline white */
.europe-map .country:hover { filter: brightness(.94); }
.europe-map .member-country { --country-fill: var(--color-primary); cursor: pointer; }
.europe-map .member-country:hover { filter: brightness(1.18); }
.europe-map .selected-country { --country-fill: var(--color-accent); }
.map-controls { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.map-controls button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--color-border); background: var(--color-surface);
  font-size: 1.15rem; font-weight: 700; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-sm); color: var(--color-text);
}
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; font-size: .85rem; color: var(--color-text-muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.map-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }
.map-credit { font-size: .72rem; color: var(--color-text-muted); margin-top: 8px; }
.map-credit a { color: inherit; }
.map-panel { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 22px; }
.map-panel label { font-weight: 700; display: block; margin-bottom: 8px; }
.map-panel select { width: 100%; font: inherit; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid #cdd5e1; background: #fff; }
.map-panel h3 { margin: 18px 0 10px; font-size: 1.05rem; }
.map-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 340px; overflow: auto; }
.map-panel li a, .map-panel li span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--color-bg-soft); color: var(--color-text); font-weight: 600; font-size: .92rem; }
.map-panel li img { width: 44px; height: 30px; object-fit: contain; flex-shrink: 0; }
.map-panel li a:hover { background: var(--color-primary-tint); text-decoration: none; }
.map-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--color-navy); color: #fff; font-size: .82rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow-md); opacity: 0; transition: opacity .1s; max-width: 260px; }
.map-tip.show { opacity: 1; }

/* Lightbox: click any photo in a gallery to view it full-size. */
.lightbox-gallery img { cursor: zoom-in; transition: transform .2s var(--ease), filter .2s var(--ease); }
.lightbox-gallery img:hover { transform: scale(1.03); filter: brightness(1.05); }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,14,24,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); display: block; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.3rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.25); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.8); font-size: .82rem; font-weight: 600;
  background: rgba(255,255,255,.1); padding: 4px 12px; border-radius: 999px;
}
.gallery-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); margin-top: 22px; }
.gallery-grid img { border-radius: var(--radius-sm); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* Project detail page */
.project-hero img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius-lg); margin: 22px 0 10px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 18px; }
.back-link::before { content: "\2190"; transition: transform .15s var(--ease); }
.back-link:hover { text-decoration: none; }
.back-link:hover::before { transform: translateX(-3px); }
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.project-layout aside { background: var(--color-bg-soft); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; position: sticky; top: 110px; }
.project-layout aside h4 { font-family: var(--font-body); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-muted); margin: 0 0 2px; }
.project-layout aside p { margin: 0; font-weight: 600; }
.project-layout h2 { font-size: 1.35rem; margin-top: 1.4em; }
@media (max-width: 860px) { .project-layout { grid-template-columns: 1fr; } .project-layout aside { position: static; } }

/* Inline visual editor (logged-in admins only, js/inline-editor.js) */
#inline-editor-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 16px;
  z-index: 900;
  display: flex; align-items: center; gap: 10px;
  background: var(--color-navy); color: #fff;
  padding: 10px 16px; border-radius: 999px;
  box-shadow: var(--shadow-lg);
}
#inline-editor-bar .btn { padding: 8px 18px; font-size: .85rem; }
#inline-edit-status { font-size: .8rem; color: #cfd6e4; max-width: 240px; }
body.inline-editing [data-field]:not([data-render="items"]) {
  outline: 2px dashed var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
}
body.inline-editing [data-field]:not([data-render="items"]):focus {
  outline-color: var(--color-accent);
  background: var(--color-primary-tint);
  color: var(--color-text);
}
.inline-items-editor {
  display: block; width: 100%; margin-top: 10px;
  padding: 12px; font: inherit; font-size: .9rem;
  border: 2px dashed var(--color-accent); border-radius: var(--radius-sm);
  background: var(--color-accent-tint); color: var(--color-text);
}

/* Utility */
.mt-0 { margin-top: 0; }
.text-muted { color: var(--color-text-muted); }
.text-justify { text-align: justify; text-justify: inter-word; hyphens: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
