#container{
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列に均等に分割 */
    gap: 0.5em; /* グリッドアイテム間の間隔 */
    margin: 0 auto; /* 中央揃え */
    max-width: 900px;
    padding: 0.5em;
}

.article_link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article_link:hover {
    text-decoration: none; /* ホバー時も下線なしを明示的に指定 */
}

.article_link:hover .article_list {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.article_list {
    background-color: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail{
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;/*トリミング*/
}

.article_list p {
    padding: 0.5em;
    color: #333; 
    margin: 0;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.4em; /* 行の高さに応じて調整 */
    line-height: 1.4; /* 行の高さを設定 */
    margin: 0;
}



/* タブレット用 */
@media screen and (max-width: 900px) {
    #container {
        grid-template-columns: repeat(2, 1fr); /* 2列に変更 */
        width: 100%;
    }
}

/* スマートフォン用 */
@media screen and (max-width: 600px) {
    #container {
        grid-template-columns: 1fr; /* 1列に変更 */
        width:100%;
    }

    .article_list {
        margin-bottom: 0em;
    }
}
