/* Keep the quote anchored to the same viewport grid on each service page. */
main .rsm-quote-hero {
  --quote-header: 111px;
  --top-gap: 28px;
  --bottom-gap: 28px;
  --stats-reserve: 116px;
  --card-height: 562px;
  --hero-height: calc(100dvh - var(--stats-reserve));
  --start: calc(var(--quote-header) + var(--top-gap));
  position: relative;
  box-sizing: border-box;
  display: block;
  min-height: var(--hero-height);
  margin: 0;
  padding: max(var(--start), calc((var(--hero-height) - var(--card-height) + var(--start) - var(--bottom-gap)) / 2)) 24px var(--bottom-gap);
}

main .rsm-quote-hero .rsm-quote-layout {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: grid;
  width: 100%;
  max-width: 1200px;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: start;
  gap: 40px;
  margin: 0 auto;
  padding: 0;
}

.rsm-quote-layout .rsm-quote-intro { min-width: 0; }
.rsm-quote-layout > .rsm-unified-quote { width: 100%; max-width: none; margin: 0; }
.rsm-quote-lead .rsm-phone-title, .rsm-quote-lead .rsm-phone-summary { display: none; }

@media (max-width: 1240px) {
  main .rsm-quote-hero { --quote-header: 90px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  main .rsm-quote-hero { --stats-reserve: 151px; }
  main .rsm-quote-hero .rsm-quote-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 24px;
  }
  .rsm-quote-hero .rsm-quote-lead h1 { font-size: 34px; }
}

@media (min-width: 769px) and (max-height: 800px) {
  main .rsm-quote-hero { --top-gap: 20px; --bottom-gap: 20px; --stats-reserve: 95px; --card-height: 473px; }
}
@media (min-width: 769px) and (max-width: 1024px) and (max-height: 800px) {
  main .rsm-quote-hero { --stats-reserve: 114px; }
}
@media (min-width: 769px) and (max-height: 680px) {
  main .rsm-quote-hero { --top-gap: 12px; --bottom-gap: 4px; --stats-reserve: 71px; --card-height: 402px; }
}

@media (max-width: 768px) {
  main .rsm-quote-hero {
    --quote-header: 84px;
    min-height: 0 !important;
    margin: 0 !important;
    padding: calc(var(--quote-header) + 12px) 18px 12px !important;
  }
  main .rsm-quote-hero .rsm-quote-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px !important;
  }
  .rsm-quote-hero .rsm-quote-layout .rsm-quote-intro:has(.rsm-quote-lead) { display: contents; }
  .rsm-quote-layout .rsm-quote-lead h1 {
    margin: 0 0 6px !important;
    color: #fff;
    font-size: 24px !important;
    line-height: 1.18 !important;
    letter-spacing: -.3px;
  }
  .rsm-quote-layout .rsm-quote-lead .rsm-wide-title { display: none; }
  .rsm-quote-layout .rsm-quote-lead .rsm-phone-title { display: inline; }
  .rsm-quote-layout .rsm-quote-lead .rsm-phone-summary {
    display: block;
    max-width: none;
    margin: 0 0 2px !important;
    color: #edf1f5;
    font-size: 13px;
    line-height: 1.35;
  }
  .rsm-quote-layout > .rsm-unified-quote { order: 1; }
  .rsm-quote-layout .rsm-quote-details { order: 2; }
}

/* Reserve the Commercial details row before the counters on every phone layout. */
@media (max-width: 768px) {
  main .rsm-quote-hero .rsm-quote-layout {
    grid-template-rows: auto auto minmax(7.9375rem, auto);
  }
  main .rsm-quote-layout > .mobile-hero-features {
    order: 2;
    align-self: center;
    margin-top: 0 !important;
  }
  main .rsm-quote-layout .rsm-specialty-intro .rsm-quote-details {
    align-self: center;
  }
}

/* The Commercial introduction must fit alongside the form on shorter laptops. */
@media (min-width: 769px) and (max-width: 1150px), (min-width: 769px) and (max-height: 800px) {
  main .rsm-quote-layout .rsm-quote-lead h1 {
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.14;
    margin-bottom: 14px;
  }
  main .rsm-quote-details p.subheading,
  main .rsm-quote-details p.highlight {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 16px;
  }
  main .rsm-quote-details .hero-feature svg {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
  }
  main .rsm-quote-details .hero-feature span {
    font-size: 12px;
    line-height: 1.25;
  }
}

/* Keep the same column centers and line breaks when the metric labels change. */
main .rsm-quote-hero ~ .reviews-banner .review-item {
  flex: 0 0 var(--metric-width);
  min-width: 0;
}
main .rsm-quote-hero ~ .reviews-banner .review-item:nth-child(1) { --metric-width: 7.5rem; }
main .rsm-quote-hero ~ .reviews-banner .review-item:nth-child(2) { --metric-width: 6.625rem; }
main .rsm-quote-hero ~ .reviews-banner .review-item:nth-child(3) { --metric-width: 6.25rem; }
main .rsm-quote-hero ~ .reviews-banner .review-item:nth-child(4) { --metric-width: 6.75rem; }

main .rsm-quote-hero ~ .reviews-banner .review-item > div {
  inline-size: max-content;
  white-space: nowrap;
  text-align: center;
}

@media (min-width: 769px) {
  main .rsm-quote-hero ~ .reviews-banner .reviews-header h2 {
    min-inline-size: 22em;
  }
}
@media (max-width: 768px) {
  main .rsm-quote-hero ~ .reviews-banner .reviews-header {
    width: 100%;
  }
}
@media (max-width: 350px) {
  main .rsm-quote-hero ~ .reviews-banner .reviews-header h2 {
    min-block-size: 2lh;
    align-content: center;
  }
}

.rsm-videos {
  background: #f4f8f8;
  color: #102b46;
  padding: clamp(24px, 3.5vw, 48px) clamp(18px, 3vw, 36px);
}
.rsm-videos__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "heading library controls" "track track track";
  align-items: center;
  gap: 16px 24px;
}
.rsm-videos .rsm-videos__heading {
  grid-area: heading;
  margin: 0;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.14;
  font-weight: 750;
  letter-spacing: -.025em;
  color: #102b46;
  text-align: left;
}
.rsm-videos__controls { grid-area: controls; display: flex; gap: 7px; }
.rsm-videos [hidden] { display: none !important; }
.rsm-videos__controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #a9c9c8;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: #102b46;
  cursor: pointer;
}
.rsm-videos__controls button:disabled { opacity: .42; cursor: default; }
.rsm-videos__controls button:enabled:hover { background: #d6f3ef; }
.rsm-videos__controls svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.rsm-videos .rsm-videos__track {
  grid-area: track;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3);
  gap: 18px;
  margin: 0;
  padding: 0 0 3px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}
.rsm-videos[data-video-carousel-enhanced] .rsm-videos__track { scrollbar-width: none; }
.rsm-videos[data-video-carousel-enhanced] .rsm-videos__track::-webkit-scrollbar { display: none; }
.rsm-videos__slide { min-width: 0; margin: 0; scroll-snap-align: start; }
.rsm-videos__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #102b46;
}
.rsm-videos__media video { display: block; width: 100%; height: 100%; object-fit: contain; background: #0b1e2c; }
.rsm-videos[data-video-carousel-enhanced] .rsm-videos__slide:not([data-video-started]) video { object-fit: cover; }
.rsm-videos__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}
.rsm-videos__play svg {
  box-sizing: border-box;
  width: 50px;
  height: 50px;
  padding: 13px;
  border-radius: 50%;
  background: #62d0c9;
  fill: #102b46;
  box-shadow: 0 1px 8px rgb(12 35 64 / 25%);
}
.rsm-videos__play:hover svg { background: #95e2dd; }
.rsm-videos .rsm-videos__caption {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 9px 0 0;
  min-height: 2.6em;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 650;
  color: #102b46;
  text-decoration: none;
}
.rsm-videos .rsm-videos__library {
  grid-area: library;
  justify-self: start;
  color: #155e61;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.rsm-videos a:hover { text-decoration: underline; }
.rsm-videos :focus-visible { outline: 3px solid #0b706f; outline-offset: -3px; }
@media (max-width: 900px) {
  .rsm-videos .rsm-videos__track { grid-auto-columns: calc((100% - 18px) / 2); }
}
@media (max-width: 580px) {
  .rsm-videos__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "heading controls" "track track" "library library";
    gap: 12px;
  }
  .rsm-videos .rsm-videos__track { grid-auto-columns: 86%; gap: 12px; }
  .rsm-videos .rsm-videos__caption { font-size: 15px; }
}

/* Shared quote card, sized from the Residential form. */
.rsm-service-quote.rsm-unified-quote {
  font-family: Montserrat, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  text-align: left;
}

.rsm-service-quote.rsm-unified-quote > .hero-right {
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px;
  border: 0;
  border-radius: 0 0 12px 12px !important;
  background: #fff;
  color: #333;
  text-align: left;
  box-shadow: 0 20px 40px rgb(0 0 0 / 15%);
}

.rsm-service-quote.rsm-unified-quote .hero-right h2 {
  margin: 0 0 8px;
  color: #0d2a45;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.rsm-service-quote.rsm-unified-quote .hero-right > p {
  margin: 0 0 18px;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.rsm-service-quote.rsm-unified-quote .hero-form-new label {
  display: block;
  margin: 0 0 5px;
  color: #0d2a45;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.rsm-service-quote.rsm-unified-quote .hero-form-new .input-wrapper {
  position: relative;
  margin: 0 0 15px;
}

.rsm-service-quote.rsm-unified-quote .input-wrapper svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #999;
  pointer-events: none;
}

.rsm-service-quote.rsm-unified-quote .hero-form-new input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 12px 14px 12px 42px;
  border: 1px solid #ddd;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #222;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: normal;
  transition: border-color .2s;
}

.rsm-service-quote.rsm-unified-quote .hero-form-new input:focus {
  border-color: #45b7b0;
}

.rsm-service-quote.rsm-unified-quote .hero-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin: 10px 0 0;
  padding: 14px;
  border: 0;
  border-radius: 6px;
  background: var(--primary, #62d0c9) !important;
  color: var(--dark, #0d2a45) !important;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
  transition: background-color .2s;
}

.rsm-service-quote.rsm-unified-quote .hero-btn:hover {
  background: #79ddd7 !important;
}

.rsm-service-quote.rsm-unified-quote .secure-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: #888;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.rsm-service-quote.rsm-unified-quote .secure-text svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #888;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rsm-service-quote.rsm-unified-quote .home-mobile-copy { display: none; }

.rsm-service-quote.rsm-unified-quote .hero-trust {
  display: block;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  text-align: center;
}

.rsm-service-quote.rsm-unified-quote .hero-trust > p {
  margin: 0 0 10px;
  color: #888;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.rsm-service-quote.rsm-unified-quote .trust-badges {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 8px;
}

.rsm-service-quote.rsm-unified-quote .badge {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
}

.rsm-service-quote.rsm-unified-quote .badge-google svg,
.rsm-service-quote.rsm-unified-quote .badge-yelp svg {
  display: block;
  height: 18px;
  margin-bottom: 6px;
}

.rsm-service-quote.rsm-unified-quote .stars {
  margin-bottom: 2px;
  color: #fbbc04;
  font-size: 11px;
  letter-spacing: 1px;
}

.rsm-service-quote.rsm-unified-quote .rating-text {
  color: #333;
  font-size: 10px;
  font-weight: 600;
}

@media (min-width: 769px) and (max-width: 1024px) {
  .rsm-service-quote.rsm-unified-quote > .hero-right { padding: 22px; }
  .rsm-service-quote.rsm-unified-quote .hero-right h2 { font-size: 23px; }
}

@media (min-width: 769px) and (max-height: 800px) {
  .rsm-service-quote.rsm-unified-quote > .hero-right { padding: 14px 22px; }
  .rsm-service-quote.rsm-unified-quote .hero-right h2 { font-size: 23px; margin-bottom: 6px; }
  .rsm-service-quote.rsm-unified-quote .hero-right > p { font-size: 13px; line-height: 1.35; margin-bottom: 12px; }
  .rsm-service-quote.rsm-unified-quote .hero-form-new .input-wrapper { margin-bottom: 4px; }
  .rsm-service-quote.rsm-unified-quote .hero-form-new input[type="text"] { min-height: 42px; padding-block: 10px; }
  .rsm-service-quote.rsm-unified-quote .hero-btn { padding: 12px; min-height: 44px; }
  .rsm-service-quote.rsm-unified-quote .hero-trust { margin-top: 12px; padding-top: 10px; }
  .rsm-service-quote.rsm-unified-quote .hero-trust > p { margin-bottom: 6px; }
  .rsm-service-quote.rsm-unified-quote .badge img { max-height: 40px; width: auto; max-width: 100%; }
}

@media (min-width: 769px) and (max-height: 680px) {
  .rsm-service-quote.rsm-unified-quote > .hero-right { padding: 12px 20px; }
  .rsm-service-quote.rsm-unified-quote .hero-right h2 { font-size: 22px; margin-bottom: 8px; }
  .rsm-service-quote.rsm-unified-quote .hero-right > p,
  .rsm-service-quote.rsm-unified-quote .hero-trust > p { display: none; }
  .rsm-service-quote.rsm-unified-quote .hero-form-new label { font-size: 12px; margin-bottom: 3px; }
  .rsm-service-quote.rsm-unified-quote .hero-trust { margin-top: 8px; padding-top: 8px; }
  .rsm-service-quote.rsm-unified-quote .badge { padding: 4px; }
  .rsm-service-quote.rsm-unified-quote .badge img { max-height: 32px; }
}

@media (max-width: 768px) {
  .rsm-service-quote.rsm-unified-quote .rsm-quote-link { background: #e0e6ec; }
  .rsm-service-quote.rsm-unified-quote .rsm-quote-link--commercial {
    min-height: 49px;
    border-top: 2px solid #789e9a;
    background: #dce7e6;
  }
  .rsm-service-quote.rsm-unified-quote .rsm-quote-link[aria-current="page"] { background: #fff; }
  .rsm-service-quote.rsm-unified-quote > .hero-right {
    display: block !important;
    padding: 11px 14px 10px !important;
    box-shadow: 0 4px 14px rgb(8 22 35 / 18%) !important;
  }
  .rsm-service-quote.rsm-unified-quote .hero-right h2 {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
  }
  .rsm-service-quote.rsm-unified-quote .hero-right > p,
  .rsm-service-quote.rsm-unified-quote .hero-trust,
  .rsm-service-quote.rsm-unified-quote .home-desktop-copy { display: none !important; }
  .rsm-service-quote.rsm-unified-quote .home-mobile-copy { display: inline; }
  .rsm-service-quote.rsm-unified-quote .hero-form-new label {
    font-size: 13px !important;
    margin-bottom: 3px !important;
  }
  .rsm-service-quote.rsm-unified-quote .hero-form-new .input-wrapper { margin-bottom: 6px !important; }
  .rsm-service-quote.rsm-unified-quote .input-wrapper svg {
    left: 12px !important;
    width: 16px !important;
    height: 16px !important;
  }
  .rsm-service-quote.rsm-unified-quote .hero-form-new input[type="text"] {
    min-height: 44px;
    padding: 8px 12px 8px 36px !important;
    font-size: 16px !important;
    line-height: 1.25;
    border-radius: 7px !important;
  }
  .rsm-service-quote.rsm-unified-quote .hero-btn {
    min-height: 44px;
    margin-top: 2px !important;
    padding: 9px 12px !important;
    border-radius: 7px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
  }
  .rsm-service-quote.rsm-unified-quote .secure-text {
    margin-top: 6px !important;
    color: #64748b !important;
    font-size: 11px !important;
  }
}
