@font-face {
  font-family: "IvyOraText-Medium";
  src: url("../fonts/IvyOraText/IvyOraText-Medium.ttf") format("truetype");
  font-weight: 500;
}

html {
  scroll-behavior: smooth;
}

main {
  padding-top: 100px;
}

/* 避免固定头部遮挡锚点定位 */
section {
  scroll-margin-top: 120px; /* 根据你的 header 高度调整 */
}

/* === Header 基础 === */
/* === Header 半透明罩层版本 === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 9vh;

  /* ✅ 半透明底色（非纯白色块） */
  background: rgba(238, 233, 226, 0.75);

  /* ✅ 背景模糊 */
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);

  /* ✅ 柔和阴影 */
  box-shadow: 0px 4px 100px 0px rgba(0, 0, 0, 0.15);

  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Container：整体略靠右 */
.site-header .container {
  width: min(88%, 78vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo a {
  text-decoration: none;
  color: inherit;
  line-height: 0;
  display: flex;
  align-items: center; /* ✅ 确保 logo 在容器里垂直居中 */
}
.logo img {
  height: clamp(48px, 6vh, 64px); /* ✅ 略大一点，完全显示 */
  display: block;
}

/* Nav 布局 */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1vw, 1.4vw, 1.6vw);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav 链接样式 */
.main-nav a {
  position: relative;
  display: inline-block;
  padding: 0.8vh 1.5vw; /* ✅ hover 区域略大一点 */
  border-radius: 0.4vw;
  font-family: "IvyOraText-Medium", serif;
  font-weight: 500;
  font-size: clamp(16px, 1.25vw, 22px);
  letter-spacing: 0.03em;
  color: #272a2c;
  text-decoration: none;
  line-height: 150%;
  transition: all 0.18s ease;
  z-index: 0;
}

/* Hover：粉底 + 阴影 + 轻微浮起 */
.main-nav a::before {
  content: "";
  position: absolute;
  inset: -0.3vh -0.4vw; /* ✅ hover 区域略大一点 */
  border-radius: inherit;
  background: #ddc2a9;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  z-index: -1;
}
.main-nav a:hover::before {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 6px 25px rgba(227, 184, 192, 0.45);
}
.main-nav a:hover {
  transform: translateY(-0.2vh);
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .site-header .container {
    width: 90%;
  }
  .main-nav ul {
    gap: 2vw;
  }
  .main-nav a {
    font-size: clamp(14px, 1.8vw, 18px);
  }
}
@media (max-width: 768px) {
  .main-nav ul {
    gap: 1.5vw;
  }
  .main-nav a {
    padding: 0.8vh 1.2vw;
  }
}

/* ===================== FOOTER ===================== */
.site-footer {
  background-color: #626657; /* 深绿背景 */
  color: #eee9e2;
  padding: 3.5vh 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  width: min(88%, 78vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* ✅ 左侧 logo + copyright 垂直堆叠 */
.footer-left {
  display: flex;
  flex-direction: column; /* ✅ 改为上下布局 */
  align-items: flex-start;
  gap: 0.8vh;
}
.footer-left img {
  height: clamp(50px, 6vh, 70px); /* ✅ 比之前略大一点 */
  filter: brightness(0) invert(1); /* 白色 logo */
}
.footer-left p {
  font-family: "IvyOraText-Medium", serif;
  font-size: clamp(12px, 0.9vw, 15px);
  color: rgba(238, 233, 226, 0.8);
  margin: 0;
}

/* 右侧导航 */
.footer-right ul {
  display: flex;
  list-style: none;
  gap: clamp(1vw, 1.4vw, 1.8vw);
  margin: 0;
  padding: 0;
}
.footer-right a {
  position: relative;
  font-family: "IvyOraText-Medium", serif;
  font-weight: 500;
  font-size: clamp(16px, 1.25vw, 21px);
  letter-spacing: 0.01em;
  color: #eee9e2;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

/* ✅ Hover：白色下划线 */
.footer-right a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25vh;
  width: 0%;
  height: 1px;
  background-color: #ffffff;
  transition: width 0.25s ease;
}
.footer-right a:hover::after {
  width: 100%;
}

/* 响应式 */
@media (max-width: 900px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 2.5vh;
  }
  .footer-left {
    align-items: center; /* ✅ 居中对齐 */
  }
  .footer-right ul {
    justify-content: center;
  }
}

/* ===================== 📱 移动端优化 ===================== */

/* --- Header 手机端 --- */
@media (max-width: 768px) {
  .site-header {
    height: auto;
    padding: 1.5vh 0;
  }

  .site-header .container {
    flex-direction: column;
    gap: 1vh;
  }

  .logo img {
    height: 48px;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 3vw;
  }

  .main-nav a {
    font-size: 15px;
    padding: 0.6vh 1vw;
    border-radius: 6px;
  }
}

/* --- Footer 手机端 --- */
@media (max-width: 768px) {
  .site-footer {
    padding: 5vh 0 4vh;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3vh;
  }

  .footer-left {
    align-items: center;
    gap: 1vh;
  }

  .footer-left img {
    height: 54px; /* ✅ 保证 logo 清晰可见 */
  }

  .footer-left p {
    font-size: 13px;
    line-height: 1.5;
  }

  .footer-right ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4vw;
  }

  .footer-right a {
    font-size: 15px;
    letter-spacing: 0.02em;
    line-height: 1.6;
  }

  .footer-right a::after {
    bottom: -0.2vh;
    height: 1px;
  }
}
