html {
  scroll-behavior: smooth;
}

.grid.gap-12,
.flex.gap-12 {
  gap: 2rem;
}

#filters {
  scroll-margin-top: 90px;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  background-image: url("/assets/page-map-bg.svg");
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.js .reveal {
  opacity: 0;
}

body.js .reveal.is-visible {
  opacity: 1;
}

body > header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
}

body > header.is-scrolled {
  background-color: rgba(36, 81, 146, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

body > header.is-scrolled nav > a[aria-label="新丝绸之路首页"] img {
  filter: brightness(0) invert(1);
}

body > header.is-scrolled nav a.rounded-full.bg-brand {
  background-color: #ffffff;
  color: #245192;
}

body > header.is-scrolled nav a.rounded-full.bg-brand:hover {
  background-color: #edf4ff;
  color: #245192;
}

body > header > div:first-child {
  border-bottom-color: rgba(255, 255, 255, 0.8);
}

.topbar-email {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.flag {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 20px;
  overflow: hidden;
  border-radius: 2px;
}

.flag img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#historyTrack {
  scrollbar-width: none;
  scrollbar-color: rgba(36, 81, 146, 0.35) transparent;
  -webkit-overflow-scrolling: touch;
}

#historyTrack figure figcaption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.3s ease;
}

#historyTrack figure:hover figcaption {
  color: #245192;
}

#historyTrack::-webkit-scrollbar {
  display: none;
}

#historyTrack::-webkit-scrollbar-track {
  background: transparent;
}

#historyTrack::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(36, 81, 146, 0.35);
}

.group:has(> a[aria-haspopup="true"])::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}

.mobile-sub-toggle img {
  filter: brightness(0) invert(1);
}

.feature-item {
  position: relative;
  min-height: 450px;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
  background-color: #001432;
  color: #fff;
  transition: background-color 0.35s ease;
}

.feature-item img.feature-bg {
  opacity: 0.25;
}

.feature-item.is-open {
  background-color: #245192;
}

.feature-item.is-open img.feature-bg {
  opacity: 0.7;
}

.feature-item .feature-gradient {
  display: none;
}

.feature-item.is-open .feature-gradient {
  display: block;
  background: linear-gradient(to bottom, rgba(36, 81, 146, 0), #245192);
}

.feature-item .feature-icon {
  position: absolute;
  left: 50%;
  top: 156px;
  width: 44px;
  height: 44px;
  transform: translateX(-50%);
}

.feature-item .feature-icon img {
  width: 44px;
  height: 44px;
}

.feature-item .feature-main {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  padding: 0 25px;
  text-align: center;
}

.feature-item .feature-main h3 {
  font-size: 20px;
}

.feature-item .feature-main p {
  font-size: 14px;
}

.feature-item .feature-extra {
  display: none;
}

.feature-item.is-open .feature-icon {
  left: auto;
  right: 30px;
  top: 30px;
  width: 80px;
  height: 80px;
  transform: none;
}

.feature-item.is-open .feature-icon img {
  width: 80px;
  height: 80px;
}

.feature-item.is-open .feature-main {
  left: 30px;
  right: 30px;
  top: 300px;
  bottom: auto;
  padding: 0;
  text-align: left;
}

.feature-item.is-open .feature-extra {
  display: block;
  margin-top: 10px;
  line-height: 28px;
  color: #fff;
}

.business-card {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.business-card .business-card-bg {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.business-card > div {
  position: relative;
  z-index: 1;
}

.business-card:hover {
  background-color: #1b3d73;
  border-color: #1b3d73;
  color: #fff;
}

.business-card:hover .business-card-bg {
  opacity: 0.2;
}

.business-card:hover h2 {
  color: #fff;
}

.business-card:hover p {
  color: rgba(255, 255, 255, 0.8);
}

.business-card:hover .border-b {
  border-color: rgba(255, 255, 255, 0.2);
}

.business-card:hover .size-\[110px\] {
  background-color: #fff;
  border-color: transparent;
}

.business-card:hover .mt-8 {
  filter: brightness(0) invert(1);
}

@media (max-width: 767px) {
  .business-card.business-card {
    background-color: #1b3d73;
    border-color: #1b3d73;
    color: #ffffff;
  }

  .business-card .business-card-bg {
    opacity: 0.2;
  }

  .business-card h2 {
    color: #ffffff;
  }

  .business-card p {
    color: rgba(255, 255, 255, 0.8);
  }

  .business-card .border-b {
    border-color: rgba(255, 255, 255, 0.2);
  }

  .business-card .size-\[110px\] {
    background-color: #ffffff;
    border-color: transparent;
  }

  .business-card .mt-8 {
    filter: brightness(0) invert(1);
  }
}

.service-card {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.service-card:hover {
  background-color: #245192;
  border-color: #245192;
  color: #fff;
}

.service-card:hover h3,
.service-card:hover p {
  color: #fff;
}

.service-card:hover .border-2 {
  border-color: #fff;
}

.service-card:hover span {
  background-color: #fff;
}

.service-card:hover .service-icon {
  filter: brightness(0) invert(1);
}

.advantage-card {
  position: relative;
  overflow: hidden;
  padding: 30px 30px 40px;
  border-bottom: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, border-radius 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-card::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 0;
  height: 2px;
  background-color: #245192;
  transition: opacity 0.3s ease;
}

.advantage-card:hover {
  background-color: #245192;
  color: #ffffff;
  border-radius: 10px;
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(36, 81, 146, 0.18);
}

.advantage-card:hover::after {
  opacity: 0;
}

.advantage-card:hover h3,
.advantage-card:hover p {
  color: #ffffff;
}

.advantage-card:hover p span {
  color: rgba(255, 255, 255, 0.6);
}

.advantage-card:hover .advantage-icon {
  border-color: #ffffff;
}

.advantage-card:hover .advantage-deco {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animate__animated {
    animation: none !important;
  }
}

.news-card {
  transition: border-color 0.35s ease, border-radius 0.35s ease, padding 0.35s ease, background-color 0.35s ease !important;
}

.news-card h3,
.news-card p,
.news-card a {
  transition: color 0.35s ease, padding-left 0.35s ease, padding-right 0.35s ease;
}

.news-card img {
  transition: transform 0.5s ease;
}

.news-card:hover {
  background-color: #ffffff;
  border-color: #245192;
  border-radius: 10px;
}

.news-card:hover img {
  transform: scale(1.05);
}

.news-card:hover > :first-child {
  border-radius: 10px 10px 0 0;
}

.news-card:hover h3,
.news-card:hover p,
.news-card:hover a {
  color: #245192;
}

.news-card:hover h3,
.news-card:hover p,
.news-card:hover a {
  padding-left: 16px;
  padding-right: 16px;
}

.news-list-card {
  cursor: pointer;
  transition: border-color 0.35s ease, border-radius 0.35s ease, padding 0.35s ease, background-color 0.35s ease !important;
}

.news-list-card img {
  transition: transform 0.5s ease;
}

.news-list-card:hover img {
  transform: scale(1.05);
}

.news-list-card:hover h3,
.news-list-card:hover p,
.news-list-card:hover a {
  color: #245192;
}

.news-feature-card h3,
.news-feature-card p,
.news-feature-card a {
  transition: color 0.3s ease;
}

.news-feature-card:hover h3,
.news-feature-card:hover p,
.news-feature-card:hover a {
  color: #245192;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 328px;
  max-width: 100%;
  padding: 10px;
  border: 1px solid rgba(92, 59, 43, 0.2);
  border-radius: 10px;
  background: #fff;
}

.history-item::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  background: url("/assets/icon-check.svg") no-repeat center / contain;
}

.history-item p:first-child {
  color: #000;
  font-size: 16px;
  font-weight: 500;
}

.history-item p:last-child {
  margin-top: 4px;
  color: #000;
  font-size: 12px;
}

.history-nav img {
  transition: filter 0.2s ease;
}

.history-nav:hover img {
  filter: brightness(0) invert(1);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-latest-clamp {
  position: relative;
  max-height: 210px;
  overflow: hidden;
}

.news-latest-clamp > * {
  margin-top: 0;
  margin-bottom: 0;
}

.news-latest-clamp::after {
  content: "...";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 40px;
  line-height: 40px;
  text-align: right;
  padding-right: 2px;
  color: #666;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 70%);
}

.news-detail-content h1,
.news-detail-content h2,
.news-detail-content h3,
.news-detail-content h4,
.news-detail-content h5,
.news-detail-content h6 {
  font-weight: 700;
  line-height: 1.4;
  color: #111;
}

.news-detail-content h1,
.news-detail-content h2 {
  font-size: 1.5rem;
}

.news-detail-content h3 {
  font-size: 1.125rem;
}

.news-detail-content h4,
.news-detail-content h5,
.news-detail-content h6 {
  font-size: 1rem;
}

.news-detail-content p {
  margin-bottom: 1rem;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1rem 0;
}
