/* ================= 基础重置与全局样式 ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: #f4f1e8; 
  background-image: url('./背景底图.webp');
    /* 让图片自动放大填满整个屏幕 */
  background-size: cover; 
  
  /* 图片居中显示 */
  background-position: center center; 
  
  /* 不平铺重复 */
  background-repeat: no-repeat; 
  
  /* 关键：背景图固定，页面滚动时背景不跟着滚，营造沉浸感 */
  background-attachment: fixed; 

  color: #1a1a1a;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

/* 容器：全屏下更宽的留白，防止内容贴边 */
.container {
  max-width: 1920px; /* 适配全屏 */
  margin: 0 auto;
  padding: 0 6vw;    /* 左右留白 6vw，视觉上更大气 */
  position: relative;
  width: 100%;
}

/* ================= 文字全局放大比例 ================= */
h1 { 
  font-size: clamp(3.5rem, 6vw, 8rem); /* 标题极大，占据左上角 */
  font-weight: 800; 
  letter-spacing: -2px; 
  margin-bottom: 3vh; 
  text-align: left; 
  line-height: 1.1;
}

h2 { 
  font-size: clamp(2.2rem, 4vw, 4.5rem); 
  font-weight: 700; 
  display: flex; 
  align-items: center; 
  gap: 20px; 
  margin-bottom: 5vh; 
}
h2::before { 
  content: ''; 
  display: inline-block; 
  width: 16px; 
  height: 16px; 
  background-color: #1a1a1a; 
  border-radius: 50%; 
}

h3 { 
  font-size: clamp(1.4rem, 2.2vw, 2.5rem); 
  font-weight: 600; 
  margin-bottom: 2vh; 
}

p { 
  font-size: clamp(1.1rem, 1.3vw, 1.6rem); /* 正文字体放大 */
  color: #333; 
  line-height: 1.9; 
}

.text-right { 
  text-align: right; 
  max-width: 45%; /* 按照截图，右侧文字占据不到一半宽度 */
  margin-left: auto; 
}

.circle-img { border-radius: 50%; object-fit: cover; }

/* ================= 顶部 Hero 区域 ================= */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 5vh; /* 标题距离顶部的距离 */
  display: flex;
  align-items: flex-start;
}

/* 顶部右侧大盘子：根据截图，非常大且向右偏移 */
.hero-plate-right {
  position: absolute;
  right: -19vw; 
  top: -29vh;
  width: 89vw;  
  height: 89vw;
  max-width: 1600px; /* 全屏下限制上限 */
  max-height: 1600px;
  object-fit: contain;
  z-index: 0; 
  pointer-events: none;
  animation: rotatePlate 60s linear infinite;
}

/* 左侧悬浮菜品底下的大盘子 */
.hero-plate-left {
  position: absolute;
  left: -26vw;
  bottom: -108vh;
  width: 89vw;
  height: 89vw;
  max-width: 1600px;
  max-height: 1600px;
  object-fit: contain;
  z-index: 0; 
  pointer-events: none;
  animation: rotatePlate 80s linear infinite reverse;
}

@keyframes rotatePlate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* 头部排版 */
.hero-header {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* 简介文字：按照截图偏右，且字体较大 */
.hero-desc {
  text-align: right; 
  max-width: 45%; 
  margin-left: auto; 
  margin-right: 3vw; 
  font-size: clamp(1.2rem, 1.4vw, 1.6rem);
}

/* 左侧悬浮的菜品图：尺寸变大，曲线排布 */
.floating-dishes {
  position: absolute;
  left: 2vw; 
  top: 28vh; 
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2vh;
}

.floating-dishes img {
  width: 18vw; /* 放大尺寸 */
  height: 18vw;
  max-width: 280px; /* 全屏上限 */
  max-height: 280px;
  border: none;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  animation: floatBubble 3s ease-in-out infinite;
  position: relative;
  z-index: 3;
  .floating-dishes img:hover {
  /* 👇 悬停时：放大、轻微上浮、加深阴影 */
  transform: scale(1.15) translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border-color: #ffd3a5; /* 可选：边框微微变色（比如暖色） */
  
  /* 👇 关键：暂停浮动动画，防止与悬停的 transform 冲突 */
  animation-play-state: paused;
  
  /* 👇 提高层级，确保悬停时浮在最上面 */
  z-index: 10;
}
}

/* 错落排布：模拟截图中的优美弧线（图2） */
.floating-dishes img:nth-child(1) { margin-left: 12vw; animation-delay: 0s;}
.floating-dishes img:nth-child(2) { margin-left: -2vw; animation-delay: 0.8s;}
.floating-dishes img:nth-child(3) { margin-left: 8vw; animation-delay: 1.5s;}
.floating-dishes img:nth-child(4) { margin-left: 0vw; animation-delay: 0.3s;}
.floating-dishes img:nth-child(5) { margin-left: 10vw; animation-delay: 1.2s;}
.floating-dishes img:nth-child(6) { margin-left: 4vw; animation-delay: 2s;}

/* ================= 历史渊源 ================= */
.section-history {padding-top: 110vh; margin-bottom: 5vh; position: relative; z-index: 2; }

/* ================= 三大流派 ================= */
/* 决定滚动总时长 */
.section-schools-scroll {
  position: relative; /* 必须相对定位 */
  height: 300vh; 
}

/* 顶部标题保持固定 */
.section-schools-scroll .container {
  position:relative;
  margin-top: -6vh; /* 👈 向上偏移，可以继续调大负数，比如 -12vh */
  padding-bottom: 10vh;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none; 
}

/* 固定视口，负责横向滚动的容器 */
.schools-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden; 
  display: flex;
  align-items: center; /* 垂直居中 */
  padding-top: 20vh;   /* 👈 如果卡片还是太靠上，就把这个数值改大，比如 15vh 或 20vh */
}

/* 横向轨道 */
.schools-track {
  display: flex;
  gap: 10vw;
  padding-left: calc(6vw + 31px); 
  padding-right: 15vw; /* 确保最后一个卡片能滑到左侧 */
  width: max-content; 
  will-change: transform; 
}

/* 单个卡片 */
.school-card {
  width: 85vw; 
  display: flex;
  flex-direction: column;
  text-align: left;
}

/* 卡片内部：防止卡片文字与标题重叠 */
.school-card h3 { 
  text-align: left; 
  font-weight: 500; 
  margin-bottom: 3vh; 
}

/* 中间的菜品图：占屏幕很大比例 */
.main-dish { 
  width: 35vw; 
  height: 35vw; 
  max-width: 600px;
  max-height: 600px;
  margin: 0 auto 8vh; 
  border: none; 
  box-shadow: 0 25px 50px rgba(0,0,0,0.08); 
}

.school-desc { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 8vw; 
  text-align: left; 
  font-size: clamp(1rem, 1.1vw, 1.3rem); 
  color: #555; 
  padding-left: 0; /* 根据截图微调缩进 */
}

/* ================= 风味与烹饪特点 ================= */
.section-flavors { margin-bottom: 25vh; position: relative; z-index: 2; }

.flavor-item { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20vh; gap: 5vw; }
.flavor-text { flex: 1; max-width: 45%; }
.flavor-img { flex: 1; display: flex; justify-content: center; }

/* 辣椒等大图：根据截图（图5），辣椒图非常大，占据屏幕大半 */
.chili-img { width: 50vw; max-width: 1100px; height: auto; object-fit: contain; }
.cured-meat-img { width: 35vw; max-width: 600px; height: auto; object-fit: contain; transform: rotate(-5deg); }
.pickle-img { width: 30vw; max-width: 500px; height: auto; object-fit: contain; }

/* 👇 4.Cooking Techniques 独立左对齐区块 */
.cooking-techniques-block { width: 100%; margin-top: 15vh; text-align: left; }
.cooking-techniques-block h3 { margin-bottom: 6vh; }

.techniques-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 4vw; 
  max-width: 1000px; /* 放大网格宽度 */
  margin-left: 0; 
}

.tech-card { position: relative; border-radius: 15px; overflow: hidden; box-shadow: 0 15px 30px rgba(0,0,0,0.05); }
.tech-card img { width: 100%; height: 35vh; object-fit: cover; display: block; }
.tech-card span { position: absolute; bottom: 20px; left: 20px; color: #fff; font-weight: bold; font-size: clamp(1.5rem, 2vw, 2.5rem); text-shadow: 0 4px 15px rgba(0,0,0,0.8); }

/* ================= 主食与小吃 ================= */
.section-staples { margin-bottom: 25vh; position: relative; z-index: 2; }
.food-row { margin-bottom: 15vh; }
.food-row p { font-size: clamp(1rem, 1.1vw, 1.4rem); max-width: 50%; margin-bottom: 6vh; }
.food-images { display: flex; gap: 6vw; flex-wrap: wrap; }

/* 三张主食图：放大到接近 18vw */
.food-images img { 
  width: 18vw; 
  max-width: 300px; 
  height: 18vw; 
  max-height: 300px; 
  border: none; 
  box-shadow: 0 15px 30px rgba(0,0,0,0.05); 
}

/* ================= 文化核心 ================= */
.section-core { position: relative; padding-bottom: 15vh; min-height: auto; }

/* 底部盘子：极度放大，占据左下角大块区域 */
.core-plate-bg { 
  position: absolute; 
  left: 9vw; 
  bottom: -88vh; 
  width: 85vw; 
  max-width: 1600px; 
  height: auto; 
  object-fit: contain; 
  z-index: 0; 
  pointer-events: none; 
   /* 参数说明：动画名 60秒转一圈 匀速 无限循环 */
  animation: rotatePlate 80s linear infinite; 

}

.core-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.core-content p { max-width: 45%; text-align: left; font-size: clamp(1.1rem, 1.3vw, 1.6rem); }

/* ================= 响应式自适应 (平板与手机) ================= */
@media (max-width: 1024px) {
  .container { padding: 0 5vw; }
  .hero-plate-right, .hero-plate-left { max-width: 80vw; max-height: 80vw; }
  .floating-dishes { position: relative; left: 0; top: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; margin-top: 60px; gap: 20px; }
  .floating-dishes img { width: 140px; height: 140px; margin: 0 !important; }
  .hero-desc { max-width: 100%; margin-right: 0; margin-left: 0; text-align: left; }
  .text-right { max-width: 100%; text-align: left; }
  .main-dish { width: 50vw; height: 50vw; }
  .school-desc { grid-template-columns: 1fr; padding-left: 0; gap: 30px; }
  .flavor-item { flex-direction: column; text-align: center; margin-bottom: 10vh; gap: 40px; }
  .flavor-text { max-width: 100%; }
  .techniques-grid { margin: 0 auto; max-width: 100%; }
  .food-images { justify-content: center; }
  .food-images img { width: 30vw; height: 30vw; }
  .core-plate-bg { width: 100vw; left: -50vw; }
  .core-content { align-items: flex-start; }
  .core-content p { text-align: left; max-width: 100%; }
}

@media (max-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  .hero-plate-right, .hero-plate-left { display: none; }
  .floating-dishes img { width: 90px; height: 90px; }
  .main-dish { width: 70vw; height: 70vw; border-width: 10px; }
  .chili-img, .cured-meat-img, .pickle-img { width: 100%; }
  .food-images img { width: 40vw; height: 40vw; border-width: 4px; }
  .tech-card img { height: 25vh; }
}/* ================= 三大流派：横向滚动特效 ================= */
.section-schools-scroll {
  position: relative;
  /* 决定滚动总时长：卡片越多，这里要设置越高。300vh 意味着要滚 3 个屏幕的高度才能走完 */
  height: 500vh; 
}

/* 顶部标题保持固定，不参与横向滚动 */
.section-schools-scroll .container {
  position: absolute;
  top: 0vh;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none; /* 让鼠标穿透，不影响下面的滚动 */
}

.schools-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden; /* 隐藏横向溢出到屏幕外的卡片 */
  display: flex;
  align-items: center;
  padding-top: 0vh;
}

/* 横向轨道：装载所有卡片的宽条 */
.schools-track {
  display: flex;
  gap: 10vw; /* 卡片之间的间距 */
  padding-left: calc(6vw + 31px); /* 与左侧边缘的距离，保持与 container 对齐 */
  padding-right: 7vw;
  width: max-content; /* 宽度由卡片总宽度撑开 */;
  will-change: transform; /* 性能优化：提示浏览器会有位移变化 */
}

/* 单个卡片的宽度限制 */
.school-card {
  width: 85vw; /* 每张卡片占屏幕宽度的 80% */
  display: flex;
  flex-direction: column;
  text-align: left;
}

/* 卡片内标题左对齐 */
.school-card h3 {
  text-align: left;
  font-weight: 500;
  margin-bottom: 3vh;
}

/* 居中显示卡片内的大图 */
.school-card .main-dish {
  margin: 0 0 5vh 0;
}

/* 卡片内底部双栏文字左对齐 */
.school-card .school-desc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4vw;
  text-align: left;
  font-size: clamp(1rem, 1.1vw, 1.3rem);
  color: #555;
  /* 保证文字不会贴死边缘 */
  padding-right: 0;
}
/* 定义泡泡浮动动画 */
@keyframes floatBubble {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px); /* 微微向上浮动 */
  }
  100% {
    transform: translateY(0px);
  }
}
/* ================= 全局文字悬停跳动效果 ================= */

/* 1. 选定文字元素，添加平滑过渡 */
h1, h2, h3, p, span, a, .school-card h3 {
  /* 关键：使用 cubic-bezier 营造类似弹簧的跳跃感 */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              color 0.3s ease;
  will-change: transform;
  position: relative; /* 确保 z-index 生效 */
  z-index: 1;
}

/* 2. 鼠标悬停时的跳动状态 */
h1:hover, h2:hover, h3:hover, p:hover, span:hover, a:hover, .school-card h3:hover {
  transform: translateY(-8px) scale(1.02); /* 向上跳起 8px 并微微放大 */
  color: #d9534f; /* 悬停时变成辣椒红，增加互动反馈 */
  z-index: 10; /* 确保跳起时不会被旁边的元素遮挡 */
}
.fade-in-up {
  opacity: 0; /* 初始透明 */
  transform: translateY(40px); /* 向下偏移 */
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}
/* ================= 全局滚动淡入上浮效果 ================= */
.fade-in-up {
  opacity: 0; /* 初始透明 */
  transform: translateY(40px); /* 向下偏移 40px */
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), 
              transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: opacity, transform;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0); /* 滑回原位 */
}
/* 1. 解决鼠标穿透：让标题重新能被鼠标感知 */
.section-schools-scroll .container h2,
.section-schools-scroll .container h3 {
  pointer-events: auto;
}

/* 2. 解决冲突：针对“已经显示出来”的标题，专属的悬停跳动效果 */
h1.fade-in-up.visible:hover,
h2.fade-in-up.visible:hover,
h3.fade-in-up.visible:hover,
.school-card h3.fade-in-up.visible:hover {
  transform: translateY(-8px) scale(1.02); /* 跳动效果回来啦 */
  color: #d9534f; /* 变成辣椒红 */
  /* 使用干脆的回弹动画，避免与淡入过渡冲突 */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              color 0.3s ease !important;
}