/* Articles List Container */
.articles-list-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.page-description {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters */
.articles-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.filter-group select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    cursor: pointer;
    appearance: none;
    min-width: 150px;
    transition: border-color 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: #4caf50;
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.article-card.featured {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
}

.article-card.featured:hover {
    transform: translateY(-4px);
}

/* Article Badge */
.article-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #4caf50;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

/* Article Image */
.article-image {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    overflow: hidden;
}

.article-card.featured .article-image {
    height: 100%;
    min-height: 320px;
}

.article-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    font-size: 48px;
}

.article-card.featured .article-placeholder {
    font-size: 64px;
}

.article-placeholder span {
    opacity: 0.5;
}

/* Article Content */
.article-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card.featured .article-content {
    padding: 32px;
    justify-content: center;
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.category {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category.json { background: #e3f2fd; color: #1565c0; }
.category.api { background: #fff3e0; color: #e65100; }
.category.web { background: #fce4ec; color: #c2185b; }
.category.security { background: #ffebee; color: #c62828; }
.category.best-practices { background: #f3e5f5; color: #6a1b9a; }

.article-date {
    font-size: 12px;
    color: #999;
}

/* Article Title */
.article-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-card.featured .article-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.article-title a:hover {
    color: #009688;
}

/* Article Excerpt */
.article-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
}

.article-card.featured .article-excerpt {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Article Footer */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.article-card.featured .article-footer {
    border-top: none;
    padding-top: 0;
}

.read-time {
    font-size: 12px;
    color: #999;
}

.read-more {
    color: #009688;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.read-more:hover {
    color: #00796b;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 48px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-link:hover:not(.disabled) {
    border-color: #4caf50;
    color: #4caf50;
}

.pagination-link.active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: #999;
    font-size: 14px;
    padding: 0 4px;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #009688 0%, #00796b 100%);
    border-radius: 8px;
    padding: 48px;
    text-align: center;
    color: white;
    margin-bottom: 48px;
}

.newsletter-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.newsletter-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    outline: none;
}

.newsletter-form button {
    padding: 12px 24px;
    background: #333;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-form button:hover {
    background: #444;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #009688;
    color: white;
    padding: 10px 20px;
    border-radius: 3px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .article-card.featured {
        grid-template-columns: 1fr;
    }

    .article-card.featured .article-image {
        height: 200px;
        min-height: auto;
    }

    .article-card.featured .article-placeholder {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .articles-list-container {
        margin: 20px auto;
        padding: 0 16px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-description {
        font-size: 14px;
    }

    .articles-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: space-between;
    }

    .filter-group select {
        flex: 1;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .newsletter-section {
        padding: 32px 24px;
    }

    .newsletter-content h2 {
        font-size: 22px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }

    .pagination {
        gap: 4px;
    }

    .pagination-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 20px;
    }

    .article-card.featured .article-content {
        padding: 24px;
    }

    .article-title {
        font-size: 16px;
    }

    .article-card.featured .article-title {
        font-size: 22px;
    }

    .article-excerpt {
        font-size: 13px;
    }

    .article-card.featured .article-excerpt {
        font-size: 14px;
    }
}

/* Animation for filtering */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card.hidden {
    display: none;
}

.article-card.visible {
    animation: fadeIn 0.3s ease-out;
}