/* 自定义CSS变量 */
:root {
  --primary-dark: #2C3E50;
  --primary-light: #ECF0F1;
  --neutral-white: #FDFEFE;
  --neutral-cream: #F8F9FA;
  --accent-blue: #34495E;
  --accent-silver: #BDC3C7;
  --text-primary: #2C3E50;
  --text-secondary: #5D6D7E;
  --border-light: #D5D8DC;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 字体系统 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--neutral-white);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-silver);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* 导航栏样式 */
.nav-fixed {
  backdrop-filter: blur(10px);
  background: rgba(253, 254, 254, 0.95);
  transition: var(--transition-smooth);
  z-index: 50;
}

.nav-link {
  position: relative;
  transition: var(--transition-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* 图片容器优化 */
.img-container {
  overflow: hidden;
  position: relative;
}

.img-hover {
  transition: transform 0.5s ease, filter 0.5s ease;
}

.img-hover:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* 卡片样式 */
.card-modern {
  background: var(--neutral-white);
  border: 1px solid var(--border-light);
  transition: var(--transition-smooth);
  overflow: hidden;
}

.card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(44, 62, 80, 0.1);
}

/* 按钮样式 */
.btn-primary {
  background: var(--primary-dark);
  color: var(--neutral-white);
  padding: 12px 32px;
  border-radius: 4px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(44, 62, 80, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 1px solid var(--primary-dark);
  padding: 12px 32px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.btn-outline:hover {
  background: var(--primary-dark);
  color: var(--neutral-white);
}

/* 页脚样式 */
.footer-custom {
  background: var(--primary-dark);
  color: var(--neutral-white);
  padding: 40px 0 20px;
  margin-top: 80px;
}

.footer-link {
  color: var(--accent-silver);
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--neutral-white);
}

/* 轮播图样式 */
.carousel-container {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

/* 响应式网格 */
.grid-responsive {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 文本样式 */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* 响应式断点 */
@media (max-width: 768px) {
  .carousel-container {
    height: 60vh;
    min-height: 400px;
  }
  
  .grid-responsive {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .btn-primary,
  .btn-outline {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .carousel-container {
    height: 50vh;
    min-height: 350px;
  }
}

/* 标题样式 */
.heading-large {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.heading-medium {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.heading-small {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

/* 页面过渡 */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.page-transition.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 图片延迟加载优化 */
.lazy-image {
  filter: blur(5px);
  transition: filter 0.3s;
}

.lazy-image.loaded {
  filter: blur(0);
}