/* ===== 投稿カードグリッド ===== */
.post-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 固定ページ内の投稿カードグリッドを全幅表示・中央揃え */
.page-body:has(.post-cards-grid) {
    max-width: 100%;
    width: 100%;
}

.page-body .post-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* :hasが効かない場合の代替案 */
.post-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: calc(100vw - 40px);
    max-width: 1200px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 40px 0;
}

/* 投稿カード */
.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* カード画像 */
.post-card-image {
    position: relative;
    padding-bottom: 60%;
    overflow: hidden;
    background: #f0f0f0;
}

.post-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

/* カードコンテンツ */
.post-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.post-card-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-title a:hover {
    color: #009944;
}

.post-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    color: #009944;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.post-card-link:hover {
    color: #00B968;
    padding-left: 5px;
}

/* タブレット表示 */
@media screen and (max-width: 1024px) {
    .post-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* スマートフォン表示 */
@media screen and (max-width: 767px) {
    .post-cards-grid,
    .page-body .post-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        width: calc(100% - 40px);
        left: auto;
        transform: none;
        margin: 40px auto;
    }
    
    .post-card-content {
        padding: 20px;
    }
    
    .post-card-title {
        font-size: 1.1rem;
    }
    
    .post-card-excerpt {
        font-size: 0.9rem;
    }
}