/*
 * =================================
 *  News Modal - Styling
 * =================================
 */

body.news-list-page::before {
    display: none;
}

body.news-list-page [data-site-footer] {
    margin: 0 auto 28px;
}

body.news-list-page [data-site-footer] .site-footer-module__divider {
    margin-top: 0;
}

body.news-list-page #pane-news.markdown-body h1 {
    display: none;
}

body.news-list-page .content-page-header {
    margin-bottom: 0;
}

body.news-list-page .page-intro__header {
    display: grid;
    gap: 0;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(23, 23, 23, 0.06);
}

body.news-list-page .page-body {
    padding-top: 0;
    border-top: none;
}

body.news-list-page .meta-label {
    display: none;
}

body.news-list-page .page-title {
    margin: 0;
    color: #111111;
    font-size: clamp(2.2rem, 4vw, 4.5rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.04em;
}

body.news-list-page .meta-line,
body.news-list-page #page-info {
    margin: 16px 0 24px;
    font-family: "Manrope", "Noto Sans TC", sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(15, 23, 42, 0.45);
}

body.news-list-page .news-list {
    display: grid;
    gap: 0;
}

.news-item {
    position: relative;
    display: grid;
    gap: 0;
    margin: 0 0 40px;
    padding: 0 0 32px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(23, 23, 23, 0.06);
    border-radius: 0;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.news-card-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: 8px;
}

.news-card-link:focus-visible {
    outline: 2px solid rgba(217, 138, 61, 0.78);
    outline-offset: 4px;
}

.news-date {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    padding-top: 0;
    color: rgba(15, 23, 42, 0.42);
    font-family: "Manrope", "Noto Sans TC", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.news-content-wrapper {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0;
    min-width: 0;
    max-width: 760px;
}

.news-thumbnail {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 220px;
    margin-top: 24px;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    background-color: #f5f4f2;
    transition: transform 0.2s ease;
}

.placeholder-thumb {
    display: block;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(244, 242, 238, 0.92)),
        #f4f2ef;
}

body.news-list-page #pane-news .news-title {
    margin: 0 0 14px;
    color: #111111;
    font-family: "Manrope", "Noto Sans TC", sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: -0.02em;
}

body.news-list-page #pane-news .news-title a,
body.news-list-page #pane-news .news-title a:visited,
body.news-list-page #pane-news .news-title a:active {
    color: inherit;
    text-decoration: none;
}

body.news-list-page #pane-news .news-title a:focus-visible {
    outline: none;
}

.news-summary {
    max-width: 100%;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    color: #5c5c5c;
    font-family: "Manrope", "Noto Sans TC", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-item:hover {
    border-color: rgba(23, 23, 23, 0.09);
}

.news-item:hover .news-title,
.news-item:focus-within .news-title {
    color: rgba(17, 17, 17, 0.82);
}

.news-item:hover .news-thumbnail {
    transform: scale(1.01);
}

.news-list > .news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

@media (max-width: 768px) {
    body.news-list-page #page-content {
        width: 100%;
        max-width: none;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }

    body.news-list-page [data-site-footer] {
        width: 100%;
        max-width: none;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }

    body.news-list-page .content-page-header {
        margin-top: 24px;
        margin-bottom: 0;
    }

    body.news-list-page .page-intro__header {
        padding-bottom: 28px;
    }

    body.news-list-page .meta-label {
        font-size: 11px;
    }

    body.news-list-page .page-title {
        font-size: clamp(2.2rem, 4vw, 4.5rem);
    }

    body.news-list-page .meta-line,
    body.news-list-page #page-info {
        margin-bottom: 20px;
    }

    .news-item {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }

    .news-date {
        margin-bottom: 8px;
        font-size: 11px;
    }

    body.news-list-page #pane-news .news-title {
        margin-bottom: 10px;
        font-size: 18px;
        line-height: 1.32;
        letter-spacing: -0.01em;
    }

    .news-summary {
        font-size: 14px;
        line-height: 1.65;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .news-thumbnail {
        height: 168px;
        margin-top: 16px;
        border-radius: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body.news-list-page .page-title {
        font-size: clamp(2.2rem, 4vw, 4.5rem);
        line-height: 1.15;
    }

    body.news-list-page #pane-news .news-title {
        font-size: 24px;
        line-height: 1.26;
    }

    .news-thumbnail {
        height: 200px;
    }
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 24px 0 6px;
    border-top: 1px solid rgba(20, 20, 20, 0.08);
    margin-top: 8px;
}

.page-link {
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #d98a3d;
    text-decoration: none;
    transition: opacity 0.2s ease, color 0.2s ease;
    user-select: none;
    padding: 4px 6px;
}

.page-link:hover,
.page-link:focus-visible {
    color: #b76f28;
    opacity: 0.88;
}

.page-link.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
    text-decoration: none;
    color: var(--text-color, #666);
}
