/* Projects & Clients page - part of the site's unified 2026-11 theme
   (adopted from the QA-QC & HSE page design: Inter throughout, same green
   family, same 1160px content width as qaqc.css/contact.css). Originally
   this page had its own one-off DM Sans + Playfair Display look from its
   source mockup - updated here to match the rest of the site instead.
   Still scoped entirely under .projects-page so nothing here leaks into
   any other page; the shared site header/footer (outside this wrapper, in
   base.njk) already use this same theme via style.css's :root. */

.projects-page {
  --pj-green: #2f6b45;
  --pj-green-dark: #1a4a33;
  --pj-green-soft: #edf3eb;
  --pj-ink: #20352a;
  --pj-muted: #617267;
  --pj-paper: #fbfcf9;
  --pj-white: #fff;
  --pj-line: #dce7dc;
  --pj-radius: 22px;
  --pj-wrap: 1160px;

  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--pj-ink);
  background: var(--pj-paper);
  line-height: 1.6;
}
.projects-page * { box-sizing: border-box; }
.projects-page a { color: inherit; text-decoration: none; }
.projects-page img { display: block; width: 100%; height: 100%; object-fit: cover; }
.projects-page h1,
.projects-page h2,
.projects-page h3,
.projects-page p { margin-top: 0; }
.projects-page h1,
.projects-page h2 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.projects-page .wrap {
  width: min(var(--pj-wrap), calc(100% - 64px));
  margin-inline: auto;
}
.projects-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--pj-green);
  font-size: 11.52px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.projects-page .eyebrow:after {
  content: "";
  height: 1px;
  width: 28px;
  background: #779782;
}

/* Featured ongoing project hero - a slideshow when there's more than one
   entry in featuredProjects (see projects-featured-slideshow.js). Each
   .featured-slide is the full two-column layout (copy + image) stacked on
   top of the others via position:absolute, cross-fading through opacity
   so both the image and the left-hand copy change together. */
.projects-page .featured-ongoing {
  position: relative;
  background: var(--pj-green-soft);
  min-height: 480px;
  overflow: hidden;
  transition: height 0.4s ease;
}
.projects-page .featured-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
  z-index: 0;
}
.projects-page .featured-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.projects-page .featured-slide-nav {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 16px 0;
}
.projects-page .featured-slide-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #c6d7c7;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.projects-page .featured-slide-dot:hover { background: var(--pj-green); }
.projects-page .featured-slide-dot.is-active { background: var(--pj-green-dark); transform: scale(1.3); }
.projects-page .featured-copy {
  width: max(340px, 39%);
  min-height: 480px;
  box-sizing: border-box;
  padding: clamp(38px, 5vw, 70px) 28px clamp(38px, 5vw, 64px) max(32px, calc((100vw - var(--pj-wrap)) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.projects-page .featured-copy h1 {
  font-size: clamp(44.8px, 4.5vw, 75.2px);
  margin: 18px 0 16px;
  max-width: 520px;
  color: var(--pj-green-dark);
}
.projects-page .featured-copy p {
  max-width: 420px;
  color: var(--pj-muted);
  margin: 0 0 24px;
  text-align: left;
}
.projects-page .featured-project-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #c6d7c7;
  border-radius: 99px;
  color: var(--pj-green-dark);
  font-size: 11.2px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.projects-page .featured-project-tag:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5c9367;
}
/* One fact per row, always - previously flex-wrap let short facts (e.g.
   Client + Contractor) sit side by side while a long one (Supply) wrapped
   to its own line, so the layout looked different from slide to slide.
   align-items was also center, which - when a value wraps to 2-3 lines -
   vertically centered the label against the whole wrapped block instead
   of sitting at its top; flex-start plus a fixed-width label column fixes
   both: every value now starts at the same x position and wraps under
   itself, with the label aligned to the first line. */
.projects-page .featured-project-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  color: var(--pj-muted);
  font-size: 12.48px;
}
.projects-page .featured-project-meta span { display: flex; align-items: flex-start; gap: 7px; }
.projects-page .featured-project-meta strong { color: var(--pj-green-dark); font-weight: 600; flex: 0 0 76px; }
.projects-page .featured-image { position: absolute; top: 0; right: 0; bottom: 0; left: max(340px, 39%); min-height: 480px; overflow: hidden; }
.projects-page .featured-image:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(237, 243, 235, 0.22), transparent 24%), linear-gradient(0deg, rgba(22, 48, 33, 0.16), transparent 45%);
  pointer-events: none;
}
.projects-page .featured-image img { object-position: center 48%; }
.projects-page .featured-image-caption {
  position: absolute;
  z-index: 1;
  left: 22px;
  bottom: 20px;
  padding: 9px 13px;
  background: rgba(251, 252, 249, 0.92);
  color: var(--pj-green-dark);
  font-size: 11.52px;
  letter-spacing: 0.04em;
}
.projects-page .credentials { padding: 46px 0 10px; }
.projects-page .credentials-head { max-width: 680px; margin-bottom: 22px; }
.projects-page .credentials-head p { color: var(--pj-muted); font-size: 13.44px; margin: 10px 0 0; text-align: left; }
/* auto-fit so a partially-filled grid stretches to fill the row instead
   of leaving empty cells, and wraps to fewer columns automatically as the
   viewport narrows - same reasoning as the QA-QC page's .cert-grid. */
.projects-page .credential-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.projects-page .credential-card { border: 1px solid var(--pj-line); border-radius: var(--pj-radius); background: #fff; overflow: hidden; }
/* object-fit:contain (not cover) and a tall box so a portrait certificate
   scan shows in full, uncropped, rather than just its cropped middle. */
.projects-page .credential-image { height: 320px; background: #e7eee6; padding: 14px; }
.projects-page .credential-image-trigger {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.projects-page .credential-image-trigger img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}
.projects-page .credential-image-trigger:hover img,
.projects-page .credential-image-trigger:focus-visible img { transform: scale(1.03); }
.projects-page .credential-image-trigger:focus-visible { outline: 2px solid var(--pj-green); outline-offset: 2px; }
.projects-page .credential-image .image-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #829889;
  background: linear-gradient(135deg, #e6eee5, #f5f7f2);
  font-size: 11.84px;
  text-align: center;
  padding: 0 16px;
}
.projects-page .credential-body { padding: 16px 18px 20px; }
.projects-page .credential-body h3 { font-size: 15.36px; font-weight: 700; margin: 0 0 4px; color: #172a20; }
.projects-page .credential-body p { font-size: 12.48px; color: var(--pj-muted); margin: 0; }

/* Certificate lightbox - opened by clicking a certificate image above
   (see projects-credential-lightbox.js). Higher than project-modal's
   z-index:1100 just to keep a clear stacking margin above it. */
.projects-page .credential-lightbox { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 30px; }
.projects-page .credential-lightbox[hidden] { display: none; }
.projects-page .credential-lightbox-backdrop { position: absolute; inset: 0; background: rgba(20, 38, 28, 0.8); }
.projects-page .credential-lightbox-image { position: relative; z-index: 1; max-width: min(900px, 100%); max-height: 90vh; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); background: #fff; }
.projects-page .credential-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pj-green-dark);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.projects-page .credential-lightbox-close:hover { background: #fff; }

.projects-page .ongoing-more { padding: 30px 0 8px; }
.projects-page .ongoing-more-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 16px;
}
.projects-page .ongoing-more-head h2 { font-size: clamp(24px, 2.5vw, 33.6px); margin: 8px 0 0; color: var(--pj-green-dark); }
.projects-page .ongoing-more-head p { margin: 0; color: var(--pj-muted); font-size: 12.8px; text-align: left; }
.projects-page .ongoing-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.projects-page .ongoing-thumb {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--pj-line);
  background: #fff;
}
.projects-page .ongoing-thumb img { height: 76px; object-fit: cover; }
.projects-page .ongoing-thumb strong { display: block; color: var(--pj-green-dark); font-size: 12.8px; font-weight: 600; }
.projects-page .ongoing-thumb span { display: block; color: var(--pj-muted); font-size: 11.2px; margin-top: 3px; }

/* style.css has a global, unscoped .projects-section { text-align:center }
   left over from the home page's own "Projects" category section - reset
   it here so it doesn't leak into this page's left-aligned layout (the
   eyebrow label was the visible symptom: it's inline, so centering shows
   immediately, while the heading/paragraph mostly hid it since their text
   nearly fills the line anyway). */
.projects-page .projects-section { padding: 74px 0 78px; text-align: left; }
.projects-page .section-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.projects-page .section-top h2 { font-size: clamp(35.2px, 3.6vw, 53.6px); margin: 13px 0 10px; color: var(--pj-green-dark); }
.projects-page .section-intro { color: var(--pj-muted); max-width: 650px; margin: 0; font-size: 15.36px; text-align: left; }
.projects-page .project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; row-gap: 38px; }
.projects-page .project-card { min-width: 0; padding-bottom: 4px; cursor: pointer; border-radius: var(--pj-radius); transition: box-shadow 0.2s ease; }
.projects-page .project-card:hover,
.projects-page .project-card:focus-visible { box-shadow: 0 10px 28px rgba(26, 74, 51, 0.14); }
.projects-page .project-card:focus-visible { outline: 2px solid var(--pj-green); outline-offset: 3px; }
.projects-page .project-image { height: 250px; overflow: hidden; background: #e7eee6; position: relative; }
.projects-page .project-image img { transition: transform 0.55s ease; }
.projects-page .project-card:hover .project-image img { transform: scale(1.035); }
.projects-page .project-image .image-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #829889;
  background: linear-gradient(135deg, #e6eee5, #f5f7f2);
  font-size: 12.48px;
  text-align: center;
  padding: 0 20px;
}
.projects-page .project-info { padding-top: 14px; }
.projects-page .project-info h3 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 20.32px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 8px;
  color: #172a20;
}
.projects-page .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--pj-muted); font-size: 12.16px; margin-bottom: 8px; }
.projects-page .project-description {
  color: var(--pj-muted);
  font-size: 13.12px;
  line-height: 1.65;
  margin: 12px 0 0;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.projects-page .project-read-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 12.8px;
  font-weight: 700;
  color: var(--pj-green);
}
.projects-page .project-card:hover .project-read-more,
.projects-page .project-card:focus-visible .project-read-more { text-decoration: underline; }

.projects-page .cta { min-height: 250px; display: grid; grid-template-columns: 1.1fr 0.9fr; background: #e5eee3; }
.projects-page .cta-image { min-height: 250px; position: relative; overflow: hidden; }
.projects-page .cta-image:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 35%, #e5eee3 100%); }
.projects-page .cta-copy { align-self: center; padding: 38px clamp(28px, 5vw, 76px) 38px 20px; }
.projects-page .cta-copy h2 { font-size: clamp(28.8px, 2.8vw, 40px); color: var(--pj-green-dark); margin: 0 0 12px; }
.projects-page .cta-copy p { font-size: 14.08px; color: var(--pj-muted); max-width: 380px; margin-bottom: 18px; text-align: left; }
.projects-page .btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: var(--pj-green-dark);
  color: #fff;
  border-radius: 99px;
  padding: 12px 22px;
  font-size: 12.8px;
  transition: background 0.2s;
}
.projects-page .btn:hover { background: var(--pj-green); color: #fff; }

@media (max-width: 950px) {
  .projects-page .featured-copy { width: max(300px, 45%); min-height: 400px; padding-left: 32px; }
  .projects-page .featured-image { left: max(300px, 45%); min-height: 400px; }
  .projects-page .featured-ongoing { min-height: 400px; }
  .projects-page .ongoing-thumb { grid-template-columns: 80px 1fr; }
  .projects-page .project-grid { gap: 26px 18px; }
  .projects-page .project-image { height: 210px; }
}
@media (max-width: 720px) {
  .projects-page .wrap { width: min(100% - 36px, var(--pj-wrap)); }
  .projects-page .featured-ongoing { min-height: 560px; }
  .projects-page .featured-copy { width: 100%; min-height: 0; margin-top: 280px; padding: 34px 22px 38px; }
  .projects-page .featured-image { left: 0; top: 0; bottom: auto; height: 280px; min-height: 280px; }
  .projects-page .featured-copy h1 { font-size: clamp(41.6px, 11vw, 57.6px); }
  .projects-page .credentials { padding: 30px 0 4px; }
  .projects-page .credential-image { height: 260px; padding: 10px; }
  .projects-page .credential-lightbox-close { top: 14px; right: 14px; }
  .projects-page .ongoing-more { padding: 26px 0 0; }
  .projects-page .ongoing-more-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .projects-page .ongoing-thumbs { grid-template-columns: 1fr; gap: 9px; }
  .projects-page .ongoing-thumb { grid-template-columns: 92px 1fr; }
  .projects-page .projects-section { padding: 54px 0; }
  .projects-page .section-top { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .projects-page .section-top h2 { font-size: 37.6px; }
  .projects-page .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .projects-page .project-image { height: clamp(150px, 34vw, 235px); }
  .projects-page .project-info h3 { font-size: 17.28px; }
  .projects-page .meta { font-size: 11.2px; gap: 6px 10px; }
  .projects-page .cta { grid-template-columns: 1fr; }
  .projects-page .cta-image { min-height: 190px; grid-row: 1; }
  .projects-page .cta-image:after { background: linear-gradient(0deg, #e5eee3, transparent 65%); }
  .projects-page .cta-copy { padding: 6px 22px 34px; }
}
@media (max-width: 430px) {
  .projects-page .project-grid { grid-template-columns: 1fr; }
  .projects-page .project-image { height: 245px; }
}

/* "Names That Build India" - reuses the exact same clientele.njk partial
   and markup/arrangement used on every other page (logo tiles for clients
   that have one, a plain centred text list below for clients that don't)
   - only the colours/fonts change here, to fit this page's light theme
   instead of the dark photo-background theme it normally sits on. */
.projects-page .clientele-section {
  padding: 74px 0 78px;
  background: linear-gradient(115deg, #eef4ec, #f6f8f3);
}
.projects-page .clientele-section .center h2 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: clamp(28.8px, 2.8vw, 40.8px);
  color: var(--pj-green-dark);
}
.projects-page .clientele-section .center h2:before { background-color: rgba(47, 107, 69, 0.18); }
.projects-page .clientele-section .parasection {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--pj-muted);
  max-width: 660px;
  margin: 38px auto 0;
}
.projects-page .clientele-logo {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(220, 231, 220, 0.7);
  box-shadow: none;
}
.projects-page .clientele-list li {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--pj-muted);
  border-right-color: var(--pj-line);
}
.projects-page .clientele-logos:not(:empty) + .clientele-list { border-top-color: var(--pj-line); }
@media (max-width: 767px) {
  /* The site-wide mobile rule gives .clientele-list li a near-white
     divider border, meant for the dark photo background this section
     normally sits on - on this page's light background that divider
     would be nearly invisible, so it needs the same light-theme line
     colour here too. */
  .projects-page .clientele-section { padding: 45px 0; }
  .projects-page .clientele-list li { border-bottom-color: var(--pj-line); }
}

/* Project detail modal - opened by clicking a card in "Our Projects"
   (see projects-card-modal.js). A single shared overlay, populated from
   whichever card was clicked via its data-* attributes, rather than one
   modal per project. */
.projects-page .project-modal {
  position: fixed;
  inset: 0;
  /* Above the sticky site header's z-index:1000 (style.css), which would
     otherwise render on top of this fixed-position overlay. */
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.projects-page .project-modal[hidden] { display: none; }
.projects-page .project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 38, 28, 0.55);
}
.projects-page .project-modal-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--pj-radius, 18px);
  max-width: 720px;
  width: 100%;
  /* As a flex item of .project-modal, this would otherwise default to
     min-width:auto and get forced wider than max-width/width:100% by its
     own un-shrinkable content (the facts row above). */
  min-width: 0;
  max-height: min(84vh, 760px);
  overflow-y: auto;
}
.projects-page .project-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--pj-green-dark);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.projects-page .project-modal-close:hover { background: #fff; }
.projects-page .project-modal-image { height: 300px; overflow: hidden; }
.projects-page .project-modal-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.projects-page .project-modal-body { padding: 26px 28px 30px; }
.projects-page .project-modal-body h3 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 24px;
  color: var(--pj-green-dark);
  margin: 0 0 8px;
}
.projects-page .project-modal-body .meta { margin-bottom: 14px; }
.projects-page .project-modal-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--pj-muted);
  font-size: 13px;
  margin-bottom: 14px;
}
/* Flex items default to min-width:auto, which stops long un-wrapped text
   (e.g. a long Contractor name) from shrinking below its natural width -
   forcing this row, and the whole modal card, wider than the viewport on
   narrow screens instead of wrapping. */
.projects-page .project-modal-facts > span { min-width: 0; }
.projects-page .project-modal-facts strong { color: var(--pj-green-dark); font-weight: 600; }
.projects-page .project-modal-body p { color: var(--pj-muted); line-height: 1.6; margin: 0; text-align: left; }
@media (max-width: 600px) {
  .projects-page .project-modal-image { height: 200px; }
  .projects-page .project-modal-body { padding: 20px 20px 26px; }
}
