/* ==================== 三断点响应式系统 ==================== */
/* 统一整合：超大屏(≥1920px)、大屏(1280px-1919px)、移动端(<1280px) */

/* ========================================
   CSS自定义属性 - 三断点设计系统
   ======================================== */
:root {
  /* 断点定义 */
  --breakpoint-mobile-max: 1279px;
  --breakpoint-desktop-min: 1280px;
  --breakpoint-desktop-max: 1899px;
  --breakpoint-large-min: 1900px;
  
  /* 容器宽度 */
  --container-max: 1920px;
  --container-xl: 1440px;
  --container-lg: 1200px;
  --container-md: 1024px;
  --container-sm: 768px;
  --container-xs: 375px;
  
  /* 网格系统 */
  --grid-columns-desktop: 12;
  --grid-columns-tablet: 8;
  --grid-columns-mobile: 4;
  
  /* 基础间距 */
  --space-unit: 8px;
  --space-xs: var(--space-unit);
  --space-sm: calc(var(--space-unit) * 2);
  --space-md: calc(var(--space-unit) * 3);
  --space-lg: calc(var(--space-unit) * 4);
  --space-xl: calc(var(--space-unit) * 6);
  --space-2xl: calc(var(--space-unit) * 8);
  --space-3xl: calc(var(--space-unit) * 12);
  
  /* 基础字体 */
  --font-size-base: 16px;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 30px;
  --font-size-4xl: 36px;
  
  /* 行高 */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.8;
  
  /* 过渡动画 */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========================================
   超大屏幕 (≥1900px) - 默认设计稿尺寸
   ======================================== */
@media screen and (min-width: 1900px) {
  :root {
    /* 容器尺寸 */
    --container-width: var(--container-max);
    --section-padding: 60px;
    --grid-gap: 80px;
    
    /* 字体大小 */
    --font-size-h1: 48px;
    --font-size-h2: 36px;
    --font-size-h3: 30px;
    --font-size-body: 18px;
    --font-size-caption: 16px;
    
    /* 组件尺寸 */
    --header-height: 110px;
    --hero-height: 970px;
    --section-min-height: 800px;
    --footer-min-height: 419px;
  }
  
  /* 布局容器 - 保持设计稿完整性 */
  .layout-container {
    width: 1900px; /* 修正为1900px */
    max-width: 1900px;
    margin: 0 auto;
    position: relative;
    /* 抛去浏览器滚动条及工具栏空间 */
    box-sizing: border-box;
  }
  
  /* 网格系统 */
  .grid-system {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns-desktop), 1fr);
    gap: var(--grid-gap);
    padding: 0 var(--section-padding);
    width: 100%;
  }
  
  /* 内容区域 */
  .content-section {
    width: 1900px; /* 修正为1900px */
    min-height: var(--section-min-height);
    position: relative;
    padding: var(--space-xl) 0;
  }
  
  /* Hero区域 */
  .hero-section {
    width: 1900px; /* 修正为1900px */
    height: var(--hero-height);
    position: relative;
    top: var(--header-height);
  }
  
  /* Footer区域 */
  .footer-section {
    width: 1900px; /* 修正为1900px */
    min-height: var(--footer-min-height);
    position: relative;
  }
}

/* ========================================
   大屏幕 (1280px-1899px) - 流体布局
   ======================================== */
@media screen and (min-width: 1280px) and (max-width: 1899px) {
  :root {
    /* 流体容器尺寸 - 平滑缩放逻辑 */
    --container-width: 100vw;
    --section-padding: clamp(30px, 3.125vw, 60px);
    --grid-gap: clamp(40px, 4.17vw, 80px);
    
    /* 流体字体大小 - 平滑缩放 */
    --font-size-h1: clamp(32px, 2.5vw, 48px);
    --font-size-h2: clamp(28px, 1.875vw, 36px);
    --font-size-h3: clamp(24px, 1.563vw, 30px);
    --font-size-body: clamp(16px, 1.111vw, 18px);
    --font-size-caption: clamp(14px, 0.972vw, 16px);
    
    /* 流体组件尺寸 - 平滑缩放 */
    --header-height: clamp(80px, 5.73vw, 110px);
    --hero-height: clamp(600px, 50vw, 970px);
    --section-min-height: clamp(600px, 41.67vw, 800px);
    --footer-min-height: clamp(300px, 21.8vw, 419px);
    
    /* 流体间距 */
    --space-xs: clamp(8px, 0.556vw, 16px);
    --space-sm: clamp(16px, 1.111vw, 24px);
    --space-md: clamp(24px, 1.667vw, 40px);
    --space-lg: clamp(32px, 2.222vw, 60px);
    --space-xl: clamp(48px, 3.333vw, 80px);
    --space-2xl: clamp(64px, 4.444vw, 100px);
  }
  
  /* 流体布局容器 */
  .layout-container {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    position: relative;
  }
  
  /* 流体网格系统 */
  .grid-system {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns-desktop), 1fr);
    gap: var(--grid-gap);
    padding: 0 var(--section-padding);
    width: 100%;
  }
  
  /* 流体内容区域 */
  .content-section {
    width: 100vw;
    min-height: var(--section-min-height);
    position: relative;
    padding: var(--space-xl) 0;
  }
  
  /* 流体Hero区域 */
  .hero-section {
    width: 100vw;
    height: var(--hero-height);
    position: relative;
    top: var(--header-height);
  }
  
  /* 流体Footer区域 */
  .footer-section {
    width: 100vw;
    min-height: var(--footer-min-height);
    position: relative;
  }
  
  /* 流体展览卡片 */
  .exhibition-card {
    width: clamp(300px, 28.85vw, 553px);
    height: clamp(400px, 29.63vw, 568px);
    position: relative;
  }
  
  .exhibition-card img {
    width: 100%;
    height: clamp(200px, 18.9vw, 363px);
    object-fit: cover;
  }
  
  /* 导航已在 header.css 中设置固定间距，由 zoom 统一缩放 */
  /* 
  .header-nav {
    gap: clamp(40px, 3.33vw, 80px);
  }
  
  .header-nav a {
    font-size: clamp(18px, 1.25vw, 24px);
  }
  */
  
  /* 流体箭头按钮 */
  .hero-arrow {
    width: clamp(36px, 2.5vw, 48px);
    height: clamp(36px, 2.5vw, 48px);
  }
  
  .hero-arrow.left {
    left: clamp(30px, 2.7vw, 52px);
  }
  
  .hero-arrow.right {
    right: clamp(30px, 2.7vw, 52px);
  }
  
  /* 流体指示器 */
  .hero-dots {
    gap: clamp(16px, 1.25vw, 24px);
    bottom: clamp(20px, 1.56vw, 30px);
  }
}

/* ========================================
   移动端 (<1280px) - 完整移动端适配
   ======================================== */
@media screen and (max-width: 1279px) {
  :root {
    /* 移动端容器尺寸 */
    --container-width: 100vw;
    --section-padding: 20px;
    --grid-gap: 20px;
    
    /* 移动端字体大小 */
    --font-size-h1: 28px;
    --font-size-h2: 24px;
    --font-size-h3: 20px;
    --font-size-body: 16px;
    --font-size-caption: 14px;
    
    /* 移动端组件尺寸 */
    --header-height: 60px;
    --hero-height: 60vh;
    --hero-min-height: 400px;
    --hero-max-height: 600px;
    --section-min-height: auto;
    --footer-min-height: auto;
    
    /* 移动端间距 */
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 24px;
    --space-2xl: 32px;
  }
  
  /* 移动端布局容器 */
  .layout-container {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    position: relative;
    overflow-x: hidden;
  }
  
  /* 移动端网格系统 */
  .grid-system {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--grid-gap);
    padding: 0 var(--section-padding);
    width: 100%;
  }
  
  /* 移动端内容区域 */
  .content-section {
    width: 100vw;
    height: auto;
    min-height: var(--section-min-height);
    padding: var(--space-xl) var(--section-padding);
    position: relative;
    top: auto;
    left: auto;
  }
  
  /* 移动端Hero区域 */
  .hero-section {
    width: 100vw;
    height: clamp(var(--hero-min-height), var(--hero-height), var(--hero-max-height));
    position: relative;
    top: 0;
    margin-top: 0;
  }
  
  /* 移动端Footer区域 */
  .footer-section {
    width: 100vw;
    height: auto;
    min-height: var(--footer-min-height);
    padding: var(--space-xl) var(--section-padding);
    position: relative;
    top: auto;
    left: auto;
  }
  
  /* 移动端导航 - 汉堡菜单 */
  .header {
    height: var(--header-height);
    padding: 0 var(--section-padding);
    position: relative;
  }
  
  .header-nav {
    display: none;
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: 100vw;
    height: calc(100vh - var(--header-height));
    background: white;
    flex-direction: column;
    padding: var(--space-xl) var(--section-padding);
    gap: var(--space-lg);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  .header-nav.mobile-open {
    display: flex;
  }
  
  .header-nav a {
    font-size: var(--font-size-lg);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid #eee;
  }
  
  /* 汉堡菜单按钮 */
  .mobile-menu-btn {
    display: block;
    position: absolute;
    right: calc(var(--section-padding) + 50px);
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
  }
  
  .mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: black;
    margin-bottom: 6px;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-btn span:last-child {
    margin-bottom: 0;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* 移动端展览卡片 - 横向滚动 */
  .exhibitions-cards-container {
    width: 100vw;
    padding: 0 var(--section-padding);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .exhibitions-cards-container::-webkit-scrollbar {
    display: none;
  }
  
  .exhibitions-cards-wrapper {
    display: flex;
    gap: var(--space-md);
    padding-bottom: var(--space-sm);
  }
  
  .exhibition-card {
    flex-shrink: 0;
    width: clamp(280px, 80vw, 400px);
    height: auto;
    min-height: 400px;
    position: relative;
  }
  
  .exhibition-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  
  /* 移动端触摸优化 */
  .hero-arrow,
  .exhibitions-arrow {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }
  
  /* 移动端Logo */
  .header-logo {
    left: var(--section-padding);
    top: 50%;
    transform: translateY(-50%);
  }
  
  .header-logo img {
    width: 50px;
    height: 36px;
  }
  
  /* 移动端语言切换 */
  .header-lang {
    right: var(--section-padding);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-size-sm);
    gap: var(--space-xs);
  }
}

/* ========================================
   动画和交互系统
   ======================================== */

/* 基础过渡 */
.transition-base {
  transition: all var(--transition-base);
}

.transition-colors {
  transition: color var(--transition-base), background-color var(--transition-base);
}

.transition-transform {
  transition: transform var(--transition-base);
}

.transition-opacity {
  transition: opacity var(--transition-base);
}

/* 悬停效果 */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.hover-scale {
  transition: transform var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* 按钮效果 */
.btn-primary {
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn-primary:hover {
  background: black;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 导航效果 */
.nav-link {
  position: relative;
  transition: color var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: black;
  transition: width var(--transition-base);
}

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

/* 滚动动画 */
.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 可访问性增强 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 焦点样式 */
.focus-visible:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* 工具类 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}