/* history.css - 咖啡历史页面样式 */
/* CSS变量定义 */
:root {
  --coffee-brown: #4e342e;
  --coffee-light: #d7ccc8;
  --coffee-dark: #3e2723;
  --accent-cream: #fff8e1;
  --text-color: #2e1d19;
  --hover-color: #8d6e63;
}
/* 页面头部 */
.history-header {
  background: linear-gradient(135deg, var(--coffee-dark) 0%, var(--coffee-brown) 100%);
  color: var(--accent-cream);
  text-align: center;
  padding: 3rem 0;
}

.history-header h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  animation: fadeIn 1s ease-out;
}

.history-header p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 1s ease-out 0.3s both;
}

/* 时间轴容器 */
.timeline-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  position: relative;
}

/* 时间轴主线 */
.timeline-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--coffee-brown);
  transform: translateX(-50%);
}

/* 时间轴项目 */
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  opacity: 1;
  animation: fadeInUp 0.8s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }
.timeline-item:nth-child(5) { animation-delay: 1.0s; }
.timeline-item:nth-child(6) { animation-delay: 1.2s; }

/* 时间轴内容 */
.timeline-content {
  background: var(--accent-cream);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  position: relative;
  width: 45%;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* 左侧项目 */
.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  animation: slideInLeft 0.8s ease-out;
}

.timeline-item:nth-child(odd) .timeline-content::after {
  content: '';
  position: absolute;
  top: 20px;
  right: -15px;
  width: 0;
  height: 0;
  border: 15px solid transparent;
  border-left-color: var(--accent-cream);
}

/* 右侧项目 */
.timeline-item:nth-child(even) .timeline-content {
  margin-left: 55%;
  animation: slideInRight 0.8s ease-out;
}

.timeline-item:nth-child(even) .timeline-content::after {
  content: '';
  position: absolute;
  top: 20px;
  left: -15px;
  width: 0;
  height: 0;
  border: 15px solid transparent;
  border-right-color: var(--accent-cream);
}

/* 时间标记 */
.timeline-date {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--coffee-dark);
  color: var(--accent-cream);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* 时间轴圆点 */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50px;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--coffee-brown);
  border: 4px solid var(--accent-cream);
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 0 0 4px var(--coffee-brown);
}

/* 内容样式 */
.timeline-content h3 {
  color: var(--coffee-dark);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.timeline-content p {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.timeline-content img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 1rem;
  transition: transform 0.3s ease;
}

.timeline-content img:hover {
  transform: scale(1.05);
}

/* 特色信息框 */
.info-box {
  background: var(--coffee-light);
  border-left: 4px solid var(--coffee-brown);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
}

.info-box h4 {
  color: var(--coffee-dark);
  margin-bottom: 0.5rem;
}

.info-box p {
  margin: 0;
  font-size: 0.95rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .timeline-container::before {
    left: 20px;
  }
  
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
  }
  
  .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-item:nth-child(even) .timeline-content::after {
    left: -15px;
    border: 15px solid transparent;
    border-right-color: var(--accent-cream);
  }
  
  .timeline-date {
    left: 20px;
    transform: none;
  }
  
  .timeline-item::before {
    left: 20px;
    transform: none;
  }
  
  .history-header h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .history-header {
    padding: 2rem 1rem;
  }
  
  .history-header h1 {
    font-size: 1.8rem;
  }
  
  .timeline-content {
    padding: 1.5rem;
  }
  
  .timeline-content h3 {
    font-size: 1.2rem;
  }
}