/* 1.〜2. （変更なし：親コンテナとarticle幅） */
.site-main {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px;
    justify-content: flex-start;
    padding: 20px 0;
}
.site-main article {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    min-width: 300px;
    margin-bottom: 20px !important;
    box-sizing: border-box;
}

/* 3. GP内部のリセット：画像ファースト用の Flex配置 */
.inside-article {
    background: #1a1a1a !important;
    border: 1px solid rgba(243, 166, 140, 0) !important;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    padding: 0 !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex !important;
    flex-direction: column !important; /* 要素を縦並びに固定 */
    position: relative;
    top: 0;
}

/* 4. （変更なし：リセット） */
.entry-header, .entry-content, .entry-summary, .entry-meta {
    word-break: break-all;
    padding: 0 !important; 
    margin: 0 !important;
}

/* 5. 画像設定：画像がなくても「16:9のダミー・スペース」を確保する（ここが重要） */
.post-image {
    order: 1 !important; /* 1番目 */
    margin: 15px 15px 5px 15px !important; 
    line-height: 0;
    display: block !important;
    
    /* --- ここを追加：画像がない場合の「偽装」設定 --- */
    aspect-ratio: 16 / 9 !important; /* 箱自体に16:9の比率を持たせる */
    background-color: #262626 !important; /* 画像がない場合の背景色（暗いグレー） */
    border-radius: 8px !important;
    overflow: hidden; /* 画像がはみ出さないように */
    position: relative;
}

/* 画像そのものの設定：箱いっぱいに広げる */
.post-image img {
    width: 100% !important;
    height: 100% !important; /* autoではなく、箱の高さ（100%）に合わせる */
    object-fit: cover; /* 潰さずにトリミング */
    border-radius: 8px !important; 
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
    
    /* 画像がある時だけ、箱の背景（#262626）を隠す */
    position: absolute;
    top: 0;
    left: 0;
}

/* 6. タイトル（画像の次へ / 3行分の高さを確保） */
.entry-header {
    order: 2 !important; /* 2番目 */
    padding-top: 10px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-bottom: 8px !important; 
    
    /* 3行分の高さを予約（1.4em × 3） */
    min-height: calc(1.4em * 3) !important; 
    display: flex !important;
    flex-direction: column;
}
.entry-title, .entry-title a {
    color: #ffffff !important;
    font-size: 1.125rem !important;
    line-height: 1.4 !important;
    text-decoration: none;
    display: -webkit-box !important;
    -webkit-line-clamp: 3; /* 3行まで表示 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100% !important;
}

/* 7. カテゴリラベル（タイトルの次へ） */
.entry-meta {
    order: 3 !important; /* 3番目 */
    display: block !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-bottom: 15px !important; /* 抜粋との距離 */
    opacity: 0.8;
    transition: all 0.4s ease;
}
.entry-meta .posted-on, .entry-meta .byline { display: none !important; }
.entry-meta a {
    color: #f3a68c !important;
    border: 1px solid rgba(243, 166, 140, 0.5);
    padding: 2px 8px !important;
    border-radius: 4px;
    font-size: 0.75rem !important;
    text-decoration: none !important;
}

/* アイコン調整（変更なし） */
.gp-icon svg, .entry-meta svg, .entry-meta .gp-icon {
    width: 1em !important; height: 1em !important;
    fill: #f3a68c !important; color: #f3a68c !important;
}
.entry-meta a svg path { fill: currentColor !important; }

/* 8. 抜粋（一番下へ） */
.entry-summary {
    order: 4 !important; /* 4番目 */
    padding-left: 15px !important;
    padding-right: 15px !important;
    padding-bottom: 24px !important; 
}
.entry-summary p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #cccccc !important;
    margin: 0 !important;
}

/* 9. （変更なし：ホバーアクション） */
.inside-article:hover {
    top: -5px;
    background: #222222 !important;
    border: 1px solid rgba(243, 166, 140, 0.6) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(243, 166, 140, 0.15);
}
.inside-article:hover .post-image img { transform: scale(1.08) !important; }
.inside-article:hover .entry-meta { opacity: 1; }

/* スマホ対応（変更なし） */
@media (max-width: 768px) {
    .site-main article {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}