/* Front-end grid styles only */
.feed-grid-wrapper {
    width: 80%;
    margin: 20px auto;
}

.feed-grid-loading {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #666;
}

.feed-category-filter {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feed-category-filter label {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.cfm-category-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    min-width: 200px;
}

.cfm-category-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 350px));
    gap: 20px;

}

.feed-card {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer;
}

.feed-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,1) 100%);
    z-index: 1;
}

.feed-card:hover {
    transform: translateY(-5px);
}

.feed-editorial-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.feed-categories {
    position: relative;
    z-index: 2;
    padding: 15px 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feed-category-badge {
    display: inline-block;
    padding: 0px 8px;
    background: #F0682E;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.feed-grid-wrapper .feed-title {
    position: relative;
    z-index: 2;
    padding: 15px 15px 0;
    font-size: 18px;
    line-height: 26px;
    text-decoration: none;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-family: Graphie, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 22px;
    color: #F2F2F2;
}

.feed-content {
    position: relative;
    z-index: 2;
    margin: 10px 15px;
    color: #f0f0f0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limits the text to a maximum of 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-read-more {
    position: relative;
    z-index: 2;
    display: block;
    padding: 0 15px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #F0682E;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
    text-align: end;
}

.feed-pagination {
    margin-top: 30px;
    text-align: center;
}

.feed-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.feed-pagination .page-numbers:hover {
    background: #f0f0f0;
    border-color: #999;
}

.feed-pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    cursor: default;
}
/* Responsive Design */
@media (max-width: 1200px) {
    .feed-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .feed-grid-wrapper {
        width: 90%;
    }

    .feed-grid {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
        gap: 15px;
    }

    .feed-card {
        min-height: 350px;
    }

    .feed-category-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cfm-category-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .feed-grid-wrapper {
        width: 95%;
        margin: 15px auto;
    }

    .feed-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feed-card {
        min-height: 300px;
    }

    .feed-grid-wrapper .feed-title {
        font-size: 18px;
        line-height: 20px;
    }

    .feed-pagination .page-numbers {
        padding: 6px 10px;
        margin: 0 2px;
        font-size: 14px;
    }
}
