/*==============================================
   KIMST home page: Notices + Director's message
   Uses .kh-reveal from home.css for the scroll reveal.
===============================================*/

.kh-updates {
    --kh-green: #108543;
    --kh-green-700: #0b6a34;
    --kh-green-800: #0a4f29;
    --kh-green-900: #073d20;
    --kh-green-300: #8fe0b0;
    --kh-green-50: #eef7f1;
    --kh-red: #d02010;
    --kh-red-700: #a8180c;
    --kh-ink: #14231a;
    --kh-muted: #5b6b61;
    --kh-line: #e3eae5;
    --kh-ease: cubic-bezier(.22, 1, .36, 1);

    padding: 84px 0;
    font-family: var(--kh-font-ui);
    background: #f3f7f4;
}

.kh-updates__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    align-items: stretch;
}

.kh-updates__grid--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
    margin: 0 auto;
}

/*---------- Notice board ----------*/

.kh-notices {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--kh-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(7, 61, 32, .04), 0 14px 34px rgba(7, 61, 32, .07);
}

.kh-notices__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--kh-green-900), var(--kh-green-700));
}

.kh-notices__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: var(--kh-green-300);
    font-size: 18px;
}

.kh-notices h2.kh-notices__title {
    margin: 0;
    color: #fff;
    font-family: var(--kh-font-ui);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.kh-notices__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    margin-left: auto;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--kh-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* The list fills the card (flex-basis 0 keeps it from stretching the row) and scrolls when long */
.kh-notices__list {
    flex: 1 1 0;
    min-height: 260px;
    margin: 0;
    padding: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    background-color: #f6faf7;
    background-image: radial-gradient(rgba(16, 133, 67, .16) 1px, transparent 1.2px);
    background-size: 18px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 133, 67, .45) transparent;
}

.kh-notice {
    display: flex;
    gap: 16px;
    margin: 0 0 14px;
    padding: 16px;
    border: 1px solid var(--kh-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(7, 61, 32, .06);
}

.kh-notice:last-child {
    margin-bottom: 0;
}

/* Raw ISO text until notices.js swaps in the day / month badge */
.kh-notice__date {
    flex: 0 0 64px;
    align-self: flex-start;
    padding: 9px 4px;
    border-radius: 14px;
    background: var(--kh-green-50);
    color: var(--kh-green-700);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
}

.kh-notice__date b {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.kh-notice__date span {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.kh-notice__body {
    flex: 1 1 auto;
    min-width: 0;
}

.kh-notice__tag {
    display: inline-block;
    margin-bottom: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(208, 32, 16, .1);
    color: var(--kh-red);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.kh-notices h3.kh-notice__title {
    margin: 0 0 6px;
    color: var(--kh-ink);
    font-family: var(--kh-font-ui);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.kh-notices p.kh-notice__desc {
    margin: 0;
    color: var(--kh-muted);
    font-family: var(--kh-font-body);
    font-size: 14.5px;
    line-height: 1.6;
}

.kh-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.kh-notices a.kh-notice__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--kh-green-50);
    color: var(--kh-green-700);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.kh-notices a.kh-notice__action:hover {
    background: var(--kh-green);
    color: #fff;
}

.kh-notices__empty {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 32px 24px;
    background: #f6faf7;
    color: var(--kh-muted);
    text-align: center;
}

.kh-notices__empty i {
    margin-bottom: 14px;
    color: var(--kh-green);
    font-size: 44px;
    opacity: .5;
}

.kh-notices__empty p {
    margin: 0;
    font-family: var(--kh-font-body);
    font-size: 16px;
    line-height: 1.6;
}

.kh-notices__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--kh-line);
    background: #fff;
    color: var(--kh-muted);
    font-size: 14px;
    line-height: 1.4;
}

.kh-notices__foot a {
    color: var(--kh-green-700);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.kh-notices__foot a:hover {
    color: var(--kh-red);
}

.kh-notices__foot a i {
    margin-left: 6px;
    transition: transform .25s var(--kh-ease);
}

.kh-notices__foot a:hover i {
    transform: translateX(4px);
}

/*---------- Director's message ----------*/

.kh-director {
    position: relative;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    min-width: 0;
    padding: 40px;
    overflow: hidden;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(520px 320px at 100% 0%, rgba(16, 133, 67, .55), transparent 65%),
        linear-gradient(135deg, var(--kh-green-900) 0%, var(--kh-green-800) 60%, var(--kh-green-700) 100%);
    box-shadow: 0 30px 60px rgba(7, 61, 32, .25);
}

/* Dotted texture */
.kh-director::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1.5px, transparent 1.6px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(120deg, #000, transparent 65%);
    mask-image: linear-gradient(120deg, #000, transparent 65%);
    pointer-events: none;
}

.kh-director__quote {
    position: absolute;
    top: -34px;
    right: 30px;
    color: rgba(255, 255, 255, .09);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 220px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.kh-director__media,
.kh-director__body {
    position: relative;
    z-index: 1;
}

.kh-director__media {
    text-align: center;
}

.kh-director__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 20%;
    border: 4px solid rgba(255, 255, 255, .92);
    border-radius: 22px;
    background: var(--kh-green-800);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .35);
}

.kh-director p.kh-director__name {
    margin: 18px 0 0;
    color: #fff;
    font-family: var(--kh-font-ui);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.kh-director__role {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: var(--kh-green-300);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.kh-director__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 4px;
}

.kh-director .kh-director__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.kh-director__eyebrow i {
    color: var(--kh-green-300);
    font-size: 14px;
}

/* Excerpt that fades out; the full text lives on /directormessage */
.kh-director__text {
    max-height: 232px;
    margin: 22px 0 26px;
    overflow: hidden;
    color: rgba(255, 255, 255, .9);
    font-family: var(--kh-font-body);
    font-size: 17px;
    line-height: 1.75;
    -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent);
    mask-image: linear-gradient(180deg, #000 68%, transparent);
}

.kh-director__text p {
    margin: 0 0 12px;
    color: inherit;
    font: inherit;
}

.kh-director a.kh-director__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--kh-red);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(208, 32, 16, .35);
    transition: background .2s ease, transform .2s ease;
}

.kh-director a.kh-director__btn:hover {
    background: var(--kh-red-700);
    color: #fff;
    transform: translateY(-2px);
}

.kh-director__btn i {
    font-size: 15px;
    transition: transform .25s var(--kh-ease);
}

.kh-director a.kh-director__btn:hover i {
    transform: translateX(4px);
}

/*---------- Focus rings ----------*/

.kh-updates :focus-visible {
    outline: 2px solid var(--kh-green-300);
    outline-offset: 3px;
}

.kh-notices :focus-visible {
    outline-color: var(--kh-green);
}

/*---------- Responsive ----------*/

@media (max-width: 1199.98px) {
    .kh-updates__grid {
        gap: 24px;
    }

    .kh-director {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 30px;
        padding: 34px 30px;
    }
}

@media (max-width: 991.98px) {
    .kh-updates {
        padding: 60px 0;
    }

    .kh-updates__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .kh-notices__list {
        flex: none;
        min-height: 0;
        max-height: 440px;
    }
}

@media (max-width: 575.98px) {
    .kh-updates {
        padding: 48px 0;
    }

    .kh-director {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 30px 22px 28px;
    }

    .kh-director__media {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: 1fr 1fr;
        align-items: center;
        gap: 4px 18px;
        text-align: left;
    }

    .kh-director__media img {
        grid-row: 1 / span 2;
        border-width: 3px;
        border-radius: 18px;
    }

    .kh-director p.kh-director__name {
        margin: 0;
        align-self: end;
    }

    .kh-director__role {
        align-self: start;
        justify-self: start;
        margin-top: 4px;
    }

    .kh-director__quote {
        font-size: 160px;
        right: 16px;
    }

    .kh-director__text {
        max-height: 210px;
        font-size: 16px;
    }

    .kh-notices__head {
        padding: 18px;
    }

    .kh-notices__list {
        padding: 14px;
    }

    .kh-notice {
        gap: 12px;
        padding: 14px;
    }

    .kh-notice__date {
        flex-basis: 56px;
    }

    .kh-notice__date b {
        font-size: 21px;
    }

    .kh-notices__foot {
        padding: 14px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh-notices a.kh-notice__action,
    .kh-notices__foot a i,
    .kh-director a.kh-director__btn,
    .kh-director__btn i {
        transition: none;
    }
}
