/* BG Paving — post-migration overrides (loaded after bg-paving.css).
   Brand red: #da1a14. Bump the ?v= query in build.js when this changes. */

/* ---------- ALTCHA widget: self-contained light theme so the "I'm not a robot"
   label stays legible on BOTH the light contact page and dark footer/hero forms. */
altcha-widget {
  display: block;
  margin: 0 0 16px;
  max-width: 280px;
  --altcha-color-base: #ffffff;
  --altcha-color-text: #1a1a1a;
  --altcha-color-border: #cbd2d9;
  --altcha-color-border-focus: #da1a14;
  --altcha-color-active: #da1a14;
  --altcha-color-error-text: #b42318;
  --altcha-color-footer-bg: #f4f6f8;
  --altcha-border-radius: 10px;
}
altcha-widget, .quote__form altcha-widget { color: #1a1a1a; }

/* ---------- Form success box: a real green confirmation (Webflow's default is a
   washed-out mint). contact.js sets display:block on success. */
.quote__form-success.w-form-done,
.w-form-done {
  display: none;
  background: #e7f7ec;
  border: 1.5px solid #1a7f37;
  color: #0f5132;
  border-radius: 12px;
  padding: 24px 22px;
  text-align: center;
  font-weight: 600;
}
.quote__form-error.w-form-fail { border-radius: 12px; }

/* ---------- Navbar above hero video / overlays on scroll ---------- */
.navbar, .navbar-component, .nav-bar, [class*="navbar"] { z-index: 1000; }

/* ---------- Service-area hub: search box + pagination ---------- */
.area-search { max-width: 560px; margin: 0 auto 2rem; }
.area-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1.15rem;
  font-size: 16px; /* >=16px: no iOS auto-zoom */
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #1a1a1a;
}
.area-search__input:focus { border-color: #da1a14; } /* border-only focus (no shadow ring -> no iOS h-scroll) */
.area-search__input::placeholder { color: #8a8a8a; }
.area-search__empty { text-align: center; margin-top: 1rem; opacity: .85; }

#area-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 2.5rem auto 0;
}
.area-pager__btn {
  min-width: 42px;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #1a1a1a;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.area-pager__btn:hover:not(:disabled) { border-color: #da1a14; color: #da1a14; }
.area-pager__btn.is-active { background: #da1a14; border-color: #da1a14; color: #fff; }
.area-pager__btn:disabled { opacity: .45; cursor: default; }
.area-pager__ellipsis { padding: 0 4px; opacity: .6; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Card / link hover affordances ---------- */
.service-card-title, .service-link-block, .service-image-link { transition: color .2s ease, opacity .2s ease; }
.service-link-block:hover .service-card-title { color: #da1a14; }
.service-area-item { transition: color .2s ease, transform .15s ease; }
.service-area-item:hover { color: #da1a14; }
.footer-menu-link { transition: color .2s ease; }
.footer-menu-link:hover { color: #da1a14; }

/* ---------- Mobile fixes ---------- */
@media screen and (max-width: 991px) {
  /* Location map: never let an absolute map disappear on mobile — stack it. */
  .location.full-location .map-absolute,
  .full-location .map-absolute {
    position: relative !important;
    width: 100% !important;
    margin-left: 0 !important;
    height: 320px;
    margin-top: 24px;
    border-radius: 12px;
    overflow: hidden;
  }
  .location.full-location .map-absolute iframe,
  .full-location .map-absolute iframe { width: 100%; height: 100%; border: 0; }
}

@media screen and (max-width: 767px) {
  /* keep inputs >=16px so iOS Safari doesn't auto-zoom + h-scroll */
  .quote__form-input, .w-input, .w-select, textarea.w-input { font-size: 16px; }
  #area-pager { gap: 6px; }
  .area-pager__btn { min-width: 38px; padding: 9px 11px; font-size: 14px; }
}

/* ═══════════════════════════════════════════
   SELF-HOSTED REVIEWS — additions only
   Cards render into the template's own .review-grid / .review-card and
   .testimonial-author-* classes, so the card chrome (2px --primary border,
   --light-bg fill, 15px radius, 70px round author image) is inherited, not
   restyled. These rules cover what those classes never had: a sane grid for a
   variable number of cards, the Facebook verdict, the aggregate strip, the
   Read more toggle and pagination.
   ═══════════════════════════════════════════ */
.reviews-block { width: 100%; }

/* .review-grid is a fixed 4-column template meant for rating badges; reviews need
   room to read. Scoped to the reviews block so the original stays untouched. */
.reviews-block .review-grid {
  grid-template-rows: auto;
  grid-template-columns: 1fr;
  grid-column-gap: 20px;
  grid-row-gap: 20px;
}
@media (min-width: 768px)  { .reviews-block .review-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .reviews-block .review-grid { grid-template-columns: 1fr 1fr 1fr; } }

.rv-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  text-align: left;
}
/* Pagination only works if hidden cards actually hide: the display above beats the
   UA stylesheet's [hidden]{display:none}. No !important, so <noscript> still wins. */
.rv-card[hidden] { display: none; }

.rv-stars { color: var(--primary); font-size: 18px; letter-spacing: 2px; line-height: 1; }

/* Facebook records a recommendation, not a star rating — say so. */
.rv-verdict {
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-color);
}
.rv-verdict-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 100%;
  background-color: var(--primary);
  color: var(--white);
  font-size: 12px;
  line-height: 1;
}

/* The template's .testimonial-author-image-block is a 70px circle sized for the big
   slider testimonial; in a 3-up grid card it dominates the row. Scope a smaller one
   to the review card and leave the template's own size alone. */
.rv-card .testimonial-author-image-block {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: cover;
  background-color: var(--neutral);
}
.rv-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}
.rv-card .rv-stars { font-size: 16px; }
.rv-card .testimonial-author-block { margin-top: auto; padding-top: 20px; grid-column-gap: 12px; grid-row-gap: 12px; }
.rv-card .testimonial-auhtor-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}
.rv-card .testimonial-author-designation {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-color);
  opacity: .7;
  text-decoration: none;
}
.rv-card a.testimonial-author-designation:hover { opacity: 1; text-decoration: underline; }

/* Review length is wildly uneven, so clamp inside the reviews block only and let
   Read more expand in place. .testimonial-summary keeps its own styling elsewhere. */
.reviews-block .testimonial-summary {
  max-width: none;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reviews-block--teaser .testimonial-summary { -webkit-line-clamp: 5; line-clamp: 5; }
.reviews-block .testimonial-summary.is-expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}
.rv-more {
  align-self: flex-start;
  margin-top: 10px;
  padding: 0;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #c4170f;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.rv-more:hover { color: var(--text-color); }
.rv-more[hidden] { display: none; }

.reviews-agg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin-bottom: 28px;
}
.reviews-agg .rv-stars { font-size: 24px; }
.reviews-agg-text { font-size: 17px; color: var(--text-color); }
.reviews-agg-text strong { font-weight: 700; }

.reviews-pg { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; }
.reviews-pg[hidden] { display: none; }
.reviews-pg-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border: 2px solid var(--primary);
  border-radius: 15px;
  background-color: var(--light-bg);
  color: var(--text-color);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
button.reviews-pg-link:not(.reviews-pg-current):hover { background-color: var(--primary); color: var(--white); }
.reviews-pg-current { background-color: var(--primary); color: var(--white); cursor: default; }
.reviews-pg-gap { font-weight: 700; padding: 0 2px; }

.reviews-more { text-align: center; margin-top: 24px; font-size: 16px; color: var(--text-color); }
.reviews-more a { color: #c4170f; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.reviews-more a:hover { color: var(--text-color); }

/* The reviews section is .black-bg (pure black). The cards carry their own light
   fill, but the aggregate strip and the "see all" line sit directly on it — the
   default near-black body colour measured 1.16:1 there, and the brand red link
   4.14:1. Flip both on dark sections. */
.black-bg .reviews-agg-text,
.black-bg .reviews-agg-text strong,
.black-bg .reviews-more { color: var(--white); }
.black-bg .reviews-more a { color: var(--neutral); }
.black-bg .reviews-more a:hover { color: var(--white); }
.black-bg .reviews-pg-link { background-color: var(--white); }
