/* your-child-theme/css/news-single.css */

/* 記事全体のコンテナ */
.news-single {
    max-width: 800px; /* 少し狭くして読みやすく */
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff; /* 明るい背景 */
    border-radius: 12px; /* 角を丸く */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* 影を強調し、少し立体的に */
    font-family: 'Noto Sans JP', sans-serif; /* 読みやすいフォントに */
    color: #333;
}

/* 記事ヘッダー */
.news-header {
    margin-bottom: 40px;
    text-align: center;
}

/* ヒーローセクション（アイキャッチ画像とタイトル） */
.news-hero {
    position: relative;
    margin-bottom: 30px;
    overflow: hidden; /* 画像の角丸に対応 */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* ヒーロー画像にも影 */
}

.news-hero-image {
    width: 100%;
    height: 380px; /* 高さを固定して見栄えを良く */
    object-fit: cover; /* 画像の縦横比を維持しつつカバー */
    display: block;
}

.news-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px 25px; /* パディングを調整 */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 30%, rgba(0, 0, 0, 0.1)); /* グラデーションを濃く、下部をより不透明に */
    color: #fff;
    box-sizing: border-box;
    text-align: left; /* 左寄せに変更 */
}

/* 記事タイトル */
.entry-title.news-title {
    font-size: 1.5em; /* タイトルを大きく */
    font-weight: 800; /* さらに太字に */
    color: #fff;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.7); /* 影を濃くして読みやすく */
}

/* 投稿日時 */
.news-post-date {
    font-size: 1.1em;
    color: #f0f0f0; /* 少し明るい白 */
    opacity: 0.95;
    margin-bottom: 0;
    letter-spacing: 0.5px;
}

/* 記事本文のラッパー */
.news-article-body {
    padding: 0 20px; /* 左右に少しパディング */
    color: #333;
    line-height: 1.9; /* 行間を広げて読みやすく */
    font-size: 1.05em; /* フォントサイズを微調整 */
}

/* 記事本文内の見出し */
.news-article-body h2 {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--primary-blue);;
    border-bottom: 4px solid var(--primary-blue-lt);; /* 柔らかい下線 */
    padding-bottom: 12px;
    margin-top: 3em;
    margin-bottom: 1.5em;
    position: relative;
    text-align: center; /* 中央寄せに */
    letter-spacing: 1px;
    display: flex; /* アイコンとテキストを中央揃えにするため */
    align-items: center;
    justify-content: center;
}
.news-article-body h2::before {
    /* content: '✨'; */
    display: inline-block;
    margin-right: 12px;
    font-size: 0.9em;
    vertical-align: middle;
}
/* 最初に出現するh2は「新サービス開始」なので特別なアイコンに */
/* .news-article-body h2:first-of-type::before {
    content: '📣';
} */


.news-article-body h3 {
    font-size: 1.8em;
    font-weight: 600;
    color: #007bff; /* サブカラーを使用 */
    border-left: 6px solid #007bff; /* 左に強調線 */
    padding-left: 18px;
    margin-top: 2.5em;
    margin-bottom: 1.2em;
    letter-spacing: 0.5px;
}
.news-article-body h3::before {
    content: '💡'; /* アイコンを追加 */
    display: inline-block;
    margin-right: 10px;
    font-size: 0.8em;
    vertical-align: middle;
}


.news-article-body h4 {
    font-size: 1.4em;
    font-weight: 600;
    color: #555;
    margin-top: 2em;
    margin-bottom: 1em;
    border-bottom: 1px dashed #e0e0e0;
    padding-bottom: 5px;
}

/* 段落 */
.news-article-body p {
    margin-bottom: 1.8em;
    word-break: break-word;
}
.news-article-body p strong {
    color: #FF5722; /* 強調したい部分に明るい色 */
    font-weight: 700;
    background-color: #fff3e0; /* 背景色で目立たせる */
    padding: 2px 5px;
    border-radius: 4px;
}

/* リスト */
.news-article-body ul,
.news-article-body ol {
    margin: 2em 0 2em 25px; /* 上下の余白を多めに */
    padding: 0;
    list-style-position: outside;
}

.news-article-body ul li {
    /* list-style-type: '🐠'; */ /* アクティビティに合わせたカスタムアイコン、または絵文字直接入力 */
    padding-left: 15px; /* アイコン分のスペースを確保 */
    margin-bottom: 1em;
    position: relative;
    font-size: 1.05em;
}
/* ul li のカスタム絵文字アイコン（例：元のテキストにあるものを活用） */
.news-article-body ul li:nth-of-type(1)::before { content: '🐢'; position: absolute; left: 0; top: 0; }
.news-article-body ul li:nth-of-type(2)::before { content: '🌳'; position: absolute; left: 0; top: 0; }
.news-article-body ul li:nth-of-type(3)::before { content: '♨️'; position: absolute; left: 0; top: 0; }
.news-article-body ul li:nth-of-type(4)::before { content: '🆕'; position: absolute; left: 0; top: 0; } /* もしあれば */


.news-article-body ol li {
    margin-bottom: 1em;
    font-size: 1.05em;
}


/* 記事内画像 */
.news-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2.5em auto; /* 上下の余白を広げ、中央寄せ */
    border-radius: 10px; /* 角を丸く */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* 影を強調 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-content img:hover {
    transform: translateY(-5px); /* ホバーで少し浮き上がる */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 引用ブロック */
.news-article-body blockquote {
    border-left: 8px solid #10A37F; /* ブランドカラーの強調線 */
    padding: 20px 25px;
    margin: 3em 0;
    background-color: #e8f5e9; /* 柔らかい背景色 */
    font-style: italic;
    color: #444;
    border-radius: 0 10px 10px 0; /* 右側だけ角丸 */
    box-shadow: inset 3px 0 8px rgba(0, 0, 0, 0.05); /* 内部にも影 */
}
.news-article-body blockquote p {
    margin-bottom: 0.8em;
}
.news-article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* コードブロック */
.news-article-body pre {
    background-color: #f8f8f8;
    border: 1px solid #eee;
    padding: 1.5em;
    margin: 2.5em 0;
    overflow-x: auto;
    border-radius: 8px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.95em;
    line-height: 1.6;
}
.news-article-body code {
    font-family: inherit;
    background-color: #e0e0e0;
    padding: 0.2em 0.5em;
    border-radius: 4px;
}

/* ページネーション（wp_link_pages） */
.page-links {
    margin-top: 3.5em;
    text-align: center;
    font-size: 1.1em;
    color: #777;
}
.page-links .post-page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
}
.page-links .post-page-numbers:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
}
.page-links .post-page-numbers.current {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    font-weight: bold;
}

/* 記事フッター */
.news-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px dashed #e0e0e0; /* 点線を強調 */
    text-align: center;
}

/* 「今すぐトップページでチェック！」ボタン */
.news-call-to-action {
    margin-top: 30px;
    text-align: center;
}

.button-go-to-top {
    display: inline-flex; /* Flexboxでアイコンとテキストを中央揃え */
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10A37F 0%, #17c671 100%); /* グラデーション背景 */
    color: #fff;
    padding: 15px 35px;
    border-radius: 50px; /* pill型 */
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 700;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(16, 163, 127, 0.4); /* 影を強調 */
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.button-go-to-top .button-icon {
    margin-right: 12px;
    font-size: 1.3em;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.4s ease;
}

.button-go-to-top:hover {
    transform: translateY(-5px); /* ホバーで少し浮き上がる */
    box-shadow: 0 12px 30px rgba(16, 163, 127, 0.6);
    background: linear-gradient(135deg, #0b7e60 0%, #129d5b 100%); /* ホバーでグラデーションの色を微調整 */
}
.button-go-to-top:hover .button-icon {
    transform: rotate(15deg) scale(1.1); /* ホバーでアイコンを回転・拡大 */
}


/* WordPressのデフォルトボタンブロックのスタイル */
.wp-block-button {
    margin-top: 30px; /* 上部に余白 */
    margin-bottom: 30px; /* 下部に余白 */
    text-align: center; /* 中央寄せ */
}

.wp-block-button__link {
    display: inline-flex; /* Flexboxでアイコンとテキストを中央揃え */
    align-items: center;
    justify-content: center;
    background: var(--primary-btn);
    color: #fff !important;
    padding: 15px 35px;
    border-radius: 50px; /* pill型 */
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 700;
    transition: all 0.4s ease;
    box-shadow: 0 4px 8px rgba(255, 102, 69, 0.4);
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: none; /* 内部のシャドウは一旦リセット */
}

.wp-block-button__link:hover {
    transform: translateY(-5px); /* ホバーで少し浮き上がる */
    box-shadow: 0 4px 8px rgba(255, 130, 101, 0.4);
    background: var(--secondary-btn); /* ホバーでグラデーションの色を微調整 */
    color: #fff; /* ホバーで文字色が変わらないように */
}

/* もしボタンにアイコンを追加したい場合（WordPressブロックエディタの機能外で） */
/* .wp-block-button__link::before {
    content: '🚀'; 
    margin-right: 12px;
    font-size: 1.3em;
    line-height: 1;
} */

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .wp-block-button__link {
        font-size: 1.1em;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .wp-block-button__link {
        font-size: 1em;
        padding: 10px 20px;
    }
}


/* レスポンシブ対応 */
@media (max-width: 768px) {
    .news-single {
        margin: 20px auto;
        padding: 20px;
    }
    .entry-title.news-title {
        font-size: 2.2em;
        margin-bottom: 10px;
    }
    .news-post-date {
        font-size: 1em;
    }
    .news-hero-image {
        height: 280px;
    }
    .news-hero-overlay {
        padding: 25px 20px 15px;
    }
    .news-article-body {
        padding: 0 10px;
        font-size: 1em;
    }
    .news-article-body h2 {
        font-size: 1.8em;
    }
    .news-article-body h3 {
        font-size: 1.5em;
    }
    .button-go-to-top {
        font-size: 1.1em;
        padding: 12px 25px;
    }
    .button-go-to-top .button-icon {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .news-single {
        padding: 15px;
        margin: 15px auto;
        border-radius: 8px;
    }
    .entry-title.news-title {
        font-size: 1.8em;
    }
    .news-post-date {
        font-size: 0.9em;
    }
    .news-hero-image {
        height: 200px;
    }
    .news-hero-overlay {
        padding: 15px;
    }
    .news-article-body {
        padding: 0 5px;
        font-size: 0.95em;
    }
    .news-article-body h2 {
        font-size: 1.2em;
        margin-top: 2.5em;
        margin-bottom: 1em;
    }
    .news-article-body h3 {
        font-size: 1.3em;
        margin-top: 2em;
        margin-bottom: 0.8em;
        padding-left: 10px;
    }
    .button-go-to-top {
        font-size: 1em;
        padding: 10px 20px;
    }
    .button-go-to-top .button-icon {
        font-size: 1.1em;
        margin-right: 8px;
    }
    .news-article-body ul li {
        padding-left: 12px;
    }
    .news-article-body ul li::before {
        font-size: 0.9em;
    }

}

@media (max-width: 320px) {
    .news-article-body h2 {
        font-size: 1.0em;
    }    
}
