/* Homepage announcements, independent of the old vertically centred ticker. */
.home-page #notice-section {
    padding-block: clamp(48px, 6vw, 80px);
    border-top: 1px solid #e5edf6;
    background: #f6f9fd;
}
.home-page .notice-hub__layout {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.65fr);
    align-items: start;
    gap: clamp(32px, 5vw, 64px);
    width: min(1180px, calc(100% - 48px));
}
.home-page .notice-hub__intro { min-width: 0; padding-top: 4px; }
.home-page .notice-hub__kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #b51d25;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.home-page .notice-hub__kicker::before { width: 24px; height: 2px; background: #e31e24; content: ""; }
.home-page .notice-hub__intro h2 {
    margin: 0 0 18px;
    color: #082e5b;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.045em;
}
.home-page .notice-hub__intro > p { margin: 0 0 22px; color: #60708a; font-size: .96rem; line-height: 1.8; }
.home-page .notice-hub__topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0 0 28px; padding: 0; list-style: none; }
.home-page .notice-hub__topics li { display: flex; align-items: baseline; gap: 8px; color: #294663; font-size: .8rem; font-weight: 600; line-height: 1.6; }
.home-page .notice-hub__topics li::before { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #e31e24; content: ""; }
.home-page .notice-hub__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 46px;
    padding: 11px 19px;
    border: 1px solid #cbdcf0;
    border-radius: 9px;
    background: #fff;
    color: #0b3f7a;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}
.home-page .notice-hub__link:hover { border-color: #1266d6; background: #edf5ff; color: #0b3f7a; }
.home-page .notice-board {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d9e4f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(12, 47, 88, .06);
}
.home-page .notice-board__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 18px 22px; border-bottom: 1px solid #e3ebf5; }
.home-page .notice-board__heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home-page .notice-board__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; background: #edf4ff; color: #1266d6; }
.home-page .notice-board__heading h3 { margin: 0; color: #17375b; font-size: 1.08rem; font-weight: 700; line-height: 1.4; }
.home-page .notice-board__count { flex-shrink: 0; padding: 5px 10px; border-radius: 6px; background: #f1f5fa; color: #60708a; font-size: .73rem; font-weight: 600; white-space: nowrap; }
.home-page .notice-board__list { max-height: 590px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b8c9df #f7faff; scrollbar-gutter: stable; }
.home-page .notice-entry { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 18px; margin: 0; padding: 22px; border-bottom: 1px solid #e8eef5; }
.home-page .notice-entry:last-child { border-bottom: 0; }
.home-page .notice-entry__date { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 60px; min-height: 80px; padding: 9px 5px; border: 1px solid #dfeafb; border-radius: 11px; background: #f0f6ff; color: #1266d6; line-height: 1.1; }
.home-page .notice-entry__day { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em; }
.home-page .notice-entry__month { font-size: .66rem; font-weight: 700; letter-spacing: .08em; }
.home-page .notice-entry__year { margin-top: 3px; color: #536983; font-size: .72rem; }
.home-page .notice-entry__content { min-width: 0; }
.home-page .notice-entry__category { display: inline-block; max-width: 100%; margin-bottom: 9px; padding: 3px 8px; border-radius: 5px; background: #edf4ff; color: #1d5caa; font-size: .75rem; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.home-page .notice-entry__content h4 { margin: 0 0 8px; color: #17375b; font-size: 1.04rem; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.home-page .notice-entry__content > p { margin: 0; color: #60708a; font-size: .94rem; line-height: 1.75; overflow-wrap: anywhere; }
.home-page .notice-entry__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.home-page .notice-entry__open, .home-page .notice-entry__attachment { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid transparent; border-radius: 8px; background: #edf4ff; color: #1266d6; font-size: .8rem; font-weight: 700; line-height: 1.5; text-align: left; text-decoration: none; cursor: pointer; }
.home-page .notice-entry__attachment { border-color: #d8e4f3; background: #fff; color: #294663; }
.home-page .notice-entry__open:hover { color: #082e5b; }
.home-page .notice-entry__attachment:hover { border-color: #1266d6; color: #1266d6; }
.home-page .notice-entry:focus-within { background: #f8fbff; }
.home-page .notice-board__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border-top: 1px solid #e3ebf5; background: #fbfdff; }
.home-page .notice-board__footer[hidden] { display: none; }
.home-page .notice-board__hint { margin: 0; color: #60708a; font-size: .78rem; line-height: 1.6; }
.home-page .notice-board__toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid #cbdcf0; border-radius: 8px; background: #fff; color: #0b3f7a; font-size: .8rem; font-weight: 700; cursor: pointer; }
.home-page .notice-board__toggle:hover { border-color: #1266d6; background: #edf5ff; }
.home-page .notice-board.is-expanded .notice-board__list { max-height: none; }
.home-page .notice-board.is-expanded .notice-board__toggle svg { transform: rotate(180deg); }
.home-page .notice-board__empty { margin: 0; padding: 28px 22px; color: #60708a; font-size: .94rem; line-height: 1.75; }
.home-page :is(.notice-hub__link, .notice-entry__open, .notice-entry__attachment, .notice-board__toggle, .notice-board__list):focus-visible { outline: 3px solid #1266d6; outline-offset: -3px; border-radius: 6px; }
@media (max-width: 991.98px) {
    .home-page .notice-hub__layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .home-page .notice-hub__intro > p { max-width: 58ch; }
    .home-page .notice-hub__topics { max-width: 480px; margin-bottom: 22px; }
    .home-page .notice-board__list { max-height: 620px; }
}
@media (max-width: 575.98px) {
    .home-page .notice-hub__layout { width: calc(100% - 36px); gap: 24px; }
    .home-page .notice-hub__intro > p { font-size: 1rem; line-height: 1.75; }
    .home-page .notice-hub__link { width: 100%; min-height: 48px; }
    .home-page .notice-board__header { min-height: 68px; gap: 10px; padding: 14px 16px; }
    .home-page .notice-board__heading { gap: 9px; }
    .home-page .notice-board__heading h3 { font-size: 1rem; }
    .home-page .notice-board__icon { width: 32px; height: 32px; flex-basis: 32px; }
    .home-page .notice-board__count { padding-inline: 7px; font-size: .7rem; }
    .home-page .notice-board__list { max-height: min(72vh, 600px); }
    .home-page .notice-entry { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 16px; }
    .home-page .notice-entry__date { flex-direction: row; justify-content: flex-start; gap: 5px; width: fit-content; min-height: 0; padding: 6px 9px; border-radius: 6px; }
    .home-page .notice-entry__day { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: normal; }
    .home-page .notice-entry__month { font-size: .72rem; letter-spacing: .02em; }
    .home-page .notice-entry__year { margin: 0; font-size: .72rem; }
    .home-page .notice-entry__category { font-size: .7rem; }
    .home-page .notice-entry__content h4 { font-size: 1rem; }
    .home-page .notice-entry__content > p { font-size: .94rem; }
    .home-page .notice-entry__open, .home-page .notice-entry__attachment { font-size: .87rem; }
    .home-page .notice-board__footer { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px; }
    .home-page .notice-board__hint { text-align: center; }
}

/* Keep the complete announcement readable in a short phone viewport. */
#noticeModal .ntbx-modal-header { min-height: 0; align-items: flex-start; gap: 16px; padding: 22px 24px; background: #082e5b; text-align: left; }
#noticeModal .ntbx-modal-header > div { flex: 1; min-width: 0; }
#noticeModal .ntbx-modal-header::after { display: none; }
#noticeModal #modalTitle { max-width: none; font-size: clamp(1.1rem, 2vw, 1.6rem); line-height: 1.45; text-align: left; overflow-wrap: anywhere; }
#noticeModal .btn-close { flex: 0 0 44px; width: 44px; height: 44px; }
#noticeModal .modal-body { padding: 24px; }
#noticeModal .modal-body > .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 0; }
#noticeModal .modal-body > .row > .col-md-6 { width: auto; max-width: none; padding: 0; }
#noticeModal .ntbx-info-box { min-height: 0; height: 100%; padding: 12px; gap: 10px; }
#noticeModal .ntbx-info-box i { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; }
#noticeModal .ntbx-info-box p { font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
#noticeModal .notice-details-title { margin: 0 0 12px; color: #17375b; font-size: 1rem; font-weight: 700; }
#noticeModal #modalMessage { max-width: none; font-size: 1rem; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
#noticeModal .modal-footer .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; }
#noticeModal .modal-footer .btn svg { flex: 0 0 16px; }
.home-page.modal-open :is(.whatsapp-btn, .backToTop) { visibility: hidden; pointer-events: none; }
@media (max-width: 575.98px) {
    #noticeModal .ntbx-modal-header { padding: 18px; }
    #noticeModal .modal-body { padding: 18px; }
    #noticeModal .modal-body > .row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid #dfe9f4; border-radius: 10px; background: #f8fbff; }
    #noticeModal .ntbx-info-box { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; }
    #noticeModal .ntbx-info-box > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; }
    #noticeModal .ntbx-info-box i { display: none; }
    #noticeModal .ntbx-info-box strong { flex-shrink: 0; margin: 0; font-size: .75rem; }
    #noticeModal .ntbx-info-box p { min-width: 0; text-align: right; }
    #noticeModal .modal-footer { gap: 10px; padding: 14px 18px; }
    #noticeModal .modal-footer .btn { flex: 1 1 0; min-width: 0; margin: 0; padding: 10px 8px; font-size: .8rem; }
}
