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

/* =========================================
   美学页面专属变量
   ========================================= */
:root {
  --aes-font-primary: 'Source Han Sans CN', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --aes-spacing-section: 8rem;
  --aes-color-text: #1a1a1a;
  --aes-color-subtext: #737373;
  --aes-color-bg: #ffffff;
  --transition-slow: 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================
   页面基础布局
   ========================================= */
main.aesthetics-page {
  background-color: var(--aes-color-bg);
  font-family: var(--aes-font-primary);
  color: var(--aes-color-text);
  padding-top: 80px; /* 适配固定导航栏 */
  overflow-x: hidden;
}

/* =========================================
   头部引导区 (Intro)
   ========================================= */
.aesthetics-intro {
  height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  opacity: 0;
  animation: fadeUp 1.2s ease-out forwards;
}

.aesthetics-intro h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  letter-spacing: 0.2em;
  color: var(--aes-color-text);
}

.aesthetics-intro p {
  font-size: 1.1rem;
  color: var(--aes-color-subtext);
  max-width: 600px;
  line-height: 1.8;
  font-weight: 300;
}

/* =========================================
   章节通用布局 (Scroll Sections)
   ========================================= */
.aesthetic-chapter {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 5%;
  margin-bottom: var(--aes-spacing-section);
  opacity: 0; /* 滚动触发显示 */
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}

.aesthetic-chapter.visible {
  opacity: 1;
  transform: translateY(0);
}

.chapter-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 5rem;
  max-width: 1400px;
  width: 100%;
  align-items: center;
}

/* 偶数章节布局反转：文左图右 */
.aesthetic-chapter:nth-child(even) .chapter-inner {
  grid-template-columns: 0.8fr 1.2fr;
}

.aesthetic-chapter:nth-child(even) .chapter-media {
  order: 2;
}

.aesthetic-chapter:nth-child(even) .chapter-text {
  order: 1;
  padding-right: 4rem;
  padding-left: 0;
  text-align: right;
}

/* =========================================
   视觉媒体区域 (Images/Video)
   ========================================= */
.chapter-media {
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.03);
}

.chapter-media img,
.chapter-media video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.5s ease-out;
  object-fit: cover;
}

/* 悬停微动效 */
.chapter-media:hover img {
  transform: scale(1.03);
}

/* =========================================
   文字内容区域 (Typography)
   ========================================= */
.chapter-text {
  padding-left: 2rem;
}

.chapter-num {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--aes-color-subtext);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  font-weight: 400;
}

.chapter-title {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
  color: var(--aes-color-text);
}

/* 标题下划线装饰 */
.chapter-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 40px;
  height: 1px;
  background-color: var(--aes-color-text);
  transition: width 0.6s ease;
}

.aesthetic-chapter:nth-child(even) .chapter-title::after {
  left: auto;
  right: 0;
}

.chapter-desc {
  font-size: 1.05rem;
  line-height: 2.2; /* 宽松行距 */
  color: #555;
  font-weight: 300;
  margin-bottom: 0;
}

/* =========================================
   色彩章节特殊组件 (Color Swatches)
   ========================================= */
.color-palette {
  display: flex;
  gap: 15px;
  margin-top: 2.5rem;
}

.aesthetic-chapter:nth-child(even) .color-palette {
  justify-content: flex-end;
}

.color-swatch {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.color-swatch:hover {
  transform: translateY(-5px);
}

/* =========================================
   响应式设计 (Responsive)
   ========================================= */
@media (max-width: 992px) {
  .aesthetics-intro h1 {
    font-size: 2.2rem;
  }

  .chapter-inner {
    grid-template-columns: 1fr !important; /* 强制单列 */
    gap: 2.5rem;
  }

  .aesthetic-chapter {
    padding: 2rem 1.5rem;
    min-height: auto;
    margin-bottom: 6rem;
  }

  .aesthetic-chapter:nth-child(even) .chapter-media {
    order: 1; /* 移动端图片始终在上方 */
  }

  .aesthetic-chapter:nth-child(even) .chapter-text {
    order: 2;
    padding-right: 0;
    text-align: left;
  }

  .aesthetic-chapter:nth-child(even) .chapter-title::after {
    left: 0;
    right: auto;
  }

  .aesthetic-chapter:nth-child(even) .color-palette {
    justify-content: flex-start;
  }

  .chapter-text {
    padding-left: 0;
  }

  .chapter-title {
    font-size: 2rem;
  }
}

/* =========================================
   动画 (Animations)
   ========================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}