/* RSS News Container */
.rss-news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Grid Layout */
.rss-news-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    white-space: wrap;
    /* Mobile default */
}

/* Responsive Columns */
@media (min-width: 768px) {
    .rss-news-columns-2 .rss-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rss-news-columns-3 .rss-news-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cols on tablet for 3-col layout */
    }

    .rss-news-columns-4 .rss-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Default to 2 columns if no class present but on tablet */
    .rss-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .rss-news-columns-3 .rss-news-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .rss-news-columns-4 .rss-news-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Default behavior if no specific column class matches */
    .rss-news-grid:not([class*="rss-news-columns-"]) {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* News Item Card */
.rss-news-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
}

.rss-news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

/* Image Wrapper */
.rss-news-image {
    position: relative;
    width: 100%;
    /* Create a 16:9 aspect ratio container */
    padding-top: 56.25%;
    overflow: hidden;
    background-color: #f3f4f6;
}

.rss-news-image a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rss-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.rss-news-item:hover .rss-news-image img {
    transform: scale(1.05);
}

/* Content Area */
.rss-news-content {
    padding: 24px;
    /* Increased padding slightly for airiness */
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Consistent spacing between elements */
    flex-grow: 1;
}

/* Title */
.rss-news-title {
    margin: 0;
    /* Handled by gap */
    font-size: 1.125rem;
    line-height: 1.35;
    font-weight: 700;
}

.rss-news-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.15s ease;
}

.rss-news-title a:hover {
    color: #2563eb;
}

/* Description */
.rss-news-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
    /* Handled by gap */

    /* Line Clamping for uniform height */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta Data (Date) */
.rss-news-meta {
    margin-top: auto;
    /* Pushes to bottom */
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.rss-news-date {
    display: inline-flex;
    align-items: center;
}

/* Empty State */
.rss-news-empty {
    text-align: center;
    padding: 48px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
}

/* Pagination */
.rss-news-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.rss-news-pagination ul {
    display: flex;
    padding-left: 0;
    list-style: none;
    gap: 0.25rem;
}

.rss-news-pagination ul li {
    list-style: inherit;
}

.rss-news-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    background: #fff;
    border: 0px solid #d1d5db;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.15s;
}

.rss-news-pagination .page-numbers:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.rss-news-pagination .page-numbers.current {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
    z-index: 1;
}

.rss-news-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}