/* =========================================================
   0. 共通：ページ上部のヒーロー領域
========================================================= */

/* HERO（投稿 / 固定 / アーカイブ 共通） */
.page-featured-header,
.eyecatch-hero {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

/* 黒い下線の原因を排除 */
.page-featured-header,
.page-featured-header::after,
.eyecatch-hero::after {
    border: none;
}

/* オーバーレイ */
.page-featured-overlay,
.eyecatch-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2;
}

/* HERO タイトル（共通） */
.hero-title,
.page-featured-title {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 40px 0;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
    text-align: center;
    color: #fff;
}

/* =========================================================
   1. 投稿ページ（single）
========================================================= */

/* HERO タイトル修正 */
.single .hero-title {
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    writing-mode: horizontal-tb !important;
}

/* アイキャッチ全幅（横の白余白除去） */
.single .eyecatch-hero,
.single .page-featured-header {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
}

/* 投稿本文のズレ修正 */
.single .content-area,
.single .entry-content,
.single .content-with-sidebar {
    margin-top: 0 !important;
    padding: 20px !important;
}

/* single の h1 の黒線削除 */
.single h1 {
    border: none !important;
}

/* =========================================================
   2. アーカイブ / カテゴリー
========================================================= */

/* HERO タイトル */
.archive .page-featured-title,
.category .page-featured-title,
.blog .page-featured-title {
    margin: 0 0 40px 0;
}

/* 黒線削除（元のCSSの border-bottom が原因） */
.archive h1,
.category h1,
.blog h1,
.search h1 {
    border: none;
}

/* ニュース一覧（カード型） */
.news-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* グリッド */
.news-posts.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.news-item {
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.news-item:hover {
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.news-item a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.news-thumb img {
    width: 100%;
    height: auto;
}

.news-content {
    padding: 12px 16px;
}

.news-content h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.news-content time {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 6px;
    display: block;
}

/* リストレイアウト */
.news-posts.list-layout {
    display: block;
}

.news-posts.list-layout .news-item a {
    flex-direction: row;
    gap: 20px;
}

.news-posts.list-layout .news-thumb {
    width: 200px;
    flex-shrink: 0;
}

.news-posts.list-layout .news-content {
    flex-grow: 1;
    padding: 8px 0;
}

/* =========================================================
   3. スマホ
========================================================= */
@media (max-width: 768px) {
    .page-featured-header,
    .eyecatch-hero {
        height: 160px;
    }

    .hero-title,
    .page-featured-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }
}
