/* ============================================================
   gonggao.css - 网站公告页 (gonggao.html, gonggaolist.html)
   ============================================================ */

/* === Main Override - narrower layout for notice pages === */
.cxz-main {
  max-width: 900px;
}

/* ===========================================================
   1. Notice Detail Card (gonggao.html)
   =========================================================== */

.cxz-notice-card {
  background: var(--white, #ffffff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
  overflow: hidden;
  border-left: 4px solid var(--primary, #102b6a);
  transition: box-shadow 0.3s;
}

.cxz-notice-card:hover {
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
}

/* --- Notice Header --- */

.cxz-notice-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border-light, #e5e7eb);
  text-align: center;
}

.cxz-notice-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary, #102b6a);
  line-height: 1.5;
  margin-bottom: 12px;
  word-break: break-word;
}

.cxz-notice-date {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cxz-notice-date::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold, #fdb933);
  flex-shrink: 0;
}

/* --- Notice Body / Content --- */

.cxz-notice-body {
  padding: 28px 32px;
}

.cxz-notice-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dark, #1a1a2e);
  word-break: break-word;
}

.cxz-notice-content p {
  margin-bottom: 12px;
}

.cxz-notice-content p:last-child {
  margin-bottom: 0;
}

.cxz-notice-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md, 8px);
  margin: 12px 0;
  display: block;
}

.cxz-notice-content a {
  color: var(--primary, #102b6a);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.cxz-notice-content a:hover {
  color: var(--orange, #f15a22);
}

.cxz-notice-content h1,
.cxz-notice-content h2,
.cxz-notice-content h3,
.cxz-notice-content h4,
.cxz-notice-content h5,
.cxz-notice-content h6 {
  color: var(--text-dark, #1a1a2e);
  margin: 20px 0 10px;
  font-weight: 700;
  line-height: 1.4;
}

.cxz-notice-content h1 { font-size: 20px; }
.cxz-notice-content h2 { font-size: 18px; }
.cxz-notice-content h3 { font-size: 16px; }
.cxz-notice-content h4 { font-size: 15px; }
.cxz-notice-content h5 { font-size: 14px; }
.cxz-notice-content h6 { font-size: 13px; }

.cxz-notice-content ul,
.cxz-notice-content ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.cxz-notice-content ul {
  list-style: disc;
}

.cxz-notice-content ol {
  list-style: decimal;
}

.cxz-notice-content li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.cxz-notice-content blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--gold, #fdb933);
  background: var(--bg-light, #f4f6fb);
  border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
  color: var(--text-muted, #6b7280);
  font-style: italic;
}

.cxz-notice-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.cxz-notice-content th,
.cxz-notice-content td {
  border: 1px solid var(--border-light, #e5e7eb);
  padding: 10px 14px;
  text-align: left;
}

.cxz-notice-content th {
  background: var(--bg-light, #f4f6fb);
  font-weight: 600;
  color: var(--text-dark, #1a1a2e);
}

.cxz-notice-content td {
  color: var(--text-default, #333333);
}

.cxz-notice-content code {
  background: var(--bg-light, #f4f6fb);
  padding: 2px 6px;
  border-radius: var(--radius-sm, 4px);
  font-size: 13px;
  color: var(--orange, #f15a22);
}

.cxz-notice-content pre {
  background: var(--bg-light, #f4f6fb);
  padding: 16px;
  border-radius: var(--radius-md, 8px);
  overflow-x: auto;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.6;
}

.cxz-notice-content pre code {
  background: none;
  padding: 0;
  color: var(--text-dark, #1a1a2e);
}

/* --- Notice Body (legacy content inside .cxz-notice-body directly) --- */

.cxz-notice-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md, 8px);
  margin: 12px 0;
  display: block;
}

.cxz-notice-body p {
  margin-bottom: 12px;
}

.cxz-notice-body p:last-child {
  margin-bottom: 0;
}

.cxz-notice-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.cxz-notice-body th,
.cxz-notice-body td {
  border: 1px solid var(--border-light, #e5e7eb);
  padding: 8px 12px;
  font-size: 14px;
}

.cxz-notice-body th {
  background: var(--bg-light, #f4f6fb);
  font-weight: 600;
}

/* ===========================================================
   2. Back Button (gonggao.html)
   =========================================================== */

.cxz-back-bar {
  margin-top: 24px;
  text-align: center;
  padding-bottom: 20px;
}

.cxz-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 32px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  background: var(--primary, #102b6a);
  color: var(--white, #ffffff);
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.cxz-back-btn:hover {
  background: var(--primary-light, #1a3f8f);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 43, 106, 0.3);
  color: var(--white, #ffffff);
}

.cxz-back-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(16, 43, 106, 0.2);
}

/* ===========================================================
   3. Notice List (gonggaolist.html)
   =========================================================== */

.cxz-notice-list {
  background: var(--white, #ffffff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
  overflow: hidden;
  border-left: 4px solid var(--primary, #102b6a);
}

/* --- Notice Item Row --- */

.cxz-notice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light, #e5e7eb);
  transition: background 0.2s, padding-left 0.2s;
  position: relative;
}

.cxz-notice-item:last-child {
  border-bottom: none;
}

.cxz-notice-item:hover {
  background: var(--bg-light, #f4f6fb);
  padding-left: 28px;
}

/* item link wrapper (simple list row) */
.cxz-notice-item a {
  flex: 1;
  color: var(--text-dark, #1a1a2e);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cxz-notice-item a:hover {
  color: var(--orange, #f15a22);
}

/* dot indicator inside list items */
.cxz-notice-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange, #f15a22);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.cxz-notice-item:hover .cxz-notice-dot {
  transform: scale(1.4);
  background: var(--primary, #102b6a);
}

/* --- Notice Item Title --- */

.cxz-notice-item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark, #1a1a2e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  transition: color 0.2s;
}

.cxz-notice-item:hover .cxz-notice-item-title {
  color: var(--primary, #102b6a);
}

/* --- Notice Item Date --- */

.cxz-notice-item-date {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  flex-shrink: 0;
  margin-left: 16px;
  white-space: nowrap;
}

/* --- Notice Item Summary --- */

.cxz-notice-item-summary {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  margin-left: 16px;
}

/* --- Notice Date (simple list) --- */

.cxz-notice-date {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  flex-shrink: 0;
  margin-left: 16px;
  white-space: nowrap;
}

/* --- Rich notice item layout (title + summary + date stacked) --- */

.cxz-notice-item--rich {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 24px;
}

.cxz-notice-item--rich .cxz-notice-item-title {
  font-size: 16px;
  font-weight: 600;
}

.cxz-notice-item--rich .cxz-notice-item-summary {
  margin-left: 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  line-height: 1.6;
}

.cxz-notice-item--rich .cxz-notice-item-date {
  margin-left: 0;
}

.cxz-notice-item--rich:hover {
  padding-left: 28px;
}

/* --- Pinned / top item --- */

.cxz-notice-item--pinned {
  background: var(--bg-light, #f4f6fb);
}

.cxz-notice-item--pinned::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold, #fdb933);
}

.cxz-notice-item--pinned .cxz-notice-item-title {
  font-weight: 700;
}

.cxz-notice-pin-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--white, #ffffff);
  background: var(--gold, #fdb933);
  margin-right: 8px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

/* ===========================================================
   4. Pagination
   =========================================================== */

.cxz-pagination {
  padding: 24px 20px;
  text-align: center;
}

/* Layui pagination overrides to match project theme */
.cxz-pagination .layui-laypage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.cxz-pagination .layui-laypage a,
.cxz-pagination .layui-laypage span {
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-light, #e5e7eb);
  font-size: 13px;
  min-width: 34px;
  height: 34px;
  line-height: 34px;
  padding: 0 10px;
  transition: all 0.2s;
}

.cxz-pagination .layui-laypage a:hover {
  color: var(--primary, #102b6a);
  border-color: var(--primary, #102b6a);
  background: var(--bg-light, #f4f6fb);
}

.cxz-pagination .layui-laypage .layui-laypage-curr .layui-laypage-em {
  background: var(--primary, #102b6a);
  border-radius: var(--radius-md, 8px);
}

.cxz-pagination .layui-laypage .layui-laypage-curr em {
  font-size: 13px;
  font-weight: 600;
}

.cxz-pagination .layui-laypage .layui-laypage-prev,
.cxz-pagination .layui-laypage .layui-laypage-next {
  font-size: 13px;
}

/* ===========================================================
   5. Empty State
   =========================================================== */

.cxz-notice-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted, #6b7280);
}

.cxz-notice-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.cxz-notice-empty-text {
  font-size: 14px;
  line-height: 1.6;
}

/* ===========================================================
   6. Notice Meta (shared)
   =========================================================== */

.cxz-notice-meta {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cxz-notice-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cxz-notice-meta-item--author {
  color: var(--orange, #f15a22);
  font-weight: 500;
}

.cxz-notice-meta-item--views {
  color: var(--text-muted, #6b7280);
}

/* ===========================================================
   7. Notice Tags / Badges
   =========================================================== */

.cxz-notice-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-right: 6px;
  flex-shrink: 0;
}

.cxz-notice-tag--important {
  color: var(--white, #ffffff);
  background: var(--orange, #f15a22);
}

.cxz-notice-tag--system {
  color: var(--white, #ffffff);
  background: var(--primary, #102b6a);
}

.cxz-notice-tag--activity {
  color: var(--white, #ffffff);
  background: var(--gold, #fdb933);
}

.cxz-notice-tag--update {
  color: var(--white, #ffffff);
  background: #27ae60;
}

/* ===========================================================
   8. Notice Navigation (prev / next)
   =========================================================== */

.cxz-notice-nav {
  margin-top: 24px;
  display: flex;
  gap: 16px;
}

.cxz-notice-nav-item {
  flex: 1;
  padding: 16px 20px;
  background: var(--white, #ffffff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
  text-decoration: none;
  transition: all 0.25s;
  overflow: hidden;
}

.cxz-notice-nav-item:hover {
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
  transform: translateY(-1px);
  color: var(--primary, #102b6a);
}

.cxz-notice-nav-label {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  margin-bottom: 4px;
}

.cxz-notice-nav-title {
  font-size: 14px;
  color: var(--text-dark, #1a1a2e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.cxz-notice-nav-item:hover .cxz-notice-nav-title {
  color: var(--primary, #102b6a);
}

.cxz-notice-nav-item--next {
  text-align: right;
}

/* ===========================================================
   9. Loading Skeleton
   =========================================================== */

.cxz-notice-skeleton {
  padding: 20px 24px;
}

.cxz-notice-skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--border-light, #e5e7eb) 25%, var(--bg-light, #f4f6fb) 50%, var(--border-light, #e5e7eb) 75%);
  background-size: 200% 100%;
  animation: cxz-skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm, 4px);
  margin-bottom: 12px;
}

.cxz-notice-skeleton-line:last-child {
  margin-bottom: 0;
}

.cxz-notice-skeleton-line--title {
  width: 60%;
  height: 18px;
}

.cxz-notice-skeleton-line--text {
  width: 100%;
}

.cxz-notice-skeleton-line--short {
  width: 40%;
}

@keyframes cxz-skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===========================================================
   10. Print Styles
   =========================================================== */

@media print {
  .cxz-notice-card {
    box-shadow: none;
    border-left: 2px solid #333;
  }

  .cxz-notice-header {
    padding: 16px 0 12px;
  }

  .cxz-notice-body,
  .cxz-notice-content {
    padding: 16px 0;
  }

  .cxz-back-bar,
  .cxz-pagination,
  .cxz-notice-nav {
    display: none;
  }
}

/* ===========================================================
   11. Responsive Styles
   =========================================================== */

/* --- Tablets (<= 1024px) --- */
@media (max-width: 1024px) {
  .cxz-notice-header {
    padding: 24px 24px 16px;
  }

  .cxz-notice-body {
    padding: 24px 24px;
  }

  .cxz-notice-item {
    padding: 14px 20px;
  }

  .cxz-notice-item:hover {
    padding-left: 24px;
  }

  .cxz-notice-item--rich {
    padding: 16px 20px;
  }

  .cxz-notice-item--rich:hover {
    padding-left: 24px;
  }

  .cxz-notice-nav {
    gap: 12px;
  }
}

/* --- Mobile (<= 768px) --- */
@media (max-width: 768px) {
  .cxz-main {
    max-width: 100%;
  }

  /* Notice card */
  .cxz-notice-card {
    border-radius: var(--radius-md, 8px);
    border-left-width: 3px;
  }

  .cxz-notice-header {
    padding: 20px 16px 14px;
  }

  .cxz-notice-title {
    font-size: 18px;
    line-height: 1.4;
  }

  .cxz-notice-date {
    font-size: 12px;
  }

  .cxz-notice-body {
    padding: 20px 16px;
  }

  .cxz-notice-content {
    font-size: 14px;
    line-height: 1.7;
  }

  .cxz-notice-content h1 { font-size: 17px; }
  .cxz-notice-content h2 { font-size: 16px; }
  .cxz-notice-content h3 { font-size: 15px; }

  .cxz-notice-content table {
    font-size: 12px;
  }

  .cxz-notice-content th,
  .cxz-notice-content td {
    padding: 8px 10px;
  }

  /* Back button */
  .cxz-back-btn {
    padding: 9px 24px;
    font-size: 13px;
  }

  /* Notice list */
  .cxz-notice-list {
    border-radius: var(--radius-md, 8px);
    border-left-width: 3px;
  }

  .cxz-notice-item {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .cxz-notice-item:hover {
    padding-left: 18px;
  }

  .cxz-notice-item a {
    font-size: 13px;
  }

  .cxz-notice-item-title {
    font-size: 14px;
  }

  .cxz-notice-item-date {
    font-size: 11px;
    margin-left: 12px;
  }

  .cxz-notice-item-summary {
    font-size: 12px;
    margin-left: 12px;
  }

  .cxz-notice-date {
    font-size: 11px;
    margin-left: 12px;
  }

  /* Rich item on mobile: stack vertically */
  .cxz-notice-item--rich {
    padding: 14px 14px;
    gap: 4px;
  }

  .cxz-notice-item--rich:hover {
    padding-left: 18px;
  }

  .cxz-notice-item--rich .cxz-notice-item-title {
    font-size: 14px;
  }

  /* Pin tag */
  .cxz-notice-pin-tag {
    font-size: 10px;
    padding: 1px 6px;
  }

  /* Notice tags */
  .cxz-notice-tag {
    font-size: 10px;
    padding: 1px 8px;
  }

  /* Notice navigation: stack vertically */
  .cxz-notice-nav {
    flex-direction: column;
    gap: 10px;
  }

  .cxz-notice-nav-item {
    padding: 12px 16px;
  }

  .cxz-notice-nav-item--next {
    text-align: left;
  }

  /* Pagination */
  .cxz-pagination {
    padding: 16px 12px;
  }

  .cxz-pagination .layui-laypage a,
  .cxz-pagination .layui-laypage span {
    min-width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 12px;
    padding: 0 6px;
  }

  /* Empty state */
  .cxz-notice-empty {
    padding: 40px 16px;
  }

  .cxz-notice-empty-icon {
    font-size: 36px;
  }
}

/* --- Small Mobile (<= 480px) --- */
@media (max-width: 480px) {
  .cxz-notice-header {
    padding: 16px 12px 12px;
  }

  .cxz-notice-title {
    font-size: 16px;
  }

  .cxz-notice-body {
    padding: 16px 12px;
  }

  .cxz-notice-content {
    font-size: 13px;
  }

  .cxz-notice-content blockquote {
    padding: 10px 14px;
    margin: 10px 0;
  }

  .cxz-notice-item {
    padding: 10px 12px;
  }

  .cxz-notice-item:hover {
    padding-left: 16px;
  }

  .cxz-notice-item-title {
    font-size: 13px;
  }

  .cxz-notice-item-summary {
    margin-left: 8px;
  }

  .cxz-notice-item-date {
    margin-left: 8px;
  }

  .cxz-notice-date {
    margin-left: 8px;
  }

  .cxz-back-btn {
    padding: 8px 20px;
    font-size: 12px;
  }

  .cxz-notice-nav-title {
    font-size: 13px;
  }
}
