/* 画像ギャラリーの親コンテナ */
.image-gallery {
    display: flex;
    flex-wrap: wrap; /* 折り返しを許可 */
    gap: 20px;       /* 画像間の余白 */
    margin: 20px 0;
    align-items: flex-start;
}

/* 各画像アイテムの基本設定 */
.image-item {
    flex: 1;             /* 可能な限り均等に広がる */
    min-width: 200px;    /* これ以上小さくなると改行する */
    max-width: 250px;    /* 1枚のときに間延びしないよう最大幅を制限 */
/*    max-width: 350px;    *//* 1枚のときに間延びしないよう最大幅を制限 */
}

/* 1枚だけの時はもう少し小さくしたい場合（任意） */
/*
.image-gallery:has(.image-item:nth-child(1):last-child) .image-item {
    max-width: 250px;
}
*/

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.image-caption {
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
    text-align: center;
    line-height: 1.4;
}

div.category {
    display: inline-block;
    border: none;
    border-radius: 4px;
    background-color: #ddd;
    box-sizing: border-box;
    width: fit-content;
    font-size: 0.8rem;
    /*font-weight: bold;*/
    color: #666;
    padding: 2px 5px;
    margin: 0 5px 0 0;
}