/* ========================================
   Article Item
   ======================================== */

/* --- 共通 --- */
.article-item {
    display: flex;
    color: #333;
    text-decoration: none;
    transition: color 0.15s;
}

.article-item:hover {
    color: #000;
}

.article-item:hover .article-item--title {
    text-decoration: none;
}

.article-item--thumb {
    flex-shrink: 0;
    overflow: hidden;
    background: #e0e0e0;
}

.article-item--thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-item--thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
}

.article-item--body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.article-item--title {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.6;
    color: #333;
}

.article-item--tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ========================================
   ラッパー: グリッド（カード表示）
   ======================================== */
.article-item-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-item-grid .article-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.article-item-grid .article-item--thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}

.article-item-grid .article-item--body {
    padding: 12px 0 8px;
    flex: 1;
}

.article-item-grid .article-item--title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   ラッパー: リスト表示
   ======================================== */
.article-item-list {
    display: flex;
    flex-direction: column;
}

.article-item-list .article-item {
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.article-item-list .article-item:last-child {
    border-bottom: none;
}

.article-item-list .article-item--thumb {
    width: 144px;
    aspect-ratio: 16 / 9;
}

.article-item-list .article-item--title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-thumbtack svg{
    position: absolute;
}

.article-item-list .article-thumbtack{
    display: none;
}

/* --- レスポンシブ --- */
@media (max-width: 900px) {
    .article-item-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-item--title {
        font-size: 12px;
    }

    .article-thumbtack svg{
        width: 24px;
        height: 24px;
    }

    .article-item-list .article-thumbtack{
        display: none;
    }
}
