﻿/* Fix image radius and layout issues */
/* Ensure image area has fixed height */
.news-card-img {
    height: 200px; /* Adjust as needed */
    width: 100% !important;
    object-fit: cover;
    display: block;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    margin: 0 auto;
    background-color: #f5f5f5; /* optional fallback */
}

/* Remove bootstrap width override */
.card-img, .card-img-top {
    width: 100% !important;
}

/* Optional: remove image whitespace/padding */
.news-card .card-img,
.news-card .card-img-top {
    width: 100% !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    object-fit: cover;
}

/* Optional: Clamp summary text */
.news-card-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
    color: #444;
}

.news-page-list {
    max-width: 1280px; /* adjust to your desired width */
    margin: 0 auto;
    padding: 1rem;
}

    /* News Page Styles (Scoped) */
    .news-page-list .sf-list-item {
        display: flex;
        flex-wrap: nowrap;
        gap: 2rem;
        background-color: #fff;
        padding: 1.5rem;
        border-radius: 12px;
        margin-bottom: 2rem;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        align-items: flex-start;
    }

    /* Scope all styles to news-page-list to avoid affecting homepage cards */
    .news-page-list .card {
        border: none;
        box-shadow: none;
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 40px;
        padding: 20px;
        background-color: #fff;
    }

    /* Image styles */
    .news-page-list .card-img,
    .news-page-list .card-img-top {
        width: 300px !important;
        height: 220px !important;
        object-fit: cover;
        border-radius: 12px;
        flex-shrink: 0;
        background-color: #f0f0f0; /* light gray placeholder */
        display: block;
        border-top-left-radius: 12px !important;
        border-top-right-radius: 12px !important;
    }

    /* Title styling */
    .news-page-list .card-title a,
    .news-page-list .card-title a:visited {
        font-size: 1.5rem;
        font-weight: 700;
        color: #000;
        text-decoration: none;
        display: inline-block;
        margin-bottom: 10px;
    }

        .news-page-list .card-title a:hover {
            text-decoration: underline;
        }

    /* Summary/Description */
    .news-page-list .card-text {
        font-size: 1rem;
        color: #444;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    /* "Read more" button */
    .news-page-list .btn-primary {
        display: inline-block;
        padding: 8px 16px;
        background-color: #d80000;
        color: #fff;
        font-weight: 600;
        border: none;
        border-radius: 8px;
        text-decoration: none;
        transition: background-color 0.3s ease;
    }

        .news-page-list .btn-primary:hover {
            background-color: #a60000;
        }

.btn-read-news {
    background-color: #E20917 !important;
    color: white !important;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    border: none;
}

    .btn-read-news:hover {
        background-color: #0f2442 !important;
        color: white !important;
        text-decoration: none;
    }

