*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
  background-color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1727px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #ffffff;
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(15, 20, 40, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 88px;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  height: 52px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 48px;
  min-width: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 40px;
}

.main-nav a {
  font-size: 16px;
  font-weight: 400;
  color: #333333;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #111111;
}

.main-nav a.is-active {
  color: #333333;
  font-weight: 500;
}

.main-nav .nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background-color: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1500;
}

.main-nav .nav-item.has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav .sub-menu li {
  list-style: none;
  margin: 0;
}

.main-nav .sub-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.main-nav .sub-menu a:hover {
  background-color: #f5f7fa;
  color: #111111;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 20px;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 28px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 500;
  color: #ffffff;
  background-color: #f07a20;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-contact:hover {
  background-color: #e06a10;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.icon-btn:hover {
  opacity: 0.75;
}

.icon-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Language switcher */
.lang-switcher {
  position: relative;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 168px;
  background-color: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  padding: 8px;
  z-index: 1500;
}

.lang-dropdown[hidden] {
  display: none;
}

.lang-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-dropdown li {
  margin: 0;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #333333;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.lang-dropdown a:hover {
  background-color: #f5f7fa;
}

.lang-dropdown a img {
  width: 18px;
  height: 12px;
  object-fit: contain;
  border-radius: 2px;
}

.lang-dropdown .current-lang a {
  color: #f07a20;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background-color: #333333;
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  margin-top: 88px;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0a0f1f;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/服务/矩形 628 拷贝 2.png");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 100px;
  padding-bottom: 100px;
}

.hero-label {
  font-size: 14px;
  font-weight: 500;
  color: #f07a20;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  max-width: 520px;
}

/* What We Do */
.what-we-do {
  padding: 80px 0 48px;
  background-color: #ffffff;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 700;
  color: #1a202c;
  line-height: 1.25;
}

.section-desc {
  font-size: 15px;
  color: #64748b;
  line-height: 1.75;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 400px;
  padding: 32px;
  background-color: #ffffff;
  border-radius: 16px;
  border: none;
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.07);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  background-color: #3b3e91;
  box-shadow: 0 14px 36px rgba(37, 43, 97, 0.28);
}

.service-card:hover h3 {
  color: #ffffff;
}

.service-card:hover .service-tag {
  color: rgba(255, 255, 255, 0.72);
}

.service-card:hover p:not(.service-tag) {
  color: rgba(255, 255, 255, 0.78);
}

.service-card:hover li {
  color: rgba(255, 255, 255, 0.9);
}

.service-card:hover li::before {
  background-color: #f07a20;
}

.service-card:hover .learn-more {
  color: #ffffff;
}

.service-card:hover .service-icon {
  background-color: #ffffff;
  border-color: #4346a8;
}

.service-card:hover .service-icon img {
  filter: brightness(0) saturate(100%) invert(24%) sepia(52%) saturate(1842%) hue-rotate(213deg) brightness(92%) contrast(88%);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background-color: #5d5fef;
  border: 1px solid transparent;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.service-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.service-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.service-tag {
  font-size: 14px;
  font-weight: 500;
  color: #f07a20;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.service-card p:not(.service-tag) {
  font-size: 14px;
  color: #718096;
  line-height: 1.65;
  margin-bottom: 18px;
  flex-grow: 1;
  transition: color 0.3s ease;
}

.service-card ul {
  margin-bottom: 22px;
}

.service-card li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: #4a5568;
  line-height: 1.75;
  margin-bottom: 6px;
  transition: color 0.3s ease;
}

.service-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ed8936;
  transition: background-color 0.3s ease;
}

.learn-more {
  font-size: 14px;
  font-weight: 600;
  color: #3182ce;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  transition: gap 0.2s ease, color 0.3s ease;
}

.learn-more:hover {
  gap: 8px;
}

/* CTA */
.cta-section {
  margin: 48px 0 0;
  padding: 64px 24px;
  background: #313695;
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.cta-section .cta-sub {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
}

.btn-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 44px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background-color: #ef7300;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 24px rgba(239, 115, 0, 0.35);
}

.btn-quote:hover {
  background-color: #d96600;
  transform: translateY(-2px);
}

.cta-note {
  margin-top: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background-color: #eef1f6;
  padding-top: 48px;
}

.footer-logo-row {
  padding-bottom: 28px;
}

.footer-logo-row .logo img {
  height: 48px;
  width: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(6, 1fr);
  gap: 32px 24px;
  padding-bottom: 40px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
  line-height: 1.5;
}

.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #94a3b8;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.social-links img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 13px;
  color: #64748b;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #f07a20;
}

.footer-bottom-bar {
  width: 100%;
  border-top: 1px solid #dde3ec;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #94a3b8;
}

.footer-bottom-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer-bottom-links a:hover {
  color: #64748b;
}

.footer-bottom-links span {
  color: #cbd5e1;
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(10, 15, 31, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-box {
  width: 100%;
  max-width: 560px;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  gap: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
  border-radius: 8px;
}

.search-box button {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background-color: #f07a20;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1200px) {
  .main-nav {
    gap: 24px;
  }

  .header-right {
    gap: 28px;
  }

  .main-nav a {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    min-height: 72px;
  }

  .logo img {
    height: 44px;
  }

  .header-right {
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #e8ecf2;
    padding: 16px 24px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .main-nav .nav-item {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0 16px;
    min-width: 0;
    margin: 0;
  }

  .main-nav .sub-menu a {
    padding: 10px 0;
    font-size: 14px;
  }

  .header-actions .btn-contact {
    display: none;
  }

  .hero .container {
    text-align: center;
  }

  .hero-title {
    max-width: none;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------------------------------------------------------------------------
 * 详情页 hero 背景轮播（cnc-hero / auto-hero，由 services.js 驱动）
 * ------------------------------------------------------------------------ */

[data-zhiyuan-hero-slider] .cnc-hero-bg,
[data-zhiyuan-hero-slider] .auto-hero-bg {
  opacity: 0;
  transition: opacity 0.8s ease;
}

[data-zhiyuan-hero-slider] .cnc-hero-bg.is-active,
[data-zhiyuan-hero-slider] .auto-hero-bg.is-active {
  opacity: 1;
}

.zhiyuan-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.zhiyuan-hero-arrow:hover,
.zhiyuan-hero-arrow:focus-visible {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.6);
}

.zhiyuan-hero-arrow.prev {
  left: 20px;
}

.zhiyuan-hero-arrow.next {
  right: 20px;
}

.zhiyuan-hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

.zhiyuan-hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.zhiyuan-hero-dots button.is-active {
  background: #ffffff;
  transform: scale(1.25);
}

@media (max-width: 640px) {
  .zhiyuan-hero-arrow {
    width: 36px;
    height: 36px;
  }

  .zhiyuan-hero-arrow.prev {
    left: 12px;
  }

  .zhiyuan-hero-arrow.next {
    right: 12px;
  }
}


@media (max-width: 768px) {
  .header-inner { gap: 8px; }
}
