/* News List & Project List Styles */

/* News/Projects List Section */
.news-list-section,
.projects-list-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.news-list-section h1,
.projects-list-section h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #2c5aa0;
    font-size: 2.5rem;
}

/* News/Project List */
.news-list,
.projects-list {
    margin-bottom: 40px;
}

/* News/Project Item */
.news-list-item,
.project-list-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-list-item:hover,
.project-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.news-list-item a,
.project-list-item a {
    display: flex;
    text-decoration: none;
    color: inherit;
}

/* Item Image */
.news-list-item-image,
.project-list-item-image {
    width: 300px;
    min-width: 300px;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-list-item-image img,
.project-list-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-list-item:hover .news-list-item-image img,
.project-list-item:hover .project-list-item-image img {
    transform: scale(1.05);
}

/* Item Content */
.news-list-item-content,
.project-list-item-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Category Badge */
.news-category-badge {
    display: inline-block;
    background: #2c5aa0;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* Item Title */
.news-list-item-title,
.project-list-item-title {
    color: #2c5aa0;
    margin-bottom: 15px;
    font-size: 1.4rem;
    line-height: 1.4;
    font-weight: 600;
}

/* Item Excerpt */
.news-list-item-excerpt,
.project-list-item-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.7;
    font-size: 1rem;
}

/* Read More Link */
.news-list-item-link,
.project-list-item-link {
    color: #ff6b35;
    font-weight: 600;
    font-size: 1rem;
}

/* Empty State */
.news-list-empty,
.projects-list-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 10px;
}

.news-list-empty p,
.projects-list-empty p {
    font-size: 1.2rem;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 15px;
    background: #2c5aa0;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.pagination a:hover {
    background: #ff6b35;
}

.pagination a.active {
    background: #ff6b35;
    cursor: default;
}

.pagination .pagination-prev,
.pagination .pagination-next {
    padding: 10px 20px;
}

.pagination .pagination-ellipsis {
    padding: 10px 5px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .news-list-item a,
    .project-list-item a {
        flex-direction: column;
    }
    
    .news-list-item-image,
    .project-list-item-image {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }
    
    .news-list-item-content,
    .project-list-item-content {
        padding: 20px;
    }
    
    .news-list-item-title,
    .project-list-item-title {
        font-size: 1.2rem;
    }
    
    /* Căn giữa toàn bộ item tin tức trên mobile */
    .news-item {
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Căn giữa ảnh tin tức trên mobile */
    .news-item .news-image {
        width: 100% !important;
        min-width: 100% !important;
        height: 200px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }
    
    .news-item .news-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 auto !important;
    }
    
    /* Căn trái nội dung tin tức trên mobile (trừ ảnh) */
    .news-item .news-content {
        text-align: left !important;
    }
    
    .news-item .news-content h3 {
        text-align: left !important;
    }
    
    .news-item .news-content p {
        text-align: left !important;
    }
    
    .news-item .news-content span {
        text-align: left !important;
        display: inline-block !important;
    }
    
    /* Căn giữa toàn bộ item dự án trên mobile */
    .project-item {
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Căn giữa ảnh dự án trên mobile */
    .project-item .project-image {
        width: 100% !important;
        min-width: 100% !important;
        height: 200px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }
    
    .project-item .project-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 auto !important;
    }
    
    /* Căn trái nội dung dự án trên mobile (trừ ảnh) */
    .project-item .project-content {
        text-align: left !important;
    }
    
    .project-item .project-content h3 {
        text-align: left !important;
    }
    
    .project-item .project-content p {
        text-align: left !important;
    }
    
    .project-item .project-content span {
        text-align: left !important;
        display: inline-block !important;
    }
}
