:root { --brand-red: #d61020; --text: #777; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif; color: var(--text); }
a { color: inherit; text-decoration: none; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--brand-red); outline-offset: 5px; }

/* Shared content width and responsive page gutters. */
:root { --content-max-width: 1440px; --content-gutter: 24px; --section-space: 64px; --content-space: 32px; --heading-space: 12px; }
.container { width: min(var(--content-max-width), calc(100% - var(--content-gutter) * 2)); margin-inline: auto; }
@media (max-width: 768px) {
  :root { --section-space: 40px; --content-space: 24px; }
}
@media (max-width: 600px) {
  :root { --content-gutter: 20px; }
}

/* Shared site footer. */
.site-footer { background: #21262c; color: #d7dfe8; }
.footer-main { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 42px; padding-block: var(--section-space); }
.footer-company { font-size: 13px; line-height: 21px; }
.footer-brand { display: flex; justify-content: center; margin: 16px 0 20px; }
.footer-brand img { display: block; width: 82px; height: 92px; object-fit: contain; }
.footer-company p { margin: 0 0 12px; }
.footer-read-more { color: #fff; font-weight: 600; }
.footer-column h2 { margin: 0 0 18px; color: #fff; font-size: 14px; font-weight: 700; line-height: 20px; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column li, .footer-contact address { font-size: 13px; line-height: 25px; }
.footer-contact address { font-style: normal; }
.footer-contact address > a, .footer-contact address > p { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.footer-contact i { flex: 0 0 12px; color: #ed1830; font-size: 12px; }
.site-footer a { text-decoration: none; transition: color .18s; }
.site-footer a:hover { color: #ff4052; }
.footer-bottom { background: #1e2228; border-top: 1px solid #666a6e; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 24px; }
.footer-copyright { font-size: 14px; line-height: 23px; }
.footer-copyright p { margin: 0; }
.footer-copyright a { color: #fff; }
.footer-social { display: flex; align-items: center; gap: 12px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 32px; color: #fff; font-size: 19px; }
@media (max-width: 900px) {
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .footer-brand { justify-content: flex-start; margin-top: 0; }
}
@media (max-width: 540px) {
  .footer-main { grid-template-columns: 1fr; gap: 28px; padding-block: var(--section-space); }
  .footer-column h2 { margin-bottom: 12px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* Shared header and back-to-top control. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.header-inner {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transition: height 0.3s ease;
}
.site-header.is-scrolled .header-inner {
  height: 76px;
}
.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.brand img {
  display: block;
  width: 200px;
  height: auto;
  transition: width 0.3s ease, transform 0.3s ease;
}
.site-header.is-scrolled .brand img {
  width: 170px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 38px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.main-nav > a, .nav-dropdown > summary {
  transition: color .2s ease;
}
.main-nav > a:hover, .nav-dropdown > summary:hover, .main-nav > a[aria-current] {
  color: #111;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}
.nav-dropdown summary::-webkit-details-marker {
  display: none;
}
.nav-dropdown summary::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform .2s ease;
}
.nav-dropdown[open] summary::after {
  transform: rotate(225deg);
  margin-top: 2px;
}
.dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: -12px;
  min-width: 260px;
  padding: 8px 0;
  background: #fff;
  border-top: 3px solid var(--brand-red);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-top: 3px solid var(--brand-red);
  animation: dropdownFade .2s ease forwards;
  z-index: 1001;
}
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-panel > a {
  display: block;
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 500;
  color: #444;
  transition: all .18s ease;
}
.dropdown-panel > a:hover {
  color: var(--brand-red);
  background: #fdf5f5;
  padding-left: 22px;
}
.nav-sub-dropdown {
  position: relative;
}
.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 2px 10px;
  transition: background .18s ease;
  cursor: pointer;
}
.sub-header .sub-link {
  flex: 1;
  display: block;
  padding: 9px 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #333;
  transition: color .18s ease;
}
.sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: 0;
  padding: 0;
  color: #888;
  cursor: pointer;
  border-radius: 4px;
  transition: all .2s ease;
}
.sub-toggle svg {
  stroke: currentColor;
  transition: transform .2s ease;
}
@media (min-width: 1021px) {
  .sub-dropdown-panel {
    position: absolute;
    top: -5px;
    left: 100%;
    margin-left: 4px;
    min-width: 280px;
    padding: 8px 0;
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid var(--brand-red);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity .2s cubic-bezier(0.16, 1, 0.3, 1),
                transform .2s cubic-bezier(0.16, 1, 0.3, 1),
                visibility .2s ease;
    pointer-events: none;
    z-index: 1002;
  }
  .sub-dropdown-panel::before {
    content: "";
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -12px;
    width: 12px;
  }
  .nav-sub-dropdown:hover > .sub-header {
    background: #fdf5f5;
  }
  .nav-sub-dropdown:hover > .sub-header .sub-link {
    color: var(--brand-red);
  }
  .nav-sub-dropdown:hover > .sub-header .sub-toggle {
    color: var(--brand-red);
  }
  .nav-sub-dropdown:hover > .sub-header .sub-toggle svg {
    transform: translateX(2px);
  }
  .nav-sub-dropdown:hover > .sub-dropdown-panel,
  .nav-sub-dropdown.is-open > .sub-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }
  .sub-dropdown-panel.flyout-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 4px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-right: 3px solid var(--brand-red);
    transform: translateX(-8px);
  }
  .sub-dropdown-panel.flyout-left::before {
    left: auto;
    right: -12px;
  }
  .nav-sub-dropdown:hover > .sub-dropdown-panel.flyout-left,
  .nav-sub-dropdown.is-open > .sub-dropdown-panel.flyout-left {
    transform: translateX(0);
  }
  .sub-dropdown-panel a {
    display: block;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: #555;
    line-height: 1.4;
    transition: all .18s ease;
  }
  .sub-dropdown-panel a:hover {
    color: var(--brand-red);
    background: #fdf5f5;
    padding-left: 22px;
  }
}
.main-nav .quote-button {
  color: #fff;
  background: var(--brand-red);
  border-radius: 5px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all .25s ease;
}
.main-nav .quote-button:hover {
  background: #b70d1b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(214, 16, 32, 0.35);
}
.main-nav .quote-button:active {
  transform: translateY(0);
}
.menu-toggle {
  display: none;
}

/* Refined Back-To-Top Button */
.back-to-top {
  position: fixed;
  z-index: 999;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #e52d27 0%, #b31217 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(214, 16, 32, 0.35), 0 2px 6px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.85);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.25s ease,
              box-shadow 0.25s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  background: linear-gradient(135deg, #ff3b30 0%, #c4121a 100%);
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 8px 24px rgba(214, 16, 32, 0.45), 0 4px 10px rgba(0, 0, 0, 0.12);
}
.back-to-top:active {
  transform: translateY(-1px) scale(0.95);
  box-shadow: 0 2px 8px rgba(214, 16, 32, 0.3);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  transition: transform 0.25s ease;
}
.back-to-top:hover svg {
  transform: translateY(-2px);
}
.back-to-top i {
  font-size: 18px;
  color: #fff;
  line-height: 1;
  transition: transform 0.25s ease;
}
.back-to-top:hover i {
  transform: translateY(-2px);
}
.back-to-top span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  border-radius: 1px;
  transform: translateY(2px) rotate(45deg);
  transition: transform 0.25s ease;
}
.back-to-top:hover span {
  transform: translateY(0) rotate(45deg);
}

/* Scroll reveal animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

@media (max-width: 1280px) {
  .header-inner { gap: 24px; }
  .main-nav { gap: 24px; font-size: 14px; }
  .brand img { width: 190px; }
  .site-header.is-scrolled .brand img { width: 165px; }
  .main-nav .quote-button { font-size: 14px; padding: 11px 18px; }
}
@media (max-width: 1020px) {
  .header-inner { height: 80px; }
  .site-header.is-scrolled .header-inner { height: 68px; }
  .brand img { width: 175px; }
  .site-header.is-scrolled .brand img { width: 150px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: 0; padding: 10px; }
  .menu-toggle span { height: 2px; width: 24px; background: #333; transition: transform 0.25s ease, opacity 0.25s ease; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 20px 24px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); max-height: calc(100dvh - 80px); overflow-y: auto; }
  .site-header.is-scrolled .main-nav { max-height: calc(100dvh - 68px); }
  .main-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > a, .nav-dropdown summary { padding: 13px 0; }
  .dropdown-panel { position: static; box-shadow: none; border: 0; padding: 0 0 0 10px; animation: none; }
  .dropdown-panel > a { padding: 10px 0; font-size: 14.5px; }
  .nav-sub-dropdown { border-bottom: 1px solid #f0f0f0; padding: 2px 0; }
  .nav-sub-dropdown:last-child { border-bottom: 0; }
  .sub-header { display: flex; align-items: center; justify-content: space-between; padding: 2px 0; }
  .sub-header .sub-link { font-size: 14.5px; font-weight: 600; color: #333; padding: 8px 0; }
  .sub-toggle { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: #f5f5f5; border-radius: 4px; color: #666; }
  .nav-sub-dropdown.is-open > .sub-header .sub-toggle { background: #fde8e8; color: var(--brand-red); }
  .nav-sub-dropdown.is-open > .sub-header .sub-toggle svg { transform: rotate(90deg); stroke: var(--brand-red); }
  .sub-dropdown-panel { display: none; flex-direction: column; padding: 4px 0 10px 14px; border-left: 2px solid #e2e2e2; margin: 4px 0 8px 8px; }
  .nav-sub-dropdown.is-open > .sub-dropdown-panel { display: flex; }
  .sub-dropdown-panel a { display: block; font-size: 13.5px; color: #666; padding: 7px 0; line-height: 1.4; }
  .sub-dropdown-panel a:hover { color: var(--brand-red); }
  .main-nav .quote-button { margin-top: 12px; text-align: center; }
}
@media (max-width: 600px) {
  .header-inner { height: 72px; }
  .site-header.is-scrolled .header-inner { height: 62px; }
  .brand img { width: 155px; }
  .site-header.is-scrolled .brand img { width: 135px; }
  .main-nav { max-height: calc(100dvh - 72px); }
  .site-header.is-scrolled .main-nav { max-height: calc(100dvh - 62px); }
  .back-to-top { width: 44px; height: 44px; right: 18px; bottom: 20px; }
  .back-to-top svg { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .back-to-top {
    transition: none !important;
  }
}
