/* style.css — 共享独立CSS，白红配色，扁平化 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-image: url('res/bg-main.jpg') no-repeat center center fixed;
  -webkit-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  color: #1e1e1e;
  padding-top: 72px; /* 为固定导航留空间 */
}

/* ---------- 顶部悬浮导航 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  border-bottom: 2px solid #d32f2f; /* 红色强调 */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left, .nav-right {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-left a, .nav-right a {
  text-decoration: none;
  color: #1e1e1e;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: 0.15s;
  font-size: 0.95rem;
}

.nav-left a:hover, .nav-right a:hover {
  border-bottom-color: #d32f2f;
  color: #b71c1c;
}

.nav-left a.active, .nav-right a.active {
  border-bottom-color: #d32f2f;
  color: #b71c1c;
}

.nav-center {
  display: flex;
  align-items: center;
}

.avatar {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d32f2f;
  background: #f5f5f5;
}

/* ---------- 中部容器 ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

/* 宣传图片 */
.hero {
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.banner-img {
  width: 100%;
  height: auto;
  display: flex;
  background: #f0f0f0;
  border: 1px solid #eaeaea;
}

/* 板块通用 */
.section-block {
  margin-top: 48px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid #d32f2f;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.7rem;
  font-weight: 600;
  color: #b71c1c;
  letter-spacing: 0.5px;
}

.section-more {
  color: #d32f2f;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid #d32f2f;
  padding: 4px 14px;
  border-radius: 20px;
  transition: 0.15s;
}

.section-more:hover {
  background: #d32f2f;
  color: #ffffff;
}

/* 卡片行 (横向排列) */
.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: flex-start;
}

.card {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 260px;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 16px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: 0.2s ease;
}

.card:hover {
  border-color: #d32f2f;
  box-shadow: 0 8px 20px rgba(211, 47, 47, 0.08);
}

.card-icon {
  width: 72px;
  height: 72px;
  background: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid #ececec;
}

.card-icon img {
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e1e1e;
  margin: 8px 0 12px;
}

.card-link {
  background: #d32f2f;
  color: #ffffff;
  text-decoration: none;
  padding: 6px 20px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.15s;
  border: 1px solid #d32f2f;
}

.card-link:hover {
  background: #b71c1c;
  border-color: #b71c1c;
}

/* 轨道日记列表 */
.diary-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

.diary-item {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fafafa;
  border-radius: 14px;
  padding: 12px 20px;
  border-left: 6px solid #d32f2f;
  transition: 0.15s;
}

.diary-item:hover {
  background: #f5f0f0;
}

.diary-item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e0d6d6;
  background: #eaeaea;
}

.diary-item p {
  font-size: 1.05rem;
  font-weight: 500;
  color: #1e1e1e;
  margin: 0;
}

/* ---------- 底部页脚 ---------- */
.footer {
  margin-top: 60px;
  background: #fafafa;
  border-top: 2px solid #d32f2f;
  padding: 32px 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.footer-links a {
  color: #1e1e1e;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  transition: 0.1s;
}

.footer-links a:hover {
  color: #d32f2f;
  text-decoration: underline;
}

.footer-copy {
  text-align: right;
  color: #4a4a4a;
  font-size: 0.9rem;
}

.footer-copy p {
  margin: 2px 0;
}

.footer-url {
  font-size: 0.8rem;
  color: #888;
}

/* 响应式微调 */
@media (max-width: 700px) {
  .nav-container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 6px;
  }
  .nav-left, .nav-right {
    gap: 14px;
  }
  .nav-center {
    order: -1;
    width: 100%;
    justify-content: center;
    margin: 4px 0;
  }
  .card-row {
    justify-content: center;
  }
  .card {
    flex: 0 0 180px;
  }
  .diary-item {
    flex-wrap: wrap;
    gap: 12px;
  }
  .diary-item img {
    width: 100%;
    height: 100%;
  }
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-copy {
    text-align: center;
  }
}