.card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body h4 {
    flex-grow: 1;
    min-height: 150px; /* Adjust this based on the expected title length */
    max-height: 150px; /* Ensures consistency */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limits title to 2 lines */
    -webkit-box-orient: vertical;
    white-space: normal;
}

.button-container {
    margin-top: auto; /* Forces button to align at bottom */
}

.pagination-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-container button {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-container button:hover {
    background: #df1e26;
    color: #fff;
    border-color: #df1e26;
}

.pagination-container button.active {
    background: #df1e26;
    color: #fff;
    border-color: #df1e26;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#articles-container .image-box {
    height: 240px;
    overflow: hidden;
    background: #f5f5f5;
}

#articles-container .image-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#articles-container .image-box.publisher-logo {
    padding: 32px;
    background: #fff;
}

#articles-container .image-box.publisher-logo img {
    object-fit: contain;
}

#articles-container .image-box.publisher-logo-dark {
    background: #18263b;
}
