/* ==========================================================================
   PPDCL Biogas Plant — Gujjar Colony, Lahore
   Single stylesheet per project tech-stack rules (see CLAUDE.md)
   ========================================================================== */

/* ---- Design Tokens ---- */
:root {
  --color-primary: #005C4E;      /* teal-green */
  --color-primary-dark: #00473c;
  --color-accent: #2E7D32;       /* biogas / nature green */
  /* Deep Pakistan-flag green. Replaces the previous navy (#1a3c6e) as the
     site's dark anchor tone — footer, counter strip, CTA gradients, a11y
     button. Kept clearly darker and cooler than --color-primary so the
     green-on-green gradients still read as two distinct tones rather than
     a flat block. */
  --color-forest: #0B3D2E;
  --color-forest-deep: #072A20;  /* darkest step, for gradient depth */
  --color-gold: #F5A623;         /* accent for badges/highlights */
  --color-white: #FFFFFF;
  /* Pastel-green page canvas — the site reads as a green initiative even in
     the empty space between bands. Cards, the header and the nav stay
     --color-white so they still lift off the page. --color-light is the
     alternating band, one step deeper than the canvas so `.section--light`
     remains visibly distinct from an unclassed section. */
  --color-page: #EDF6EE;
  --color-light: #DCEDDF;
  --color-text: #1c2b28;
  --color-text-muted: #57645f;
  --color-border: #e1e6e4;
  --color-placeholder-bg: #fff8ec;
  --color-placeholder-border: #F5A623;

  --font-en: 'Inter', Arial, sans-serif;
  --font-ur: 'Noto Nastaliq Urdu', serif;

  /* Layout scale. Kept in rem so page geometry scales with the root
     font-size — the single lever the large-screen breakpoints pull (see
     "Very Large Screens" at the foot of this file). At the 16px base these
     resolve to exactly the original 1180px / 78px, so nothing below
     1600px viewport width changes. */
  --container-width: 73.75rem;   /* 1180px @16px */
  --radius: 0.625rem;            /* 10px @16px */
  --shadow: 0 4px 18px rgba(0, 40, 30, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 40, 30, 0.16);

  --header-height: 4.875rem;     /* 78px @16px */
}

/* ---- Reset & Base ---- */
* { box-sizing: border-box; }
/* Root font-size is the scaling lever for the whole site (see "Very Large
   Screens" at the foot of this file). Deliberately a plain length, never
   calc(var(...)): when <html>'s own font-size depends on a custom property,
   Chromium keeps resolving it against the pre-stylesheet 16px default once
   the accessibility widget sets its multiplier inline, and no amount of
   forced recalculation clears it. The a11y multiplier is applied in
   applyFontStep() in js/main.js instead. */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-en);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-page);
  -webkit-font-smoothing: antialiased;
}

/* Faint fixed Government of Punjab seal watermark, visible through the site's
   light backgrounds, fading out on colored/dark bands and never behind opaque
   cards — content and readability are unaffected. */
.page-watermark {
  position: fixed;
  inset: 0;
  background-image: url('../assets/images/govt-seal.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(80vw, 62.5rem);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-primary);
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4rem 0; }
.section--tight { padding: 2.75rem 0; }
/* Kept semi-transparent so the fixed seal watermark still reads through it. */
.section--light { background: rgba(220, 237, 223, 0.94); }
.section--forest { background: linear-gradient(120deg, var(--color-forest) 0%, var(--color-primary) 100%); color: var(--color-white); }
.section--forest h2 { color: var(--color-white); }

/* Trailing flow content carries its own bottom margin, which stacks on top of
   the section padding and makes otherwise-identical sections look unevenly
   spaced. Reset it so every `.section` ends on the same 4rem gap. */
.section > .container > p:last-child,
.section > .container > ul:last-child,
.section > .container > ol:last-child { margin-bottom: 0; }

.section-heading { text-align: center; max-width: 45rem; margin: 0 auto 2.5rem; }
.section-heading p { margin: 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.625rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--color-gold); color: #1a1200; }
.btn--primary:hover { box-shadow: 0 10px 24px rgba(245, 166, 35, 0.4); }
.btn--outline { background: transparent; color: var(--color-white); border-color: rgba(255,255,255,0.7); }
.btn--outline:hover { background: rgba(255,255,255,0.12); }
.btn--solid { background: var(--color-primary); color: var(--color-white); }
.btn--solid:hover { box-shadow: 0 10px 24px rgba(0, 92, 78, 0.35); }
.btn--block { width: 100%; justify-content: center; }

/* ---- Placeholder marker (Developer Rule #4) ---- */
.placeholder {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  background: var(--color-placeholder-bg);
  border: 1px dashed var(--color-placeholder-border);
  border-radius: 0.375rem;
  color: #8a6100;
  font-size: 0.85em;
  font-style: italic;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--color-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: var(--header-height);
  gap: 1.25rem;
  /* Full-bleed: the brand sits against the page edge, not against the
     centred content column — the client asked for the logo aligned to the
     page. The padding scales with the viewport so the lockup keeps a
     sensible margin on a phone and on a 55" screen alike. */
  max-width: 100%;
  margin-inline: 0;
  padding: 0 clamp(1rem, 2.5vw, 2.5rem);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand-logo { height: 3rem; width: auto; }

.main-nav { justify-self: center; }
.main-nav ul { display: flex; gap: 0.25rem; align-items: center; }
/* .dropdown-toggle is styled identically to a nav link. The Projects menu has
   no landing page of its own — its three project pages are the only
   destinations — so its parent is a <button>, not a link to nowhere. Sharing
   the selector keeps the two visually indistinguishable in the bar. */
.main-nav a,
.main-nav .dropdown-toggle {
  display: block;
  /* A nav label must never break across two lines. The horizontal bar is
     only shown at widths where all six fit (see the 1199px collapse
     below), so this can't cause overflow. */
  white-space: nowrap;
  padding: 0.625rem 0.875rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav .dropdown-toggle {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: start;
}
.main-nav a:hover,
.main-nav a:focus,
.main-nav .dropdown-toggle:hover,
.main-nav .dropdown-toggle:focus { background: var(--color-light); color: var(--color-primary); }
.main-nav a.active,
.main-nav .dropdown-toggle.active { color: var(--color-primary); background: rgba(0,92,78,0.08); }

/* ---- Dropdown (Projects > the three project pages) ---- */
.main-nav li.has-dropdown { position: relative; }
.main-nav li.has-dropdown > .dropdown-toggle::after,
.main-nav li.has-dropdown > a::after {
  content: "\f107";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75em;
  margin-inline-start: 6px;
  opacity: 0.6;
}
.main-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 13.75rem;
  background: var(--color-white);
  border-radius: 0.625rem;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  z-index: 30;
  margin: 0.25rem 0 0;
}
.main-nav li.has-dropdown:hover > .dropdown-menu,
.main-nav li.has-dropdown:focus-within > .dropdown-menu {
  display: block;
}
.main-nav .dropdown-menu li { width: 100%; }
.main-nav .dropdown-menu a {
  padding: 0.625rem 0.75rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: 0.625rem; }

/* Registration call-to-action, sitting immediately before the language toggle.
   Trims .btn's padding/type down to header scale; everything else (gold fill,
   hover, focus) is inherited from .btn--primary so there is no new colour. */
.nav-cta {
  padding: 0.5rem 1.125rem;
  font-size: 0.85rem;
  white-space: nowrap;
  /* .btn's 0.5rem gap already separates the icon from the label; the icon
     carries no margin of its own or the two spacings compound. */
  gap: 0.4rem;
}

.lang-toggle {
  border: 1px solid var(--color-border);
  background: var(--color-white);
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-primary);
}
.lang-toggle:hover { background: var(--color-light); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.3125rem;
  background: none;
  border: none;
  padding: 0.5rem;
}
.nav-toggle span { width: 1.625rem; height: 0.1875rem; background: var(--color-primary); border-radius: 2px; transition: 0.2s; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  color: var(--color-white);
  background-color: var(--color-primary);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  /* Which part of the photo stays in frame when it's cropped to fill. Exposed
     as a variable so the hero image can be art-directed without touching this
     rule — e.g. set --hero-focus: 70% center on index.html to push a
     centre-framed plant toward the clear right side of the scrim. */
  background-position: var(--hero-focus, center);
  transition: transform 0.3s ease-out;
  will-change: transform;
  z-index: 0;
}

/* Directional scrim. The previous rule dimmed the WHOLE image evenly, which hid
   the plant behind the headline. This concentrates the darkness behind the text
   column on the left and clears toward the right, so the subject of the photo
   stays visible. Behind the text it is no darker than the old overlay was, so
   headline legibility/contrast is unchanged — only the photo side gets brighter. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0, 25, 20, 0.82) 0%,
    rgba(0, 25, 20, 0.72) 32%,
    rgba(0, 40, 30, 0.40) 56%,
    rgba(0, 45, 35, 0.12) 78%,
    rgba(0, 45, 35, 0.04) 100%
  );
  z-index: 1;
}
/* In Urdu the text column sits on the right, so the scrim has to follow it. */
html[dir="rtl"] .hero::before { transform: scaleX(-1); }

/* .hero-content is also a .container, which is margin:0 auto — so narrowing IT
   would centre the text block rather than keep it left. Constrain the children
   instead: each text element is capped so the copy stays in the scrim's dark
   zone. The container's own max-width is dropped here so the hero copy aligns
   to the PAGE edge (viewport gutter) rather than the centred content column —
   on wide screens the centred column would otherwise push the headline well
   inside the scrim's darkest area. padding-inline (not padding-left) so the
   Urdu RTL layout mirrors it automatically. */
.hero-content { position: relative; z-index: 2; max-width: none; padding-inline: 3rem; }
.hero-content .eyebrow,
.hero-content h1,
.hero-content .lede,
.hero-content .hero-actions { max-width: 33.75rem; }
.hero-content h1 { color: var(--color-white); }
.hero-content .lede { color: rgba(255,255,255,0.92); font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.875rem; margin-top: 1.5rem; }

.page-hero {
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
  color: var(--color-white);
  padding: 4.25rem 0 3.5rem;
  text-align: center;
}
.page-hero h1 { color: var(--color-white); margin-bottom: 0.625rem; }
.page-hero p { color: rgba(255,255,255,0.9); max-width: 42.5rem; margin: 0 auto; font-size: 1.05rem; }
.page-hero .eyebrow { color: var(--color-gold); }

/* ---- Highlight badges strip ---- */
.badge-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.125rem;
  margin-top: -2.875rem;
  position: relative;
  z-index: 3;
}
.badge-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.375rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border-top: 0.25rem solid var(--color-gold);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.badge-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0, 40, 30, 0.2); }
.badge-card i { font-size: 1.6rem; color: var(--color-primary); transition: transform 0.25s ease; }
.badge-card:hover i { transform: scale(1.15); }
.badge-card span { font-weight: 700; font-size: 0.95rem; color: var(--color-text); }

/* ==========================================================================
   Counter Strip
   ========================================================================== */
.counter-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  text-align: center;
}
/* Column-count modifiers. The base is a fixed 5-column grid, so a strip with a
   different number of items would otherwise leave phantom empty tracks. Kept as
   explicit modifiers rather than auto-fit: auto-fit interacts with the 991px and
   768px overrides at the foot of this file and would need the full width sweep
   re-verified. */
.counter-strip--3 { grid-template-columns: repeat(3, 1fr); }
.counter-strip--4 { grid-template-columns: repeat(4, 1fr); }
.counter-item .counter-value {
  font-size: clamp(1.15rem, 2.6vw, 2rem);
  font-weight: 800;
  color: var(--color-primary);
  display: block;
  white-space: nowrap;
}
.counter-item .counter-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
.section--forest .counter-value { color: var(--color-gold); }
.section--forest .counter-label { color: rgba(255,255,255,0.75); }

/* ==========================================================================
   Cards / Grids
   ========================================================================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 92, 78, 0.25);
}
.card i { font-size: 1.9rem; color: var(--color-accent); margin-bottom: 0.875rem; display: inline-block; transition: transform 0.25s ease; }
.card:hover i { transform: scale(1.15) rotate(-4deg); }
.card h3 { margin-bottom: 0.5rem; }

/* Collapsible card body — desktop-only density trick.
   Touch devices (the majority of traffic) get the card fully expanded, so the
   body copy and its Read More button are never hidden behind an interaction
   that has no hover to trigger it. Only fine-pointer devices collapse it, and
   there focus-within opens the card for keyboard users before the link inside
   can receive focus invisibly.

   The card is centred on both axes so the collapsed state is a heading sitting
   in the middle of the card rather than a heading stranded at the top. The
   0fr -> 1fr grid row animates the height without max-height guesswork and
   without any px — it needs exactly ONE grid child, hence .card-body-inner;
   a second child would land in an implicit auto row and never collapse. */
.card--collapse {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.card--collapse .card-body {
  display: grid;
  grid-template-rows: 1fr;
  width: 100%;
}
/* The heading's own bottom margin would push the collapsed group off-centre,
   so it moves inside the collapsing box as padding and disappears with it. */
.card--collapse h3 { margin-bottom: 0; }
/* Status tag stays outside the collapsing box — it must be readable without
   hovering (Developer Rule #4), so it sits with the heading in both states. */
.card--collapse > p { margin: 0.5rem 0 0; }
.card--collapse .card-body-inner {
  min-height: 0;
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card--collapse .card-body-inner p:last-child { margin-bottom: 0; }
/* Bullet lists keep their own left alignment inside the centred card — centred
   multi-line bullets are hard to scan, and `start` keeps Urdu RTL correct. */
.card--collapse .card-body-inner .icon-list {
  align-self: stretch;
  text-align: start;
  margin-bottom: 0;
}
.card--collapse .card-body-inner .icon-list li:last-child { margin-bottom: 0; }

/* The stock .btn--solid hover shadow is clipped by the collapsing wrapper's
   overflow and reads as a grey slab behind the button — swap it for a colour
   shift that stays inside the box. */
.card--collapse .btn--solid:hover {
  box-shadow: none;
  background: var(--color-accent);
}

@media (hover: hover) and (pointer: fine) {
  .card--collapse .card-body {
    grid-template-rows: 0fr;
    overflow: hidden;
    opacity: 0;
    transition: grid-template-rows 0.3s ease, opacity 0.3s ease;
  }
  .card--collapse:hover .card-body,
  .card--collapse:focus-within .card-body {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card--collapse .card-body { transition: none; }
}

.icon-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}
.icon-list i {
  color: var(--color-accent);
  background: rgba(46, 125, 50, 0.1);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Explicit bottom margin: inside a .card these bullets would otherwise pick
     up `.card i { margin-bottom: 0.875rem }` and float above their own text. */
  margin: 2px 0 0;
}
.card:hover .icon-list i { transform: none; }

/* ---- Tables ---- */
.data-table { width: 100%; border-collapse: collapse; background: var(--color-white); box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 1rem 1.125rem; border-bottom: 1px solid var(--color-border); }
.data-table th { background: var(--color-primary); color: var(--color-white); font-weight: 700; width: 38%; }
.data-table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ==========================================================================
   Process Steps (Technology page)
   ========================================================================== */
.process-illustration {
  max-width: 48.75rem;
  margin: 0 auto 2.5rem;
}
.process-illustration img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 30px rgba(0, 40, 30, 0.18));
}
.process-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  counter-reset: step;
}
.process-step {
  position: relative;
  text-align: center;
  padding: 0 0.875rem;
}
.process-step .step-circle {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 6px 16px rgba(0,92,78,0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.process-step:hover .step-circle {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 12px 24px rgba(245, 166, 35, 0.45);
  background: var(--color-gold);
  color: #1a1200;
}
.process-step::after {
  content: "";
  position: absolute;
  top: 2.125rem;
  left: calc(50% + 2.5rem);
  width: calc(100% - 5rem);
  height: 0.1875rem;
  background: repeating-linear-gradient(90deg, var(--color-gold) 0 0.625rem, transparent 0.625rem 1.125rem);
}
.process-step:last-child::after { display: none; }
.process-step h3 { font-size: 1.05rem; }
.process-step p { font-size: 0.9rem; }

/* ==========================================================================
   CTA Band
   ========================================================================== */
.cta-band {
  background: linear-gradient(120deg, var(--color-forest-deep), var(--color-forest) 45%, var(--color-primary));
  color: var(--color-white);
  text-align: center;
  padding: 3.5rem 0;
}
.cta-band h2 { color: var(--color-white); }
.cta-band p { color: rgba(255,255,255,0.88); max-width: 38.75rem; margin: 0 auto 1.5rem; }

/* ==========================================================================
   Announcement Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 20, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.25rem;
  /* A centring flex container clips its overflow at BOTH ends, so on a short
     viewport — a phone in landscape, or any desktop at high browser zoom,
     where 300% turns a 900px window into 300 CSS px — the box was hanging
     off the top with its close button unreachable and no way to scroll to
     it. Scrolling the overlay plus `margin: auto` on the box keeps the modal
     centred when it fits and scrollable from its true top when it doesn't. */
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--color-white);
  border-radius: 0.875rem;
  max-width: 32.5rem;
  width: 100%;
  margin: auto;
  padding: 2.25rem 2rem 1.875rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
  border-top: 6px solid var(--color-gold);
}
.modal-overlay.is-open .modal-box { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  background: var(--color-light);
  border: none;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--color-text-muted);
}
.modal-close:hover { background: var(--color-border); }
.modal-box .eyebrow { color: var(--color-gold); }
.modal-box h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.modal-box p { margin-bottom: 1.375rem; }

/* ==========================================================================
   Gallery + Lightbox
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
/* Auto-scrolling carousel (home page "From the Field").
   The track holds the slides twice — initGalleryCarousel() clones them — so a
   -50% translate lands exactly on the start of the second copy and loops with
   no visible seam. Spacing is margin-inline-end, not gap: gap would not be
   included in that 50% and the seam would drift by one gap per cycle. */
.gallery-carousel {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.gallery-track {
  display: flex;
  width: max-content;
  align-items: stretch;
}
.gallery-track .gallery-item {
  flex: 0 0 auto;
  width: 24rem;
  margin-inline-end: 1.25rem;
}
.gallery-carousel--running .gallery-track {
  animation: gallery-scroll 40s linear infinite;
}
[dir="rtl"] .gallery-carousel--running .gallery-track { animation-direction: reverse; }
.gallery-carousel--running:hover .gallery-track,
.gallery-carousel--running:focus-within .gallery-track { animation-play-state: paused; }
@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-carousel { overflow-x: auto; }
  .gallery-carousel--running .gallery-track { animation: none; }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  background: var(--color-light);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.75rem 0.875rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.72), transparent);
  color: var(--color-white);
  font-size: 0.85rem;
  font-weight: 600;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 1.875rem;
}
.lightbox-overlay.is-open { opacity: 1; visibility: visible; }
.lightbox-overlay img { max-width: 90vw; max-height: 80vh; border-radius: 0.5rem; }
.lightbox-caption { color: var(--color-white); text-align: center; margin-top: 0.875rem; font-weight: 600; }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--color-white);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.3rem;
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-nav.prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* ==========================================================================
   Leadership & Team (team.html)
   ========================================================================== */
.team-avatar {
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 50%;
  background: rgba(0, 92, 78, 0.08);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.leadership-feature {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 51.25rem;
  margin: 0 auto;
}
.leadership-feature .team-avatar { width: 6.875rem; height: 6.875rem; font-size: 2.6rem; margin: 0; }
.leadership-feature h3 { margin-bottom: 2px; }
.leadership-feature .team-title { color: var(--color-accent); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.875rem; display: block; }
.leadership-feature .team-email { font-size: 0.88rem; margin-top: 0.75rem; display: inline-block; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.team-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.125rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.team-card:hover .team-avatar { transform: scale(1.08); }
.team-card h3 { font-size: 1rem; margin-bottom: 4px; }
.team-card .team-title { display: block; color: var(--color-text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.team-card .team-email { font-size: 0.78rem; word-break: break-all; }
.team-card .team-tag {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.15);
  color: #8a6100;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ==========================================================================
   Video (Home page)
   ========================================================================== */
.video-frame {
  position: relative;
  max-width: 53.75rem;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary), var(--color-forest-deep));
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
}
.video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0, transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(255,255,255,0.06) 0, transparent 40%);
}
.video-play-btn {
  position: relative;
  z-index: 2;
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
}
.video-frame:hover .video-play-btn { transform: scale(1.1); background: rgba(255,255,255,0.26); }
.video-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 1.125rem 1.5rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  color: #fff;
  text-align: left;
}
.video-caption strong { display: block; font-size: 1rem; }
.video-caption span { font-size: 0.82rem; opacity: 0.85; }

/* ==========================================================================
   Directory & Updates (sample/placeholder content)
   ========================================================================== */
.sample-banner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--color-placeholder-bg);
  border: 1px dashed var(--color-placeholder-border);
  border-radius: 0.5rem;
  padding: 0.875rem 1.125rem;
  color: #8a6100;
  font-size: 0.88rem;
  margin-bottom: 1.75rem;
}
.sample-banner i { font-size: 1.1rem; }
.directory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.directory-card { position: relative; }
.directory-card .sample-tag {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  padding: 0.125rem 0.5625rem;
  border-radius: 999px;
  background: var(--color-placeholder-bg);
  border: 1px solid var(--color-placeholder-border);
  color: #8a6100;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.directory-card .directory-category { color: var(--color-accent); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.updates-list { max-width: 47.5rem; margin: 0 auto; }
.update-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.125rem 1.25rem;
  margin: 0 -1.25rem;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.update-item:last-child { border-bottom: none; }
.update-item:hover { background: var(--color-light); transform: translateX(4px); }
html[dir="rtl"] .update-item:hover { transform: translateX(-4px); }
.update-date {
  min-width: 6.875rem;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.85rem;
}
.update-body h3 { font-size: 1.02rem; margin-bottom: 4px; }
.update-body p { margin-bottom: 0; font-size: 0.9rem; }

/* ==========================================================================
   Biogas Potential Calculator (Investment page)
   ========================================================================== */
.calc-card {
  max-width: 48.75rem;
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.calc-mode-toggle {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.calc-mode-btn {
  flex: 1;
  min-width: 12.5rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.9rem;
}
.calc-mode-btn.is-active {
  border-color: var(--color-primary);
  background: rgba(0, 92, 78, 0.08);
  color: var(--color-primary);
}
.calc-input-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.calc-input-row .form-field { flex: 1; min-width: 13.75rem; margin-bottom: 0; }
.calc-input-row .form-field[hidden] { display: none; }
.calc-hint { font-size: 0.78rem; color: var(--color-text-muted); }
.calc-input-row .btn { height: 3rem; }
.calc-error {
  display: none;
  color: #c0392b;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.875rem;
}
.calc-error.is-visible { display: block; }
.calc-results { margin-top: 1.875rem; padding-top: 1.625rem; border-top: 1px dashed var(--color-border); }
.calc-results-grid {
  display: grid;
  /* Three outputs: digester capacity, raw biogas, fuel-grade gas. The cost
     output was removed — no capital-cost figure is published on this site. */
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  text-align: center;
}
.calc-results-grid .counter-value {
  color: var(--color-primary);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  white-space: nowrap;
}
.calc-disclaimer {
  margin: 1.375rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ==========================================================================
   Forms (Contact)
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem; }
.form-field { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1.125rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.9rem; color: var(--color-text); }
.form-field label .req { color: #c0392b; }
.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--color-white);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,92,78,0.12);
}
.form-field .error-msg { color: #c0392b; font-size: 0.8rem; display: none; }
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: #c0392b; }
.form-field.has-error .error-msg { display: block; }
.captcha-box {
  border: 1px dashed var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--color-light);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
/* Unticked-confirmation error. A class rather than an inline style so the
   high-contrast override below can reach it. */
.captcha-box.has-error { border-color: #c0392b; border-style: solid; }
.form-success {
  display: none;
  background: #eafaf1;
  border: 1px solid var(--color-accent);
  color: #1b5e20;
  padding: 0.875rem 1.125rem;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.form-success.is-visible { display: block; }

/* Info card + form side by side. This lives here rather than as an inline
   style on the element: an inline grid-template-columns outranks the
   `.grid-2 { grid-template-columns: 1fr }` collapse in the max-width:991px
   block, which forced two columns onto phones and pushed the form ~270px
   off the side of a 360px screen. Declared before the responsive section so
   that equal-specificity override still wins on source order. */
.contact-layout {
  grid-template-columns: 1fr 1.4fr;
  align-items: start;
  gap: 2rem;
}

.contact-info-card {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}
.contact-info-card h3 { color: var(--color-white); }
/* The office email is one unbreakable ~282px token. Left alone it sets the
   card's min-content width, which floors the single-column grid track at
   366px and pushes the whole column off the side of a 360px phone screen.
   `anywhere` rather than `break-word`: only `anywhere` reduces the
   min-content contribution that grid track sizing actually reads. */
.contact-info-card { overflow-wrap: anywhere; }
.contact-info-card .info-row { display: flex; gap: 0.75rem; margin-bottom: 1.125rem; align-items: flex-start; }
.contact-info-card .info-row > * { min-width: 0; }
.contact-info-card .info-row i { margin-top: 3px; color: var(--color-gold); }
.contact-info-card .placeholder { background: rgba(255,255,255,0.12); border-color: var(--color-gold); color: #ffe9bf; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-forest) 45%, var(--color-forest-deep) 100%);
  color: rgba(255,255,255,0.85);
  padding-top: 3.25rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-brand { display: flex; gap: 0.875rem; align-items: flex-start; }
.footer-brand img { height: 2.75rem; background: #fff; padding: 0.5rem 0.75rem; border-radius: 0.5rem; }
.footer-col h4 { color: var(--color-white); font-size: 1rem; margin-bottom: 0.875rem; }
.footer-col ul li { margin-bottom: 0.625rem; }
.footer-col a:hover { color: var(--color-gold); }
.footer-col address { font-style: normal; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* ==========================================================================
   Accessibility Widget + Scroll-to-top
   ========================================================================== */
.a11y-widget {
  position: fixed;
  left: 1.125rem;
  bottom: 1.125rem;
  z-index: 950;
}
.a11y-toggle {
  width: 3.125rem;
  height: 3.125rem;
  border-radius: 50%;
  background: var(--color-forest);
  color: var(--color-white);
  border: none;
  font-size: 1.3rem;
  box-shadow: var(--shadow-lg);
}
.a11y-panel {
  position: absolute;
  bottom: 3.75rem;
  left: 0;
  background: var(--color-white);
  border-radius: 0.625rem;
  box-shadow: var(--shadow-lg);
  padding: 0.875rem;
  width: 12.5rem;
  display: none;
  gap: 0.5rem;
  flex-direction: column;
}
.a11y-panel.is-open { display: flex; }
.a11y-panel button {
  border: 1px solid var(--color-border);
  background: var(--color-light);
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  text-align: left;
}
.a11y-panel button:hover { background: var(--color-border); }
.a11y-panel button[aria-pressed="true"] { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.back-to-top {
  position: fixed;
  right: 1.125rem;
  bottom: 1.125rem;
  width: 3.125rem;
  height: 3.125rem;
  border-radius: 50%;
  background: var(--color-gold);
  color: #1a1200;
  border: none;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
  z-index: 950;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---- Home hero art direction ----
   gujjar-colony-aerial.jpg has the digesters running through the centre-left of
   the frame, so the default centre focus drops them straight behind the
   headline. Anchoring the crop left pushes the domes, gas store and solar array
   into the right half, where the directional scrim has cleared. Mirrored under
   RTL, where the text column flips to the right and the subject must follow.
   Re-check both when a higher-resolution original arrives. */
body[data-page="home"] .hero-bg { --hero-focus: left center; }
html[dir="rtl"] body[data-page="home"] .hero-bg { --hero-focus: right center; }

/* ==========================================================================
   Status Tags — delivered vs planned
   The rollout page describes work that does not exist yet, alongside project
   pages describing work that does. Those two states must never be mistakable
   for one another, so every pillar and site carries an explicit tag.
   ========================================================================== */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  white-space: nowrap;
}
/* Inside a .card the tag's icon would inherit `.card i` (1.9rem plus a bottom
   margin) and sit oversized and off-centre against the label — reset it to the
   tag's own type size. Must stay after the `.card i` rules: equal specificity. */
.status-tag i {
  font-size: 1em;
  line-height: 1;
  margin: 0;
  color: inherit;
  flex-shrink: 0;
}
.card:hover .status-tag i { transform: none; }

.status-tag--delivered { background: #e3f4e6; color: #1b5e20; border: 1px solid #a5d6a7; }
.status-tag--planned { background: #fff4e0; color: #8a5a00; border: 1px solid var(--color-gold); }
.status-tag--progress { background: #e7f1fb; color: #14507d; border: 1px solid #9dc4e8; }

/* ==========================================================================
   Anchor Navigation (long single-page sections, e.g. the Rollout page)
   ========================================================================== */
.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin: 0 auto 2.5rem;
}
.anchor-nav a {
  border: 1px solid var(--color-border);
  background: var(--color-white);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}
.anchor-nav a:hover { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }
/* Anchored sections must clear the sticky header when jumped to. */
[id^="pillar-"], #timeline, #livestock-census, #community, #household, #lessons {
  scroll-margin-top: calc(var(--header-height) + 1.25rem);
}

/* ==========================================================================
   Rollout Timeline
   ========================================================================== */
.timeline { display: grid; gap: 1.25rem; }
.timeline-phase {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem;
  align-items: start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-inline-start: 4px solid var(--color-gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.timeline-year {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
}
.timeline-year small { display: block; font-size: 0.78rem; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }
.timeline-body ul { list-style: none; display: grid; gap: 0.625rem; }
.timeline-body li { display: flex; gap: 0.625rem; align-items: flex-start; }
.timeline-body li i { color: var(--color-accent); margin-top: 0.25rem; flex-shrink: 0; }

/* ==========================================================================
   Urdu / RTL
   ========================================================================== */
html[dir="rtl"] body,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[dir="rtl"] button {
  font-family: var(--font-ur);
}
html[dir="rtl"] body { line-height: 2.1; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { line-height: 1.9; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
html[dir="rtl"] .lang-toggle { font-family: var(--font-en); }
html[dir="rtl"] .a11y-panel button { text-align: right; }
html[dir="rtl"] .main-nav .dropdown-menu { left: auto; right: 0; }
html[dir="rtl"] .main-nav li.has-dropdown > a::after,
html[dir="rtl"] .main-nav li.has-dropdown > .dropdown-toggle::after { transform: scaleX(-1); }

/* Keep the brand logo pinned to the physical left and header-actions pinned to the
   physical right in both languages — only the nav's own content mirrors for RTL reading.
   Without this, flex row order fully reverses under dir="rtl" and the logo jumps to the
   right, which reads as broken rather than intentional on a bilingual site. */
html[dir="rtl"] .header-inner { direction: ltr; }
html[dir="rtl"] .header-inner > * { direction: rtl; }
html[dir="rtl"] .directory-card .sample-tag { right: auto; left: 0.875rem; }

/* Under RTL, CSS Grid keeps DOM order but reverses visual column order, so
   step 1 renders on the right and each next step renders to its LEFT. The
   connector must overflow this step's box in that same direction (left)
   to bridge toward the next step — mirroring the left/width anchor the
   LTR rule uses on the right. Without this it still overflows rightward,
   off into empty space instead of toward the next step. */
html[dir="rtl"] .process-step::after {
  left: auto;
  right: calc(50% + 2.5rem);
}

/* High contrast mode (toggled via JS on <html>).
   Darkening containers alone isn't enough: several elements set their own
   explicit text color (p, nav links, badge/card text, form labels, table
   cells) which otherwise keeps rendering dark-on-dark against the new
   black/near-black backgrounds. Every such element gets an explicit
   override below rather than relying on inheriting the body's white. */
html.high-contrast body { background: #000; color: #fff; }
html.high-contrast .site-header,
html.high-contrast .main-nav,
html.high-contrast .main-nav .dropdown-menu,
html.high-contrast .section--light,
html.high-contrast .card,
html.high-contrast .badge-card,
html.high-contrast .team-card,
html.high-contrast .leadership-feature,
html.high-contrast .calc-card,
html.high-contrast .data-table,
html.high-contrast .modal-box { background: #111; color: #fff; }
html.high-contrast .data-table th { background: #000; }
html.high-contrast .data-table td { color: #fff; border-color: #333; }
html.high-contrast h1, html.high-contrast h2, html.high-contrast h3, html.high-contrast h4 { color: #ffd54a; }
html.high-contrast .eyebrow { color: #ffd54a; }
html.high-contrast .counter-value { color: var(--color-gold); }
html.high-contrast p,
html.high-contrast .icon-list li,
html.high-contrast .badge-card span,
html.high-contrast .counter-label,
html.high-contrast .team-title,
html.high-contrast .update-date,
html.high-contrast .directory-category,
html.high-contrast .calc-hint,
html.high-contrast .form-field label { color: #e8e8e8; }
html.high-contrast .main-nav a,
html.high-contrast .main-nav .dropdown-toggle { color: #fff; }
html.high-contrast .main-nav a:hover,
html.high-contrast .main-nav a:focus,
html.high-contrast .main-nav a.active,
html.high-contrast .main-nav .dropdown-toggle:hover,
html.high-contrast .main-nav .dropdown-toggle:focus { color: #ffd54a; background: rgba(255,255,255,0.12); }
html.high-contrast .nav-toggle span { background: #fff; }
html.high-contrast .form-field input,
html.high-contrast .form-field select,
html.high-contrast .form-field textarea { background: #fff; color: #111; }
/* Register CTA: gold on near-black reads fine, but the .btn--primary text
   colour has to be forced dark or it inherits the white body colour. */
html.high-contrast .nav-cta { background: #ffd54a; color: #111; border-color: #ffd54a; }
/* The captcha error border needs to lift off #111 — #c0392b alone is too dark. */
html.high-contrast .captcha-box.has-error { border-color: #ff6b5a; }
html.high-contrast .timeline-phase,
html.high-contrast .anchor-nav a { background: #1c1c1c; border-color: #555; color: #fff; }
html.high-contrast .timeline-year,
html.high-contrast .timeline-year small,
html.high-contrast .timeline-body li { color: #fff; }
html.high-contrast .status-tag--delivered { background: #103d15; color: #b8ecc0; border-color: #b8ecc0; }
html.high-contrast .status-tag--planned { background: #3d2d05; color: #ffd54a; border-color: #ffd54a; }
html.high-contrast .status-tag--progress { background: #0d2b42; color: #b7dcff; border-color: #b7dcff; }

/* ==========================================================================
   Utility
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 0.875rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
  .badge-strip { margin-top: -1.875rem; }
  .counter-strip { grid-template-columns: repeat(2, 1fr); }
  /* An odd-numbered strip (the 5-item home strip) otherwise leaves its last
     figure stranded in the left half of a half-empty row. Spanning both
     columns centres it under the pair above. .calc-results-grid keeps three
     columns at this width, so it is excluded — the rule would make its third
     output span the row. */
  .counter-strip:not(.calc-results-grid) > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .process-flow { grid-template-columns: 1fr; }
  .process-step::after { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-track .gallery-item { width: 20rem; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .directory-grid { grid-template-columns: 1fr; }
  .leadership-feature { flex-direction: column; text-align: center; }
  .leadership-feature .team-avatar { margin: 0 auto; }
  .calc-results-grid { grid-template-columns: repeat(3, 1fr); }
  /* Year column stacks above its contents rather than squeezing the list. */
  .timeline-phase { grid-template-columns: 1fr; gap: 0.875rem; }
}

/* ---- Collapsed (hamburger) navigation ----
   Breakpoint is 1199px, NOT the 768px used for the rest of the mobile
   layout below. The seven nav items need ~703px on one line, and between
   769px and ~1199px the header cannot supply that alongside the Government
   logo and the language button: the nav was overflowing its track — which
   wrapped "The Project" onto a second line — while the logo was squeezed
   from its natural 328px down to as little as 0. Collapsing to the
   hamburger until the horizontal bar genuinely fits keeps the logo at full
   size and the nav labels at full readable size, per the brief's
   large-readable-text rule. Only the nav collapses here; every other
   mobile adjustment stays at 768px. */
@media (max-width: 1199px) {
  /* Once .main-nav goes `position: fixed` below it leaves the grid's flow, so
     it no longer occupies the middle track. Auto-placement then drops
     .header-actions into that 1fr track and its contents sit at the track's
     start — the Register/اردو/hamburger cluster ends up stranded mid-header
     with a wide gap to the right edge. Two tracks (brand, then everything
     else pinned to the end) is what this state actually needs. This is very
     visible at high browser zoom, where a desktop viewport lands in this
     range. */
  .header-inner { grid-template-columns: auto 1fr; }
  .header-actions { justify-self: end; }
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    /* Cancel the base rule's `justify-self: center`, which centres the
       horizontal desktop bar. It also applies to this fixed panel as a grid
       child, and for an out-of-flow box with both left and right set it
       forces shrink-to-fit — leaving the open menu as a 260px strip floating
       mid-screen instead of the full-width drawer left/right:0 implies. */
    justify-self: stretch;
    background: var(--color-white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.is-open { max-height: 80vh; overflow-y: auto; }
  /* `align-items: stretch` cancels the base rule's `align-items: center`,
     which centres items along the horizontal bar. Once the list turns into a
     column that same value centres each link on the cross axis, leaving the
     drawer's links floating mid-panel and fighting the left indent on the
     nested dropdown items. Stretching also makes each link fill the drawer
     width, giving a full-width tap target. */
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 10px 20px 20px; gap: 2px; }
  .main-nav a,
  .main-nav .dropdown-toggle { padding: 12px 10px; width: 100%; }
  .main-nav li.has-dropdown > a::after,
  .main-nav li.has-dropdown > .dropdown-toggle::after { float: right; }
  .main-nav .dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
    padding: 0 0 0 16px;
    margin: 0;
  }
  .main-nav .dropdown-menu a { padding: 10px; font-size: 0.88rem; color: var(--color-text-muted); }
  .nav-toggle { display: flex; }
}

@media (max-width: 768px) {
  /* The three badges are a short icon + label each and still read cleanly at
     a third of a ~780px column, so they hold their row down to the phone
     breakpoint rather than collapsing at 991px into three full-width slabs —
     which is what a desktop at high browser zoom was getting. */
  .badge-strip { grid-template-columns: 1fr; }
  .lang-toggle { padding: 7px 12px; font-size: 0.8rem; }
  .brand-logo { height: 36px; }
  .header-inner { gap: 6px; padding: 0 16px; }
  .header-actions { gap: 6px; }
  /* Logo + CTA + language toggle + hamburger will not fit a 360px phone at full
     size. The CTA drops to its icon only; the label is hidden rather than the
     whole button, so the registration route stays reachable from every page. */
  .nav-cta { padding: 7px 10px; font-size: 0.8rem; }
  .nav-cta .nav-cta-label { display: none; }
  .hero { min-height: 62vh; text-align: left; }
  /* On phones the text spans the full width, so a left-to-right scrim would
     leave part of the headline over bare photo. Switch to a vertical scrim:
     lighter at the top where the plant shows, deepening behind the text below. */
  .hero::before {
    background: linear-gradient(
      180deg,
      rgba(0, 25, 20, 0.45) 0%,
      rgba(0, 25, 20, 0.66) 45%,
      rgba(0, 25, 20, 0.80) 100%
    );
  }
  html[dir="rtl"] .hero::before { transform: none; }
  /* Back to the normal page gutter — the wide-screen edge alignment isn't
     needed once the text spans the full width. */
  .hero-content { padding-inline: 1.25rem; }
  .hero-content .eyebrow,
  .hero-content h1,
  .hero-content .lede,
  .hero-content .hero-actions { max-width: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .counter-strip { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-track .gallery-item { width: 16rem; margin-inline-end: 0.875rem; }
  .gallery-carousel--running .gallery-track { animation-duration: 28s; }
  .team-grid { grid-template-columns: 1fr; }
  .update-item { flex-direction: column; gap: 4px; }
}

/* ==========================================================================
   Very Large Screens (ultra-wide monitors, true 4K / 55"+ displays viewed
   from a distance — e.g. lobby/kiosk/presentation screens). Root font-size
   is the single lever: all type and all structural sizing on this site is
   rem-based, so raising the root font-size alone grows type, gutters, header
   height, logo, card padding, buttons and the content column together. A
   4K/55" display then shows the layout the design was drawn at, simply
   larger — rather than a 16px ribbon stranded mid-screen. --container-width
   gets a little extra widening at the top steps so very wide displays fill
   out slightly more than pure proportional scaling would give.

   NOTE: this ladder is defeated if anything writes an inline font-size onto
   <html> and leaves it there. applyFontStep() in js/main.js clears its
   inline value before reading the base back, and re-applies on resize.
   ========================================================================== */
@media (min-width: 1600px) { html { font-size: 17px; } }

@media (min-width: 1920px) { html { font-size: 18px; } }

@media (min-width: 2560px) {
  html { font-size: 20px; }
  :root { --container-width: 76rem; }
}

@media (min-width: 3200px) {
  html { font-size: 23px; }
  :root { --container-width: 80rem; }
  .hero { min-height: 70vh; }
}

@media (min-width: 3840px) {
  html { font-size: 26px; }
  :root { --container-width: 80rem; }
}
