/* 只针对 resources 页面 */
.resources-page .card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px;
}

.resources-page .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  height: 180px;
  width: 280px;
}

.resources-page .card img {
  max-width: 80%;
  height: auto;
  margin-bottom: 10px;
}

.resources-page .card h3 {
  margin: 10px 0;
  font-size: 16px;
  color: #333;
}

.resources-page .card span {
  font-size: 16px;
  color: #444;
}

.resources-page .btn {
  display: inline-block;
  padding: 8px 12px;
  margin-top: 10px;
  background: #007BFF;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}

.resources-page .btn:hover {
  background: #0056b3;
}

/* Add responsive design for smaller screens */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
  nav li {
    margin: 10px 0;
  }
  .hero h1 {
    font-size: 28px;
  }
  .features {
    grid-template-columns: 1fr;
  }
}

/* Optimize images for performance */
img {
  max-width: 100%;
  height: auto;
}


body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

.container {
  flex: 1;
}

footer {
  text-align: center;
  padding: 10px;
  background-color: #f5f5f5;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.card img {
  width: 48px; height: 48px; /* 统一图标尺寸 */
  object-fit: contain;
}


main {
  flex: 1;  /* 自动占满剩余高度 */
}
/* ✅ 汉堡按钮 */
.menu-toggle {
  display: none; /* 默认隐藏 */
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
}

/* ====== 响应式：小屏幕样式 ====== */
@media (max-width: 768px) {
  nav ul {
    display: none;              /* 默认隐藏菜单 */
    flex-direction: column;     /* 垂直排列 */
    background: white;
    position: absolute;
    top: 70px; right: 20px;
    width: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 15px;
  }
  nav ul.show { display: flex; } /* ✅ 点击按钮时显示 */
  nav li { margin: 10px 0; }
  .menu-toggle { display: block; } /* ✅ 小屏幕显示按钮 */
}