/* fashion-art-gallery-050410/frontend/public/styles/behind.css */

/* =========================================
   页面特定变量
   ========================================= */
:root {
  --timeline-line-color: #e5e5e5;
  --timeline-dot-color: #333;
  --card-bg: #ffffff;
  --text-muted: #737373;
  --gap-large: 6rem;
  --gap-medium: 3rem;
}

/* =========================================
   Hero / 头部区域
   ========================================= */
.behind-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeIn 1.2s ease-out forwards;
}

.behind-hero h1 {
  font-weight: 300;
  font-size: 2.5rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

.behind-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.8;
}

/* =========================================
   时间线布局 (Timeline Layout)
   ========================================= */
.timeline-section {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--gap-medium) 1rem;
}

/* 垂直中心线 */
.timeline-section::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--timeline-line-color);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--gap-large);
  width: 100%;
  display: flex;
  justify-content: center;
  opacity: 0; /* 配合JS实现滚动显现 */
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 内容容器：左右交替 */
.timeline-content {
  width: 45%;
  position: relative;
}

/* 偶数项在左侧，奇数项在右侧（通过flex-direction或margin控制） */
.timeline-item:nth-child(odd) {
  justify-content: flex-start;
}

.timeline-item:nth-child(even) {
  justify-content: flex-end;
}

/* 时间节点圆点 */
.timeline-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--card-bg);
  border: 1px solid var(--timeline-dot-color);
  border-radius: 50%;
  transform: translate(-50%, 20px);
  z-index: 2;
}

/* 阶段标题 */
.stage-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: block;
}

/* 图片容器 */
.media-wrapper {
  width: 100%;
  overflow: hidden;
  background-color: #f0f0f0;
  margin-bottom: 1.5rem;
  transition: transform 0.6s ease;
}

.media-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.5s ease;
  filter: grayscale(10%);
}

.media-wrapper:hover img {
  transform: scale(1.03);
  filter: grayscale(0%);
}

/* 描述文本 */
.description-box {
  background: var(--card-bg);
  padding: 1rem 0;
}

.description-box h3 {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.description-box p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  font-weight: 300;
}

/* =========================================
   灵感板网格 (Inspiration Grid)
   ========================================= */
.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: var(--gap-large);
  padding-bottom: var(--gap-large);
}

.grid-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background-color: #f9f9f9;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.grid-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.grid-item:hover .grid-caption {
  opacity: 1;
}

.grid-caption span {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================
   响应式设计
   ========================================= */
@media (max-width: 768px) {
  .behind-hero {
    padding: 4rem 1rem 2rem;
  }

  .timeline-section::before {
    left: 20px; /* 线条移至左侧 */
  }

  .timeline-item {
    justify-content: flex-start !important; /* 强制全部左对齐 */
    margin-bottom: 4rem;
    padding-left: 3rem; /* 为线条留出空间 */
  }

  .timeline-content {
    width: 100%;
  }

  .timeline-dot {
    left: 20px; /* 圆点移至左侧 */
  }

  .inspiration-grid {
    grid-template-columns: 1fr; /* 移动端单列 */
    gap: 1rem;
  }
}

/* 动画关键帧 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}