/* Styles for the content pages migrated from the old site
   (HERS, load calculations, testing, services, training, about, contact, articles).
   Loaded after site.css, which supplies the colors, fonts and .wrap width. */

.main-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }

/* ---------- Page intro ---------- */

.page-intro { padding-top: 40px; padding-bottom: 20px; }
.page-intro h1 { font-size: 52px; max-width: 20em; }
.page-intro .lead { color: var(--ink-soft); max-width: 65ch; margin-top: 12px; }
.crumb { margin-bottom: 10px; font-size: 15px; font-weight: 600; }

.page-body { padding-bottom: 64px; }

/* ---------- Reading column ---------- */

.prose {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px 36px 36px;
  max-width: 920px;
  overflow: hidden;           /* contain floated images */
}

.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 34px; line-height: 1.1; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 22px; margin-top: 1.4em; }
.prose p, .prose li { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose a { color: var(--accent); }
.prose a:hover { color: var(--accent-hover); }
.prose .btn { color: #fff; }
.prose .btn-primary:hover { color: #fff; }
.prose img, .prose iframe, .prose video { max-width: 100%; height: auto; }
.prose img { border-radius: 4px; border: 1px solid var(--line); display: block; margin: 0 auto; }
.prose img.alignright { float: right; margin: 4px 0 14px 24px; max-width: 45%; }
.prose img.alignleft { float: left; margin: 4px 24px 14px 0; max-width: 45%; }
.prose p > a > img, .prose p > img { margin-top: 6px; margin-bottom: 6px; }
.prose .article-video { display: block; width: 100%; max-width: 640px; border-radius: 4px; background: #000; }
.prose iframe { border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.byline { color: var(--muted); font-size: 15px; font-weight: 500; }
.address { font-weight: 500; }
.hint { font-size: 14px; color: var(--muted); }

/* ---------- Article lists ---------- */

.group-title { font-size: 34px; margin: 40px 0 18px; }
.group-title:first-child { margin-top: 0; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 8px; }

/* ---------- Thermal imaging gallery ---------- */

.ir-gallery { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 1.2em; }
.ir { margin: 0; width: 300px; max-width: 100%; }
.ir img { width: 100%; height: auto; }
.ir figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: 15px; }
.ir figcaption span { color: var(--muted); font-size: 14px; }

/* ---------- Forms ---------- */

.info-form, .paypal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
}

.paypal-form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 22px 22px;
  margin: 1.4em 0;
}

.paypal-form h3 { margin-top: 0; }

.field { display: flex; flex-direction: column; gap: 5px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, fieldset.field > legend, .paypal-form > label { font-weight: 600; font-size: 15px; padding: 0; }
.field .req { color: var(--heat); }
fieldset.field { gap: 10px; }
fieldset.field .field { gap: 4px; }
label.radio { font-weight: 400; display: flex; gap: 8px; align-items: baseline; }

.info-form input[type="text"], .info-form input[type="email"], .info-form input[type="tel"],
.info-form select, .info-form textarea, .paypal-form input[type="text"], .paypal-form select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.info-form input:focus-visible, .info-form select:focus-visible, .info-form textarea:focus-visible,
.paypal-form input:focus-visible, .paypal-form select:focus-visible { outline: 2px solid var(--cold); outline-offset: 1px; }

.info-form button.btn, .paypal-form button.btn { cursor: pointer; font: inherit; font-weight: 600; align-self: flex-start; }
.info-form h2 { margin-top: 0.6em; font-size: 30px; }

/* ---------- Narrow screens ---------- */

@media (max-width: 760px) {
  .page-intro h1 { font-size: 38px; }
  .prose { padding: 22px 20px 26px; }
  .prose h2, .group-title { font-size: 28px; }
  .prose img.alignright, .prose img.alignleft { float: none; max-width: 100%; margin: 12px auto; }
}

/* ---------- Spam trap (honeypot) ---------- */
/* Visible to bots reading the HTML, never to people or screen readers. */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
