/* Services page */
.page-services {
  background-color: var(--bg);
  background-image: url("../assets/bg-texture-large.jpg");
  background-size: cover;
  background-attachment: scroll;
}

.page-services .footer-grid::before {
  background-image: url("../assets/contact/footer-bg.jpg");
}

/* Hero */
.services-hero {
  position: relative;
  padding: 0.5rem 0 40px;
  text-align: center;
  overflow: visible;
}

.services-hero-inner {
  position: relative;
  z-index: 1;
}

.services-hero-tree {
  position: absolute;
  inset: -1.5rem 0 -2rem;
  z-index: 0;
  background: url("../assets/services/waist-tree.jpg") calc(50% + 5rem) calc(50% + 3rem) / min(792px, 101.2%) auto no-repeat;
  opacity: 0.42;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    ellipse 70% 72% at calc(50% + 5rem) calc(48% + 3rem),
    #000 20%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse 70% 72% at calc(50% + 5rem) calc(48% + 3rem),
    #000 20%,
    transparent 78%
  );
}

.services-hero-inner > *:not(.services-hero-tree) {
  position: relative;
  z-index: 1;
}

.services-hero h1 {
  font-family: var(--font-brand);
  font-size: clamp(2.35rem, 5.5vw, 3.35rem);
  font-weight: 500;
  margin: 50px 0 0.5rem;
}

.services-hero .deco-line {
  width: 200px;
  margin: 0 auto 0.85rem;
}

.services-hero-sub {
  margin: 0 auto;
  max-width: 640px;
  color: #4b4b4b;
  font-size: 15px;
  line-height: 1.55;
}

/* Main layout */
.services-main {
  padding: 0 0 3rem;
}

.services-layout {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  column-gap: 0;
  align-items: start;
}

/* Sidebar nav */
.services-nav {
  display: flex;
  flex-direction: column;
  width: 250px;
  gap: 0;
  border: 1px solid rgba(176, 164, 149, 0.45);
  border-radius: 4px 0 0 4px;
  overflow: hidden;
}

.services-nav-btn {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.9rem 1rem;
  border: none;
  border-bottom: 1px solid rgba(176, 164, 149, 0.45);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-brand);
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.services-nav-btn.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--line-red);
  border-radius: 2px 0 0 2px;
}

.services-nav-btn img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.services-nav-btn:hover {
  color: var(--accent);
}

.services-nav-btn:last-child {
  border-bottom: none;
}

.services-nav-btn.is-active {
  background-color: var(--paper);
  color: var(--accent);
  font-weight: 700;
}

/* Panel */
.services-panel {
  min-width: 0;
  padding: 1.25rem 30px;
  background-color: var(--paper);
  border: 1px solid rgba(176, 164, 149, 0.65);
  border-radius: 0 4px 4px 4px;
}

.service-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.service-panel-head h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(1.2rem, 2.2vw, 30px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
}

.service-price {
  flex-shrink: 0;
  font-family: var(--font-brand);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 500;
  color: var(--brown);
  white-space: nowrap;
}

.service-panel-head .service-price {
  margin-bottom: 5px;
  font-size: 20px;
  font-weight: 400;
  color: #000;
  line-height: 1;
}

.service-panel-head .service-price-amount {
  font-size: 25px;
  color: var(--brown);
}

.service-body {
  margin: 0 0 1.25rem;
  width: 828px;
  max-width: 100%;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
}

.service-body em {
  font-style: italic;
}

.service-subhead {
  margin: 1.5rem 0 0.65rem;
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.service-subhead .service-price {
  font-size: 18px;
}

.service-compare {
  margin: 0 0 1.25rem;
}

.service-compare .compare-static {
  max-width: 100%;
  gap: 1rem;
  overflow: visible;
  box-shadow: none;
}

.service-compare .compare-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.service-compare .compare-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.service-compare .compare-pane figcaption {
  position: static;
  flex-shrink: 0;
  font-size: 20px;
}

.service-compare .compare-pane-extra {
  display: block;
  width: 100%;
  height: 250px;
  min-height: 250px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
}

.service-compare .compare-before figcaption {
  background: rgba(53, 53, 53, 1);
}

.service-compare .compare-after figcaption {
  background: rgba(207, 186, 164, 1);
  background-image: none;
  color: rgba(53, 53, 53, 1);
  border: none;
  border-image: none;
}

.service-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.service-split figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.service-split img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.service-split figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.65rem;
  font-family: var(--font-brand);
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
}

.service-split .split-before figcaption {
  background: rgba(44, 44, 44, 1);
  color: #fff;
}

.service-split .split-after figcaption {
  background: rgba(232, 223, 208, 0.92);
  color: #353535;
}

.service-features {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.service-features.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-feature {
  text-align: center;
}

.service-feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.45rem;
}

.service-feature-icon img {
  width: 100%;
  height: 100%;
  margin: 10px 0;
  object-fit: contain;
}

.service-feature p {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
}

.service-footnote {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #4b4b4b;
}

.service-footnote .star {
  flex-shrink: 0;
}

.service-scope-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
}

.service-scope-table th,
.service-scope-table td {
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(176, 164, 149, 0.45);
  text-align: left;
  vertical-align: top;
}

.service-scope-table th {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.45);
  color: var(--brown);
}

.service-scope-table td:last-child {
  font-style: italic;
  white-space: nowrap;
}

/* How it works */
.services-hiw {
  position: relative;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line-gray);
  text-align: center;
  overflow: visible;
}

.services-hiw-brush {
  position: absolute;
  left: 50%;
  top: calc(50% + 2rem);
  z-index: 0; /* 只比页面底图高一层，内容在 .services-hiw-inner (z-index: 1) 之上 */
  width: min(58.5%, 660px);
  aspect-ratio: 1;
  background: url("../assets/ink-brush-stroke.jpg") center / contain no-repeat;
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: multiply;
  transform: translate(-50%, -50%) rotate(-30deg);
  transform-origin: center center;
  /* 更靠内、更柔的径向遮罩：继续压掉可见硬边 */
  -webkit-mask-image: radial-gradient(
    ellipse 62% 58% at 50% 50%,
    #000 8%,
    rgba(0, 0, 0, 0.65) 32%,
    rgba(0, 0, 0, 0.28) 52%,
    transparent 70%
  );
  mask-image: radial-gradient(
    ellipse 62% 58% at 50% 50%,
    #000 8%,
    rgba(0, 0, 0, 0.65) 32%,
    rgba(0, 0, 0, 0.28) 52%,
    transparent 70%
  );
}

.services-hiw-inner {
  position: relative;
  z-index: 1;
}

.services-hiw h2 {
  font-family: var(--font-brand);
  font-size: 40px;
  font-weight: 400;
  margin: -20px 0 0.5rem;
}

.services-hiw .deco-line {
  width: 200px;
  margin: 0 auto 1.75rem;
}

.services-hiw .deco-line img {
  margin-top: -10px;
}

.hiw-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.hiw-step {
  position: relative;
}

.hiw-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 48px;
  right: -0.65rem;
  width: 1.35rem;
  height: 1.35rem;
  background: url("../assets/services/how-it-works/next.svg") center / contain no-repeat;
  opacity: 1;
  pointer-events: none;
}

.hiw-step-icon {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.5);
}

.hiw-step-icon::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: 0;
  background: url("../assets/—Pngtree—vector chinese style ink round_7202708.png") center / contain no-repeat;
  opacity: 0.2;
  pointer-events: none;
  transform: scale(0.8);
}

.hiw-step-icon img {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.hiw-step-num {
  display: block;
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.hiw-step h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.hiw-step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: #4b4b4b;
  width: 175px;
  max-width: 14rem;
  margin-inline: auto;
}

/* CTA */
.services-cta {
  margin-top: 0;
  padding: 5px 0;
  background-color: #fff;
}

.services-cta-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.35rem;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 4px;
}

.services-cta-icon {
  width: 60px;
  height: 60px;
}

.services-cta-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin-left: 50px;
}

.services-cta-text {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  margin: 0 0 0 75px;
  width: 500px;
  height: 70px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}

.services-cta-text strong,
#services-cta-title {
  margin-top: 5px;
  margin-bottom: -20px;
  height: 25px;
  font-size: 20px;
  font-weight: 400;
  color: rgba(70, 52, 31, 1);
}

.services-cta-text span {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 20px;
  color: rgba(70, 52, 31, 1);
}

.services-cta-btn {
  display: inline-block;
  width: 175px;
  padding: 0.6rem 1.35rem;
  background: var(--brown);
  color: #fff;
  border-radius: 10px;
  font-family: var(--font-brand);
  font-size: 0.92rem;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.services-cta-btn:hover {
  background: #46341f;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 960px) {
  /* 服务特色：始终一排 */
  .service-features,
  .service-features.cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .service-feature-icon {
    width: clamp(36px, 9vw, 56px);
    height: clamp(36px, 9vw, 56px);
    margin-bottom: 0.25rem;
  }

  .service-feature-icon img {
    margin: 0;
  }

  .service-feature p {
    font-size: clamp(0.65rem, 2.1vw, 0.82rem);
    line-height: 1.3;
  }

  /* 服务流程五个步骤始终一排 */
  .hiw-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .hiw-step-icon {
    width: clamp(52px, 14vw, 88px);
    height: clamp(52px, 14vw, 88px);
    margin-bottom: 0.4rem;
  }

  .hiw-step-icon::before {
    inset: -6px;
    transform: scale(0.85);
  }

  .hiw-step-icon img {
    width: clamp(22px, 6vw, 36px);
    height: clamp(22px, 6vw, 36px);
  }

  .hiw-step:not(:last-child)::after {
    top: clamp(22px, 6vw, 40px);
    right: -0.35rem;
    width: 0.7rem;
    height: 0.7rem;
  }

  .hiw-step-num {
    font-size: clamp(11px, 2.4vw, 16px);
  }

  .hiw-step h3 {
    font-size: clamp(10px, 2.2vw, 13px);
    line-height: 1.25;
  }

  .hiw-step p {
    width: auto;
    max-width: none;
    font-size: clamp(9px, 1.9vw, 12px);
    line-height: 1.35;
  }
}

@media (max-width: 760px) {
  .services-layout {
    grid-template-columns: 1fr;
  }

  .service-compare .compare-static {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .service-compare .compare-col {
    gap: 0.5rem;
  }

  .service-compare .compare-pane img {
    min-height: 0;
  }

  .service-compare .compare-pane figcaption {
    font-size: 0.9rem;
  }

  .service-compare .compare-pane-extra {
    height: auto;
    min-height: 0;
    aspect-ratio: 5 / 6;
  }

  .services-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 0.35rem;
    padding: 0.35rem;
    overflow: visible;
  }

  .services-nav-btn {
    border-bottom: none;
    border-radius: 4px;
  }

  .services-nav-btn.is-active {
    background-color: var(--paper);
  }

  .service-features,
  .service-features.cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .service-feature-icon {
    width: clamp(32px, 8vw, 48px);
    height: clamp(32px, 8vw, 48px);
  }

  .service-feature p {
    font-size: clamp(0.6rem, 2vw, 0.75rem);
  }

  .hiw-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .hiw-step {
    text-align: center;
  }

  .hiw-step:not(:last-child)::after {
    display: none;
  }

  .services-cta-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.85rem;
    padding: 1.15rem 1rem;
  }

  .services-cta-icon {
    width: 60px;
    height: 60px;
    margin: 0;
  }

  .services-cta-icon img {
    margin: 0;
    display: block;
  }

  .services-cta-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    width: 100%;
    max-width: 22rem;
    height: auto;
    text-align: center;
  }

  .services-cta-text strong,
  #services-cta-title {
    margin: 0;
    height: auto;
    line-height: 1.35;
  }

  .services-cta-text span {
    margin: 0.35rem 0 0;
    line-height: 1.4;
  }

  .services-cta-btn {
    margin: 0;
  }
}

@media (max-width: 520px) {
  .services-nav {
    grid-template-columns: 1fr;
  }

  .service-split {
    grid-template-columns: 1fr;
  }

  .service-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
