/* ========================================
   微点科技官网 - 微点公告页「一封信」
   ======================================== */

/* ========================================
   Section - 满高居中
   ======================================== */
.notice-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* 顶部 96 = 固定导航占位（top 24 + 高 60）+ 12px 余量；
       内容溢出时不再让标签行被导航胶囊压住 */
    padding: 96px 8% 24px;
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(0, 102, 255, 0.07) 0%, transparent 60%),
        var(--surface-container-low);
}

@supports (min-height: 100svh) {
    .notice-section {
        min-height: 100svh;
    }
}

/* ========================================
   信封上方的标签行
   ======================================== */
.notice-board__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 14px;
}

.notice-board__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--primary);
    white-space: nowrap;
}

.notice-board__pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: noticePulse 2.4s ease-in-out infinite;
}

@keyframes noticePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(0.8); }
}

.notice-board__en {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--on-surface-muted);
}

/* ========================================
   Envelope - 信封本体
   ======================================== */
.notice-board {
    position: relative;
    width: 100%;
    max-width: 900px;
    padding: 0 24px 24px;
    background: linear-gradient(180deg, #d6e1f2 0%, #c2d2e8 100%);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(25, 28, 30, 0.05),
        0 18px 36px rgba(0, 80, 203, 0.10),
        0 44px 72px -44px rgba(25, 28, 30, 0.28);
    animation: noticeEnvelopeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes noticeEnvelopeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 信封封盖：倒 V 形折线 */
.notice-board__flap {
    display: block;
    height: 88px;
    margin: 0 -24px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    /* 近层锐利阴影画出 V 形折痕，远层柔和阴影撑起信封厚度 */
    filter:
        drop-shadow(0 2px 2px rgba(6, 44, 107, 0.42))
        drop-shadow(0 8px 16px rgba(6, 44, 107, 0.14));
}

/* 封蜡章：压住封盖尖端 */
.notice-board__seal {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    /* 不规则圆，模拟火漆章的流动边缘 */
    border-radius: 46% 54% 48% 52%;
    background: linear-gradient(150deg, #1a5fd0 0%, #0b3f96 55%, #062c6b 100%);
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow:
        0 6px 14px rgba(6, 44, 107, 0.35),
        inset 0 2px 3px rgba(255, 255, 255, 0.35),
        inset 0 -3px 6px rgba(0, 0, 0, 0.22);
}

.notice-board__seal::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.32);
    border-radius: 50%;
}

/* ========================================
   Paper - 信纸
   ======================================== */
.notice-board__paper {
    position: relative;
    padding: 38px 40px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fdfcf9 100%);
    border-radius: 8px;
    box-shadow: 0 -10px 24px rgba(6, 44, 107, 0.10);
    animation: noticePaperOut 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

@keyframes noticePaperOut {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 邮票 */
.notice-board__stamp {
    position: absolute;
    top: 16px;
    right: 20px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 62px;
    background: linear-gradient(135deg, #f4f8ff 0%, #e8f0fe 100%);
    border: 1px dashed rgba(0, 80, 203, 0.28);
    border-radius: 3px;
    color: var(--primary);
    transform: rotate(2.5deg);
    box-shadow: 0 2px 6px rgba(0, 80, 203, 0.10);
}

.notice-board__stamp svg {
    width: 26px;
    height: 32px;
}

/* 邮戳 */
.notice-board__postmark {
    position: absolute;
    top: 26px;
    right: 62px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 72px;
    height: 72px;
    border: 1.5px solid rgba(70, 90, 130, 0.35);
    border-radius: 50%;
    color: rgba(70, 90, 130, 0.6);
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-align: center;
    transform: rotate(-9deg);
    pointer-events: none;
}

.notice-board__postmark::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px dashed rgba(70, 90, 130, 0.2);
    border-radius: 50%;
}

/* 称呼 */
.notice-board__salutation {
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    color: var(--on-surface-variant);
    margin-bottom: 0.5rem;
}

/* ========================================
   Viewport - 多条公告切换
   ======================================== */
.notice-board__viewport {
    position: relative;
}

.notice-board__item {
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-board__item:not(.is-active) {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

/* 标题 */
.notice-board__title {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--on-surface);
    margin: 0 0 0.625rem;
    padding-right: 76px;
    /* 避让邮票/邮戳后的窄栏也要断行均衡，不留秃尾行 */
    text-wrap: balance;
}

.notice-board__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--on-surface-muted);
    font-variant-numeric: tabular-nums;
}

.notice-board__count {
    padding-left: 0.75rem;
    border-left: 1px solid rgba(194, 198, 216, 0.6);
    color: var(--primary);
    font-weight: 600;
}

/* ========================================
   Body - 声明正文
   ======================================== */
.notice-board__body,
.notice-board__clauses {
    position: relative;
    max-height: 210px;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 底部淡出遮罩，暗示还有更多内容 */
.notice-board__body::after,
.notice-board__clauses::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fdfcf9 82%);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.notice-board.is-expanded .notice-board__body::after,
.notice-board__item.is-expanded .notice-board__body::after,
.notice-board.is-expanded .notice-board__clauses::after,
.notice-board__item.is-expanded .notice-board__clauses::after {
    opacity: 0;
}

.notice-board__excerpt {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--on-surface-variant);
}

.notice-board__points {
    list-style: none;
    counter-reset: notice-point;
    display: grid;
    gap: 0.5rem;
    margin-top: 0.875rem;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--on-surface-variant);
}

.notice-board__points li {
    position: relative;
    padding-left: 1.6em;
    text-indent: -1.6em;
}

.notice-board__points li::before {
    counter-increment: notice-point;
    content: counter(notice-point) "、";
    color: var(--primary);
    font-weight: 600;
}

/* 公文式正文：段落首行缩进两字，条款标题另起一行 */
.notice-board__item--file .notice-board__excerpt,
.notice-board__clause {
    text-indent: 2em;
}

.notice-board__clause-title {
    margin: 1.125rem 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--on-surface);
}

.notice-board__clause {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--on-surface-variant);
}

.notice-board__clause + .notice-board__clause {
    margin-top: 0.875rem;
}

/* ========================================
   Foot - 展开按钮 + 落款
   ======================================== */
.notice-board__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 0.875rem;
}

.notice-board__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.6rem;
    font-size: 0.9375rem;
    border-radius: 100px;
    flex-shrink: 0;
}

.notice-board__toggle-icon {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-board__toggle[aria-expanded="true"] .notice-board__toggle-icon {
    transform: rotate(180deg);
}

.notice-board__sign {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    margin-left: auto;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--on-surface-muted);
    text-align: right;
}

.notice-board__closing {
    color: var(--on-surface-variant);
    margin-bottom: 0.125rem;
}

/* ========================================
   附件公告 - 盖章原件卡
   ======================================== */
/* 附件类公告的 __body 只放导语与文件卡，不折行：内容是打开入口，截断会丢掉卡片 */
.notice-board__item--file .notice-board__body {
    max-height: none;
    overflow: visible;
}

.notice-board__item--file .notice-board__body::after {
    display: none;
}

.notice-board__file {
    margin-top: 1rem;
}

.notice-board__file-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 10px 16px 10px 10px;
    /* 裸 button 不会继承页面字体，否则数字与英文会落到 UA 默认字体 */
    font-family: inherit;
    font-size: 1rem;
    background: linear-gradient(135deg, #f8fbff 0%, #eaf1fb 100%);
    border: 1px solid rgba(0, 80, 203, 0.14);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-board__file-btn:hover {
    border-color: rgba(0, 80, 203, 0.32);
    box-shadow: 0 12px 26px rgba(0, 80, 203, 0.13);
    transform: translateY(-2px);
}

.notice-board__file-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 缩略图：一张微微歪斜的纸 */
.notice-board__file-shot {
    position: relative;
    flex-shrink: 0;
    width: 62px;
    height: 86px;
    padding: 4px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow:
        0 4px 10px rgba(6, 44, 107, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    transform: rotate(-1.6deg);
}

.notice-board__file-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 2px;
}

/* 红色小标签，呼应常见盖章件的朱红 */
.notice-board__file-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    padding: 1px 6px;
    background: linear-gradient(150deg, #d94a33 0%, #a3261a 100%);
    border-radius: 3px;
    color: #ffffff;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.6;
    box-shadow: 0 3px 8px rgba(163, 38, 26, 0.35);
}

.notice-board__file-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
}

.notice-board__file-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary);
}

.notice-board__file-name {
    overflow: hidden;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--on-surface);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.notice-board__file-spec {
    overflow: hidden;
    font-size: 0.75rem;
    color: var(--on-surface-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.notice-board__file-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-left: auto;
    padding: 7px 14px;
    border: 1px solid rgba(0, 80, 203, 0.2);
    border-radius: 100px;
    background: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    transition: background 0.28s ease, border-color 0.28s ease, color 0.28s ease;
}

.notice-board__file-btn:hover .notice-board__file-cta {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.notice-board__file-cta svg {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-board__file-btn:hover .notice-board__file-cta svg {
    transform: translate(2px, -2px);
}

/* ========================================
   盖章原件预览（Lightbox）
   ======================================== */
/* 锁滚动时保留滚动条占位，否则预览层打开 / 关闭时页面会左右跳一下 */
html {
    scrollbar-gutter: stable;
}

body.is-lightbox-open {
    overflow: hidden;
}

.notice-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vh 4vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notice-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.notice-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 17, 32, 0.84);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.notice-lightbox__dialog {
    position: relative;
    padding: 10px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.5);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-lightbox.is-open .notice-lightbox__dialog {
    transform: translateY(0) scale(1);
}

.notice-lightbox__img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 86vh;
    border-radius: 6px;
}

.notice-lightbox__close {
    position: absolute;
    top: -16px;
    right: -16px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: var(--on-surface);
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.notice-lightbox__close:hover {
    background: var(--primary);
    color: #ffffff;
    transform: rotate(90deg);
}

/* 指示点 + 轮播开关（多条公告时由 JS 生成指示点） */
.notice-board__pager {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    margin-top: 1rem;
}

.notice-board__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 12px;
}

.notice-board__dots:empty {
    display: none;
}

.notice-board__dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: none;
    border-radius: 100px;
    background: rgba(25, 28, 30, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notice-board__dot:hover {
    background: rgba(0, 80, 203, 0.45);
}

.notice-board__dot.is-active {
    width: 20px;
    background: var(--primary);
}

/* 暂停 / 继续轮播 */
.notice-board__play {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px 5px 9px;
    border: 1px solid rgba(0, 80, 203, 0.16);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--on-surface-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.notice-board__play:hover {
    background: #ffffff;
    border-color: rgba(0, 80, 203, 0.36);
    color: var(--primary);
}

.notice-board__play[hidden] {
    display: none;
}

.notice-board__play-icon {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.notice-board__play-icon-play {
    display: none;
}

.notice-board__play.is-paused .notice-board__play-icon-pause {
    display: none;
}

.notice-board__play.is-paused .notice-board__play-icon-play {
    display: inline;
}

/* ========================================
   Desktop - 全文直接展开，无需折叠
   ======================================== */
@media (min-width: 1025px) {
    .notice-board__body,
    .notice-board__clauses {
        max-height: none;
    }

    .notice-board__body::after,
    .notice-board__clauses::after,
    .notice-board__toggle {
        display: none;
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .notice-section {
        /* 96 = 固定导航占位（84）+ 12px 余量 */
        padding: 96px 6% 22px;
    }

    .notice-board {
        padding: 0 18px 18px;
    }

    .notice-board__flap {
        height: 76px;
        margin: 0 -18px;
    }

    .notice-board__seal {
        /* 章心对齐 76px 封盖尖端 */
        top: 48px;
        width: 56px;
        height: 56px;
        font-size: 0.625rem;
    }

    .notice-board__paper {
        /* 34 让封蜡章与“致 尊敬的访客：”留出 7px 间隙 */
        padding: 34px 28px 24px;
    }

    .notice-board__body,
    .notice-board__clauses {
        /* 6 行 × 29.6px 行高，切口正好落在行末 */
        max-height: 178px;
    }
}

@media (max-width: 768px) {
    .notice-section {
        /* 84 = 移动端导航占位（top 16 + 高 52）+ 16px 余量 */
        padding: 84px 1.25rem 20px;
        justify-content: flex-start;
    }

    .notice-board__head {
        margin-bottom: 12px;
    }

    .notice-board {
        padding: 0 14px 14px;
        border-radius: 12px;
    }

    .notice-board__flap {
        height: 52px;
        margin: 0 -14px;
    }

    .notice-board__seal {
        /* 章心对齐 52px 封盖尖端 */
        top: 32px;
        width: 40px;
        height: 40px;
        font-size: 0.5625rem;
    }

    .notice-board__paper {
        /* 顶部留白避开压下来的封蜡章 */
        padding: 30px 18px 18px;
        border-radius: 6px;
    }

    .notice-board__stamp {
        top: 12px;
        right: 14px;
        width: 42px;
        height: 50px;
    }

    .notice-board__stamp svg {
        width: 20px;
        height: 26px;
    }

    /* 移动端空间有限，隐藏邮戳 */
    .notice-board__postmark {
        display: none;
    }

    .notice-board__salutation {
        font-size: 0.875rem;
    }

    .notice-board__title {
        font-size: 1.375rem;
        padding-right: 58px;
    }

    .notice-board__body,
    .notice-board__clauses {
        max-height: 178px;
    }

    .notice-board__body::after,
    .notice-board__clauses::after {
        height: 40px;
    }

    .notice-board__foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .notice-board__toggle {
        width: 100%;
        justify-content: center;
    }

    .notice-board__sign {
        align-items: flex-start;
        margin-left: 0;
        text-align: left;
    }

    /* 附件卡：移动端收紧尺寸，卡片仍横向排布 */
    .notice-board__file-btn {
        gap: 12px;
        padding: 10px 12px 10px 10px;
    }

    .notice-board__file-name {
        font-size: 0.875rem;
    }

    .notice-lightbox {
        padding: 4vh 5vw;
    }

    .notice-lightbox__dialog {
        padding: 7px;
    }

    .notice-lightbox__close {
        top: -14px;
        right: -14px;
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .notice-board__title {
        font-size: 1.25rem;
    }

    /* 窄屏收起 CTA 文字，只留图标按钮，避免挤压文件信息 */
    .notice-board__file-cta {
        padding: 8px;
        border-radius: 50%;
    }

    .notice-board__file-cta-text {
        display: none;
    }

    /* 日期已在上方公告时间中重复展示，窄屏让位给文件名 */
    .notice-board__file-spec-date {
        display: none;
    }

    /* 5 行正文 + 16px 段间距 + 1 行条款 = 178px，切口落在行末 */
    .notice-board__body,
    .notice-board__clauses {
        max-height: 178px;
    }

    /* 条款区折叠时与附件卡之间保持一点呼吸 */
    .notice-board__clauses {
        margin-top: 0.5rem;
    }

    .notice-board__excerpt,
    .notice-board__points {
        font-size: 0.9375rem;
        line-height: 1.8;
    }

    .notice-board__clause-title,
    .notice-board__clause {
        font-size: 0.9375rem;
        line-height: 1.8;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .notice-board__pulse {
        animation: none;
    }

    .notice-board,
    .notice-board__paper {
        animation: none;
    }

    .notice-board__item,
    .notice-board__body,
    .notice-board__dot,
    .notice-board__file-btn,
    .notice-lightbox,
    .notice-lightbox__dialog {
        transition: none;
    }
}
