/* ==========================================================================
   J Shearer Roofing - home page additions
   Trust strip, Recent Projects row, FAQ block and offices footer.
   Upload to /css/home-extras.css (index.html links to it).
   Pixel units only: the root font size differs between the site stylesheets.
   ========================================================================== */

:root {
  --hm-navy: #014384;
  --hm-dark: #001055;
  --hm-sky: #6dcdff;
  --hm-ink: #253774;
  --hm-panel: #f4f7fb;
  --hm-line: #dbe3ee;
}

/* ---------- Section titles ---------- */
.hm-title {
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--hm-ink);
  text-align: center;
  margin: 0 0 10px;
}
.hm-lead {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  text-align: center;
  max-width: 780px;
  margin: 0 auto 26px;
}
.hm-section { padding: 6px 0 12px; }

/* ---------- Recent projects ---------- */
.hm-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--hm-line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 16, 85, .06);
  transition: transform .2s, box-shadow .2s;
}
.hm-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 16, 85, .14); }
.hm-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hm-card-body { padding: 18px 20px 22px; }
.hm-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 3px;
  background: var(--hm-navy);
  color: #fff;
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hm-card h3 {
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--hm-ink);
  margin: 0 0 8px;
}
/* only the title is the link; ::after stretches the click area over the card */
.hm-card h3 a { color: inherit; text-decoration: none; }
.hm-card h3 a::after { content: ""; position: absolute; inset: 0; }
.hm-card p { font-size: 15px; line-height: 1.5; color: #666; margin: 0; }

.hm-more { text-align: center; margin: 24px 0 6px; }
.hm-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  background: var(--hm-navy);
  color: #fff;
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background .2s;
}
.hm-btn:hover { background: var(--hm-dark); color: #fff; }

@media (max-width: 900px) { .hm-projects-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .hm-projects-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.hm-faq { max-width: 900px; margin: 0 auto; }
.hm-faq details {
  margin: 0 0 10px;
  background: #fff;
  border: 1px solid var(--hm-line);
  border-radius: 6px;
  overflow: hidden;
}
.hm-faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  cursor: pointer;
  list-style: none;
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--hm-ink);
}
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
  color: var(--hm-navy);
}
.hm-faq details[open] summary { background: var(--hm-panel); border-bottom: 1px solid var(--hm-line); }
.hm-faq details[open] summary::after { content: "\2212"; }
.hm-faq summary:focus-visible { outline: 3px solid var(--hm-sky); outline-offset: -3px; }
.hm-faq-answer { padding: 16px 20px 4px; }
.hm-faq-answer p { font-size: 16px; line-height: 1.6; color: #555; margin: 0 0 12px; }
.hm-faq-answer a { color: var(--hm-navy); text-decoration: underline; }

/* ---------- Offices footer ---------- */
.hm-footer {
  margin: 30px 0 0;
  padding: 44px 0 40px;
  background: var(--hm-dark);
  color: #dbe6f5;
}
/* full width background, content held to the same width as the page above */
.hm-footer .row { max-width: 1200px; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }
@media (max-width: 600px) { .hm-footer .row { padding-left: 16px; padding-right: 16px; } }
.hm-footer a { color: #fff; }
.hm-footer-title {
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  text-align: center;
  margin: 0 0 26px;
}

.hm-offices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 30px; }
.hm-office {
  padding: 22px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(109, 205, 255, .25);
  border-radius: 6px;
}
.hm-office h3 {
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--hm-sky);
  margin: 0 0 10px;
}
.hm-office address { font-style: normal; font-size: 15px; line-height: 1.6; margin: 0 0 12px; color: #dbe6f5; }
.hm-office-phone {
  display: block;
  margin-bottom: 10px;
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
}
.hm-office-phone:hover { color: var(--hm-sky); }
.hm-office-hours { font-size: 14px; line-height: 1.5; color: #b9cbe6; margin: 0 0 12px; }
.hm-office-links { font-size: 14px; margin: 0; }
.hm-office-links a { color: var(--hm-sky); text-decoration: underline; margin-right: 14px; }
.hm-office-links a:hover { color: #fff; }

.hm-footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--hm-navy);
  border-radius: 6px;
}
.hm-footer-cta p { flex: 1 1 320px; margin: 0; font-size: 18px; color: #fff; }
.hm-footer-cta .hm-btn { flex: 0 0 auto; }
.hm-footer-cta .hm-btn { background: #fff; color: var(--hm-dark); }
.hm-footer-cta .hm-btn:hover { background: var(--hm-sky); color: var(--hm-dark); }

@media (max-width: 900px) {
  .hm-offices { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hm-title, .hm-footer-title { font-size: 32px; }
  .hm-footer-cta { flex-direction: column; align-items: flex-start; }
}

/* ---------- H1 (was a styled paragraph): keep the previous look ---------- */
h1.heading { font-family: inherit; line-height: 1.6; margin: 0 0 17px; }

/* ==========================================================================
   Layout refresh below the hero: inset, intro, feature cards, service cards
   ========================================================================== */

/* side padding for everything below the hero */
.hm-main .row { max-width: 1200px; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }
/* Foundation makes every link bold; keep the new blocks to their own weights */
.hm-main a, .hm-footer a { font-weight: inherit; }
@media (max-width: 600px) { .hm-main .row { padding-left: 16px; padding-right: 16px; } }

/* equal height card rows (Foundation columns float, so use flex here) */
.hm-equal { display: flex; flex-wrap: wrap; }
.hm-equal::before, .hm-equal::after { display: none; }
.hm-equal > .columns { display: flex; margin-bottom: 26px; }
.hm-equal > .twelve.columns { display: block; margin-bottom: 0; }

/* ---------- Heading and intro ---------- */
.hm-intro { padding: 8px 0 44px; text-align: center; }
.hm-intro h1.heading {
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #666;
  margin: 0 0 28px;
}
.hm-intro h1 .heading,
.hm-intro h1 .heading.darkBlue {
  display: block;
  margin-top: 16px;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.05;
  color: var(--hm-navy);
}
.hm-intro h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin: 24px auto 0;
  border-radius: 2px;
  background: var(--hm-sky);
}
.hm-intro-text {
  max-width: 880px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.75;
  color: #555;
  text-align: left;
}
.hm-intro-text a { color: var(--hm-navy); text-decoration: underline; }
@media (max-width: 600px) {
  .hm-intro h1.heading { font-size: 20px; }
  .hm-intro h1 .heading, .hm-intro h1 .heading.darkBlue { font-size: 34px; }
  .hm-intro-text { font-size: 16px; }
}

/* ---------- 3x1 feature cards ---------- */
.hm-feature {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--hm-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 16, 85, .06);
}
.hm-feature img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hm-feature-body { padding: 20px 22px 8px; }
.hm-feature-title {
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 29px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--hm-ink);
  text-align: left;
  margin: 0 0 12px;
}
.hm-feature-body p { font-size: 16px; line-height: 1.65; color: #555; text-align: left; margin: 0 0 14px; }
.hm-feature-body a { color: var(--hm-navy); text-decoration: underline; }

/* ---------- 4x1 service cards ---------- */
.hm-svc {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hm-navy);
  box-shadow: 0 2px 10px rgba(0, 16, 85, .10);
  transition: transform .2s, box-shadow .2s;
}
.hm-svc:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 16, 85, .2); }
.hm-svc-img { overflow: hidden; }
.hm-svc-img img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .35s; }
.hm-svc:hover .hm-svc-img img { transform: scale(1.05); }
.hm-svc-title {
  margin: 0;
  padding: 14px 12px;
  text-align: center;
  font-family: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  background: var(--hm-navy);
  transition: background .2s;
}
.hm-svc:hover .hm-svc-title { background: var(--hm-dark); }
.hm-svc-title a { color: #fff; text-decoration: none; }
.hm-svc-title a::after { content: ""; position: absolute; inset: 0; }

/* responsive columns (Foundation forces width:auto on small screens) */
@media (max-width: 900px) {
  .hm-services > .three.columns { width: 50% !important; }
}
@media (max-width: 767px) {
  .hm-equal > .four.columns { width: 100% !important; flex: 0 0 100%; }
}
@media (max-width: 480px) {
  .hm-services > .three.columns { width: 100% !important; }
}
.hm-equal > .twelve.columns { width: 100% !important; flex: 0 0 100%; }

/* tablet: stack the three feature cards so the text stays readable */
@media (max-width: 900px) {
  .hm-equal > .four.columns { width: 100% !important; flex: 0 0 100%; }
  .hm-feature img { aspect-ratio: 16 / 7; }
}
.hm-services > .twelve.columns { margin-bottom: 18px; }

/* breathing room between hero and the welcome heading */
.hm-main { padding-top: 40px; }
@media (max-width: 600px) {
  .hm-main { padding-top: 28px; }
  .hm-intro { padding: 4px 0 32px; }
}

@media (max-width: 600px) { .hm-footer { padding: 32px 0 28px; } }

/* service images: portrait on larger screens, square on phones */
@media (max-width: 600px) {
  .hm-svc-img img { aspect-ratio: 1 / 1; }
}

/* two-line section title: small label above the main heading */
.hm-eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #666;
}
@media (max-width: 600px) { .hm-eyebrow { font-size: 18px; } }
.hm-reviews .hm-title { margin-bottom: 22px; }

/* divider above the reviews section */
.hm-reviews::before {
  content: "";
  display: block;
  height: 1px;
  margin: 14px 0 46px;
  background: linear-gradient(90deg, rgba(1, 67, 132, 0), rgba(1, 67, 132, .35), rgba(1, 67, 132, 0));
}
@media (max-width: 600px) { .hm-reviews::before { margin: 6px 0 34px; } }

/* mobile: stop the quote text stretching to a 320px tall box when the band stacks */
@media (max-width: 600px) {
  .hm-footer-cta p { flex: 0 0 auto; }
  .hm-footer-cta { gap: 14px; }
}

/* small print inside an FAQ answer (finance notice) */
.hm-faq-answer p.hm-faq-small { font-size: 13px; line-height: 1.5; color: #777; }

/* links inside FAQ answers keep the answer's weight (Foundation makes every link bold) */
.hm-faq-answer a { font-weight: inherit; }