/* 
 * =================================
 *  News Modal - Styling
 * =================================
 */

#pane-news {
    /* Changed from flex to block to allow natural stretching inside the modal */
    display: block;
}

#pane-news h1 {
    margin-top: 10px;
    margin-bottom: 0px;
    font-size: 1.8em;
}

/* Hide by default, display: block when active */
#pane-news:not(.active) {
    display: none;
}

#news-list-container {
    /* Removed flex-grow/overflow to let it stretch naturally */
    padding-bottom: 20px;
}

.news-item.blog-style {
    display: flex;
    gap: 30px;
    margin-bottom: 0;
    padding: 30px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 0.5px solid #ececec;
    /* Extremely thin line */
    transition: background 0.2s;
}

.news-item.blog-style:hover {
    background: rgba(0, 0, 0, 0.01);
    /* Very subtle hover feedback */
}

.news-item.blog-style:last-child {
    border-bottom: none;
}

.news-item.is-test {
    border-left: 2px solid #fbbc05;
    /* Thinner test line */
    background-color: transparent;
    /* Remove test background */
}

.news-item.is-pinned {
    border-left: 4px solid #1a365d;
    background: rgba(26, 54, 93, 0.02);
}

.pinned-badge {
    background-color: #1a365d;
    color: white;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    align-self: flex-start;
}

.news-item.is-test .news-title {
    color: #666;
}

.news-thumbnail {
    width: 200px;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    /* More subtle radius */
    background-size: cover;
    background-position: center;
    background-color: #f7f7f7;
    /* Very light background */
    flex-shrink: 0;
}

.placeholder-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9em;
}

.news-content-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
}

.news-date {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9em;
    color: #777;
    font-weight: 600;
}

.news-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.3em;
    color: #222;
    margin: 0;
    font-weight: 600;
    transition: color 0.2s;
}

.news-title:hover {
    color: #1a365d;
}

.news-summary {
    color: #555;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 12px;
    /* Max 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.news-summary:hover {
    color: #333;
}

.read-more-btn {
    align-self: flex-end;
    background: none;
    border: none;
    color: #1a365d;
    padding: 0;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 10px;
    text-decoration: none;
}

.read-more-btn:hover {
    text-decoration: underline;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .news-item.blog-style {
        flex-direction: column;
        gap: 16px;
        padding: 25px 0;
        /* Reduced from 30px */
    }

    .news-content-wrapper {
        display: contents;
        /* Unwraps the content for reordering */
    }

    .news-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        order: 2;
        /* Thumbnail goes second */
    }

    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        order: 1;
        /* Title bar goes first */
    }

    .news-summary {
        order: 3;
        /* Summary goes third */
        margin-bottom: 0;
    }

    .read-more-btn {
        order: 4;
        /* Read more goes last */
        align-self: flex-start;
        /* Align to left on mobile */
        margin-top: 0;
    }
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0 10px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    /* Lighter border */
    margin-top: 10px;
}

.page-link {
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    color: #1a365d;
    /* Or use main app link color */
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
    user-select: none;
    padding: 4px 8px;
    /* Increase click area */
}

.page-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.page-link.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
    text-decoration: none;
    color: var(--text-color, #666);
    /* Disabled fallback */
}

#page-info {
    font-size: 0.9rem;
    color: #555555;
    /* Darker grey for legibility */
    font-weight: 500;
}