/**
 * Home and city testimonials: shared desktop/mobile layout and section rhythm.
 * Loaded after layout-rhythm.css to replace the old three-row quote placement.
 * The full route prefix also beats legacy per-slide important declarations.
 */

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 {
  box-sizing: border-box;
  padding: 3rem 15px 1.5rem !important;
  margin: 1.5rem 0 1.25rem !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .container-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .block-title-wrap {
  margin: 0 auto !important;
  padding: 0 15px !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .block-title-content {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .block-title {
  margin: 0 !important;
  font-size: 30px !important;
  line-height: 1.2 !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .block-subtitle {
  margin: 0 0 1.25rem !important;
  font-size: 28px !important;
  line-height: 1.2 !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .cyb-review-cta {
  margin: 0 0 1.5rem !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .block-content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 15px !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-slideshow-controls-top {
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: center !important;
  gap: 8px !important;
  padding: 0 0 0.85rem !important;
  margin: 0 0 2rem !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views_slideshow_slide_counter {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 34px;
  gap: 6px;
  grid-row: 1 !important;
  padding: 6px 14px !important;
  margin: 0 !important;
  border: 1px solid #c5e6d4;
  border-radius: 999px;
  background: #eaf7ee;
  color: #0e6c3e;
  -webkit-text-fill-color: #0e6c3e;
  font-size: 15px !important;
  font-weight: 700;
  line-height: 1.25 !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views_slideshow_controls_text {
  display: grid !important;
  grid-template-columns: repeat(3, 96px) !important;
  grid-row: 2 !important;
  gap: 8px !important;
  margin: 0 !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views_slideshow_controls_text a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 96px !important;
  min-height: 44px !important;
  padding: 8px !important;
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views_slideshow_controls_text a:focus-visible {
  outline: 3px solid #138450 !important;
  outline-offset: 3px;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  max-width: 1140px !important;
  gap: 0 1.5rem !important;
  padding: 1rem 1.25rem !important;
  align-items: stretch !important;
  align-content: stretch !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-row > .views-field {
  min-width: 0;
  overflow-wrap: anywhere;
  align-self: stretch !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-field-field-image .field-content,
html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-field-field-image .field-content div {
  padding: 0 !important;
  scale: 1 !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-field-body {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  height: 100% !important;
  padding: 2rem 0.5rem !important;
  justify-content: center !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-field-field-rating {
  grid-column: 1 !important;
  grid-row: 3 !important;
  justify-content: center !important;
}

html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-field-field-vehicle-detailed {
  grid-column: 2 !important;
  grid-row: 3 !important;
  padding: 0.75rem 0 0 !important;
  justify-content: center !important;
}

/* Keep labels available to assistive technology without consuming grid space. */
html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-field .views-label {
  display: block !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

@media (max-width: 991.98px) {
  html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 {
    padding-bottom: 1rem !important;
  }

  html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .block-title {
    font-size: 20px !important;
  }

  html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .block-subtitle {
    font-size: 14px !important;
  }

  html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .block-content {
    padding: 0 !important;
  }

  html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-slideshow-controls-top {
    padding-bottom: 0.65rem !important;
    margin-bottom: 0.5rem !important;
  }

  html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-row {
    gap: 0.45rem !important;
    padding: 0.45rem !important;
  }

  html body:is(.path-frontpage, .page-service-city) #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-field-field-vehicle-detailed {
    padding: 0 !important;
  }
}

/* Keep the work link readable in both light quotes and dark testimonial cards. */
html body:is(.path-frontpage, .page-service-city) #wrapper #block-martis-views-block-testimonials-block-1 .views-field-body a.testimonial-work-link,
html body.path-node #wrapper .testimonial-body a.testimonial-work-link {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

/* Match the city slideshow width while preserving the homepage mobile layout. */
@media (min-width: 1000.01px) {
  html body.path-frontpage #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 .views-slideshow-controls-top.clearfix,
  html body.path-frontpage #wrapper #main-content #content-wide-top #block-martis-views-block-testimonials-block-1 #views_slideshow_cycle_main_testimonials-block_1 {
    width: 100% !important;
    max-width: 1146px !important;
    margin-inline: auto !important;
  }
}
