body { background-color: #f3f4f6; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: #1f2937; }

.article-page-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; text-align:left; }
@media(max-width: 900px) { .article-page-container { grid-template-columns: 1fr; } }

.filter-section { background: #fff; border-radius: 16px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); margin-bottom: 30px; }
.filter-section h1 { margin: 0 0 20px 0; font-size: 2rem; color: #111827; font-weight: 800; }
.search-row { display: flex; gap: 10px; margin-bottom: 20px; }
.search-input { flex: 1; padding: 12px 16px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem; outline: none; transition: border-color 0.2s; }
.search-input:focus { border-color: #d81b60; }
.search-btn { background: #d81b60; color: #fff; border: none; padding: 0 25px; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 1rem; transition: background 0.2s; }
.search-btn:hover { background: #b71555; }

.cat-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.cat-tag { background: #f3f4f6; color: #4b5563; padding: 8px 16px; border-radius: 20px; text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: all 0.2s ease; border: 1px solid transparent; }
.cat-tag:hover { background: #e5e7eb; }
.cat-tag.active { background: #d81b60; color: #fff; border-color: #d81b60; box-shadow: 0 4px 10px rgba(216,27,96,0.2); }

.sort-row { display: flex; justify-content: flex-end; align-items: center; border-top: 1px solid #f3f4f6; padding-top: 15px; }
.sort-select { padding: 8px 12px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 0.9rem; outline: none; background: #fff; }

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.article-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.03); transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; text-decoration: none; }
.article-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.article-card-cover { height: 180px; background: #f9fafb; position: relative; overflow: hidden; }
.article-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.article-card:hover .article-card-cover img { transform: scale(1.05); }
.article-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.article-card-meta { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.badge-diff { background: #fee2e2; color: #b91c1c; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.article-card-title { font-size: 1.15rem; color: #111827; margin: 0 0 10px 0; line-height: 1.4; font-weight: 700; }
.article-card-desc { font-size: 0.9rem; color: #6b7280; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 15px; }
.article-card-footer { margin-top: auto; font-size: 0.85rem; color: #9ca3af; font-weight: 500; display: flex; justify-content: space-between;}

.pagination { margin-top: 40px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 16px; border-radius: 8px; background: #fff; color: #111827; text-decoration: none; font-weight: 600; border: 1px solid #d1d5db; transition: all 0.2s; }
.pagination a:hover { background: #f9fafb; }
.pagination span.active { background: #d81b60; color: #fff; border-color: #d81b60; }

.sidebar-widget { background: #fff; border-radius: 16px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); }
.sidebar-widget h3 { margin-top: 0; font-size: 1.3rem; color: #111827; margin-bottom: 20px; border-bottom: 2px solid #f3f4f6; padding-bottom: 15px; font-weight: 800; }
.rec-item { display: flex; gap: 15px; align-items: center; text-decoration: none; margin-bottom: 20px; transition: transform 0.2s ease; }
.rec-item:hover { transform: translateX(5px); }
.rec-item:last-child { margin-bottom: 0; }
.rec-thumb { width: 75px; height: 65px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #e5e7eb; }
.rec-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec-title { font-size: 0.95rem; font-weight: 600; color: #1f2937; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-date { font-size: 0.8rem; color: #9ca3af; }

.article-page-container {
    width: 100%;
    box-sizing: border-box;
}

.article-main, .sidebar-widget {
    min-width: 0; 
    word-break: break-word;
}

@media(max-width: 600px) {
    .search-row { 
        flex-direction: column; 
    }
    .search-input { 
        width: 100%; 
        box-sizing: border-box; 
    }
    .search-btn { 
        width: 100%; 
        padding: 12px; 
    }
    
    .sort-row { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 10px; 
    }
    .sort-select { 
        width: 100%; 
        box-sizing: border-box; 
    }
    
    .filter-section { 
        padding: 15px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
}