/* 组织架构主体：对应 Figma 的党委卡片和党支部列表。 */
.party-organization-main { width: min(1440px, calc(100% - 120px)); margin: 0 auto; padding: 60px 0 100px; }
.party-committee { position: relative; overflow: hidden; padding: 24px 38px 42px; border: 1px solid #ddd; background: url("../images/party-organization-wall.png") right bottom / 520px 118px no-repeat; }
.party-committee::before { position: absolute; top: 24px; left: 38px; width: 650px; height: 118px; content: ""; background: url("../images/party-organization-emblem.png") left center / 650px 118px no-repeat; }
.party-committee h2 { position: relative; z-index: 1; height: 118px; margin: 0 0 14px; padding-left: 88px; color: #fff; font-size: 16px; font-weight: 400; line-height: 118px; }
.party-committee-list > div { min-height: 84px; padding: 0; display: grid; grid-template-columns: 120px 220px 1fr; align-items: center; border-bottom: 1px solid #eee; font-size: 15px; }
.party-committee-list > div:last-child { border-bottom: 0; }
.party-committee strong { font-weight: 400; }
.party-committee span { padding-left: 20px; }
/* 联系支部较多时自然换行，避免新增名单在桌面端被卡片边界裁切。 */
.party-committee p { margin: 0; padding-left: 58px; white-space: normal; line-height: 1.7; border-left: 1px solid var(--line); }
.party-branches { margin-top: 58px; }
.party-branches h2 { height: 60px; margin: 0; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: #e60000; font-size: 16px; font-weight: 400; }
.party-branches-toggle { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.party-branches-toggle-icon { width: 11px; height: 11px; display: block; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(225deg) translate(-2px, -2px); }
.party-branches-toggle[aria-expanded="false"] .party-branches-toggle-icon { transform: rotate(45deg) translate(-2px, -2px); }
.party-branches.is-collapsed .party-branch-list { display: none; }
.party-branch-list { padding: 0 38px; }
/* 支委职务分行展示，增加行距和上下留白，保留原有四列布局。 */
.party-branch-list > div { min-height: 86px; padding: 12px 0; display: grid; grid-template-columns: 60px 420px 220px 1fr; gap: 0; align-items: center; border-bottom: 1px solid #eee; font-size: 15px; line-height: 1.7; }
.party-branch-list strong { color: #e60000; font-size: 18px; }
.party-branch-list > div > span + span { padding-left: 30px; border-left: 1px solid var(--line); }
/* 左列统一预留最长职务姓名所需的九个字宽，使各支部右列垂直对齐，列间距保持 16px。 */
.party-branch-members { display: grid; grid-template-columns: 9em max-content; column-gap: 16px; }
.party-organization-page .site-footer { margin-top: 0; border-top: 6px solid var(--blue); }
/* 鼠标悬停时，党委和党支部整行展开浅红渐变、右移 4px 并变色；仅在支持精确悬停的设备启用，避免触屏残留。 */
@media (hover: hover) and (pointer: fine) {
  .party-committee-list > div,
  .party-branch-list > div {
    /* 两侧固定预留 16px，让文字与悬停背景边缘保持间距，避免悬停时内容挤动。 */
    padding-inline: 16px;
    background-image: linear-gradient(90deg, #fff1f1, rgba(255, 241, 241, 0));
    background-repeat: no-repeat;
    background-size: 0% 100%;
    border-radius: 8px;
    transition: background-size 280ms ease, transform 280ms ease, color 280ms ease;
  }
  .party-committee-list > div:hover,
  .party-branch-list > div:hover {
    background-size: 100% 100%;
    transform: translateX(4px);
    color: #b4232a;
  }
}
/* 遵循系统减少动态效果设置：保留悬停提示，取消位移和过渡动画。 */
@media (prefers-reduced-motion: reduce) {
  .party-committee-list > div,
  .party-branch-list > div { transition: none; }
  .party-committee-list > div:hover,
  .party-branch-list > div:hover { transform: none; }
}
/* 手机端将信息条改为纵向阅读，避免固定宽度造成横向溢出。 */
html.is-mobile .party-organization-main { width: auto; margin: 0 16px; padding: 40px 0 56px; }
html.is-mobile .party-committee { padding: 16px 14px 18px; background-size: 100% 90px; }
html.is-mobile .party-committee::before { top: 16px; left: 14px; width: 100%; height: 62px; background-size: 100% 62px; }
html.is-mobile .party-committee h2 { height: 62px; margin-bottom: 12px; padding-left: 48px; font-size: 14px; line-height: 62px; }
html.is-mobile .party-committee-list > div { grid-template-columns: 82px 1fr; min-height: 0; padding: 11px 0; font-size: 14px; }
html.is-mobile .party-committee span { padding-left: 10px; }
html.is-mobile .party-committee p { grid-column: 1 / -1; padding: 8px 0 0; white-space: normal; line-height: 20px; border-left: 0; }
html.is-mobile .party-branches { margin-top: 24px; }
html.is-mobile .party-branches h2 { height: 42px; padding: 0 14px; font-size: 15px; }
html.is-mobile .party-branch-list { padding: 0 12px; }
html.is-mobile .party-branch-list > div { grid-template-columns: 22px 1fr; min-height: 0; padding: 12px 0; gap: 4px; font-size: 14px; }
html.is-mobile .party-branch-list > div > span { grid-column: 2; padding: 3px 0 0; }
html.is-mobile .party-branch-list > div > span + span { padding-left: 0; border-left: 0; }
/* 窄屏缩小委员字号，保留 16px 列间距，让较长姓名仍可保持两行两列。 */
html.is-mobile .party-branch-members { font-size: clamp(12px, 3.5vw, 14px); }
html.is-mobile .party-organization-page .site-footer { border-top-width: 4px; }
