/* assets/css/style.css */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #1F3A2F, #0f1f18);
  color: #F5F1E8;
  line-height: 1.6;
}

/* 全局图片限制 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

header {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ✅ 导航优化（重点修复） */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
}

/* LOGO */
.logo {
  font-size: 20px;
  font-weight: bold;
  color: #C6A96B;
  flex-shrink: 0;
}

/* NAV 居中 */
nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* 菜单不换行 */
nav ul {
  display: flex;
  list-style: none;
  gap: 18px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* 菜单文字 */
nav ul li a {
  padding: 6px 10px;
  font-size: 14px;
  transition: 0.3s;
  white-space: nowrap;
}

nav ul li a:hover,
nav ul li a.active {
  background: #C6A96B;
  color: #000;
  border-radius: 4px;
}

/* CTA 按钮 */
.cta-btn {
  border: 1px solid #C6A96B;
  padding: 8px 14px;
  border-radius: 4px;
  transition: 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.cta-btn:hover {
  background: #C6A96B;
  color: #000;
}

.menu-toggle {
  display: none;
  cursor: pointer;
}

/* HERO */
.hero {
  position: relative;
  padding: 100px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
}

.hero .content {
  max-width: 50%;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

.hero .buttons a {
  margin-right: 15px;
}

.hero .img-block {
  max-width: 600px;
}

/* IMAGE BLOCK */
.img-block {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #ccc;
  padding: 10px;
  margin-top: 20px;
}

.img-block img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 40px;
  width: 100%;
}

.card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 8px;
  transition: 0.3s;
  width: 100%;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* 卡片图片强制裁剪 */
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* SECTION */
.section {
  padding: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* FOOTER */
footer {
  background: #0a1410;
  padding: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid h4 {
  margin-bottom: 10px;
  color: #C6A96B;
}

.footer-bottom {
  margin-top: 20px;
  border-top: 1px solid #333;
  padding-top: 10px;
  font-size: 14px;
  text-align: center;
}

/* RESPONSIVE */
@media(max-width: 768px){

  nav {
    position: absolute;
    right: 0;
    top: 60px;
    width: 200px;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background: #000;
    padding: 10px;
  }

  nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    flex-direction: column;
  }

  .hero .content {
    max-width: 100%;
  }

  .hero .img-block {
    max-width: 100%;
  }
}