/* Grid Layout */
.custom-rss-feed.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr)); /* 3 columns per row */
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: start; /* Ensures grid starts from the left */
}

/* Individual grid items */
.custom-rss-feed .rss-item {
    position: relative;
    background: #272729; /* Dark card background */
    border: 1px solid #FFD936; /* Yellow border */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    width: 100%;
}

/* Hover effect */
.custom-rss-feed .rss-item:hover {
    transform: translateY(-5px);
}

/* Image container to maintain aspect ratio */
.custom-rss-feed .rss-item .image-container {
    width: 100%;
    height: 0;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

/* Image styling (Fixed Aspect Ratio) */
.custom-rss-feed .rss-item .image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

/* Image hover effect */
.custom-rss-feed .rss-item a:hover img {
    transform: scale(1.05);
}

/* Content below the image */
.custom-rss-feed .rss-item .overlay {
    padding: 15px;
    color: #B0B0B0; /* Default title color */
    font-size: 16px;
    font-weight: bold;
}

/* Date styling */
.custom-rss-feed .rss-item .date {
    font-size: 14px;
    font-weight: 400;
    color: #ddd;
    margin-bottom: 5px;
}

/* Title styles */
.custom-rss-feed .rss-item h3 a {
    color: #B0B0B0; /* Default title color */
    text-decoration: none;
    transition: color 0.3s ease-in-out;
    display: block;
}

/* Title hover effect */
.custom-rss-feed .rss-item h3 a:hover {
    color: #FFD936; /* Yellow hover color */
}

/* Pagination - Show only 30 items per page */
.custom-rss-feed .rss-item:nth-child(n+31) {
    display: none;
}

/* Responsive Design */

/* For medium screens (tablets) */
@media (max-width: 1200px) {
    .custom-rss-feed.grid {
        grid-template-columns: repeat(2, minmax(250px, 1fr)); /* 2 columns */
    }
}

/* For small tablets */
@media (max-width: 900px) {
    .custom-rss-feed.grid {
        grid-template-columns: repeat(2, minmax(250px, 1fr)); /* 2 columns */
    }
}

/* For mobile screens */
@media (max-width: 600px) {
    .custom-rss-feed.grid {
        grid-template-columns: 1fr; /* 1 column */
    }
}
