@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    .text-gradient {
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
    }
    .bg-blur {
        backdrop-filter: blur(8px);
    }
    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }
    .scrollbar-hide {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.hero-gradient {
    background: linear-gradient(135deg, rgba(11,60,93,0.7) 0%, rgba(50,140,193,0.6) 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.nav-scrolled {
    background-color: rgba(11,60,93,0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-scrolled a,
.nav-scrolled button,
.nav-scrolled a.text-white,
.nav-scrolled button.text-white,
.nav-scrolled .text-white,
.nav-scrolled [class*="text-"] {
    color: white !important;
}

.globe-animation {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible, .fade-in {
    opacity: 1;
    transform: translateY(0);
}

#browser-translation-tip {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-active {
    border-bottom: 2px solid #D9B310;
}

/* 移除旧的垂直线样式 */
.timeline-item:not(:last-child)::after {
    display: none;
}

/* 确保所有部分都有足够的空间显示 */
section {
    scroll-margin-top: 80px;
    display: block; /* 确保所有section都默认显示 */
}

/* 下拉导航菜单高亮样式 */
.group .absolute a:hover {
    color: #c4c6c9; /* 灰白色高亮字体 */
}

/* 移动端下拉菜单高亮样式 */
#mobile-resources-submenu a:hover {
    color: #f8f9fa; /* 灰白色高亮字体 */
}

/* 修复移动设备上的显示问题 */
@media (max-width: 768px) {
    .timeline-item:not(:last-child)::after {
        display: none;
    }
}

/* 英语语言模式特定样式 */
html[lang="en"] #home {
    min-height: 120vh !important;
}

html[lang="en"] .container.mx-auto.px-4.z-10.text-center {
    margin-top: 3rem !important;
}

/* 英语模式下滚动指示器样式，确保在所有按钮下方 */
html[lang="en"] .absolute.bottom-8.left-1/2.transform.-translate-x-1/2.z-30 {
    bottom: 4rem !important;
    z-index: 10 !important;
}

/* 英语模式下标题文字换行处理 */
html[lang="en"] h1[data-lang-key="hero-title"] {
    line-height: 1.3 !important;
    margin-bottom: 2rem !important;
}

html[lang="en"] p[data-lang-key="hero-subtitle"] {
    line-height: 1.4 !important;
    margin-bottom: 2.5rem !important;
}

/* 英语模式下统计数据卡片间距调整 */
html[lang="en"] .bg-[rgba(255,255,255,0.08)].backdrop-blur-lg {
    margin-top: 4rem !important;
    margin-bottom: 2rem !important;
}

/* 英语模式下按钮区域样式 */
html[lang="en"] .flex.flex-col.sm\:flex-row.justify-center.gap-4.fade-in {
    margin-bottom: 5rem !important;
    position: relative;
    z-index: 5 !important;
}











.typewriter {
  overflow: hidden; /* 确保文本超出部分不可见 */
  border-right: .15em solid orange; /* 光标效果 */
  white-space: nowrap; /* 防止文本换行 */
  animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}
 
/* 打字动画 */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}
 
/* 光标闪烁动画 */
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: orange }
}

/* 企业发展历程时间轴样式 - 修复居中和溢出 */
#timeline-container {
  position: relative;
  padding: 80px 0;
  margin: 60px 0;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

/* 时间轴轨道 - 居中对齐 */
.timeline-track {
  transition: transform 0.5s ease-out;
  display: flex;
  align-items: center;
  min-height: 400px;
  position: relative;
  padding: 0 20px;
}

/* 时间轴项目基础样式 */
.timeline-item {
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-width: 260px;
  max-width: 280px;
  padding: 0 15px;
  height: 320px;
}

.timeline-item:hover {
  transform: translateY(-3px);
}

/* 单数年份项目 - 向下移动贴合时间线 */
.timeline-odd {
    align-self: flex-start;
    position: relative;
    margin-top: 60px;
}

/* 双数年在下 - 调整对齐 */
.timeline-even {
    align-self: flex-end;
    position: relative;
    margin-top: 70px;
}

/* 连接线 - 统一长度和对齐 */
.timeline-odd::before,
.timeline-even::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 2px;
  height: 50px;
  background-color: #328CC1;
  z-index: -1;
  transform: translateX(-50%);
  display: none; /* 隐藏连接线以避免细竖线 */
}

.timeline-odd::before {
  top: 100%;
  margin-top: 5px;
}

.timeline-even::before {
  bottom: 100%;
  margin-bottom: 10px;
}

/* 时间线曲线容器 - 精确居中 */
.timeline-curve-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 2px;
  z-index: 0;
  width: 100%;
}

/* 主时间轴线 - 居中显示 */
.timeline-main-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #328CC1, #0B3C5D);
  transform: translateY(-50%);
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 时间线曲线 */
.timeline-curve {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

/* 卡片内容样式 */
.timeline-card-content {
  padding: 20px 0;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 年份数字位置 - 调整到卡片内部 */
.timeline-card .absolute {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* 调整时间节点标记位置 */
.timeline-center-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  height: 2px;
  background-color: rgba(1, 0, 3, 0.2);
  z-index: -1;
}

/* 时间轴卡片样式优化 - 修复年份溢出 */
.timeline-card {
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  width: 240px;
  min-height: 160px;
  max-height: 240px;
  padding: 15px;
  overflow-y: auto;
  text-align: center;
  background: white;
  border: 1px solid rgba(59, 130, 246, 0.1);
  margin: 0 auto;
  position: relative;
  padding-top: 40px;
}

.timeline-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

/* 统一字体和文字样式优化 */
.timeline-card h4 {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0B3C5D;
  margin-bottom: 10px;
  line-height: 1.4;
}

.timeline-card p {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* 左右滑动控制按钮样式优化 */
#timeline-prev,
#timeline-next {
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.8;
  background-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#timeline-prev:hover,
#timeline-next:hover {
  opacity: 1;
  transform: scale(1.1);
  background-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* 响应式调整 - 确保桌面版的交错布局优先 */
.timeline-odd {
  align-self: flex-start !important;
  margin-top: -150px !important;
}

.timeline-even {
  align-self: flex-end !important;
  margin-top: 0 !important;
}

@media (max-width: 992px) {
  .timeline-item {
    min-width: 200px;
  }
  
  .timeline-card {
    padding: 0px;
  }
  
  .timeline-card h4 {
    font-size: 16px;
  }
  
  .timeline-card p {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .timeline-center-line {
    top: 24px;
    height: 2px;
  }
  
  /* 移动设备下统一为垂直布局 */
  .timeline-odd,
  .timeline-even {
    align-self: flex-start !important;
    margin-top: 0 !important;
    width: 100%;
  }
  
  .timeline-item {
    display: flex;
    align-items: center;
    min-width: 100%;
    padding-left: 50px;
  }
  
  .timeline-card {
    border-top: none !important;
    border-bottom: none !important;
    border-left: 4px solid #0B3C5D !important;
  }
  
  .timeline-card .absolute {
    left: -32px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
  
  #timeline-prev,
  #timeline-next {
    display: none;
  }
}