/* ===== Trading Article List Page ===== */

/* ===== Banner ===== */
.tal-banner {
    background-color: #1a1a2e;
    background-image: url(../images/edu/banners/banner-article.webp);
    background-size: cover;
    background-position: center;
    min-height: 327px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0 40px;
    text-align: center;
    color: #fff;
}

.tal-banner-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tal-banner-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Main Layout ===== */
.tal-content {
    padding: 40px 0 78px;
    background: #fcfcfc;
}

.tal-layout {
    display: grid;
    grid-template-columns: 1fr 408px;
    grid-template-rows: auto 1fr;
    gap: 24px;
    align-items: start;
}

/* Filter bar: search + categories — desktop sits in right column */
.tal-filter-bar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Left: Article List ===== */
.tal-main {
    grid-column: 1;
    grid-row: 1 / 3;
    min-width: 0;
}

.tal-article-list {
    border-radius: 8px;
    overflow: hidden;
    gap: 10px;
    display: flex;
    flex-direction: column;
}

/* Single Article Item */
.tal-article-item {
    display: flex;
    gap: 24px;
    padding: 9px 28px 11px 28px;
}

.tal-article-item:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.tal-article-thumb {
    width: 280px;
    height: 166px;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}

.tal-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.tal-article-item:hover .tal-article-thumb img {
    transform: scale(1.05);
}

.tal-article-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tal-article-title {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.tal-article-item:hover .tal-article-title {
    color: #DD0000;
}

.tal-article-desc {
    font-size: 16px;
    color: #888888;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 10px 0;
}

.tal-article-meta {
    display: flex;
    align-items: center;
    gap: 19px;
    flex-wrap: wrap;
}

.tal-article-date {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    color: #818181;
}

.tal-article-date img {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.tal-article-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tal-article-tag {
    font-size: 16px;
    color: #DC0000;
    transition: opacity 0.2s;
}

.tal-article-tag:hover {
    opacity: 0.7;
}

/* Empty */
.tal-empty {
    padding: 60px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Loading */
.tal-loading {
    padding: 60px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ===== Pagination ===== */
.tal-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 40px 0 10px;
}

.tal-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #D2D2D2;
    background: #fff;
    color: #999999;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tal-page-btn:hover {
    border-color: #DC0000;
    color: #FFFFFF;
}

.tal-page-btn.active {
    background: #DC0000;
    border-color: #DC0000;
    color: #FFFFFF;
}

.tal-page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.tal-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #999;
    font-size: 16px;
    letter-spacing: 2px;
}

/* ===== Right Sidebar ===== */
.tal-sidebar {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* Search Box */
.tal-search-box {
    display: flex;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
    align-items: center;
}

.tal-search-icon {
    width: 18px;
    height: 18px;
    margin-left: 16px;
    flex-shrink: 0;
    color: #bbb;
}

.tal-search-input {
    flex: 1;
    padding: 12px 10px;
    border: none;
    font-size: 18px;
    color: #333;
    outline: none;
    font-family: inherit;
}

.tal-search-input::placeholder {
    color: #bbb;
}

.tal-search-btn {
    padding: 12px 24px;
    background: #DC0000;
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.tal-search-btn:hover {
    background: #B30000;
}

/* Sidebar Card */
.tal-sidebar-card {
    background: #fcfcfc;
    border-radius: 8px;
    padding: 20px 0;
}

.tal-sidebar-title {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin-bottom: 36px;
    padding-left: 14px;
    border-left: 6px solid #DC0000;
}

/* Category Tags */
.tal-cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tal-cat-tag {
    display: inline-block;
    padding: 8px 20px;
    background: #F3F6F7;
    border-radius: 4px;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.tal-cat-tag:hover,
.tal-cat-tag.active {
    background: #DC0000;
    border-color: #DC0000;
    color: #fff;
}

/* Keyword Tags */
.tal-keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    max-height: 280px;
    overflow-y: auto;
}

.tal-keyword-tag {
    display: inline-block;
    padding: 6px 16px;
    background: #F3F6F7;
    border-radius: 4px;
    font-size: 18px;
    color: #666666;
    transition: all 0.2s;
}

.tal-keyword-tag:hover,
.tal-keyword-tag.active {
    border-color: #DC0000;
    color: #DC0000;
}

/* Keyword tags scrollbar */
.tal-keyword-tags::-webkit-scrollbar {
    width: 7px;
}

.tal-keyword-tags::-webkit-scrollbar-thumb {
    background: #DD0000;
}

/* Activity Banner */
.tal-activity-banner {
    overflow: hidden;
    position: relative;
}

.tal-activity-slide {
    display: none;
}

.tal-activity-slide.active {
    display: block;
    animation: talFadeIn 0.6s ease;
}

@keyframes talFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tal-activity-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.tal-activity-dots {
    position: absolute;
    bottom: 10px;
    left: 12px;
    display: flex;
    gap: 3px;
    z-index: 2;
}

.tal-activity-dot {
    width: 24px;
    height: 2px;
    background: #FEFEFE;
    border-radius: 1px;
    transition: background 0.3s;
}

.tal-activity-dot.active {
    background: #DD0000;
}

/* Hot Articles */
.tal-hot-list {
    display: flex;
    flex-direction: column;
}

.tal-hot-item {
    display: flex;
    gap: 14px;
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.tal-hot-item:last-child{
    border-bottom: none;
}

.tal-hot-thumb {
    width: 145px;
    height: 81px;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}

.tal-hot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tal-hot-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tal-hot-title {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
    font-weight: bold;
}

.tal-hot-item:hover .tal-hot-title {
    color: #DC0000;
}

.tal-hot-item:hover {
    background: #FFFFFF;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.tal-hot-date {
    font-size: 14px;
    color: #666666;
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {

    /* Banner */
    .tal-banner {
        min-height: auto;
        padding: 20vw 0 6vw;
    }

    .tal-banner-title {
        font-size: 6vw;
    }

    .tal-banner-subtitle {
        font-size: 3.5vw;
    }

    /* Layout: single column, filter-bar first */
    .tal-content {
        padding: 4vw 0 8vw;
    }

    .tal-layout {
        display: flex;
        flex-direction: column;
        gap: 4vw;
    }

    .tal-filter-bar {
        order: -1;
        gap: 3vw;
        max-width: 100%;
        overflow: hidden;
    }

    .tal-main {
        order: 0;
    }

    .tal-sidebar {
        order: 1;
        gap: 4vw;
    }

    /* Article Item: keep horizontal layout */
    .tal-article-list {
        border-radius: 2vw;
    }

    .tal-article-item {
        padding: 4vw 4vw 4vw 0;
        gap: 3vw;
    }

    .tal-article-thumb {
        width: 30vw;
        height: 20vw;
        border-radius: 1.5vw;
    }

    .tal-article-title {
        font-size: 3.8vw;
    }

    .tal-article-desc {
        font-size: 3.2vw;
        margin: 1.5vw 0;
        -webkit-line-clamp: 1;
    }

    .tal-article-meta {
        gap: 2vw;
    }

    .tal-article-date {
        font-size: 3vw;
    }

    .tal-article-date img {
        width: 3vw;
        height: 3vw;
    }

    .tal-article-tag {
        font-size: 3vw;
    }

    /* Pagination */
    .tal-pagination {
        padding: 6vw 0 2vw;
        gap: 1.5vw;
    }

    .tal-page-btn {
        width: 9vw;
        height: 9vw;
        font-size: 3.2vw;
    }

    /* Search Box */
    .tal-search-box {
        border-radius: 2vw;
    }

    .tal-search-icon {
        width: 4vw;
        height: 4vw;
        margin-left: 3vw;
    }

    .tal-search-input {
        padding: 3vw 2.5vw;
        font-size: 3.5vw;
    }

    .tal-search-btn {
        padding: 3vw 5vw;
        font-size: 3.5vw;
    }

    /* Sidebar Cards */
    .tal-sidebar-card {
        padding: 4vw 4vw 4vw 0;
        border-radius: 2vw;
    }

    .tal-sidebar-title {
        font-size: 4.2vw;
        margin-bottom: 3vw;
        padding-left: 3vw;
        border-left-width: 1vw;
    }

    /* Category Tags: horizontal scroll, single row */
    .tal-cat-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 2.5vw;
        padding-bottom: 1vw;
    }

    .tal-cat-tags::-webkit-scrollbar {
        display: none;
    }

    .tal-cat-tag {
        padding: 2vw 4vw;
        font-size: 3.2vw;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Keyword Tags: compact */
    .tal-keyword-tags {
        max-height: 30vw;
        gap: 2vw;
    }

    .tal-keyword-tag {
        padding: 1.5vw 3vw;
        font-size: 3vw;
    }

    .tal-keyword-tags::-webkit-scrollbar {
        width: 4px;
    }

    /* Activity Banner */
    .tal-activity-banner {
        border-radius: 2vw;
    }

    /* Hot Articles: show only first 4 on mobile */
    .tal-hot-item:nth-child(n+5) {
        display: none;
    }

    .tal-hot-item {
        padding: 2.5vw 0;
        gap: 3vw;
    }

    .tal-hot-thumb {
        width: 24vw;
        height: 16vw;
        border-radius: 1.5vw;
    }

    .tal-hot-title {
        font-size: 3.4vw;
    }

    .tal-hot-date {
        font-size: 2.8vw;
    }
}