/* flexラップ */
.flex-block {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* 投稿カード */
.item {
    width: calc(33.333% - 20px);
    box-sizing: border-box;
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
}
.item:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

/* アイキャッチ */
.item img {
    width: 100%;
    display: block;
    height: 200px;
    object-fit: cover;
}

/* ホバーで情報表示 */
.hover-parent {
    position: relative;
    overflow: hidden;
    padding: 10px; /* 写真の周りに空白 */
    background: #fff; /* 白背景で余白が見える */
    box-sizing: border-box;
}
.hover-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    font-size: 14px;
    line-height: 1.5;
    text-align: center; /* 中央揃え */
}
.hover-parent:hover .hover-mask {
    opacity: 1;
    transform: translateY(-2px);
}
.hover-parent:hover .hover-mask {
    opacity: 1;
    transform: translateY(-2px);
}

/* 建物詳細 */
.building-detail {
    padding: 12px;
}
.building-detail p.building-age {
    font-size: 13px;
    color: #555;
    margin: 0 0 8px 0;
}
.building-detail ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.building-detail ul li {
    font-size: 12px;
    background: #f8f8f8;
    color: #333;
    padding: 3px 8px;
    border-radius: 4px;
}

/* 詳細ボタン */
.btn_works_detail {
    margin-top: 10px;
    text-align: center; /* 中央揃え */
}

.btn_works_detail a {
    display: inline-block; /* これをブロックに変更 */
    width: 100%;           /* カード幅いっぱいに */
    box-sizing: border-box; /* padding込みで幅調整 */
    padding: 3px 8px;       /* 高さは調整 */
    background: #F5F5F5;
    color: #333;
    text-decoration: none;
    border-radius: 0 0 6px 6px; /* 下だけ丸めるとカードに馴染む */
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn_works_detail a:hover {
    background: #333;
}

/* レスポンシブ */
@media (max-width:1024px){
    .item { width: calc(50% - 20px); }
}
@media (max-width:768px){
    .item { width: 100%; }
}

/* ページネーション */
.pagination {
    margin-top: 40px;
}
.pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
}
.pagination ul li a {
    padding: 7px 14px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}
.pagination ul li a:hover {
    background: #333;
    color: #fff;
}

.projects-category-buttons {
    text-align: center;
    margin: 30px 0;
}
.projects-category-buttons .cat-btn {
    display: inline-block;
    padding: 8px 20px;
    margin: 5px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #333;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.projects-category-buttons .cat-btn.active,
.projects-category-buttons .cat-btn:hover {
    background: #333;
    color: #fff;
}