/* ==========================================================================
   Services page (/services.php)
   Scoped styles, loaded only by ControllerServices.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Category filters
   One control for every breakpoint: pills that wrap on desktop and scroll
   horizontally on phones (replacing the old green <select>).
   -------------------------------------------------------------------------- */

.service-filters {
  position: relative;
}

.service_section_category {
  flex-wrap: wrap;
  gap: .625rem;
}

.service_section_category .btn-brand-secondary-r {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: .7rem 1.15rem;
  border-radius: 999px;
  background: #fff;
  color: #25545D;
  box-shadow: inset 0 0 0 1px rgba(37, 84, 93, .25);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.service_section_category .btn-brand-secondary-r:hover,
.service_section_category .btn-brand-secondary-r:focus {
  background: #25545D;
  color: #fff;
  box-shadow: inset 0 0 0 1px #25545D;
}

.service_section_category .btn-brand-secondary-r.mixitup-control-active {
  background: #25545D;
  color: #fff;
  box-shadow: inset 0 0 0 1px #25545D;
}

@media (max-width: 767.98px) {
  .service_section_category {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1rem;
  }

  .service_section_category::-webkit-scrollbar { display: none; }

  .service_section_category .btn-brand-secondary-r { scroll-snap-align: start; }

  /* Fade hints that the row keeps going. */
  .service-filters::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.5rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 70%);
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service_section_category .btn-brand-secondary-r { transition: none; }
}

/* --------------------------------------------------------------------------
   Symptom checker modal
   -------------------------------------------------------------------------- */

.sc-modal .modal-dialog {
  max-width: 30rem;
}

.sc {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(37, 84, 93, .3);
}

.sc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(37, 84, 93, .1);
}

.sc__back,
.sc__close {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #25545D;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
}

.sc__back { justify-content: flex-start; }
.sc__close { justify-content: center; color: rgba(37, 84, 93, .6); }

.sc__back:hover,
.sc__close:hover {
  background: #F6F6EF;
  color: #25545D;
}

.sc__back[hidden] { display: none; }

.sc__progress {
  display: flex;
  gap: 6px;
  margin: 0 auto;
}

.sc__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(37, 84, 93, .18);
}

.sc__dot.is-done { background: rgba(128, 171, 89, .5); }
.sc__dot.is-active { background: #80AB59; }

.sc__body {
  padding: 20px 22px 24px;
}

.sc__title {
  margin: 0 0 .5rem;
  color: #25545D;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.sc__lead {
  margin: 0 0 1.125rem;
  color: rgba(37, 84, 93, .78);
  font-size: .9375rem;
  line-height: 1.55;
}

.sc__list {
  margin: 0 0 1.125rem;
  padding: 0;
  list-style: none;
}

.sc__list li {
  position: relative;
  padding: .3rem 0 .3rem 1.5rem;
  color: rgba(37, 84, 93, .85);
  font-size: .9375rem;
}

.sc__list li::before {
  content: "";
  position: absolute;
  left: .35rem;
  top: .85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #80AB59;
}

.sc__options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.sc__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 84, 93, .18);
  border-radius: 12px;
  background: #fff;
  color: #25545D;
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.sc__option:hover,
.sc__option:focus {
  border-color: #25545D;
  background: #F6F6EF;
}

.sc__option svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: rgba(37, 84, 93, .45);
}

.sc__option--muted {
  color: rgba(37, 84, 93, .75);
  font-weight: 600;
}

.sc__option--primary {
  border-color: #25545D;
  background: #25545D;
  color: #fff;
}

.sc__option--primary:hover,
.sc__option--primary:focus {
  background: #1c4148;
  border-color: #1c4148;
  color: #fff;
}

.sc__badge {
  display: inline-block;
  margin-bottom: .75rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(128, 171, 89, .16);
  color: #4f7a2f;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sc__badge--urgent {
  background: rgba(223, 94, 89, .14);
  color: #b23a35;
}

.sc__actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.sc .sc__cta {
  padding: .8rem 1.25rem;
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.sc .sc__cta:hover,
.sc .sc__cta:focus { text-decoration: none; }

.sc .sc__cta--ghost {
  background: #fff;
  color: #25545D;
  box-shadow: inset 0 0 0 1px rgba(37, 84, 93, .28);
}

.sc .sc__cta--ghost:hover,
.sc .sc__cta--ghost:focus {
  background: #25545D;
  color: #fff;
}

.sc__note {
  margin: 1rem 0 0;
  color: rgba(37, 84, 93, .6);
  font-size: .75rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .sc__option { transition: none; }
}

/* --------------------------------------------------------------------------
   Service cards: swipe carousel on phones
   The grid keeps its normal layout until JS adds .is-carousel, so no-JS
   visitors still get the wrapped grid.
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  .treatments.is-carousel {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 0 1rem 1rem;
  }

  .treatments.is-carousel::-webkit-scrollbar { display: none; }

  .treatments.is-carousel > a {
    flex: 0 0 76vw;
    max-width: 76vw;
    margin: 0;
    scroll-snap-align: center;
  }

  .treatments.is-carousel .mix {
    width: 100% !important;
    margin: 0 !important;
  }

  .treatments.is-carousel .service_grid img {
    height: 230px !important;
  }

  .treatments.is-carousel .card-title {
    font-size: 1.0625rem !important;
    padding: 0 .25rem;
  }

  .service-swipe-hint {
    margin: 0 0 .75rem;
    padding: 0 1rem;
    color: rgba(37, 84, 93, .55);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
}

@media (min-width: 768px) {
  .service-swipe-hint { display: none; }
}

/* Anchor target for the "Browse all services" jump. */
.service-section {
  scroll-margin-top: 1rem;
}

/* Text link above the outcome buttons in the symptom checker. */
.sc__readmore {
  margin: -.5rem 0 1rem;
  font-size: .9375rem;
  font-weight: 700;
}

.sc__readmore a {
  color: #25545D;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sc__readmore a:hover,
.sc__readmore a:focus {
  color: #80AB59;
}

/* The full grid renders before mixitup applies the default filter, which
   flashes every service for a frame. Hold it back until the filter has run.
   Only applies when JS is present, so no-JS visitors still see the grid. */
.js-reveal .treatments:not(.is-ready) {
  opacity: 0;
}

.js-reveal .treatments.is-ready {
  opacity: 1;
  transition: opacity .18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .treatments.is-ready { transition: none; }
}

/* --------------------------------------------------------------------------
   Service cards: 3 per row on desktop, mobile's green name strip everywhere
   -------------------------------------------------------------------------- */

@media (min-width: 961px) {
  /* Inline-block cards carry whitespace between them, so leave room for it. */
  .treatments .mix {
    width: calc(100% / 3 - 1.75rem) !important;
    margin: .75rem !important;
  }
}

.treatments .mixitup_grid {
  height: 260px;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(37, 84, 93, .1);
  transition: box-shadow .18s ease;
}

.treatments .mixitup_grid:hover {
  box-shadow: 0 14px 30px rgba(37, 84, 93, .18);
}

.treatments .mixitup_grid img {
  height: 260px !important;
  object-fit: cover;
  border-radius: 0 !important;
}

/* Solid green strip with the service name, as on mobile. */
.treatments .mixitup_grid .card-title {
  background-color: #80AB59 !important;
  color: #fff !important;
  padding: 1rem .875rem !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.3;
  border-radius: 0 !important;
}

.treatments .mixitup_grid:hover .card-title {
  background-color: #25545D !important;
}

@media (max-width: 767.98px) {
  .treatments.is-carousel .mixitup_grid,
  .treatments.is-carousel .service_grid img {
    height: 260px !important;
  }
}
