/* 
 * 视觉风格定义
 * 主题：现代、简洁、高雅
 * 色调：中性色（白、浅灰） + 季节性点缀
 */

:root {
  /* 色彩体系 */
  --bg-primary: #FFFFFF;
  --bg-secondary: #FAFAFA;
  --text-primary: #2C2C2C;
  --text-secondary: #555555;
  --accent-sand: #E9DCD1;
  --accent-shell: #F5E9E0;
  --accent-mist: #E8EEE8;
  --border-color: #EEEEEE;
  --nav-bg: rgba(255, 255, 255, 0.95);
  
  /* 字体系统 */
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* 间距 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* 布局 */
  --container-width: 1400px;
  --header-height: 80px;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-height); /* 为固定导航栏留出空间 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 排版 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 布局工具 */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background-color: var(--text-primary);
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-item {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-primary);
  position: relative;
  padding: 5px 0;
}

.nav-item::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--text-primary);
  transition: width 0.3s ease;
}

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

/* 移动端菜单按钮 (默认隐藏) */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  position: absolute;
  right: 5%;
}

/* 首页组件 */
.hero-section {
  width: 100%;
  height: calc(100vh - var(--header-height));
  min-height: 600px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: zoomIn 20s infinite alternate;
}

.grid-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.showcase-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.showcase-item img {
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
}

.showcase-item:hover img {
  transform: scale(1.05);
}

/* 优雅着装页面组件 */
.style-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.style-block.reverse {
  direction: rtl; /* 图片在右，文字在左 */
}

.style-block.reverse .text-content {
  direction: ltr; /* 文字方向恢复 */
}

.text-content {
  padding: var(--spacing-md);
  text-align: center;
}

.style-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

/* 灵感图库页面组件 - 瀑布流 */
.gallery-masonry {
  column-count: 3;
  column-gap: var(--spacing-md);
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: opacity 0.3s ease;
}

.gallery-item:hover img {
  opacity: 0.9;
}

/* 页脚 */
.site-footer {
  margin-top: auto;
  padding: var(--spacing-md) 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

@keyframes zoomIn {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  :root {
    --spacing-xl: 4rem;
    --container-width: 95%;
  }
  
  .grid-showcase {
    gap: var(--spacing-sm);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --spacing-lg: 2.5rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  /* 移动端导航 */
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: height 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    gap: var(--spacing-md);
  }

  .nav-links.open {
    height: 200px;
  }

  /* 移动端布局调整 */
  .grid-showcase {
    grid-template-columns: 1fr;
  }

  .style-block, 
  .style-block.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .gallery-masonry {
    column-count: 1;
  }
  
  .hero-section {
    min-height: 400px;
  }
}