/* ======================================
   Virtual Workgroups — site.css
   Unified, mobile-first stylesheet
   ====================================== */

/* --- Custom Properties --- */
:root {
  color-scheme: light dark;
  --color-bg: #f0f2f0;
  --color-dark: #1a1a1a;
  --color-accent: #2d7a2d;
  --color-accent-light: #4caf50;
  --color-nav-bg: #2c2c2c;
  --color-nav-text: #f0f0f0;
  --color-card-bg: #ffffff;
  --color-text: #222;
  --color-text-muted: #666;
  --color-border: #ddd;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.18);
  --transition: 0.25s ease;
  --max-width: 1200px;
  --header-height: 100px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* All images are responsive by default */
img { max-width: 100%; height: auto; display: block; }

/* ===========================
   STANDARDISED IMAGE SIZES
   =========================== */

/* Content / worddoc images — constrained width, auto height */
.worddoc img {
  max-width: 100%;
  height: auto !important;
  width: auto !important;
  border-radius: var(--radius);
  display: block;
  margin: 16px 0;
}

/* Side-by-side inline images (e.g. diy pages) */
.worddoc p img,
.worddoc h2 img,
.worddoc h3 img {
  display: inline-block;
  max-width: 48%;
  height: auto !important;
  width: auto !important;
  vertical-align: top;
  margin: 6px 1%;
  border-radius: var(--radius);
}

/* Three or more inline images shrink to thirds */
.worddoc h3 img:nth-of-type(3) ~ img,
.worddoc h3 img:nth-of-type(3) {
  max-width: 31%;
}

/* Archive section standalone images */
.archive-section img {
  max-width: 100%;
  height: auto !important;
  width: auto !important;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius);
  margin: 12px 0;
}
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-light); }

/* --- Ticker (homepage) --- */
/* Items are duplicated by JS so translateX(-50%) = exactly one set, seamless loop */
.tcontainer { width: 100%; }
.ticker-wrap {
  width: 100%;
  background: linear-gradient(90deg, #1a5c1a, var(--color-accent), #1a5c1a);
  display: flex;
  align-items: stretch;
}
.ticker-label {
  background: #c0392b;
  color: white;
  padding: 0 20px;
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  padding-right: 28px;
}
.ticker-overflow {
  overflow: hidden;
  flex: 1;
}
.ticker-move {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 35s linear infinite;
  padding-left: 2rem;
}
.ticker-move:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-block;
  padding: 10px 0;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  color: white;
  font-family: 'Arial Black', sans-serif;
}
.ticker-item::after {
  content: '\25C6';
  padding: 0 1.5rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.55rem;
  vertical-align: middle;
}
.ticker-amount {
  color: #ffd700;
  font-weight: 900;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==============================
   INDEX PAGE — Dark mysterious single viewport
   ============================== */
html:has(body.index-page) { overflow-x: auto; overflow-y: auto; }
body.index-page {
  min-height: 100vh;
  overflow-x: auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #07090a;
}
/* Dot-grid pattern overlay */
body.index-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(61,186,61,0.11) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}
body.index-page > * { position: relative; z-index: 1; }

/* Header blends into dark theme on index */
body.index-page .site-header { background: #050805; border-bottom: 1px solid rgba(61,186,61,0.12); }

.index-screen {
  flex: 1;
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 0;
}

/* ---- Left panel ---- */
.index-panel-left {
  background: linear-gradient(160deg, #080e08 0%, #050905 100%);
  color: white;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  border-right: 1px solid rgba(61,186,61,0.16);
  position: relative;
}
/* Ambient glow top-left */
.index-panel-left::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(45,122,45,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Value proposition */
.index-vp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.58rem;
  letter-spacing: 3px;
  color: #3dba3d;
  border: 1px solid rgba(61,186,61,0.3);
  padding: 4px 10px;
  border-radius: 2px;
  text-transform: uppercase;
  width: fit-content;
}
.index-vp-headline {
  font-family: 'Arial Black', sans-serif;
  font-size: 2rem;
  line-height: 1.1;
}
.index-vp-headline span {
  display: block;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  color: #e8f0e8;
}
.index-vp-headline span:nth-child(1) { animation: lineReveal 0.5s cubic-bezier(0.16,1,0.3,1) 0.3s forwards; }
.index-vp-headline span:nth-child(2) { animation: lineReveal 0.5s cubic-bezier(0.16,1,0.3,1) 0.7s forwards; }
.index-vp-headline span:nth-child(3) { animation: lineReveal 0.5s cubic-bezier(0.16,1,0.3,1) 1.1s forwards; color: #3dba3d; text-shadow: 0 0 30px rgba(61,186,61,0.4); }
@keyframes lineReveal {
  to { clip-path: inset(0 0% 0 0); }
}
.index-vp-body {
  font-size: 0.81rem;
  color: #6a8a6a;
  line-height: 1.7;
}
@keyframes cta-glow-pulse {
  0%,100% { text-shadow: 0 0 6px rgba(61,186,61,0.4); color: #3dba3d; }
  50%      { text-shadow: 0 0 18px rgba(61,186,61,0.9), 0 0 32px rgba(61,186,61,0.4); color: #80ff80; }
}
@keyframes underline-scan {
  0%   { transform: scaleX(0); transform-origin: left; }
  50%  { transform: scaleX(1); transform-origin: left; }
  50.01% { transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
.index-vp-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3dba3d;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 3px;
  animation: cta-glow-pulse 2.4s ease-in-out infinite;
  transition: gap 0.2s;
}
.index-vp-cta::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: #3dba3d;
  box-shadow: 0 0 6px rgba(61,186,61,0.8);
  animation: underline-scan 2.4s ease-in-out infinite;
}
.index-vp-cta:hover {
  color: #b0ffb0;
  gap: 9px;
  animation: none;
  text-shadow: 0 0 20px rgba(61,186,61,0.9);
}
.index-vp-cta:hover::after { transform: scaleX(1); animation: none; }

/* Stats */
.index-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.index-stat {
  background: rgba(61,186,61,0.05);
  border: 1px solid rgba(61,186,61,0.16);
  border-radius: var(--radius);
  padding: 10px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.2s, border-color 0.2s;
}
.index-stat:hover { background: rgba(61,186,61,0.1); border-color: rgba(61,186,61,0.35); }
.index-stat-num {
  font-size: 1.55rem;
  font-weight: 900;
  color: #3dba3d;
  text-shadow: 0 0 16px rgba(61,186,61,0.45);
}
.index-stat-label {
  font-size: 0.58rem;
  color: #3a5a3a;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* Buttons — override outline for dark bg */
body.index-page .btn-outline {
  border-color: rgba(61,186,61,0.4);
  color: #3dba3d;
}
body.index-page .btn-outline:hover { background: rgba(61,186,61,0.12); color: #80ff80; }

/* Partners */
.index-partners-mini { margin-top: auto; }
.index-partners-label {
  display: block;
  font-size: 0.57rem;
  color: #2e462e;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 7px;
}
.index-partner-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.index-partner-chips span {
  font-size: 0.64rem;
  padding: 3px 8px;
  background: rgba(61,186,61,0.04);
  border: 1px solid rgba(61,186,61,0.13);
  border-radius: 20px;
  color: #4a6a4a;
  transition: color 0.2s, border-color 0.2s;
}
.index-partner-chips span:hover { color: #9dca9d; border-color: rgba(61,186,61,0.35); }

/* ---- Right panel ---- */
.index-panel-right {
  background: #060a06;
  padding: 18px 14px 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
}
.index-projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.index-projects-header h2 {
  font-family: 'Arial Black', sans-serif;
  font-size: 0.72rem;
  color: #3a5a3a;
  text-transform: uppercase;
  letter-spacing: 2.5px;
}
.index-cards-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: visible;
}
body.index-page .index-cards-grid .project-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #0b0f0b;
  border: 1px solid rgba(61,186,61,0.13);
  border-radius: var(--radius);
  box-shadow: none;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
body.index-page .index-cards-grid .project-card:hover {
  border-color: rgba(61,186,61,0.42);
  box-shadow: 0 0 22px rgba(61,186,61,0.12);
  transform: translateY(-2px);
}
body.index-page .index-cards-grid .project-card-img {
  height: 55px;
  flex-shrink: 0;
  background: #080c08;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
body.index-page .index-cards-grid .project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 6px;
  filter: brightness(0.85) saturate(0.8);
  transition: filter 0.25s;
}
body.index-page .index-cards-grid .project-card:hover .project-card-img img { filter: brightness(1.05) saturate(1); }
body.index-page .index-cards-grid .project-card-body {
  flex: 1;
  min-height: 0;
  padding: 6px 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
body.index-page .index-cards-grid .project-card-body h3 { font-size: 0.78rem; color: #7a9a7a; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.index-page .index-cards-grid .card-link { color: #3dba3d; font-size: 0.7rem; }
body.index-page .index-cards-grid .card-link:hover { color: #80ff80; }
body.index-page .index-cards-grid .project-card-footer {
  border-top: none;
  border-bottom: 1px solid rgba(61,186,61,0.3);
  padding-top: 6px;
  padding-bottom: 6px;
  margin-bottom: 0;
}

/* ---- Expertise keyword cloud ---- */
@keyframes expertise-float {
  0%,100% { transform: translateY(0px); opacity: 0.55; }
  50%      { transform: translateY(-8px); opacity: 1; }
}
.expertise-cloud {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 4px 8px;
  align-items: flex-start;
  align-content: flex-start;
  border-top: 1px solid rgba(61,186,61,0.1);
}
.expertise-tag {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid rgba(61,186,61,0.25);
  border-radius: 20px;
  font-size: 0.65rem;
  font-family: 'Arial', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4daa4d;
  background: rgba(61,186,61,0.04);
  cursor: default;
  animation: expertise-float var(--t,7s) ease-in-out var(--d,0s) infinite;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.expertise-tag:hover {
  color: #a8ffa8;
  border-color: rgba(61,186,61,0.7);
  background: rgba(61,186,61,0.1);
  box-shadow: 0 0 14px rgba(61,186,61,0.25);
  animation-play-state: paused;
}

/* ---- Larger featured project tiles (computers and tablets) ----
   The keyword cloud below the tiles used to stretch to fill the rest of the
   right-hand column, leaving a large empty area above the footer. Here the
   tiles take that space instead: the grid grows to fill the column, both rows
   share the height equally, and each tile's picture grows to fill its tile.
   Phones (768px and narrower) are left as they were, because the page
   already scrolls there and has no empty area.
   This block must stay after the keyword cloud styles above, so that its
   settings win over theirs. */
@media (min-width: 769px) {
  .index-cards-grid {
    flex: 1 1 auto;                         /* grow to fill the spare height */
    grid-template-rows: repeat(2, 1fr);     /* two rows of equal height */
  }
  body.index-page .index-cards-grid .project-card-img {
    flex: 1 1 auto;                         /* picture area takes the tile's spare height */
    height: auto;
    min-height: 90px;                       /* never smaller than this */
    position: relative;                     /* lets the picture fill the area exactly */
  }
  body.index-page .index-cards-grid .project-card-img img {
    position: absolute;
    inset: 0;                               /* fill the picture area; object-fit: contain keeps the shape */
  }
  body.index-page .index-cards-grid .project-card-body { flex: 0 0 auto; }  /* text keeps its natural height */
  .expertise-cloud { flex: 0 0 auto; }      /* keyword cloud only as tall as its tags */
}

/* ---- Same-size featured project pictures (computers and tablets) ----
   Every tile picture is shown in a frame of the same size and shape as the
   Starlink engraving (1200 x 821), centred in its tile. Pictures of a
   different shape fill the frame and lose a little at the edges
   (object-fit: cover). The Innovation Centre picture is a wide text title,
   so it is shown whole instead (object-fit: contain), or words would be cut off.
   Must stay after the "Larger featured project tiles" block above. */
@media (min-width: 769px) {
  body.index-page .index-cards-grid .project-card-img img {
    inset: 0 auto 0 50%;                    /* full height, starting at the centre line */
    transform: translateX(-50%);            /* shift back by half its width, so it is centred */
    width: auto;
    height: 100%;
    max-width: 100%;                        /* never wider than the tile */
    aspect-ratio: 1200 / 821;               /* same shape as the Starlink engraving */
    object-fit: cover;                      /* fill the frame, trimming edges if needed */
  }
  body.index-page .index-cards-grid .project-card-img img[src$="innovationtitle.gif"] {
    object-fit: contain;                    /* text title: show it whole, never trimmed */
  }
}

/* ---- CTA panel ---- */
@keyframes cta-pulse {
  0%,100% { box-shadow: 0 0 10px rgba(61,186,61,0.15), inset 0 0 10px rgba(61,186,61,0.04); border-color: rgba(61,186,61,0.25); }
  50%      { box-shadow: 0 0 28px rgba(61,186,61,0.45), inset 0 0 18px rgba(61,186,61,0.08); border-color: rgba(61,186,61,0.65); }
}
.cta-panel {
  flex-shrink: 0;
  padding: 10px 4px 6px;
}
.cta-panel-inner {
  border: 1px solid rgba(61,186,61,0.25);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(61,186,61,0.04) 0%, rgba(0,0,0,0) 100%);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: cta-pulse 3.5s ease-in-out infinite;
}
.cta-panel-sub {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #3dba3d;
  margin: 0 0 4px;
}
.cta-panel-headline {
  font-family: 'Arial Black', sans-serif;
  font-size: 1.05rem;
  color: #c8e8c8;
  line-height: 1.2;
  margin: 0;
}
.cta-panel-btn {
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 9px 18px;
  white-space: nowrap;
}

/* ---- Compact footer bar ---- */
.index-footer-bar {
  background: #040604;
  border-top: 1px solid rgba(61,186,61,0.1);
  color: #2e462e;
  padding: 7px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  flex-shrink: 0;
  gap: 16px;
}
.index-footer-bar nav a { color: #3a5a3a; margin: 0 8px; font-size: 0.68rem; }
.index-footer-bar nav a:hover { color: #3dba3d; }
.index-footer-logos { display: flex; gap: 8px; align-items: center; }
.index-footer-logos img { height: 20px; width: auto; opacity: 0.25; filter: grayscale(1); }
body.index-page .back-to-top { display: none; }

/* --- Sticky Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-dark);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}
.header-logo img {
  height: 84px;
  width: auto;
  border-radius: 4px;
  object-fit: contain;
}
.header-logo .title-group h1 {
  font-size: 1.6rem;
  color: var(--color-accent-light);
  letter-spacing: 1px;
  line-height: 1.1;
  font-family: 'Arial Black', sans-serif;
}
.header-logo .title-group .subtitle {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 3px;
}
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid #666;
  color: white;
  font-size: 1.3rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  line-height: 1;
}
.nav-toggle:hover { border-color: var(--color-accent-light); color: var(--color-accent-light); }

/* --- Navigation --- */
.site-nav {
  background-color: var(--color-nav-bg);
  border-bottom: 3px solid var(--color-accent);
}
.site-nav ul {
  list-style: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  gap: 0;
}
.site-nav ul li a {
  display: block;
  padding: 12px 18px;
  color: var(--color-nav-text);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  margin-bottom: -3px;
}
.site-nav ul li a:hover,
.site-nav ul li a.active {
  color: var(--color-accent-light);
  border-bottom-color: var(--color-accent-light);
  background: rgba(255,255,255,0.04);
}

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max-width);
  margin: 14px auto 0;
  padding: 0 20px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.breadcrumb a { color: var(--color-accent); }
.breadcrumb span { margin: 0 6px; color: #bbb; }

/* --- Page Wrapper --- */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto 0;
  padding: 24px 20px;
}
.page-bg {
  background: url('../images/bit2.JPG') repeat;
  padding: 24px 20px;
}
.page-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --- Section Title Banner --- */
.section-banner {
  background: rgba(26,26,26,0.85);
  color: white;
  padding: 18px 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border-left: 5px solid var(--color-accent-light);
}
.section-banner h1, .section-banner h2 {
  margin: 0;
  font-size: 1.7rem;
  font-family: 'Arial Black', sans-serif;
  letter-spacing: 1px;
}

/* ===========================
   HERO SECTION (homepage)
   =========================== */
.hero {
  background: linear-gradient(135deg, #0d1f0d 0%, #1a3d1a 60%, #0a1a0a 100%);
  color: white;
  padding: 90px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/bit2.JPG') repeat;
  opacity: 0.08;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--color-accent-light);
  margin-bottom: 20px;
  line-height: 1.2;
  font-family: 'Arial Black', sans-serif;
}
.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #ccc;
  margin-bottom: 38px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-family: 'Segoe UI', sans-serif;
}
.btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 14px rgba(45,122,45,0.3);
}
.btn-primary:hover {
  background: var(--color-accent-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}
.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover {
  background: white;
  color: var(--color-dark);
  transform: translateY(-2px);
  border-color: white;
}
.btn-sm {
  padding: 8px 20px;
  font-size: 0.82rem;
}

/* ===========================
   STATS BAR
   =========================== */
.stats-bar {
  background: var(--color-dark);
  color: white;
  padding: 35px 20px;
}
.stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-item .stat-number {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--color-accent-light);
  line-height: 1;
  font-family: 'Arial Black', sans-serif;
}
.stat-item .stat-label {
  font-size: 0.82rem;
  color: #999;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ===========================
   PROJECT CARDS
   =========================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 10px;
}
.project-card {
  background: var(--color-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.project-card-img {
  height: 185px;
  overflow: hidden;
  background: #e8f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.45s ease;
}
.project-card:hover .project-card-img img { transform: scale(1.06); }
.project-card-img .card-icon {
  font-size: 3.5rem;
  opacity: 0.5;
}
.card-img-link {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.project-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-card-body h3 {
  font-size: 1.15rem;
  color: var(--color-dark);
  margin-bottom: 8px;
  font-family: 'Arial Black', sans-serif;
}
.project-card-body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.6;
}
.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 50px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-completed { background: #e8f5e9; color: #2e7d32; }
.badge-active    { background: #e3f2fd; color: #1565c0; }
.badge-new       { background: #fff8e1; color: #e65100; }
.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-link::after { content: ' →'; }
.card-link:hover { color: var(--color-accent-light); }

/* ===========================
   FILTER TABS
   =========================== */
.filter-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 24px;
}
.filter-tab {
  padding: 8px 22px;
  border-radius: 50px;
  border: 2px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Segoe UI', sans-serif;
}
.filter-tab:hover, .filter-tab.active {
  background: var(--color-accent);
  color: white;
}

/* ===========================
   TEAM CARDS
   =========================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
  margin-top: 10px;
}
.team-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.team-card-img {
  height: 210px;
  overflow: hidden;
  background: #ddeedd;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-card-img .no-photo {
  font-size: 5rem;
  opacity: 0.4;
}
.team-card-body { padding: 22px; }
.team-card-body h3 {
  font-size: 1.1rem;
  color: var(--color-dark);
  margin-bottom: 4px;
  font-family: 'Arial Black', sans-serif;
}
.team-card-body .role {
  font-size: 0.82rem;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.team-card-body p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}
.team-memorial {
  background: #fdf2f2;
  border-left: 4px solid #c0392b;
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 12px;
  font-size: 0.83rem;
  color: #922b21;
  font-style: italic;
  line-height: 1.5;
}

/* ===========================
   NEWS CARDS
   =========================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 10px;
}
.news-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 4px solid var(--color-accent);
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.news-date { font-size: 0.8rem; color: var(--color-text-muted); }
.news-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag-funding { background: #e8f5e9; color: #2e7d32; }
.tag-project { background: #e3f2fd; color: #1565c0; }
.tag-tech    { background: #fce4ec; color: #c62828; }
.tag-general { background: #f3e5f5; color: #6a1b9a; }
.news-card h3 { font-size: 1.05rem; color: var(--color-dark); margin-bottom: 10px; font-family: 'Arial Black', sans-serif; }
.news-card p { font-size: 0.9rem; color: var(--color-text-muted); flex: 1; line-height: 1.6; }
.news-card-link { margin-top: 16px; font-size: 0.85rem; font-weight: 700; }

/* ===========================
   CONTACT PAGE
   =========================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 10px;
}
.contact-info, .contact-form-wrap {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}
.contact-info h2, .contact-form-wrap h2 {
  color: var(--color-accent);
  margin-bottom: 22px;
  font-size: 1.25rem;
  font-family: 'Arial Black', sans-serif;
  border-bottom: 2px solid #eee;
  padding-bottom: 12px;
}
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.contact-detail .icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.contact-detail .text { font-size: 0.95rem; color: var(--color-text); line-height: 1.6; }
.contact-detail .text strong { display: block; color: var(--color-dark); margin-bottom: 2px; }
.contact-detail .text a { color: var(--color-accent); font-weight: 600; }
.map-wrap { margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); }
.map-wrap iframe { width: 100%; border: none; display: block; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-dark);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--color-text);
  background: #fafafa;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(45,122,45,0.12);
  background: white;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-submit-btn {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
}
.form-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius);
  padding: 16px;
  color: #2e7d32;
  display: none;
  margin-top: 16px;
  text-align: center;
  font-weight: 600;
}
.form-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 10px;
  text-align: center;
}

/* ===========================
   PARTNERS / CLIENTS STRIP
   =========================== */
.partners-section {
  background: white;
  padding: 50px 20px;
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.partners-section .section-label {
  color: #999;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 30px;
  font-weight: 700;
}
.partners-logos {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.partner-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  color: #888;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 140px;
  transition: all var(--transition);
}
.partner-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: #f0f8f0;
}

/* ===========================
   DIY / WORD-DOC STYLE PAGE
   =========================== */
.worddoc {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 35px 40px;
  color: var(--color-text);
}
.worddoc h1, .worddoc h2 { color: var(--color-accent); margin-bottom: 14px; }
.worddoc h3 { color: #333; margin: 18px 0 10px; }
.worddoc p, .worddoc li { color: #444; line-height: 1.7; margin-bottom: 10px; }
.worddoc ol, .worddoc ul { padding-left: 24px; margin-bottom: 14px; }
.worddoc blockquote {
  background: #f5f9f5;
  border-left: 4px solid var(--color-accent);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
}
.worddoc a { color: var(--color-accent); font-weight: 600; }
.worddoc a:hover { color: var(--color-accent-light); }

/* ===========================
   ARCHIVE PAGE
   =========================== */
.archive-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
  border-left: 5px solid var(--color-accent);
}
.archive-section h2 {
  color: var(--color-accent);
  font-family: 'Arial Black', sans-serif;
  margin-bottom: 10px;
}
.archive-section .archive-meta {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  font-weight: 600;
}
.archive-section p { color: #555; line-height: 1.7; margin-bottom: 8px; }
.archive-section ul { padding-left: 22px; color: #555; }
.archive-section ul li { margin-bottom: 6px; line-height: 1.6; }

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--color-dark);
  color: #bbb;
  padding: 45px 20px 20px;
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 35px;
}
.footer-col h4 {
  color: var(--color-accent-light);
  font-size: 0.9rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: 'Arial Black', sans-serif;
}
.footer-col p { font-size: 0.87rem; color: #aaa; line-height: 1.8; }
.footer-col a { font-size: 0.87rem; color: #aaa; line-height: 1.8; display: block; padding: 2px 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--color-accent-light); }
.footer-col .footer-brand h3 { color: var(--color-accent-light); font-size: 1.1rem; margin-bottom: 8px; font-family: 'Arial Black', sans-serif; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid #2a2a2a;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}
.footer-bottom p { font-size: 0.8rem; color: #666; }
.footer-logos { display: flex; gap: 16px; align-items: center; }
.footer-logos img { height: 36px; width: auto; opacity: 0.6; filter: grayscale(40%); transition: opacity var(--transition); }
.footer-logos img:hover { opacity: 1; filter: none; }

/* ===========================
   BACK TO TOP BUTTON
   =========================== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-accent-light); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

/* ===========================
   DARK THEME — All non-index pages
   =========================== */
body:not(.index-page) {
  --color-bg: #080e08;
  --color-card-bg: #0d150d;
  --color-text: #b8cbb8;
  --color-text-muted: #6a8a6a;
  --color-border: rgba(61,186,61,0.15);
  background: #080e08;
  color: #b8cbb8;
}
/* Subtle dot-grid overlay */
body:not(.index-page)::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(61,186,61,0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}
body:not(.index-page) > * { position: relative; z-index: 1; }

/* Page background — remove texture, use transparent so dot-grid shows */
body:not(.index-page) .page-bg { background: transparent; }

/* Breadcrumb */
body:not(.index-page) .breadcrumb { color: #4a6a4a; }
body:not(.index-page) .breadcrumb span { color: #3a5a3a; }

/* Section banner */
body:not(.index-page) .section-banner {
  background: rgba(8,18,8,0.9);
  border-left-color: #3dba3d;
}

/* Project cards */
body:not(.index-page) .project-card {
  background: #0d150d;
  border: 1px solid rgba(61,186,61,0.15);
  box-shadow: none;
}
body:not(.index-page) .project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 28px rgba(61,186,61,0.14);
  border-color: rgba(61,186,61,0.38);
}
body:not(.index-page) .project-card-img { background: #060c06; }
body:not(.index-page) .project-card-body h3 { color: #8ab88a; }
body:not(.index-page) .project-card-body p { color: #5a7a5a; }
body:not(.index-page) .project-card-footer { border-bottom-color: rgba(61,186,61,0.12); }

/* Badges — dark variants */
body:not(.index-page) .badge-completed { background: rgba(46,125,50,0.15); color: #4dba4d; }
body:not(.index-page) .badge-active    { background: rgba(21,101,192,0.15); color: #5aafff; }
body:not(.index-page) .badge-new       { background: rgba(230,81,0,0.15);   color: #ff8c42; }

/* Filter tabs */
body:not(.index-page) .filter-tab { color: #3dba3d; border-color: rgba(61,186,61,0.35); }
body:not(.index-page) .filter-tab:hover,
body:not(.index-page) .filter-tab.active { background: #2d7a2d; color: white; border-color: #2d7a2d; }

/* Team cards */
body:not(.index-page) .team-card {
  background: #0d150d;
  border: 1px solid rgba(61,186,61,0.15);
  box-shadow: none;
}
body:not(.index-page) .team-card:hover {
  box-shadow: 0 0 28px rgba(61,186,61,0.14);
  border-color: rgba(61,186,61,0.38);
}
body:not(.index-page) .team-card-img { background: #060c06; }
body:not(.index-page) .team-card-body h3 { color: #8ab88a; }
body:not(.index-page) .team-card-body p { color: #5a7a5a; }
body:not(.index-page) .team-memorial {
  background: rgba(192,57,43,0.1);
  border-left-color: #c0392b;
  color: #d88;
}

/* News cards */
body:not(.index-page) .news-card {
  background: #0d150d;
  border: 1px solid rgba(61,186,61,0.15);
  border-top: 4px solid #3dba3d;
  box-shadow: none;
}
body:not(.index-page) .news-card:hover {
  box-shadow: 0 0 28px rgba(61,186,61,0.14);
  border-color: rgba(61,186,61,0.38);
  border-top-color: #3dba3d;
}
body:not(.index-page) .news-card h3 { color: #8ab88a; }
body:not(.index-page) .news-card p  { color: #5a7a5a; }
body:not(.index-page) .news-date    { color: #4a6a4a; }

/* News tags — dark variants */
body:not(.index-page) .tag-funding { background: rgba(46,125,50,0.15);  color: #4dba4d; }
body:not(.index-page) .tag-project { background: rgba(21,101,192,0.15); color: #5aafff; }
body:not(.index-page) .tag-tech    { background: rgba(198,40,40,0.15);  color: #ff6b6b; }
body:not(.index-page) .tag-general { background: rgba(106,27,154,0.15); color: #c77dff; }

/* Contact panels */
body:not(.index-page) .contact-info,
body:not(.index-page) .contact-form-wrap {
  background: #0d150d;
  border: 1px solid rgba(61,186,61,0.15);
  box-shadow: none;
}
body:not(.index-page) .contact-info h2,
body:not(.index-page) .contact-form-wrap h2 { border-bottom-color: rgba(61,186,61,0.15); }
body:not(.index-page) .contact-detail .text { color: #7a9a7a; }
body:not(.index-page) .contact-detail .text strong { color: #9aba9a; }
body:not(.index-page) .map-wrap { border-color: rgba(61,186,61,0.15); }

/* Forms */
body:not(.index-page) .form-group label { color: #7a9a7a; }
body:not(.index-page) .form-group input,
body:not(.index-page) .form-group textarea,
body:not(.index-page) .form-group select {
  background: #080e08;
  border-color: rgba(61,186,61,0.2);
  color: #b8cbb8;
}
body:not(.index-page) .form-group input::placeholder,
body:not(.index-page) .form-group textarea::placeholder { color: #3a5a3a; }
body:not(.index-page) .form-group input:focus,
body:not(.index-page) .form-group textarea:focus,
body:not(.index-page) .form-group select:focus {
  background: #0a120a;
  border-color: #3dba3d;
  box-shadow: 0 0 0 3px rgba(61,186,61,0.1);
}
body:not(.index-page) .form-success {
  background: rgba(61,186,61,0.08);
  border-color: rgba(61,186,61,0.3);
  color: #4dba4d;
}
body:not(.index-page) .form-note { color: #4a6a4a; }

/* Partners / clients strip */
body:not(.index-page) .partners-section {
  background: #060c06;
  border-top-color: rgba(61,186,61,0.1);
}
body:not(.index-page) .partners-section .section-label { color: #3a5a3a; }
body:not(.index-page) .partner-chip {
  border-color: rgba(61,186,61,0.2);
  color: #4a7a4a;
}
body:not(.index-page) .partner-chip:hover {
  border-color: #3dba3d;
  color: #3dba3d;
  background: rgba(61,186,61,0.05);
}

/* Word-doc style content pages */
body:not(.index-page) .worddoc {
  background: #0a120a;
  border: 1px solid rgba(61,186,61,0.12);
  box-shadow: none;
  color: #9ab89a;
}
body:not(.index-page) .worddoc h3 { color: #7aaa7a; }
body:not(.index-page) .worddoc p,
body:not(.index-page) .worddoc li { color: #8aaa8a; }
body:not(.index-page) .worddoc blockquote {
  background: rgba(61,186,61,0.05);
  border-left-color: #3dba3d;
}

/* Archive sections */
body:not(.index-page) .archive-section {
  background: #0a120a;
  border: 1px solid rgba(61,186,61,0.12);
  border-left: 5px solid #3dba3d;
  box-shadow: none;
}
body:not(.index-page) .archive-section p,
body:not(.index-page) .archive-section ul { color: #7a9a7a; }

/* Stats bar (inner pages) */
body:not(.index-page) .stats-bar { background: #050d05; }

/* Outline button on dark bg */
body:not(.index-page) .btn-outline {
  border-color: rgba(61,186,61,0.4);
  color: #3dba3d;
}
body:not(.index-page) .btn-outline:hover {
  background: rgba(61,186,61,0.12);
  color: #80ff80;
  border-color: #3dba3d;
}

/* ===========================
   UPDATES / NEWSLETTER CTA
   =========================== */
.updates-cta {
  margin-top: 40px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(61,186,61,0.2);
  border-radius: var(--radius);
  padding: 36px 30px;
  text-align: center;
}
.updates-cta-title {
  color: var(--color-accent-light);
  font-family: 'Arial Black', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.updates-cta-body {
  color: #9ab89a;
  max-width: 460px;
  margin: 0 auto 22px;
  line-height: 1.7;
  font-size: 0.95rem;
}
.updates-fields {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}
.updates-fields input {
  flex: 1;
  min-width: 180px;
  padding: 11px 14px;
  border: 2px solid rgba(61,186,61,0.25);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #080e08;
  color: #b8cbb8;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.updates-fields input::placeholder { color: #3a5a3a; }
.updates-fields input:focus {
  outline: none;
  border-color: #3dba3d;
  box-shadow: 0 0 0 3px rgba(61,186,61,0.1);
}
.updates-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #4dba4d;
  min-height: 1.2em;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 25px; }
  .index-screen { grid-template-columns: 280px 1fr; }
}

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .index-screen { grid-template-columns: 240px 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 65px; }

  .header-logo img { height: 54px; }
  .header-logo .title-group h1 { font-size: 1.15rem; }
  .header-logo .title-group .subtitle { display: none; }

  .nav-toggle { display: flex; align-items: center; justify-content: center; }

  .site-nav { display: none; border-bottom: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0; }
  .site-nav ul li a {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    border-left: 4px solid transparent;
    margin-bottom: 0;
    font-size: 0.95rem;
  }
  .site-nav ul li a.active,
  .site-nav ul li a:hover {
    border-left-color: var(--color-accent-light);
    border-bottom-color: #333;
  }

  .hero { padding: 55px 20px; }
  .hero-content h1 { font-size: 2rem; }

  .index-screen { grid-template-columns: 1fr; }
  .index-panel-left { overflow: visible; border-right: none; border-bottom: 1px solid rgba(61,186,61,0.16); }
  .index-cards-grid { grid-template-columns: repeat(2, 1fr); }

  .projects-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }

  .worddoc { padding: 24px 20px; }
}

/* ---- Home page fit on phones (768px and narrower) ----
   Two parts of the home page were wider than a phone screen, so the
   featured project tiles (and their "Learn more" links) were cut off at the
   right edge and the page could slide sideways:
   - the "Have an idea?" panel kept its text and button side by side, which
     stretched the whole right-hand column past the screen edge;
   - the footer bar kept everything on one line, so its last logo stuck out.
   Here the right-hand column is allowed to be narrower than its content,
   the panel stacks its text above the button, and the footer wraps.
   Computers and tablets are not affected. */
@media (max-width: 768px) {
  .index-panel-right { min-width: 0; }      /* column may shrink to the screen width */
  .cta-panel-inner {
    flex-direction: column;                 /* text above the "Get in Touch" button */
    align-items: flex-start;
    gap: 12px;
  }
  .index-footer-bar {
    flex-wrap: wrap;                        /* copyright, links and logos wrap onto extra lines */
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 15px; }
  .stat-item .stat-number { font-size: 2rem; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
  .filter-tabs { justify-content: center; }
  .partners-logos { gap: 10px; }
  .partner-chip { min-width: 110px; font-size: 0.8rem; padding: 8px 14px; }
  .index-cards-grid { grid-template-columns: 1fr; }
  .index-stats { grid-template-columns: 1fr 1fr; }
}
