/* =========================================================
   Single Service banner overlay
   Scoped to single Services CPT only (body.single-services).
   Matches Figma Frame 4 soft wash + brand navy tint for contrast.
   ========================================================= */
body.single-services .yh-page-hero.yh-page-hero--photo.yh-single-hero,
body.single-services #brxe-ybfpvp.yh-page-hero {
  isolation: isolate;
  position: relative;
  min-height: 685px !important;
  height: auto !important;
  padding: 200px 24px 80px !important;
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  background-size: cover !important;
  background-position: center !important;
}

body.single-services .yh-page-hero.yh-page-hero--photo.yh-single-hero::before,
body.single-services #brxe-ybfpvp.yh-page-hero::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  /* Exact requested overlay; ~0.8 keeps the hero photo faintly visible (Figma image @ 20%) */
  background: linear-gradient(180deg, #D6F0FF 0%, #D1D1D1 100%) !important;
  opacity: 0.8 !important;
}

body.single-services .yh-page-hero.yh-page-hero--photo.yh-single-hero > *,
body.single-services #brxe-ybfpvp.yh-page-hero > * {
  position: relative;
  z-index: 2;
}

body.single-services .yh-page-hero .yh-page-hero__content {
  width: min(990px, 100%);
  margin: 0 auto;
  padding-inline: 12px;
}

/* Tablet */
@media (max-width: 1100px) {
  body.single-services .yh-page-hero.yh-page-hero--photo.yh-single-hero,
  body.single-services #brxe-ybfpvp.yh-page-hero {
    min-height: 560px !important;
    padding: 160px 20px 64px !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  body.single-services .yh-page-hero.yh-page-hero--photo.yh-single-hero,
  body.single-services #brxe-ybfpvp.yh-page-hero {
    min-height: 420px !important;
    padding: 120px 16px 48px !important;
  }

  body.single-services .yh-page-hero .yh-page-hero__content h1,
  body.single-services #brxe-ybfpvp.yh-page-hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
    line-height: 1.15 !important;
  }
}

/* Small phones */
@media (max-width: 480px) {
  body.single-services .yh-page-hero.yh-page-hero--photo.yh-single-hero,
  body.single-services #brxe-ybfpvp.yh-page-hero {
    min-height: 360px !important;
    padding: 110px 14px 40px !important;
  }
}

/* YUEHANG SMS Coverflow — Figma node 117:1724 (isolated add-on) */
.yh-sms {
  --yh-sms-primary: #051e3e;
  --yh-sms-muted: #475467;
  --yh-sms-accent: #ffae00;
  --yh-sms-white: #ffffff;
  --yh-sms-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --yh-sms-font-display: "Manrope", system-ui, sans-serif;
  --yh-sms-font-body: "Inter", system-ui, sans-serif;

  width: 100%;
  padding: 80px 0 60px;
  background: var(--yh-sms-white);
  color: var(--yh-sms-primary);
  font-family: var(--yh-sms-font-body);
  overflow: visible;
}

.yh-sms__inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.yh-sms__head {
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.yh-sms__title {
  margin: 0;
  font-family: var(--yh-sms-font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.4vw, 48px);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--yh-sms-primary);
  letter-spacing: 0;
}

.yh-sms__subtitle {
  margin: 30px 0 0;
  font-size: clamp(1rem, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--yh-sms-muted);
  font-weight: 400;
}

.yh-sms__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 43.52px;
  margin-top: 30px;
  padding: 0 16px;
}

.yh-sms__tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 4px 0 8px;
  margin: 0;
  cursor: pointer;
  font-family: var(--yh-sms-font-body);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--yh-sms-muted);
  transition: color 0.25s var(--yh-sms-ease), border-color 0.25s var(--yh-sms-ease);
  white-space: nowrap;
}

.yh-sms__tab:hover {
  color: var(--yh-sms-primary);
}

.yh-sms__tab.is-active {
  color: var(--yh-sms-accent);
  border-bottom-color: var(--yh-sms-accent);
  font-weight: 400;
}

.yh-sms__stage {
  position: relative;
  margin-top: 36px;
  padding-top: 48px;
}

.yh-sms__view-all {
  position: absolute;
  top: 12px;
  right: 0;
  z-index: 5;
  font-size: 17px;
  font-weight: 400;
  color: var(--yh-sms-primary);
  text-decoration: none;
  padding: 12px 20px;
  transition: color 0.2s ease;
}

.yh-sms__view-all:hover {
  color: var(--yh-sms-accent);
}

.yh-sms__viewport {
  position: relative;
  width: min(1160px, 100%);
  min-height: 520px;
  height: 520px;
  margin: 0 auto;
  overflow: visible;
}

.yh-sms__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.yh-sms__card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 156px;
  height: 354px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 40px rgba(5, 30, 62, 0.12);
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.55s var(--yh-sms-ease),
    width 0.55s var(--yh-sms-ease),
    height 0.55s var(--yh-sms-ease),
    opacity 0.4s var(--yh-sms-ease),
    box-shadow 0.4s ease;
  cursor: pointer;
  z-index: 1;
}

.yh-sms__card.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Coverflow slots: far-left, near-left, center, near-right, far-right */
.yh-sms__card[data-slot="-2"] {
  width: 156px;
  height: 354px;
  transform: translate(calc(-50% - 482px), -50%);
  z-index: 2;
}

.yh-sms__card[data-slot="-1"] {
  width: 216px;
  height: 399px;
  transform: translate(calc(-50% - 277px), -50%);
  z-index: 3;
}

.yh-sms__card[data-slot="0"] {
  width: 300px;
  height: auto;
  min-height: 444px;
  transform: translate(-50%, -48%);
  z-index: 5;
  box-shadow: none;
  cursor: default;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}

.yh-sms__card[data-slot="1"] {
  width: 216px;
  height: 399px;
  transform: translate(calc(-50% + 277px), -50%);
  z-index: 3;
}

.yh-sms__card[data-slot="2"] {
  width: 156px;
  height: 354px;
  transform: translate(calc(-50% + 482px), -50%);
  z-index: 2;
}

.yh-sms__card-media {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background-color: #d9e2ec;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  flex: 1 1 auto;
}

.yh-sms__card:not([data-slot="0"]) .yh-sms__card-media {
  position: absolute;
  inset: 0;
}

.yh-sms__card[data-slot="0"] .yh-sms__card-media {
  height: 294px;
  flex: 0 0 294px;
}

.yh-sms__card:not([data-slot="0"]) .yh-sms__card-body {
  display: none;
}

.yh-sms__card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 18px;
  text-align: center;
  background: transparent;
}

.yh-sms__card-title {
  margin: 0;
  max-width: 300px;
  font-family: var(--yh-sms-font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.63;
  letter-spacing: -1.02px;
  text-transform: capitalize;
  color: var(--yh-sms-primary);
}

.yh-sms__card-desc {
  margin: 10px 0 0;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--yh-sms-muted);
  font-weight: 400;
}

.yh-sms__card-actions {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  min-height: 48px;
}

.yh-sms__details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1.333px solid var(--yh-sms-primary);
  border-radius: 8px;
  color: var(--yh-sms-primary);
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  background: var(--yh-sms-white);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.yh-sms__details:hover {
  background: var(--yh-sms-primary);
  color: #fff;
}

.yh-sms__play {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--yh-sms-accent);
  text-decoration: none;
  flex: 0 0 48px;
  transition: transform 0.25s var(--yh-sms-ease), box-shadow 0.25s ease;
}

.yh-sms__play:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 174, 0, 0.35);
}

.yh-sms__play img {
  width: 18px;
  height: 18px;
  display: block;
}

.yh-sms__nav {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 32px;
  height: 32px;
  margin-top: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--yh-sms-primary);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.yh-sms__nav:hover {
  background: #0a2a5e;
  transform: scale(1.06);
}

.yh-sms__nav--prev {
  left: max(0px, calc(50% - 610px));
}

.yh-sms__nav--next {
  right: max(0px, calc(50% - 610px));
}

/* Tablet */
@media (max-width: 1100px) {
  .yh-sms__viewport {
    height: 460px;
  }

  .yh-sms__card[data-slot="-2"] {
    transform: translate(calc(-50% - 360px), -50%) scale(0.92);
  }

  .yh-sms__card[data-slot="-1"] {
    width: 180px;
    height: 340px;
    transform: translate(calc(-50% - 210px), -50%);
  }

  .yh-sms__card[data-slot="0"] {
    width: 260px;
    height: 400px;
  }

  .yh-sms__card[data-slot="0"] .yh-sms__card-media {
    height: 250px;
    flex-basis: 250px;
  }

  .yh-sms__card[data-slot="1"] {
    width: 180px;
    height: 340px;
    transform: translate(calc(-50% + 210px), -50%);
  }

  .yh-sms__card[data-slot="2"] {
    transform: translate(calc(-50% + 360px), -50%) scale(0.92);
  }

  .yh-sms__card-title {
    font-size: 20px;
    letter-spacing: -0.6px;
  }

  .yh-sms__nav--prev {
    left: 0;
  }

  .yh-sms__nav--next {
    right: 0;
  }
}

/* Mobile: only the active center card */
@media (max-width: 767px) {
  .yh-sms {
    padding: 56px 0 24px;
  }

  .yh-sms__inner {
    width: min(100% - 32px, 1280px);
  }

  .yh-sms__tabs {
    gap: 8px 18px;
    margin-top: 22px;
    padding: 0;
  }

  .yh-sms__tab {
    font-size: 14px;
    white-space: normal;
    text-align: center;
    max-width: 46%;
  }

  .yh-sms__stage {
    padding-top: 40px;
  }

  .yh-sms__view-all {
    right: 50%;
    transform: translateX(50%);
    top: 0;
    padding: 8px 12px;
    font-size: 15px;
  }

  .yh-sms__viewport {
    height: auto;
    min-height: 420px;
  }

  .yh-sms__track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 420px;
  }

  .yh-sms__card {
    position: relative;
    top: auto;
    left: auto;
    display: none;
    width: min(300px, 100%);
    height: auto;
    transform: none !important;
    opacity: 1;
    margin: 0 auto;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .yh-sms__card[data-slot="0"] {
    display: flex;
    width: min(300px, 100%);
    height: auto;
    pointer-events: auto;
  }

  .yh-sms__card[data-slot="0"] .yh-sms__card-media {
    height: 240px;
    flex-basis: 240px;
  }

  .yh-sms__card-body {
    display: flex !important;
  }

  .yh-sms__nav {
    top: 160px;
    margin-top: 0;
  }

  .yh-sms__nav--prev {
    left: 0;
  }

  .yh-sms__nav--next {
    right: 0;
  }
}

/* =========================================================
   Hide single-service sections marked empty (no dynamic data)
   ========================================================= */
body.single-services section.yh-is-empty-dynamic,
body.single-services .brxe-section.yh-is-empty-dynamic {
  display: none !important;
}
