/* ===== 公告模块 ===== */
.module-1 {
  position: relative;
  padding: 36px 300px 28px;
  overflow: visible;
}

.notice-wrap {
  position: relative;
  margin: 0 auto;
  overflow: visible;
  max-width: 1320px;
}

.notice-box {
  border: 4px solid #7eb8e0;
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
}

/* Tabs 栏 */
.notice-tabs {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px 88px 0 24px;
  background: #edf4f8;
  border-bottom: 1px solid #d5e6f2;
}

.notice-tabs-group {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 48px;
}

.notice-tab {
  position: relative;
  flex-shrink: 0;
  padding: 6px 8px 18px;
  font-family: inherit;
  font-size: 16px;
  color: #a8b8c4;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
}

.notice-tab:hover {
  color: #6a7a86;
}

.notice-tab.active {
  color: #3d4a54;
  font-weight: 600;
}

.notice-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #7eb8e0;
}

/* 内容区 */
.notice-body {
  min-height: 220px;
  padding: 24px;
  background: #fff;
}

.notice-more-btn {
  position: absolute;
  right: 20px;
  bottom: 16px;
  padding: 4px 12px;
  font-family: inherit;
  font-size: 14px;
  color: #5a8fb8;
  background: #fff;
  border: 1px solid #c5dced;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.notice-more-btn:hover {
  color: #3d4a54;
  background: #fff;
  border-color: #7eb8e0;
}

.notice-more-btn[hidden] {
  display: none;
}

.notice-panel {
  display: none;
}

.notice-panel.is-active {
  display: block;
}

.notice-panel--facebook.is-active {
  display: block;
}

/* 四列公告列表（固定一行） */
.notice-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.notice-item[hidden] {
  display: none;
}

.notice-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 172px;
  padding: 16px 14px;
  border: 1px solid #e3eef5;
  border-radius: 4px;
  background: #fafcfd;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.notice-item:hover,
.notice-item:focus-visible {
  border-color: #7eb8e0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(126, 184, 224, 0.18);
  outline: none;
}

.notice-item--empty {
  align-items: center;
  justify-content: center;
  cursor: default;
  background: #fff;
}

.notice-item--empty:hover,
.notice-item--empty:focus-visible {
  border-color: #e3eef5;
  box-shadow: none;
}

.notice-item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #3d4a54;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.notice-item-date {
  font-size: 13px;
  color: #8a9aa6;
  flex-shrink: 0;
}

.notice-item-content {
  flex: 1;
  margin: 0;
  font-size: 14px;
  color: #5a6872;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.notice-item-author {
  margin: 0;
  font-size: 13px;
  color: #a8b8c4;
  flex-shrink: 0;
}

.notice-empty {
  font-size: 18px;
  color: #c5c5c5;
  letter-spacing: 1px;
  text-align: center;
}

/* 全部公告弹窗 */
.notice-all-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.notice-all-modal[hidden] {
  display: none;
}

.notice-all-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.notice-all-modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px 24px 24px;
  border: 4px solid #7eb8e0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.notice-all-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 32px;
  height: 32px;
  font-size: 24px;
  line-height: 1;
  color: #8a9aa6;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.notice-all-modal-close:hover {
  color: #3d4a54;
}

.notice-all-modal-title {
  margin: 0 32px 16px 0;
  font-size: 20px;
  font-weight: 600;
  color: #3d4a54;
}

.notice-all-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-all-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e3eef5;
  border-radius: 4px;
  background: #fafcfd;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.notice-all-item:hover,
.notice-all-item:focus-visible {
  border-color: #7eb8e0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(126, 184, 224, 0.18);
  outline: none;
}

.notice-all-item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #3d4a54;
  line-height: 1.4;
}

.notice-all-item-date {
  font-size: 13px;
  color: #8a9aa6;
}

.notice-all-item-content {
  margin: 0;
  font-size: 14px;
  color: #5a6872;
  line-height: 1.5;
}

/* 公告弹窗 */
.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.notice-modal[hidden] {
  display: none;
}

.notice-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.notice-modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px 24px 24px;
  border: 4px solid #7eb8e0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.notice-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 32px;
  height: 32px;
  font-size: 24px;
  line-height: 1;
  color: #8a9aa6;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.notice-modal-close:hover {
  color: #3d4a54;
}

.notice-modal-title {
  margin: 0 32px 12px 0;
  font-size: 20px;
  font-weight: 600;
  color: #3d4a54;
  line-height: 1.4;
}

.notice-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 16px;
  font-size: 14px;
  color: #8a9aa6;
}

.notice-modal-author::before {
  content: "作者：";
}

.notice-modal-text {
  margin: 0 0 16px;
  font-size: 15px;
  color: #5a6872;
  line-height: 1.6;
}

.notice-modal-text p {
  margin: 0 0 12px;
}

.notice-modal-text p:last-child {
  margin-bottom: 0;
}

.notice-modal-lead {
  font-size: 16px;
  font-weight: 600;
  color: #3d4a54;
}

.notice-modal-subtitle {
  margin: 20px 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #3d4a54;
}

.notice-modal-table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 14px;
}

.notice-modal-table th,
.notice-modal-table td {
  padding: 10px 12px;
  border: 1px solid #d5e6f2;
  text-align: left;
  vertical-align: top;
}

.notice-modal-table th {
  background: #edf4f8;
  color: #3d4a54;
  font-weight: 600;
  white-space: nowrap;
}

.notice-modal-list {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.notice-modal-list li {
  margin-bottom: 6px;
}

.notice-modal-list li:last-child {
  margin-bottom: 0;
}

.notice-modal-text a {
  color: #2b7cd3;
  word-break: break-all;
}

.notice-modal-text a:hover {
  text-decoration: underline;
}

.notice-modal-tags {
  font-size: 13px;
  color: #8a9aa6;
  line-height: 1.5;
}

.notice-modal-image-wrap[hidden] {
  display: none;
}

.notice-modal-image-wrap {
  line-height: 0;
}

.notice-modal-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* 右侧贴图（绝对定位漂浮，不占位） */
.notice-sticker {
  position: absolute;
  right: -205px;
  bottom: -100px;
  width: 220px;
  height: auto;
  z-index: 3;
  pointer-events: none;
}

/* 中等宽度（PWA 桌面窗口、窄屏浏览器） */
@media (max-width: 1400px) {
  .module-1 {
    padding-left: 80px;
    padding-right: 80px;
  }

  .notice-sticker {
    right: -120px;
    width: 180px;
  }
}

@media (max-width: 1100px) {
  .module-1 {
    padding-left: 40px;
    padding-right: 40px;
  }

  .notice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notice-item {
    min-height: 150px;
  }

  .notice-sticker {
    right: -80px;
    width: 140px;
  }
}

@media (max-width: 900px) {
  .module-1 {
    padding-left: 24px;
    padding-right: 24px;
  }

  .notice-tabs-group {
    gap: 32px;
  }

  .notice-sticker {
    right: -40px;
    width: 110px;
    bottom: -40px;
  }
}

/* ===== 公告模块 手机端 ===== */
@media (max-width: 768px) {
  .module-1 {
    padding: 24px 16px 20px;
  }

  .notice-tabs {
    padding: 10px 72px 0 16px;
  }

  .notice-tabs-group {
    gap: 24px;
  }

  .notice-tab {
    font-size: 14px;
    padding-bottom: 16px;
  }

  .notice-more-btn {
    right: 12px;
    font-size: 13px;
    padding: 3px 10px;
  }

  .notice-body {
    min-height: auto;
    padding: 16px;
  }

  .notice-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .notice-item {
    min-height: auto;
    padding: 12px 14px;
  }

  .notice-item-title {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .notice-item-content {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .notice-item-date,
  .notice-item-author {
    font-size: 12px;
  }

  .notice-empty {
    font-size: 16px;
  }

  .notice-sticker {
    right: -16px;
    width: 110px;
  }

  .notice-modal {
    padding: 16px;
  }

  .notice-modal-dialog {
    padding: 24px 16px 16px;
  }

  .notice-modal-title {
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .module-1 {
    padding-left: 12px;
    padding-right: 12px;
  }

  .notice-tabs-group {
    gap: 16px;
  }

  .notice-tab {
    font-size: 13px;
  }

  .notice-item {
    padding: 10px 12px;
  }

  .notice-item-title {
    font-size: 13px;
  }

  .notice-item-content {
    font-size: 12px;
  }

  .notice-sticker {
    right: -12px;
    bottom: 0;
    width: 90px;
  }
}
