.cf-services-reference {
  --cf-ref-ink: #172824;
  --cf-ref-copy: #424955;
  --cf-ref-green: #087044;
  --cf-ref-border: #e1e8e6;
  --cf-ref-gutter: clamp(8px, 1.15vw, 24px);
  color: var(--cf-ref-ink);
  background: #fff;
  font-family: Kanit, system-ui, sans-serif;
}

.cf-services-reference *,
.cf-services-reference *::before,
.cf-services-reference *::after { box-sizing: border-box; }

.cf-ref-shell {
  width: 100%;
  margin-inline: auto;
  padding-inline: max(var(--cf-ref-gutter), env(safe-area-inset-left)) max(var(--cf-ref-gutter), env(safe-area-inset-right));
}

.cf-services-reference a {
  color: inherit;
  text-decoration: none;
}

.cf-services-reference a:focus-visible {
  outline: 2px solid #087957;
  outline-offset: 3px;
}

.cf-ref-hero {
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(168deg, #eefafa 0%, #ebfbf8 48%, #fff 100%);
}

.cf-ref-hero-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: clamp(155px, 37.4vw, 235px);
  padding-block: clamp(23px, 6vw, 48px) 12px;
}

.cf-ref-hero-copy {
  position: relative;
  z-index: 1;
  padding-inline-start: 4px;
}

.cf-services-reference .cf-ref-hero-copy h1 {
  margin: 0;
  color: var(--cf-ref-ink);
  font-family: inherit;
  font-size: clamp(1.34rem, 7.25vw, 2.55rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-wrap: nowrap;
}

.cf-ref-hero-copy h1 span {
  display: block;
  margin-block-start: .08em;
  color: var(--cf-ref-green);
}

.cf-ref-hero-copy p {
  margin: .34em 0 0;
  color: var(--cf-ref-copy);
  font-size: clamp(.9rem, 3.8vw, 1.3rem);
  font-weight: 500;
  line-height: 1.35;
}

.cf-ref-hero-art {
  position: absolute;
  inset-inline-end: -.22rem;
  inset-block-end: .15rem;
  width: clamp(132px, 41vw, 265px);
  aspect-ratio: 1.19;
}

.cf-ref-hero-art::before {
  position: absolute;
  z-index: -1;
  inset: 1% -32% -10% -13%;
  border-radius: 68% 30% 30% 22%;
  background: linear-gradient(143deg, #a5ead6 0%, #dff7f2 57%, #e8f7f003 85%);
  content: '';
}

.cf-ref-hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

.cf-ref-actions {
  display: grid;
  gap: clamp(11px, 3.15vw, 18px);
  margin-block: 1px 0;
}

.cf-ref-actions .cf-ref-book {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .64em;
  min-height: clamp(44px, 12.3vw, 60px);
  padding: .37em .55em;
  border: 1px solid #25c5a3;
  border-radius: clamp(10px, 2.75vw, 14px);
  background-color: #009e74;
  background-image: linear-gradient(156deg, #0dc9a0, #049f79 52%, #008258) !important;
  box-shadow: 0 5px 8px #14684c27;
  color: #fff;
  font-size: clamp(.97rem, 4.85vw, 1.42rem);
  font-weight: 700;
  line-height: 1.28;
}

.cf-ref-book svg {
  flex: none;
  width: 1.36em;
  height: 1.36em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cf-ref-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 2.15vw, 16px);
  margin-block-start: clamp(3px, 1.3vw, 8px);
}

.cf-ref-contact a {
  display: flex;
  align-items: center;
  gap: clamp(6px, 2.7vw, 16px);
  min-height: clamp(50px, 14.2vw, 67px);
  min-width: 0;
  padding: 5px clamp(6px, 3vw, 18px);
  border: 1px solid var(--cf-ref-border);
  border-radius: clamp(10px, 3vw, 16px);
  background: linear-gradient(150deg, #f5f9f9, #eaf9f6);
  font-size: clamp(.73rem, 3.36vw, 1rem);
  font-weight: 500;
  line-height: 1.32;
}

.cf-ref-contact-icon {
  flex: none;
  display: grid;
  width: clamp(27px, 8.25vw, 43px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 24%;
  background: linear-gradient(163deg, #7ad84e, #0aa22e 68%, #008a2a);
  color: #fff;
  font-size: clamp(.95rem, 4vw, 1.35rem);
}

.cf-ref-contact-icon .fa-line {
  font-size: 1.14em;
}

.cf-ref-contact strong {
  display: block;
  color: var(--cf-ref-green);
  font-size: 1.1em;
  font-weight: 700;
  white-space: nowrap;
}

.cf-ref-price {
  display: flex;
  align-items: center;
  gap: clamp(9px, 3.3vw, 19px);
  min-height: 44px;
  padding: 5px clamp(9px, 3.45vw, 20px);
  border: 1px solid var(--cf-ref-border);
  border-radius: clamp(9px, 2.6vw, 14px);
  background: linear-gradient(150deg, #f9fafb, #f0f6f7);
  box-shadow: 0 2px 4px #1628200a;
  font-size: clamp(.92rem, 3.75vw, 1.13rem);
  font-weight: 600;
}

.cf-ref-price i {
  color: #078ecc;
  font-size: 1.45em;
}

.cf-ref-price svg {
  width: 1em;
  height: 1em;
  margin-inline-start: auto;
  fill: none;
  stroke: #19382d;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cf-ref-choices {
  margin-block-start: clamp(15px, 4.7vw, 29px);
}

.cf-services-reference .cf-ref-choices h2 {
  display: flex;
  align-items: center;
  gap: .42em;
  margin: 0 0 clamp(8px, 2.65vw, 15px) 3px;
  color: var(--cf-ref-ink);
  font-size: clamp(1.1rem, 5.25vw, 1.54rem);
  font-weight: 700;
  line-height: 1.22;
}

.cf-ref-choices h2 i {
  color: #11976b;
  font-size: 1.04em;
}

.cf-ref-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: clamp(36px, 9.4vw, 46px);
  padding: 2px;
  border: 1px solid var(--cf-ref-border);
  border-radius: clamp(8px, 2.5vw, 13px);
}

.cf-ref-tabs a {
  display: grid;
  place-items: center;
  border-radius: inherit;
  color: var(--cf-ref-copy);
  font-size: clamp(.93rem, 4.15vw, 1.16rem);
  font-weight: 600;
}

.cf-ref-tabs a[aria-selected="true"],
.cf-ref-tabs:not([role]) a:first-child {
  background: linear-gradient(145deg, #e7f9eb, #d5f1e3);
  color: var(--cf-ref-green);
  font-weight: 700;
}

.cf-ref-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 1.83vw, 13px);
  margin-block-start: clamp(8px, 3.4vw, 19px);
}

.cf-ref-cards[hidden] { display: none; }

.cf-ref-cards > a:not(.cf-ref-all-brands) {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: clamp(77px, 22vw, 110px);
  padding: clamp(4px, 1.2vw, 9px) 2px clamp(6px, 1.95vw, 11px);
  border-radius: clamp(9px, 3vw, 15px);
  background: #e8f5fc;
  font-size: clamp(.71rem, 3.42vw, 1rem);
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.cf-ref-cards > a:nth-child(2) { background: #eaf8ed; }
.cf-ref-cards > a:nth-child(3) { background: #f4edfd; }
.cf-ref-cards > a:nth-child(4) { background: #ebf3fa; }

.cf-ref-symptom-icon {
  width: clamp(48px, 16.1vw, 72px);
  height: clamp(41px, 13vw, 62px);
  background-image: url('/assets/changfix-services-reference-symptoms-20261201.webp');
  background-repeat: no-repeat;
  background-size: 400% auto;
  background-position: calc(var(--cf-ref-icon-index) * 100% / 3) center;
}

.cf-ref-brands i {
  color: #145944;
  font-size: 2em;
}

.cf-services-reference .cf-ref-all-brands {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 24px;
  color: var(--cf-ref-green);
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cf-ref-benefits {
  margin-block: clamp(12px, 4.2vw, 25px) 0;
  padding-block: clamp(10px, 3vw, 20px) clamp(9px, 3vw, 19px);
  border-top: 1px solid #dae2df;
}

.cf-services-reference .cf-ref-benefits h2 {
  margin: 0 0 .22em 4px;
  color: var(--cf-ref-ink);
  font-size: clamp(1rem, 4.66vw, 1.45rem);
  font-weight: 700;
  line-height: 1.28;
}

.cf-ref-benefits > p {
  margin: 0 0 .55em 4px;
  color: var(--cf-ref-copy);
  font-size: clamp(.83rem, 3.55vw, 1.02rem);
  line-height: 1.34 !important;
}

.cf-ref-benefits ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cf-ref-benefits li,
.cf-ref-benefits li > a {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.cf-ref-benefits li + li { border-inline-start: 1px solid #dae2df; }
.cf-ref-benefits strong {
  font-size: clamp(.68rem, 3.25vw, .99rem);
  font-weight: 700;
  line-height: 1.24;
}

.cf-ref-benefit-icon {
  width: clamp(36px, 12vw, 62px);
  aspect-ratio: 1;
  background-image: url('/assets/changfix-services-reference-benefits-20261201.webp');
  background-repeat: no-repeat;
  background-size: 390% 130%;
  background-position: calc(5.17% + var(--cf-ref-icon-index) * 44.83%) center;
}

/* Keep the previous details and store terms below the reference layout. */
body .cf-ref-legacy-contract .sh-left,
body .cf-ref-legacy-contract .sh-right > div:first-child > :not(.sh-note) {
  display: none !important;
}

body .cf-ref-legacy-contract .sh-layout,
body .cf-ref-legacy-contract .sh-right { display: block; }

body .cf-ref-legacy-contract .sh-note { margin: 0 0 12px; }

@media (max-width: 767px) {
  body:has(.cf-services-reference) > header.xh .xh-row {
    height: 61px !important;
    padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)) !important;
  }

  body:has(.cf-services-reference) > header.xh .xh-burger {
    width: 41px;
    height: 38px;
    border-radius: 11px;
  }

  body:has(.cf-services-reference) > header.xh .xh-logo .cf-top-logo {
    width: clamp(91px, 24vw, 108px) !important;
    height: auto !important;
  }

  body:has(.cf-services-reference) > nav.xh-bn {
    gap: 6px;
    padding: 4px 7px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid #e2e7e5;
    background: #fff;
  }

  body:has(.cf-services-reference) > nav.xh-bn a {
    min-height: 48px;
    border-radius: 11px;
    padding: 4px 0;
    color: #203a31;
    font-size: clamp(.65rem, 3.05vw, .86rem);
    line-height: 1.14;
  }

  body:has(.cf-services-reference) > nav.xh-bn a.on {
    background: #e3f5ea;
    color: #075e39;
  }

  body:has(.cf-services-reference) > nav.xh-bn a[href="/booking/"] {
    background: linear-gradient(145deg, #04bd8e, #008e62);
    color: #fff;
  }
}

@media (max-width: 355px) {
  .cf-ref-contact a { gap: 5px; }
  .cf-ref-contact-icon { width: 24px; }
}

@media (min-width: 768px) {
  .cf-ref-hero-inner {
    --cf-ref-art-width: clamp(255px, 33vw, 452px);
    min-height: calc(var(--cf-ref-art-width) * .76 + 30px);
    align-items: center;
    padding-block: 38px;
  }

  .cf-services-reference .cf-ref-hero-copy h1 {
    font-size: clamp(2.25rem, 4.8vw, 3.35rem);
  }

  .cf-ref-hero-art {
    width: var(--cf-ref-art-width);
    aspect-ratio: 1.32;
    inset-inline-end: clamp(14px, 2vw, 34px);
    inset-block-end: 9px;
  }

  .cf-ref-actions { margin-block-start: 18px; }
  .cf-ref-cards > a:not(.cf-ref-all-brands) { min-height: 120px; }
}

@media (min-width: 1100px) {
  .cf-ref-actions { grid-template-columns: 1fr 1fr; }
  .cf-ref-contact { margin-block-start: 0; }
  .cf-ref-price { grid-column: 1 / -1; }
}
