/* Post List Display Frontend Styles */
.news-list-container { 
    font-family: 'Tahoma', sans-serif; 
    width: 100%; 
    border-top: 1px solid #ddd; 
    margin: 20px 0;
    clear: both;
}

.news-header { 
    display: flex; 
    font-weight: bold; 
    padding: 10px 8px; 
    background-color: #f5f5f5; 
    border-bottom: 1px solid #ddd; 
}

.header-title { flex: 3; }
.header-group { flex: 1; text-align: left; }
.header-date { flex: 1; text-align: left; }
.header-author { flex: 1; text-align: left; }

.news-list { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
}

.news-item { 
    display: flex; 
    align-items: center; 
    padding: 12px 8px; 
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.news-item:hover { 
    background-color: #f9f9f9; 
}

.news-title { 
    flex: 3; 
    padding-right: 10px;
}

.news-title a { 
    text-decoration: none; 
    color: #333; 
    font-weight: 500;
}

.news-title a:hover { 
    color: #0073aa; 
}

.news-group, .news-date, .news-author { 
    flex: 1; 
    text-align: left; 
    color: #555; 
    font-size: 14px;
}

.news-excerpt {
    font-size: 14px; 
    color: #666; 
    margin-top: 5px; 
    line-height: 1.4;
}

/* WPBakery specific styles */
.vc_row .news-list-container,
.vc_column .news-list-container {
    margin: 15px 0;
    width: 100%;
}

.wpb_wrapper .news-list-container {
    overflow: visible;
}

.vc_row .wpb_column .news-list-container {
    width: 100%;
}

/* Controls styling */
.mpl-controls {
    margin-bottom: 20px; 
    padding: 15px; 
    background: #f8f9fa; 
    border-radius: 8px; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    align-items: center;
}

.mpl-search-wrapper {
    flex: 1; 
    min-width: 200px;
}

.mpl-search-wrapper input {
    width: 100%; 
    padding: 8px 12px; 
    border: 1px solid #ddd; 
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.mpl-sort-wrapper select {
    padding: 8px 12px; 
    border: 1px solid #ddd; 
    border-radius: 4px;
    font-size: 14px;
}

/* Pagination styling */
.mpl-pagination {
    margin-top: 20px; 
    text-align: center;
}

.mpl-page-btn, .mpl-page-current {
    display: inline-block; 
    padding: 8px 12px; 
    margin: 0 2px; 
    text-decoration: none; 
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mpl-page-btn {
    background: #f8f9fa; 
    border: 1px solid #ddd;
    color: #333;
}

.mpl-page-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #333;
    text-decoration: none;
}

.mpl-page-current {
    background: #007cba; 
    color: white;
    border: 1px solid #007cba;
}

.mpl-no-posts {
    padding: 20px; 
    text-align: center; 
    color: #666; 
    font-style: italic;
    background: #f8f9fa;
    border-radius: 4px;
}

.mpl-search-highlight {
    background-color: #fff3cd;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .news-header {
        display: none;
    }
    
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 8px;
    }
    
    .news-title {
        width: 100%;
        margin-bottom: 8px;
        padding-right: 0;
    }
    
    .news-group,
    .news-date,
    .news-author {
        font-size: 12px;
        color: #888;
        margin-right: 15px;
        margin-top: 5px;
    }
    
    .news-excerpt {
        margin-top: 8px !important;
        font-size: 13px !important;
    }
    
    .mpl-controls {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .mpl-search-wrapper {
        min-width: auto !important;
    }
    
    .mpl-pagination {
        font-size: 14px;
    }
    
    .mpl-page-btn, .mpl-page-current {
        padding: 6px 10px !important;
        font-size: 14px !important;
        margin: 0 1px !important;
    }
}

/* WPBakery and Elementor Mobile Responsive */
@media (max-width: 768px) {
    .vc_row .news-list-container,
    .elementor-widget-mpl_post_list .news-list-container {
        margin: 10px 0;
    }
    
    .wpb_wrapper .news-list-container,
    .elementor-widget-container .news-list-container {
        width: 100%;
    }
    
    /* Ensure controls stack properly in mobile */
    .elementor-widget-mpl_post_list .mpl-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .elementor-widget-mpl_post_list .mpl-search-wrapper,
    .elementor-widget-mpl_post_list .mpl-sort-wrapper {
        width: 100%;
    }
}