/* 引入 Inter 字体 */
@import url("../../assets/libs/font/inter/inter.css");

/* 平滑滚动 + 锚点偏移（避免被 fixed 导航栏遮挡） */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* 全局样式 */
:root {
  --primary-color: #0d2179;
  --secondary-color: #5b21b6;
  --dark-color: #0f172a;
  --light-color: #f8fafc;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --card-bg: #ffffff;
  --hero-bg: #0d2179;
}

body {
  margin: 0;
  padding: 0;
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial,
    sans-serif;
  color: var(--dark-color);
}
/* 导航栏容器 */
.nav-container {
  width: 100%;
  max-width: none !important;
  padding: 0 4.1667rem;
}
/* 版心容器-100px */
.container-100 {
  width: 100%;
  max-width: 100% !important;
  padding: 0 6.9444rem;
}
/* 版心容器-60px */
.container-60 {
  width: 100%;
  max-width: 100% !important;
  padding: 0 4.1667rem;
}

/* 通用上下内边距-195px */
.common-padding-195 {
  padding-top: 13.5417rem;
  padding-bottom: 6.9444rem;
}
/* 通用上下内边距-80px */
.common-padding-80 {
  padding-top: 5.5556rem;
  padding-bottom: 4.1667rem;
}
/* 响应式调整1199px以下 */
@media (max-width: 1199px) {
  .navbar-brand {
    display: none;
  }
  .navbar-collapse {
    justify-content: space-between;
  }
  .navbar-nav {
    margin-left: 0 !important;
    justify-content: space-between;
  }
}

/* 响应式调整992px以下 */
@media (max-width: 992px) {
  .navbar-brand {
    display: flex;
  }
  /* 版型左右间距统一50px */
  .container-100,
  .nav-container,
  .container-60 {
    padding-left: 3.4722rem;
    padding-right: 3.4722rem;
  }

  .common-padding-195 {
    padding-top: 10.4167rem;
    padding-bottom: 3.4722rem;
  }
  .common-padding-80 {
    padding-top: 5.5556rem;
    padding-bottom: 3.4722rem;
  }
}
/* 响应式调整768px以下 */
@media (max-width: 768px) {
  /* 版型左右间距统一24px */
  .container-100,
  .nav-container,
  .container-60 {
    padding: 0 1.6667rem;
  }
  .common-padding-195,
  .common-padding-80 {
    padding-top: 5.2083rem;
    padding-bottom: 1.6667rem;
  }
}
/* 导航栏 */
/* 默认透明背景，滚动超过10px后由 main.js 添加 .navbar-scrolled 恢复半透明背景 */
.navbar {
  background: transparent !important;
  backdrop-filter: none;
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease;
}

.navbar.navbar-scrolled {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.navbar-logo {
  width: 10.4167rem;
  /* height: 50px; */
  object-fit: cover;
}

.navbar-nav {
  gap: 5.4167rem;
}
.navbar-nav .nav-link {
  color: #ffffff;
  opacity: 0.7;
  font-size: 0.9722rem;
  position: relative;
}

/* .navbar-nav .nav-link:hover, */
.navbar-nav .nav-link.active {
  opacity: 1;
  font-weight: 600;
}

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0.1563rem;
  height: 0.1563rem;
  background-color: #ffffff;
  border-radius: 50%;
}

/* 导航栏图标 */
.navbar .nav-icon {
  margin-top: -0.1389rem;
  width: 0.9028rem;
  height: 0.9722rem;
  /* margin-left: 0.5556rem; */
}
.navbar .login-btn {
  font-size: 0.9722rem;
  font-weight: 500;
  color: #fff;
}
.login-register {
  margin-left: 4.3056rem;
}
.login-register .line-divider {
  color: #fff;
}

@media (max-width: 992px) {
  .navbar-collapse {
    margin-top: 1.6667rem;
  }
  .navbar-nav {
    gap: 1.6667rem;
  }
  /* 小屏幕时汉堡菜单中的登录按钮样式 */
  .login-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-left: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 1rem 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .login-register {
    margin: 0;
    gap: 0.8333rem;
  }
  .navbar-collapse .login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.75rem;
    background: var(--primary-color);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(45, 52, 232, 0.3);
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }
  .navbar-collapse .login-register .nav-icon {
    display: none;
  }
  .navbar-collapse .login-register .line-divider {
    display: none;
  }
}

/* 页脚 */
.footer {
  padding-top: 2.2917rem !important;
  padding-bottom: 2.2917rem !important;
  background: #121a3b;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.7778rem;
}
.footer-logo {
  width: 10.4167rem;
  object-fit: cover;
}
.footer-logo-img {
  width: 100%;
  object-fit: cover;
}

.footer-section-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4.8611rem;
}
.footer-section a {
  color: #ffffff;
  font-weight: 400;
  text-decoration: none;
}

.footer-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1.3889rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.0833rem;
  line-height: 1;
  color: #ffffff;
  text-decoration: none;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.social-icon:hover {
  color: #ffffff;
  transform: translateY(-0.2083rem);
}

.social-icon i {
  line-height: 1;
}
.footer-line {
  margin: 4.1667rem 0;
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
}
.footer-bottom {
  text-align: center;
}
.footer-bottom h6 {
  color: #ffffff;
  font-weight: 400;
  margin-bottom: 20px;
}
.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
/* 页脚社交图标：进入视口后依次放大再缩小 */
.footer.is-visible .social-icon i {
  animation: social-pop 0.8s ease-out both;
}

/* 三个图标依次触发 */
.footer.is-visible .social-icon:nth-child(2) i {
  animation-delay: 0.15s;
}

.footer.is-visible .social-icon:nth-child(3) i {
  animation-delay: 0.3s;
}

/* 放大→缩小 keyframes */
@keyframes social-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 页脚响应式调整 */
@media (max-width: 1199px) {
  .footer-content {
    flex-direction: column;
  }
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: 0.6944rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: none;
  color: #ffffff;
  font-size: 1.6667rem;
  line-height: 1;
  box-shadow: 0 0.2778rem 0.8333rem rgba(13, 33, 121, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
  z-index: 1030;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  color: #ffffff;
  box-shadow: 0 0.4167rem 1.1111rem rgba(91, 33, 182, 0.45);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* 响应式调整768px以下：缩小按钮尺寸 */
@media (max-width: 768px) {
  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  .back-to-top img {
    width: 1.3889rem;
    height: 1.3889rem;
  }
}
/* ============================================
   公共样式 / Utility Classes
   ============================================ */

/* Flex 布局 */
.flex {
  display: flex;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.flex-row {
  display: flex;
  flex-direction: row;
}
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flex-around {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.flex-start {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.flex-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.flex-wrap {
  flex-wrap: wrap;
}
.flex-1 {
  flex: 1;
}
.flex-grow {
  flex-grow: 1;
}
.flex-shrink {
  flex-shrink: 0;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.self-center {
  align-self: center;
}
.self-start {
  align-self: flex-start;
}
.self-end {
  align-self: flex-end;
}

/* 文字省略 */
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ellipsis-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 滚动入场动画 */
[data-animation] {
  opacity: 0;
  transition:
    opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-animation].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* 淡入 */
[data-animation="fade"] {
  opacity: 0;
}

/* 从下方滑入 */
[data-animation="slide-up"] {
  transform: translateY(100px);
}

/* 从上方滑入 */
[data-animation="slide-down"] {
  transform: translateY(-100px);
}

/* 从左滑入 */
[data-animation="slide-left"] {
  transform: translateX(-100px);
}

/* 从右滑入 */
[data-animation="slide-right"] {
  transform: translateX(100px);
}

/* 缩放入场 */
[data-animation="zoom-in"] {
  transform: scale(0.6);
}

/* 模糊淡入 */
[data-animation="blur"] {
  filter: blur(24px);
}

/* X轴翻转入场 */
[data-animation="flip-x"] {
  transform: perspective(1000px) rotateX(90deg);
}

/* Y轴翻转入场 */
[data-animation="flip-y"] {
  transform: perspective(1000px) rotateY(90deg);
}

/* 旋转缩放入场 */
[data-animation="rotate-zoom"] {
  transform: rotate(-360deg) scale(0.3);
}

/* 动画延迟（交错效果） */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}
/* 初始化bootstrap样式 */
.row {
  margin: 0;
}
.col-lg-6 {
  padding: 0;
}
p {
  margin-bottom: 0;
}
/* Viewer.js 预览样式覆盖 */
.viewer-container .viewer-canvas img {
  border-radius: 0.8333rem;
}
.viewer-toolbar > ul {
  overflow: hidden;
  display: flex !important;
  justify-content: center;
  align-items: center;
}
.viewer-container .viewer-prev,
.viewer-container .viewer-next {
  bottom: auto;
  width: 3.3333rem;
  height: 3.3333rem;
  min-width: 3.3333rem;
  min-height: 3.3333rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  font-size: 1.6667rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}
