/* ✅ Reset + 全局字体 */
html, body {
  height: 100%; /* 关键：让 body 占满高度 */
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column; /* 关键：上下排列 */
  min-height: 100vh;      /* 页面最小高度占满屏幕 */
}

/* ✅ Header */
header {
  background: #003366;
  color: white;
  padding: 10px 20px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-weight: bold;
  font-size: 16px;
  color: white;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  padding: 0;
  margin: 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
}

/* ✅ 主体内容 (让内容区域可以自动撑开) */
main {
  flex: 1; /* 关键：自动填满中间空间，推到底部 */
  padding: 20px;
}

/* ✅ Footer */
footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  margin-top: auto; /* 关键：保持在最下面 */
}

/* ✅ Language Dropdown */
.dropdown {
  position: relative;
}

.dropbtn {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 80px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #ddd;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ✅ Gallery 分类按钮 */
.gallery-categories {
  text-align: center;
  margin: 20px 0;
}

.gallery-categories button {
  margin: 5px;
  padding: 8px 12px;
  cursor: pointer;
}

/* ✅ Gallery item 默认隐藏 */
.gallery-item {
  display: none;
}

.gallery-item.show {
  display: block;
}

/* WhatsApp 悬浮按钮 */
.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s;
}

.whatsapp-button:hover {
    transform: scale(1.1);
}

.whatsapp-button img {
    width: 100%;
    height: 100%;
    display: block;
}

/* 移动端汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: 0.3s;
}

/* 当屏幕宽度小于 768px 时 */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    width: 100%;
    display: none; /* 默认隐藏 */
  }

  nav ul.show {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

/* ===== 手机端显示隐藏导航按钮 ===== */
.mobile-menu-btn {
  display: none; /* 桌面端隐藏 */
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 2000; /* 提高 z-index，保证在最上层 */
  width: 45px;
  height: 45px;
  background: #003366;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 24px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* 强制在992px以下显示按钮 */
@media (max-width: 992px) {
  .mobile-menu-btn {
    display: flex !important;
  }

  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    transition: transform 0.3s ease;
  }

  header.hidden {
    transform: translateY(-100%);
  }

  .nav-links {
    flex-direction: column;
    background: #003366;
    width: 100%;
    padding-top: 60px;
    display: none;
    overflow: visible; /* 避免遮挡按钮 */
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li a {
    color: white;
    padding: 12px 20px;
    font-size: 16px;
  }
}

/* ===== 移动端汉堡菜单 ===== */
@media (max-width: 992px) {
  /* 隐藏导航菜单，显示汉堡按钮 */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100%;
    background: #003366; /* 或你想要的背景色 */
    flex-direction: column;
    padding-top: 80px;
    gap: 20px;
    transition: right 0.3s ease;
    z-index: 999;
  }

  .nav-links li {
    text-align: left;
    margin: 0 20px;
  }

  .nav-links li a {
    color: white;
    font-size: 16px;
  }

  /* 汉堡按钮显示 */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    height: 3px;
    background: #003366;
    border-radius: 2px;
    transition: 0.3s ease;
  }

  /* 打开菜单状态 */
  .nav-links.show {
    right: 0;
  }

  /* 汉堡变 X */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* 手机端菜单里的翻译按钮修正 */
@media (max-width: 768px) {
  .nav-links .dropdown {
    text-align: center; /* 居中 */
  }

  .nav-links .dropdown .dropdown-content {
    display: flex !important;
    justify-content: center;
    gap: 10px;
    background: transparent;
    box-shadow: none;
    position: static; /* 取消绝对定位 */
  }

  .nav-links .dropdown .dropdown-content a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    background: #003366; /* 深蓝背景 */
    color: #fff !important;
    font-weight: bold;
    transition: background 0.3s;
  }

  .nav-links .dropdown .dropdown-content a:hover {
    background: #ff9933; /* 高亮橙色 */
  }

  /* 让手机端 EN/CN 主按钮不影响点击 */
  .nav-links .dropdown .dropbtn {
    pointer-events: none;
    opacity: 0.7;
  }
}


