/* Mobile-only homepage design overrides. This file is also linked with a max-width media condition. */
@media (max-width: 760px) {
  .hero-inner {
    padding-bottom: 34px;
  }

  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 336px);
    gap: 20px 16px;
    margin-top: 24px;
  }

  .trust-item {
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.3;
  }

  .trust-item .material-symbols-rounded {
    width: 32px;
    flex: 0 0 32px;
    font-size: 32px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero-inner {
    padding: 26px 0 28px;
  }

  .hero h1 {
    max-width: 19ch;
    margin: 0 auto 12px;
    font-size: clamp(32px, 8.5vw, 36px);
    line-height: 1.08;
    letter-spacing: -.025em;
    text-wrap: balance;
  }

  .hero-subtitle {
    max-width: 320px;
    margin: 0 auto 20px;
    font-size: 14px;
    line-height: 1.45;
    text-wrap: balance;
  }

  .location-search {
    width: 100%;
    max-width: 520px;
    min-height: 58px;
    gap: 11px;
    padding: 6px 7px 6px 16px;
  }

  .location-search > svg {
    width: 22px;
    height: 22px;
  }

  .location-search input {
    font-size: 15px;
    padding: 12px 0;
  }

  .location-search button {
    width: 46px;
    height: 46px;
  }

  .location-search button svg {
    width: 21px;
    height: 21px;
  }

  .services > .service-carousel {
    width: min(calc(100% - 32px), 520px);
  }

  .service-card .service-photo {
    aspect-ratio: 1.2 / 1;
    object-fit: contain;
  }

  .how-it-works {
    padding: 30px 0 34px;
    background: #f8f8f4;
  }

  .how-it-works h2 {
    max-width: 330px;
    margin-inline: auto;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.08;
  }

  .steps {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 20px;
    text-align: left;
  }

  .steps::before {
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 24px;
    width: 2px;
    background: #d5e1d8;
    content: "";
  }

  .steps li {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 66px;
    grid-template-columns: 48px 32px minmax(0, 1fr);
    grid-template-areas:
      "icon number title"
      "icon number copy";
    align-items: start;
    column-gap: 8px;
    padding: 10px 12px 10px 0;
  }

  .steps li::before {
    position: absolute;
    z-index: 0;
    inset: 0 0 0 48px;
    border: 1px solid #e8ece6;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(39, 75, 57, .06);
    content: "";
  }

  .step-icon {
    position: relative;
    z-index: 1;
    align-self: center;
    justify-self: center;
    width: 38px;
    height: 38px;
    grid-area: icon;
    margin: 0;
    border: 4px solid #fff;
    background: #f3f6ef;
    box-shadow: 0 0 0 1px #e4ebe5, 0 5px 14px rgba(39, 75, 57, .08);
  }

  .step-icon svg {
    width: 21px;
    height: 21px;
  }

  .step-number {
    position: relative;
    z-index: 1;
    display: grid;
    align-self: stretch;
    place-items: center;
    grid-area: number;
    border-right: 1px solid #e2e9e3;
    color: #0b8054;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 25px;
    font-variant-numeric: oldstyle-nums;
    font-weight: 400;
    line-height: 1;
    text-align: center;
  }

  .steps h3 {
    position: relative;
    z-index: 1;
    grid-area: title;
    max-width: none;
    margin: 0 0 2px;
    font-size: 14px;
    line-height: 1.25;
  }

  .steps p {
    position: relative;
    z-index: 1;
    grid-area: copy;
    max-width: none;
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
  }

  .service-rail {
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
  }

  .service-number {
    top: calc(var(--service-card-width) - 62px);
    left: 14px;
    width: 42px;
    height: 42px;
    font-size: 15px;
  }

  .service-card .service-copy {
    min-height: 282px;
    padding: 22px 12px 12px;
    justify-content: flex-start;
  }

  .service-card .service-copy h3 {
    min-height: 42px;
    font-size: 16px;
  }

  .service-description {
    min-height: 34px;
    margin: 4px 0 6px !important;
    font-size: 12px !important;
  }

  .service-card ul {
    min-height: 0;
    margin-bottom: 8px;
    gap: 4px;
  }

  .service-card li {
    padding-left: 20px;
    font-size: 11px;
    line-height: 1.2;
  }

  .service-card li::before {
    width: 16px;
    height: 16px;
    font-size: 11px;
  }

  .service-card .service-copy strong {
    margin: auto 0 9px;
    font-size: 24px;
  }

  .book-button {
    min-height: 40px;
    font-size: 13px;
  }

  .learn-link {
    margin-top: 8px;
    font-size: 12px;
  }

  .service-arrow {
    display: none;
  }

  .service-scroll-range {
    display: none;
  }

  .service-pagination:not([hidden]) {
    display: flex;
    min-height: 40px;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .service-page-dot {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .service-page-dot::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #b8cbc1;
    content: "";
    transition: width 180ms ease-out, background-color 180ms ease-out;
  }

  .service-page-dot[aria-current="page"]::before {
    width: 20px;
    background: #00754a;
  }

  .service-page-dot:focus-visible {
    outline: 3px solid #00754a;
    outline-offset: 3px;
  }
}

@media (max-width: 420px) {
  .trust-strip {
    column-gap: 16px;
    row-gap: 18px;
  }

  .trust-item {
    gap: 8px;
    font-size: 11px;
  }

  .trust-item .material-symbols-rounded {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-rail {
    scroll-behavior: auto;
  }
}

@media (max-width: 360px) {
  .service-number {
    top: calc(var(--service-card-width, 220px) - 74px);
  }
}

@media (max-width: 600px) {
  body.home-page .care-result.is-match {
    padding: 0;
    overflow: hidden;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(27 40 32 / 8%);
  }

  body.home-page .care-result.is-match .match-card {
    gap: 0;
  }

  body.home-page .care-result.is-match .match-photo-wrap,
  body.home-page .care-result.is-match .match-photo-placeholder {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 1.2 / 1;
    border-radius: 14px;
    overflow: hidden;
  }

  body.home-page .care-result.is-match .match-photo {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: cover;
  }

  body.home-page .care-result.is-match .match-photo-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 10px;
    background: #f5faf5;
    color: #355e45;
    font-size: 11px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
  }

  body.home-page .care-result.is-match .match-photo-badge .material-symbols-rounded {
    font-size: 19px;
  }

  body.home-page .care-result.is-match .match-content {
    display: block;
    padding: 16px 0 0;
  }

  body.home-page .care-result.is-match .match-heading {
    padding: 0 14px;
  }

  body.home-page .care-result.is-match .result-kicker {
    color: #6e7371;
    font-size: 10px !important;
    letter-spacing: .13em;
    text-transform: uppercase;
  }

  body.home-page .care-result.is-match h2 {
    margin: 4px 0 3px;
    color: #171b18;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.08;
  }

  body.home-page .care-result.is-match .match-location {
    margin: 7px 0 0;
    gap: 6px;
    color: #626966;
    font-size: 14px;
  }

  body.home-page .care-result.is-match .match-location .material-symbols-rounded {
    font-size: 19px;
  }

  body.home-page .care-result.is-match .match-summary,
  body.home-page .care-result.is-match .match-method,
  body.home-page .care-result.is-match .match-trust {
    display: none;
  }

  body.home-page .care-result.is-match .match-mobile-trust {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0 0;
    padding: 12px 8px;
    border-radius: 12px;
    background: #f8f8f4;
    list-style: none;
  }

  body.home-page .care-result.is-match .match-mobile-trust.has-cleaning-count {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.home-page .care-result.is-match .match-mobile-trust li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #555e59;
    font-size: 10px;
    line-height: 1.3;
  }

  body.home-page .care-result.is-match .match-mobile-trust li + li {
    border-left: 1px solid #e7e9e2;
  }

  body.home-page .care-result.is-match .match-mobile-trust .material-symbols-rounded {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 50%;
    background: #e7eedc;
    color: #264b38;
    font-size: 18px;
  }

  body.home-page .care-result.is-match .match-windows {
    margin-top: 17px;
    padding: 0 0 0;
  }

  body.home-page .care-result.is-match .slot-label {
    margin: 0 0 2px !important;
    color: #181d19;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px !important;
  }

  body.home-page .care-result.is-match .slot-date-mobile {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    color: #707671;
    font-size: 13px;
  }

  body.home-page .care-result.is-match .slot-list,
  body.home-page .care-result.is-match .slot-empty-default {
    display: none;
  }

  body.home-page .care-result.is-match .slot-list-mobile {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  body.home-page .care-result.is-match .slot-list-mobile li {
    display: grid;
    min-height: 40px;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #faf3f3;
    color: #242925;
    font-size: 12px;
  }

  body.home-page .care-result.is-match .slot-list-mobile .material-symbols-rounded {
    font-size: 18px;
  }

  body.home-page .care-result.is-match .match-actions {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 0;
    border: 0;
  }

  body.home-page .care-result.is-match .retry-search,
  body.home-page .care-result.is-match .view-profile {
    min-height: 44px;
    width: 100%;
    border-radius: 24px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    font-weight: 400;
  }

  body.home-page .care-result.is-match .retry-search {
    border: 1px solid #111;
    background: #111;
    color: #fff;
  }

  body.home-page .care-result.is-match .retry-search:hover {
    border-color: #303030;
    background: #303030;
    color: #fff;
  }

  body.home-page .care-result.is-match .retry-search:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
    box-shadow: 0 0 0 2px #fff;
  }

  body.home-page .care-result.is-match .view-profile {
    border: 1px solid #365a47;
    background: #fff;
    color: #365a47;
  }

  .gallery-track {
    scrollbar-width: none;
  }

  .gallery-track::-webkit-scrollbar {
    display: none;
  }

  .gallery-pagination:not([hidden]) {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
  }

  .gallery-page-dot {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .gallery-page-dot::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #E8DADD;
    content: "";
    transition: width 180ms ease-out, background-color 180ms ease-out;
  }

  .gallery-page-dot[aria-current="page"]::before {
    width: 20px;
    background: #F6CBD8;
  }

  .gallery-page-dot:focus-visible {
    outline: 3px solid #171717;
    outline-offset: 3px;
  }
}
