/* notice对卡片的样式的定义 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f8f9fa;
  font-family: 'Noto Sans SC', sans-serif;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.banner {
  width: 100%;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 30px;
}

.banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* 年月分组标题样式 */
.month-group {
  margin-bottom: 30px;
}

.month-title {
  font-size: 1.8em;
  color: #333;
  padding: 10px 20px;
  margin: 0 0 20px 0;
  border-left: 5px solid #3a7ca5;
  background-color: rgba(58, 124, 165, 0.1);
  display: inline-block;
}

/* 卡片容器样式 */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
}

/* 卡片样式 */
.card {
  flex: 0 0 auto;
  width: 280px;
  height: 420px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background-color: white;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card:hover img {
  transform: scale(1.05);
}

.card h3 {
  padding: 15px 20px 10px;
  font-size: 1.1em;
  color: #333;
  height: 60px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card p:not(.date) {
  padding: 0 20px 15px;
  color: #666;
  line-height: 1.6;
  height: 100px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.date {
  color: #999;
  font-size: 0.9em;
  padding: 0 20px 20px;
  margin-top: auto;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* 响应式样式 */
@media (max-width: 1400px) {
  .card {
    width: 260px;
    height: 410px;
  }
}

@media (max-width: 1200px) {
  .cards-container {
    gap: 20px;
  }
  .card {
    width: 240px;
    height: 400px;
  }
  .card img {
    height: 180px;
  }
  .card h3 {
    height: 55px;
    font-size: 1.05em;
  }
  .card p:not(.date) {
    height: 90px;
  }
}

@media (max-width: 992px) {
  .card {
    width: 220px;
    height: 390px;
  }
  .card img {
    height: 170px;
  }
  .card h3 {
    font-size: 1em;
    padding: 12px 18px 8px;
  }
  .card p:not(.date) {
    padding: 0 18px 12px;
    font-size: 0.95em;
  }
}

@media (max-width: 768px) {
  .cards-container {
    gap: 18px;
  }
  .card {
    width: calc(50% - 10px);
    height: 390px;
    min-width: 220px;
  }
  .month-title {
    font-size: 1.6em;
  }
}

@media (max-width: 576px) {
  .cards-container {
    gap: 15px;
  }
  .card {
    width: 100%;
    max-width: 320px;
    height: 400px;
    margin: 0 auto;
  }
  .month-title {
    font-size: 1.5em;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .card {
    height: 380px;
  }
  .card img {
    height: 160px;
  }
  .card h3 {
    height: 55px;
    font-size: 1em;
  }
  .card p:not(.date) {
    height: 90px;
  }
}

/* 返回顶部按钮 */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #3a7ca5;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

#backToTop.active {
  opacity: 1;
  visibility: visible;
}
