/* yanyu-home-notice-nav-v1：公告中心 + 顶部导航简化 */

.yanyu-notice-center {
  position: relative;
  z-index: 3;
  padding: 58px 22px 46px;
  background:
    radial-gradient(circle at 85% 10%, rgba(142, 42, 34, 0.11), transparent 32%),
    linear-gradient(180deg, rgba(250, 246, 236, 0.94), rgba(238, 228, 204, 0.72));
}

.yanyu-notice-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.yanyu-notice-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.yanyu-notice-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.yanyu-notice-head p {
  max-width: 560px;
  margin: 8px 0 0;
  color: rgba(62, 45, 34, 0.72);
  line-height: 1.75;
}

.yanyu-notice-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff8ed;
  background: linear-gradient(135deg, #8d2a23, #1d1715);
  font-size: 13px;
  font-weight: 900;
}

.yanyu-notice-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
  gap: 14px;
}

.yanyu-notice-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(87, 55, 42, 0.14);
  border-radius: 20px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.84), rgba(232,224,206,.72)),
    rgba(246, 240, 228, .92);
  box-shadow: 0 18px 46px rgba(35, 24, 18, 0.10);
}

.yanyu-notice-card::before {
  content: attr(data-notice-mark);
  position: absolute;
  right: -8px;
  top: -18px;
  color: rgba(128, 40, 32, 0.09);
  font-size: 76px;
  font-weight: 900;
  line-height: 1;
}

.yanyu-notice-card.primary {
  grid-row: span 2;
  min-height: 286px;
}

.yanyu-notice-card strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 19px;
  line-height: 1.25;
}

.yanyu-notice-card p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: rgba(62, 45, 34, 0.72);
  font-size: 14px;
  line-height: 1.75;
}

.yanyu-notice-card ul {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  padding-left: 18px;
  color: rgba(62, 45, 34, 0.76);
  line-height: 1.9;
}

.yanyu-notice-action-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.yanyu-notice-action {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(120, 35, 30, 0.22);
  border-radius: 999px;
  color: #fff8ed;
  background: linear-gradient(135deg, #171312, #8d2a23);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.yanyu-notice-action.secondary {
  color: #3b2b23;
  background: rgba(255,255,255,0.58);
}

/* 顶部导航简化 */
.site-header nav[data-yanyu-simple-nav="v1"] {
  gap: 7px !important;
}

.site-header nav[data-yanyu-simple-nav="v1"] a {
  white-space: nowrap;
}

.site-header nav[data-yanyu-simple-nav="v1"] a.active {
  color: #fff8ed !important;
  background: linear-gradient(135deg, #171312, #8d2a23) !important;
  border-color: rgba(141, 42, 35, 0.28) !important;
}

/* 首页模式显示公告中心；二级页隐藏公告中心 */
html[data-yanyu-hub-page="benefits"] #yanyu-notice-center,
html[data-yanyu-hub-page="forum"] #yanyu-notice-center,
html[data-yanyu-hub-page="members"] #yanyu-notice-center,
html[data-yanyu-hub-page="chronicle"] #yanyu-notice-center {
  display: none !important;
}

/* 首页保留近报/公告区，二级页隐藏近报 */
html[data-yanyu-hub-page="benefits"] #updates,
html[data-yanyu-hub-page="forum"] #updates,
html[data-yanyu-hub-page="members"] #updates {
  display: none !important;
}

html[data-yanyu-hub-page="chronicle"] #updates {
  display: block !important;
}

/* 让首页结构顺序更舒服 */
html[data-yanyu-hub-page="home"] #yanyu-notice-center,
html[data-yanyu-hub-page="home"] #yanyu-hub {
  display: block !important;
}

@media (max-width: 760px) {
  .yanyu-notice-center {
    padding: 40px 14px 32px;
  }

  .yanyu-notice-head {
    display: block;
    margin-bottom: 14px;
  }

  .yanyu-notice-head h2 {
    font-size: clamp(26px, 8vw, 38px);
  }

  .yanyu-notice-head p {
    font-size: 14px;
    line-height: 1.68;
  }

  .yanyu-notice-pill {
    margin-top: 10px;
    min-height: 28px;
    padding: 5px 10px;
    font-size: 12px;
  }

  .yanyu-notice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .yanyu-notice-card,
  .yanyu-notice-card.primary {
    min-height: auto;
    grid-row: auto;
    padding: 14px;
    border-radius: 16px;
  }

  .yanyu-notice-card::before {
    font-size: 56px;
    top: -10px;
  }

  .yanyu-notice-card strong {
    font-size: 16px;
  }

  .yanyu-notice-card p,
  .yanyu-notice-card ul {
    font-size: 13px;
    line-height: 1.65;
  }

  .yanyu-notice-action {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .site-header nav[data-yanyu-simple-nav="v1"] {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-header nav[data-yanyu-simple-nav="v1"]::-webkit-scrollbar {
    display: none;
  }
}
