/* Article Listing - Filter Bar */
.article-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.article-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

/* Switch toggle filter */
.article-filter-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-weight: normal;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 12px 5px 8px;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.article-filter-switch:hover {
    border-color: #aaa;
}

.article-filter-switch.active {
    border-color: #337ab7;
    background: #f0f7ff;
}

.switch-track {
    display: inline-block;
    width: 36px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
    position: relative;
    transition: background 0.25s ease;
    flex-shrink: 0;
}

.switch-thumb {
    display: block;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.article-filter-switch.active .switch-track {
    background: #337ab7;
}

.article-filter-switch.active .switch-thumb {
    transform: translateX(16px);
}

.switch-label {
    margin-left: 6px;
    font-size: 13px;
    color: #555;
}

.article-filter-switch.active .switch-label {
    color: #333;
    font-weight: 600;
}

.article-search-box {
    min-width: 220px;
    max-width: 300px;
}

/* Results Count */
.article-results-count {
    margin-bottom: 15px;
    font-size: 14px;
    color: #777;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 991px) {
    .article-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .article-search-box {
        max-width: 100%;
    }
}

/* Article Card */
.article-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-card-no-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #bbb;
}

.article-card-body {
    padding: 15px;
}

/* Type Badges */
.article-type-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
    margin-right: 4px;
}

.badge-article {
    background: #5bc0de;
    color: #fff;
}

.badge-express {
    background: #f0ad4e;
    color: #fff;
}

.badge-podcast {
    background: #5cb85c;
    color: #fff;
}

.badge-video {
    background: #d9534f;
    color: #fff;
}

.badge-english,
.badge-french {
    background: #337ab7;
    color: #fff;
}

.badge-story {
    background: #6f42c1;
    color: #fff;
}

.badge-default {
    background: #777;
    color: #fff;
}

.badge-exercise {
    background: #f0ad4e;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
}

/* Card Title & Content */
.article-card-title {
    margin: 10px 0 8px;
    font-size: 16px;
    line-height: 1.3;
}

.article-card-title a {
    color: #333;
    text-decoration: none;
}

.article-card-title a:hover {
    color: #337ab7;
}

.article-card-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

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

.article-card-meta span {
    margin-right: 12px;
}

.article-card-meta i {
    margin-right: 3px;
}

/* Pagination */
.article-listing .pagination {
    margin-top: 0;
}

/* Loading */
.my-4 {
    margin-top: 30px;
    margin-bottom: 30px;
}
