﻿.article-flex {
    display: flex;
}

    .article-flex .thumb {
        flex: 1 1 0;
        max-width: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .article-flex .thumb img {
            width: 100%;
            height: auto;
            object-fit: cover;
            display: block;
        }

    .article-flex .info-block {
        flex: 1 1 0;
        max-width: 50%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        margin-left: 4px;
    }

.article .title-new {
    font-size: 16px;
    color: #333333;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: bold;
}

.article .tool_name {
    font-size: 14px;
    color: #1976D2;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: break-all;
    min-height: 2.8em; /* 2行高度，依字型大小微調 */
    line-height: 1.4em; /* 建議與設計一致 */
}

.mt-10 {
    margin-top: 10px !important;
}

html#scoped #Tools .article {
    width: calc((100% - 72px) / 3);
}

.articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.article {
    /* 不要設定固定高度，讓 JS 控制 */
    display: flex;
    flex-direction: column;
    height: auto;
}

.article-flex {
    display: flex;
    height: 100%;
    align-items: center;
}

    .article-flex .info-block {
        flex: 1 1 0;
        max-width: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-left: 4px;
    }

@media screen and (max-width: 800px) {
    html#scoped #Tools .article {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .article-flex .thumb,
    .article-flex .info-block {
        max-width: 50%;
    }

    .articles {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 1200px) {
    .articles {
        grid-template-columns: repeat(2, 1fr);
    }
}