/* =====================================================================
   SUB PROJECT PAGE ONLY (index.html)

   ===================================================================== */


/* 1. no background image on #about (it's the home page's map) */
body:has(#mg-grid) #about::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

body #projects   { background-color: #fff; }

/* 2. #about wraps the whole page (see note above), so it gets no padding
      or overflow clipping of its own; the About content gets the home
      page's spacing (45px top / 50px bottom) on its own container instead */
body:has(#mg-grid) #about.section-padding {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  overflow: visible !important;
  font-size: inherit;                  /* stop tempo's "larger" cascading into the nested sections */
}
body:has(#mg-grid) #about > .container {
  padding-top: 45px;
  padding-bottom: 50px;
  font-size: larger;                   /* the larger text applies to the About content only */
  /* keeps the gray band edge to edge behind the About content */
  box-shadow: 0 0 0 100vmax #f4f4f4;
  clip-path: inset(0 -100vmax);
}

/* the other sections: normal flow, container stays Bootstrap's width */
body:has(#mg-grid) #projects {
  align-items: stretch;                /* style.css centers flex children, which can shrink the container on small screens */
}

/* anchor links (nav bar) land with the heading clear of the fixed navbar */
body:has(#mg-grid) #about > .container,
body:has(#mg-grid) #projects,
body:has(#mg-grid) #support,
body:has(#mg-grid) #connect,
body:has(#mg-grid) #disclaimer {
  scroll-margin-top: 30px;
}


/* 3. headings: centered on the page, same spacing as the home page.
      tempo-style's "#about .page-title { margin-left: 120px; max-width: 45em }"
      hits every heading nested in #about, so reset them all */
body:has(#mg-grid) .page-title {
  max-width: none !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  text-align: center !important;
  margin-bottom: 40px;
}
body:has(#mg-grid) #about > .container .page-title {
  margin-bottom: 22px;                 /* same as the home page About title */
}
body:has(#mg-grid) #disclaimer .page-title {
  margin-bottom: 30px;
}
body:has(#mg-grid) .page-title h1 {
  text-align: center;
}
body:has(#mg-grid) .page-title .pg-titl-bdr-btm {
  margin-left: auto !important;
  margin-right: auto !important;
}


/* 4. About + Disclaimer paragraphs: one centered column under the centered
      heading, text justified inside it */
body:has(#mg-grid) #about .info p,
body:has(#mg-grid) #disclaimer .col-md-12 p {
  max-width: 56em;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.55;
  -webkit-hyphens: auto;
          hyphens: auto;               /* avoids big gaps between words on narrower lines */
}
body:has(#mg-grid) #about .info p {
  margin-bottom: 0;
}
body:has(#mg-grid) #disclaimer .col-md-12 p {
  margin-bottom: 15px;
}
body:has(#mg-grid) #disclaimer .col-md-12 p:last-child {
  margin-bottom: 0;
}


/* 5. Made Possible By: logos centered */
body:has(#mg-grid) #support .support {
  justify-content: center;
  align-items: center;
}
body:has(#mg-grid) #support .column {
  text-align: center;
}
body:has(#mg-grid) #support .image-box {
  display: flex;
  justify-content: center;
}
body:has(#mg-grid) #support .image-box img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}


/* 6. Connect: uses the home page's own styling from tempo-style.css
      (centered lead, cards, idea banner), nothing extra needed */


/* 7. Maps gallery: "Show more" button centered */
body:has(#mg-grid) #projects .mg-more {
  text-align: center;
}
body:has(#mg-grid) #projects .mg-grid {
  justify-items: center;
}


/* 8. phones: About text centered, like the home page */
@media (max-width: 767px) {
  body:has(#mg-grid) #about > .container {
    padding-top: 35px;
    padding-bottom: 45px;
  }
  body:has(#mg-grid) #about .info p {
    text-align: center;
  }
}