/* Restored style.css for HomeConnect */
:root{
  --brand: #0057b8;
  --text: #06243a; /* darker navy for higher contrast */
  /* spacing between sections */
  --section-gap: 48px;
  --muted: #333333; /* dark gray for muted text */
  --bg-wash: rgba(255,255,255,0.96);
  /* overlays/backgrounds disabled */
  --bg-overlay: rgba(255,255,255,0.9);
  /* panels: fully transparent (no soft tint) */
  --soft-blue: transparent;
  --radius: 8px;
}
*{ box-sizing: border-box }
html,body{ height:100%; }
html, body { overflow-x: hidden; }
/* Smooth scrolling for anchor navigation */
html { scroll-behavior: smooth }
body{
    margin:0;
    font-family: 'Segoe UI', -apple-system, Arial, sans-serif;
    /* Use darker text for readability */
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
  /* Page background is transparent so the background image and wash can show */
  background: transparent;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
  }

/* -----------------------------
   Global typography (unified HomeConnect look)
   ----------------------------- */
/* Body text */
body { font-size: 16px; line-height: 1.6; color: var(--text); }
p { color: var(--text); margin: 0 0 1em; max-width: 80ch; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Headings */
h1, h2, h3, h4 { color: var(--brand); margin: 0 0 .6em; line-height: 1.15; font-weight: 800 }
h1{ font-size: 2.4rem; }
h2{ font-size: 1.4rem; }
h3{ font-size: 1.1rem; }
h4{ font-size: 1rem; }

/* Keep manual initial highlights available without altering text flow. */
.caps {
  color: #000;
  font-weight: 900;
}

/* Component text: ensure consistent muted body copy in cards and boxes */
.step-box, .value-box, .element-box, .project-info, .project-meta, .partner-name {
  color: var(--muted);
}
.project-title{ color: var(--brand); font-weight:800 }

/* Make sure lead text and tagline are visually distinct but consistent */
.lead{ color: var(--text); font-weight:700 }
.tagline{ color: var(--text); font-weight:700 }


/* Apply a soft translucent blue background to muted text blocks (but not lead/tagline) */
p:not(.lead):not(.tagline), .step-box, .value-box, .element-box, .project-info, .contact-info {
  background: var(--soft-blue);
  padding: 10px 12px;
  border-radius: 10px;
}

/* Project meta slightly smaller padding */
.project-meta{ padding:6px 10px; border-radius:8px; background: var(--soft-blue) }

/* Remove the translucent soft-blue background from the About section specifically */
#about, #about p, #about .value-box, #about .step-box, #about .panel {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Remove translucent background for Contact section specifically */
#contact, #contact p, #contact .contact-info {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Remove translucent background for footer area (copyright line) */
footer, footer p, footer .copyright, footer a {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Center footer content */
footer{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px 8px;
}
footer p{ margin:0; text-align:center }

/* Footer: social links for business profiles */
.footer-inner{ display:flex; gap:18px; align-items:center }
.social-links{ display:flex; gap:10px }
.social-link{ display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; border:2px solid var(--brand); color:var(--brand); text-decoration:none; font-weight:700 }
.social-link:focus-visible{ outline:3px solid rgba(0,88,184,0.12); outline-offset:3px }
.social-link:hover{ background:var(--brand); color:#fff }
/* Make inline SVGs fit and inherit color */
.social-link svg{ width:18px; height:18px; display:block; fill:currentColor }

/* Standard size for section content images */
.content-image-small{
  width:45%;
  max-width:450px;
  height:auto;
  margin:12px auto 0;
  border-radius:8px;
  display:block;
}

/* Images inside step boxes */
.step-box .content-image-small{
  margin:12px auto 0;
  width:100%;
  max-width:100%;
}

/* Lists inside step boxes */
.step-box ul{
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 0.92em;
  color: var(--muted);
}
.step-box ul li{
  margin-bottom: 3px;
}

/* Wide image variant for sections like About */
.content-image-wide{
  width:75%;
  max-width:750px;
  height:auto;
  margin:12px auto 0;
  border-radius:8px;
  display:block;
}

/* Keep content images responsive by default */
img:not(.logo-image){
  max-width:100%;
  height:auto;
}

/* Remove drop caps from case study headings for clarity */
#case-studies h3 .caps{
  font-size: 1em;
  font-weight: 800;
  margin-right: 0;
  line-height: inherit;
}


/* Full-viewport background image (grayscale) placed behind content */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  /* background image: grayscale (black & white) */
  background-image: url('assets/taust.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  filter: grayscale(100%) contrast(100%) brightness(110%);
  transform: translateZ(0);
  z-index: -2; /* behind the overlay and content */
  pointer-events: none;
}

/* Subtle white overlay to preserve text legibility over the image */
body::after{
  content: "";
  position: fixed;
  inset: 0;
  /* light white wash to keep content legible over the image */
  background: var(--bg-overlay);
  z-index: -1;
  pointer-events: none;
}
nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  height:76px;
  padding:0 24px 0 36px;
  position: fixed; /* keep nav always visible while scrolling */
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  /* keep header clean and corporate */
  background: var(--bg-wash);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: none;
  border-bottom: 1px solid #D0D7E2;
}
.logo{ font-weight:700; font-size:2.2rem; color: var(--brand); text-shadow: none; line-height:1 }
/* Logo link: make the text blue again but keep the large initials black */
.logo{ font-weight:700; font-size:2.2rem; color: var(--brand); text-shadow: none; line-height:1; position:static; transform:none; z-index:2; margin-right:14px }
.logo a{ color: var(--brand); text-decoration: none; font-weight:700; display:flex; align-items:center; line-height:1 }
.logo-image{ display:block; height:180px; width:auto; max-width:none }
.logo-main{ font-size:2.2rem; line-height:1 }
.logo-subtitle{ font-size:0.8rem; font-weight:600; color: var(--brand); margin-top:2px; letter-spacing:0.02em }
.logo-subtitle-initial{ color:#000 !important; font-weight:800 }
.brand-name{ color: var(--brand); font-weight:700 }
.brand-main{ font-size:1em; font-weight:700 }
.brand-sub{ font-size:0.65em; font-weight:600; letter-spacing:0.02em }
.brand-initial{ color:#000 !important; font-weight:800 }
.logo a:focus-visible{ outline: 3px solid rgba(0,88,184,0.18); outline-offset: 4px }
.logo-highlight{ color:#000; font-weight:900; font-size:1.05em; vertical-align:middle }
nav ul{ list-style:none; display:flex; align-items:center; gap:26px; margin:0 12px 0 auto; padding:0; white-space:nowrap }
nav a{ color:#1A1A1A; text-decoration:none; font-weight:600; font-size:15px; letter-spacing:0.5px; display:inline-block; padding-bottom:2px; border-bottom:1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease }
/* Active nav item styling */
/* Active nav item styling: underline indicator instead of blue background */
nav a.active{ background: transparent; color: #005BBB; padding:0; border-radius:0; border-bottom: 1px solid #005BBB; }
nav a.active::first-letter{ color:#000; font-weight:800 }
nav a:hover{ color:#005BBB; text-decoration:none }
/* Language selector: use the same sans-serif as the page and match brand color */
select{
  font-family: inherit; /* use the page font (Segoe UI) */
  font-size: 1rem;
  color: var(--brand);
  background: transparent;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 6px 10px;
  border-radius: 6px;
  -webkit-appearance: none; /* neutralize native arrow on WebKit */
  appearance: none;
}
select:focus-visible{
  outline: 3px solid rgba(0,88,184,0.12);
  outline-offset: 2px;
}

/* Custom language display: show a styled label with black initial and brand-colored rest
   while keeping the native select accessible (we overlay a transparent select). */
.lang{ position: relative; display:inline-block; }
.lang select{ position: relative; z-index:2; opacity:0; width:48px; cursor:pointer }
.lang-display{ position:absolute; left:0; top:0; z-index:1; pointer-events:none; display:flex; align-items:center; justify-content:center; padding:7px 10px; border-radius:6px; border:1px solid #D0D7E2; background:#fff; min-width:48px; min-height:34px }
.lang-flag{ font-size:1rem; line-height:1; display:inline-block }
.lang-code{ display:none }
@media (max-width:600px){ .lang select, .lang-display { width:48px; min-width:48px } }

/* Keep layout stable when Google Translate injects helper UI and wrapper nodes */
body{ top:0 !important; }
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight,
body > .skiptranslate {
  display:none !important;
}
.goog-text-highlight {
  background: transparent !important;
  box-shadow: none !important;
}
body font,
body .translated-ltr,
body .translated-rtl {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

/* Give translated text room without changing the overall visual system */
nav ul,
.steps,
.step-box,
.panel,
.contact-info,
.project-info {
  min-width: 0;
}
.steps {
  align-items: stretch;
}
.step-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 170px;
}
h1, h2, h3, h4,
.panel p,
.step-box p,
.project-title,
.project-meta,
.contact-info p {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.contact-form{ display:flex; flex-direction:column; gap:12px; max-width:520px; margin:12px 0 18px }
.contact-form label{ font-weight:700; color:var(--brand) }
.contact-form input,
.contact-form textarea{ font: inherit; padding:10px 12px; border-radius:8px; border:1px solid rgba(0,0,0,0.18); background:#fff; color:var(--text) }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible{ outline:3px solid rgba(0,88,184,0.16); outline-offset:2px }
.btn-primary{ align-self:flex-start; background:#fff; color:#000; border:2px solid var(--brand); border-radius:8px; padding:10px 16px; font-weight:700; cursor:pointer }
.btn-primary:hover{ opacity:0.9 }
.contact-cta{ display:flex; justify-content:center; margin:16px 0 }
.header-blue {
  /* match regular section spacing so header is the same size as partners page */
  padding: 24px 6px;
  text-align: center;
  position: relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height: auto;
  background: var(--bg-wash);
  color: var(--text);
}
.header-blue h1{ font-size:0.9rem; margin:0 0 4px; color: var(--brand); }
.header-blue p{ margin:0 0 6px; color: var(--text); }

/* center header copy */
.header-blue .lead, .header-blue .tagline { text-align:center }

/* Keep the large initial black on blue background */
.header-blue h1::first-letter, .header-blue .caps { color: #000 }
.lead{ font-size:1.05rem; max-width:820px; margin:6px auto 12px; color:var(--text); }
.tagline{ font-size:1.05rem; max-width:820px; margin:6px auto 0; color:var(--text); font-weight:700 }

/* Ensure the intro/title block doesn't create extra spacing so sections stay uniform */
.page-title{ display:block; margin:0 0 var(--section-gap); }
.lead, .tagline { margin: 0 auto 0; }
/* Make the first letter of the tagline a large black initial to match headings */
.tagline::first-letter{
  color: #000;
  font-weight: 900;
  font-size: 1.5em;
  line-height: 1;
  margin-right: 0.06em;
  vertical-align: baseline;
  display: inline-block;
}
.btn{ display:inline-block; padding:10px 16px; border-radius:8px; border:2px solid var(--brand); color:var(--brand); background:transparent; text-decoration:none }
/* Main layout: give more vertical space to avoid sections overlapping */
/* Add extra top spacing so page content starts lower on the viewport */
main{ max-width:1000px; margin:0 auto; padding:108px 20px 64px }

/* Legacy page layout normalizer for older partner/client pages. */
main.legacy-content{
  display:flex;
  flex-direction:column;
  gap:14px;
}
main.legacy-content > h1,
main.legacy-content > h2,
main.legacy-content > p,
main.legacy-content > .project-gallery,
main.legacy-content > ul,
main.legacy-content > ol{
  width:100%;
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
}
main.legacy-content > h1,
main.legacy-content > h2{
  margin-bottom:4px;
}
main.legacy-content > p{
  margin-bottom:0;
}
.project-gallery{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
}
.project-gallery img{
  max-width:320px;
  width:100%;
  height:auto;
  border-radius:8px;
  display:block;
}
.logo-caption{
  width:100%;
  text-align:center;
  color:var(--muted);
  font-weight:600;
}
/* Increase default section spacing so content has breathing room */
/* Uniform section spacing and comfortable vertical rhythm */
section{
  margin: 0 0 var(--section-gap);
  padding-top:24px;
  padding-bottom:24px;
}
/* Adjust pseudo-panel inset so panels don't visually overlap neighboring sections */
/* Remove pseudo-element panels (they caused visual overlap).
   Use per-section backgrounds instead so panels don't cover each other. */
@media (max-width:600px){
  header{ border-radius:8px }
}

#about{ padding:24px 0; background: transparent }
#about { max-width:900px; margin:0 auto; text-align:left; margin-top:-24px; }
#about h2, #about p { color: var(--text); }
@media (max-width:600px){
  #about { padding: 14px 12px }
}

/* Reusable panel style: each section that needs a white backdrop should use .panel */
.panel{
  /* fully transparent panels per user request (no white boxes) */
  background: transparent;
  padding: 22px;
  border-radius: 0;
  box-shadow: none;
  border: none;
  /* center content inside panels so text blocks align similarly */
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (max-width:600px){
  nav{ height:72px; padding:0 10px 0 12px }
  .logo{ position:static; transform:none; margin-right:8px; font-size:1rem }
  .logo-image{ height:86px; max-width:150px }
  nav ul{ gap:12px; margin-right:6px }
  nav a{ font-size:14px; letter-spacing:0.3px }
  .lang select{ width:70px }
  .lang-display{ min-width:70px; padding:6px 8px }
  .logo-highlight{ font-size:0.95em }
  .header-blue { padding: 24px 6px; min-height: auto }
  .header-blue h1 { font-size: 0.85rem }
}

@media (max-width:768px){
  .content-image-small{
    width:68% !important;
    max-width:220px !important;
    margin:10px auto 0;
  }
  .content-image-wide{
    width:76% !important;
    max-width:260px !important;
    margin:10px auto 0;
  }
  .step-box .content-image-small{
    width:68% !important;
    max-width:220px !important;
    margin:10px auto 0;
  }
  main img:not(.logo-image):not(.partner-logo):not(.project-thumb){
    width:72% !important;
    max-width:240px !important;
    height:auto !important;
    margin-left:auto;
    margin-right:auto;
    display:block;
  }
  .step-box{ min-height: 0; }
}
#about .vision h2{
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 1.25rem;
}
#about .vision ul{ padding-left:20px }

.partners{ display:flex; gap:12px; flex-wrap:wrap; justify-content:center; margin-top:0 }
.partner{ flex:1 1 160px; padding:12px; border:none; border-radius:8px; text-align:center; background:transparent; display:block; color:inherit; text-decoration:none }

.partner-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:12px; margin:0 }
.partner-item{ display:flex; align-items:center; gap:10px; padding:6px 0; background: transparent; border-radius:0; text-decoration:none; color:var(--text); border:none }
.partner-item:hover{ transform: none; }
.partner-logo{ width:56px; height:40px; background: transparent; border-radius:4px; flex:0 0 56px }
.partner-name{ font-weight:700 }

/* partners grid */
.partners{ display:flex; gap:12px; flex-wrap:wrap; margin-top:0 }
.partner{ flex:1 1 160px; padding:12px; border:none; border-radius:8px; text-align:center; background:transparent; display:block; color:inherit; text-decoration:none }
h2{ font-size:1.25rem; margin:0 0 12px; color: var(--brand) }
h3{ margin:0 0 8px }
/* Center all headings on the page */
h1, h2, h3, h4 { text-align: center; }
.panel, section { scroll-margin-top: 12vh; }
.page-title, section h2 { scroll-margin-block-start: 12vh; }

/* Intro panel modifier: slightly larger title and lead, centered and tighter spacing */
/* Intro panel: make typography and spacing match the global site rhythm */
.panel--intro{ padding: 22px; }
.panel--intro .page-title{ font-size: 2.4rem; margin: 0 0 var(--section-gap); color: var(--brand); font-weight:800 }
.panel--intro .lead{ font-size: 1.05rem; max-width:80ch; margin: 0 auto 1em; color: var(--text); font-weight:700 }
.panel--intro .tagline{ font-size: 1.05rem; max-width:80ch; margin: 0 auto; color: var(--text); font-weight:700 }

/* Make intro visually consistent with other sections (no warm-beige backdrop) */
#intro.panel, #how.panel { background: transparent }

/* Make partners sections transparent so the underlying page background is visible */
#partners.panel, #subcontractors.panel {
  background: transparent; /* let body background show through */
  padding: 22px;
  border-radius: 0;
  box-shadow: none;
  border: none;
  align-items: stretch;
}

#partners .partner-grid, #subcontractors .partner-grid {
  margin-top: 8px;
}

/* Remove per-item white lifts so logos sit directly on the page background */
#partners .partner-item, #subcontractors .partner-item {
  background: transparent;
  padding: 6px 0;
  border-radius: 0;
  text-align: center;
}
.steps{ display:flex; gap:16px; flex-wrap:wrap }
.step-box{ flex:1 1 220px; padding:14px; border-radius:8px }
form{ display:grid; gap:8px; max-width:480px; margin-top:8px }
input,textarea{ padding:8px; border:1px solid #ccc; border-radius:6px }
footer{ text-align:center; padding:18px 8px; color:var(--muted) }
.logo-highlight{ color:#000 }
/* Make the heading initial (wrapped by the small JS) larger and black */
.caps{
  color: #000;
  display: inline-block;
  font-weight: 800;
  font-size: 1.3em;
  line-height: 1;
  margin-right: 0.06em;
  vertical-align: baseline;
}
/* Ensure the first typographic letter of headings is styled the same way
   so pages without the JS wrapper still show a black large initial. */
h1::first-letter, h2::first-letter, h3::first-letter, h4::first-letter {
  color: #000;
  font-weight: 800;
  font-size: 1.3em;
  line-height: 1;
  margin-right: 0.06em;
  vertical-align: baseline;
}

/* paragraph/list initials removed (reverted) */

/* Make the first letter of navigation links black for consistent initials */
nav a::first-letter {
  color: #000;
  font-weight: 800;
}
/* contact link styling */
.contact-info a{ color: var(--brand); text-decoration: none; }
/* removed hover styling per request */
.contact-info a:hover{ color: var(--brand); text-decoration: none; }
.contact-info{ text-align:center; max-width:480px; margin:8px auto; }

/* Keep each contact line on a single row on desktop */
#contact .contact-info{ display:flex; flex-direction:column; gap:12px; align-items:flex-start; }
#contact .contact-info p{ white-space: nowrap; display:inline-block; margin:0; }

/* On very small screens allow wrapping to prevent overflow */
@media (max-width:520px){
  #contact .contact-info p{ white-space: normal; display:block }
  #contact .contact-info{ align-items:stretch }
}

/* Center the contact section heading and intro line */
#contact { text-align: center; }
#contact > p { margin: 0 0 12px; }
.nav a:hover{ color:var(--brand); text-decoration:none; }
.btn:hover{ background: transparent; }
/* Ensure hover is inert but keyboard focus is visible */
nav a:focus-visible, .btn:focus-visible, .contact-info a:focus-visible {
  outline: 3px solid #003058; /* darker blue */
  outline-offset: 3px;
}
/* Decorative icons for phone and email links (no extra files) */
.contact-info a[href^="tel:"], .contact-info a[href^="mailto:"] {
  position: relative;
  padding-left: 22px;
}
.contact-info a[href^="tel:"]::before,
.contact-info a[href^="mailto:"]::before {
  content: "";
  width: 16px;
  height: 16px;
  display: inline-block;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-size: 16px 16px;
  opacity: 0.95;
}
.contact-info a[href^="tel:"]::before{
  /* simple solid circle indicator instead of svg image */
  background-color: var(--brand);
  border-radius:50%;
}
.contact-info a[href^="mailto:"]::before{
  background-color: var(--brand);
  border-radius:50%;
}
@media (max-width:600px){
  .steps{ flex-direction:column }
  nav ul{ display:none }
}

@media (max-width:600px){
  body.nav-open nav ul{
    display:flex;
    flex-direction:column;
    gap:10px;
    position:absolute;
    top:64px;
    left:8px;
    right:auto;
    min-width:220px;
    max-width:70vw;
    margin:0;
    padding:14px;
    background:rgba(255,255,255,0.98);
    border:1px solid #D0D7E2;
    border-radius:10px;
    box-shadow:0 8px 24px rgba(6,36,58,0.12);
    z-index:9998;
  }

  body.nav-open nav ul li{
    width:100%;
  }

  body.nav-open nav ul a{
    display:block;
    width:100%;
    padding:8px 2px;
    border-bottom:1px solid rgba(0,0,0,0.08);
  }

  body.nav-open nav ul li:last-child a{
    border-bottom:none;
  }
}


/* Removed pseudo-element panels in favor of per-section .panel
   to prevent white backdrop elements from overlapping each other. */

/* Client project cards - used on partners.html */
.project-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:16px; margin:0 }

/* Focused contact view: when user requests to see only contact info */
body.focus-section-contact nav,
body.focus-section-contact header,
body.focus-section-contact footer,
body.focus-section-contact main > :not(#contact) {
  display: none !important;
}
body.focus-section-contact #contact {
  display: block !important;
  margin: 6vh auto;
  max-width: 720px;
  padding: 28px 18px;
  background: var(--bg-wash);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
/* Close control inserted into the contact section when focused */
.focus-close {
  position: absolute;
  right: 12px;
  top: 10px;
  background: transparent;
  border: 2px solid var(--brand);
  color: var(--brand);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight:700;
}
.focus-close:focus{ outline:3px solid rgba(0,88,184,0.12); outline-offset:2px }
.project-card{ display:block; background: transparent; border-radius:6px; overflow:visible; text-decoration:none; color:var(--text); border:none; box-shadow:none; transition: none }
.project-card:hover{ transform: none }
.project-thumb{ width:100%; height:140px; object-fit:cover; display:block; background:transparent }
.project-info{ padding:12px 14px }

/* Ensure paragraph-level text inside panels is centered and constrained */
.panel p, .panel .lead, .panel .tagline {
  max-width: 820px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.project-title{ font-weight:800; margin-bottom:6px; color: var(--brand) }
.project-meta{ font-size:0.95rem; color:var(--muted) }

@media (max-width:600px){
  .project-thumb{ height:110px }
  .project-grid{ gap:12px }
  /* Reduce the extra top spacing on small screens */
  main{ padding:88px 12px 40px }
  .panel{ padding:16px 10px }
  section{ padding-top:16px; padding-bottom:16px }
  #about{ margin-top: 0; text-align:center; }
  #about p{ text-align:center; }
}

@media (max-width:400px){
  nav{ height:66px; padding:0 8px }
  .logo-image{ height:72px; max-width:120px }
  main{ padding:76px 10px 30px }
  .panel{ padding:12px 8px }
  section{ margin:0 0 28px; padding-top:12px; padding-bottom:12px }

  .content-image-small,
  .step-box .content-image-small{
    width:64% !important;
    max-width:190px !important;
  }

  .content-image-wide{
    width:70% !important;
    max-width:220px !important;
  }

  main img:not(.logo-image):not(.partner-logo):not(.project-thumb){
    width:66% !important;
    max-width:200px !important;
  }
}

/* Make all visible text on the site use the brand blue while keeping large initials black
   (use !important to reliably override earlier rules) */
body, body * {
  color: var(--brand) !important;
}

/* Preserve large initial-letter styling as solid black */
.caps,
.header-blue .caps,
.header-blue h1::first-letter,
h1::first-letter, h2::first-letter, h3::first-letter, h4::first-letter,
.page-title::first-letter, .lead::first-letter,
.tagline::first-letter, .logo-highlight, nav a::first-letter, .lang-initial, .lang-display .lang-initial,
.partner-name::first-letter, .project-title::first-letter {
  color: #000 !important;
  font-weight: 900 !important;
  font-size: 1.3em !important;
  line-height: 1 !important;
  margin-right: 0.06em !important;
  vertical-align: baseline !important;
  display: inline-block !important;
}

/* Final Android/mobile layout normalization */
@media (max-width:768px){
  html, body { overflow-x: hidden !important; }

  nav{ height:64px !important; padding:0 8px !important; }
  .logo-image{ height:78px !important; max-width:160px !important; }

  main{ padding:76px 10px 28px !important; }
  .panel{ padding:14px 8px !important; align-items:stretch !important; }
  section{ margin:0 0 28px !important; padding-top:12px !important; padding-bottom:12px !important; }

  .steps{ display:block !important; }
  .step-box{
    width:100% !important;
    max-width:100% !important;
    min-height:0 !important;
    margin:0 0 14px !important;
    padding:10px !important;
  }

  .content-image-small,
  .content-image-wide,
  .step-box .content-image-small{
    width:90% !important;
    max-width:360px !important;
    height:auto !important;
    display:block !important;
    margin:10px auto !important;
  }

  .content-image-wide{
    width:94% !important;
    max-width:520px !important;
  }

  main img{
    max-width:100% !important;
    height:auto !important;
    visibility:visible !important;
    opacity:1 !important;
  }

  #about{ margin-top:0 !important; }
  #about p, .panel p{ text-align:center !important; }

  .contact-form,
  #contact .contact-form,
  input,
  textarea,
  button{
    max-width:100% !important;
    width:100% !important;
  }

  #contact .btn-primary,
  .contact-cta .btn-primary{
    width:auto !important;
    max-width:none !important;
  }
}

@media (max-width:420px){
  .content-image-small,
  .content-image-wide,
  .step-box .content-image-small{
    max-width:300px !important;
  }

  .logo-image{ height:70px !important; max-width:140px !important; }
}

/* Final containment fix for Android/mobile: prevent sideways scroll and image overlap */
@media (max-width:900px){
  html, body{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  main{
    width:100% !important;
    max-width:100% !important;
    padding:76px 12px 32px !important;
    overflow-x:hidden !important;
  }

  section,
  .panel,
  .steps,
  .step-box,
  form,
  .contact-form{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .panel,
  .step-box{
    overflow:hidden !important;
  }

  .steps{
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
  }

  .step-box{
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  main img:not(.logo-image),
  .content-image-small,
  .content-image-wide,
  .step-box .content-image-small,
  .step-box img{
    display:block !important;
    position:static !important;
    float:none !important;
    clear:both !important;
    transform:none !important;
    width:92% !important;
    max-width:360px !important;
    height:auto !important;
    margin:10px auto 0 !important;
    object-fit:contain !important;
  }

  .logo-image{
    width:auto !important;
    max-width:140px !important;
    height:68px !important;
  }
}
