/* -------------------------
 * 基本設定と配色
 * ------------------------- */
:root {
    --white-primary: #FAFFFF;    /* 基本背景色 (白系) */
    --gray-primary: #DEE0DC;  /* 補助背景色 (グレー) */
    --black-primary: #1F1D1D;    /* 文字色、線色 (黒系) */
    --accent-primary: #B51510;   /* アクセント。キャラクターカラー (赤系) */
    --accent-secondary: #D98688; /* アクセントの補助 (ピンク系) */
}

/* -------------------------
 * 全体・リセット (★配色反転)
 * ------------------------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--accent-primary); /* ★背景を赤に */
    color: var(--white-primary);          /* ★文字を白に */
    line-height: 1.6; 
    font-size: 15px; 
    position: relative; 
    
    /* ★ Sticky Footer対応: 追加 */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 画面の高さいっぱいに広げる */
}

/* -------------------------
 * SVGノイズ (★ノイズ強化)
 * ------------------------- */
body::after {
    content: "";
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#noise); 
    opacity: 0.15; /* 0.05から0.15に変更 */
    z-index: 10000; 
    pointer-events: none; 
}


h1 { font-size: 36px; } 
h2 { font-size: 26px; } 
h3 { font-size: 22px; } 

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

/* ★ リンク色の調整 (赤背景用) */
a {
    color: var(--white-primary);
    text-decoration: underline; /* 白文字に下線 */
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--accent-secondary);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block; 
}

/* -------------------------
 * レイアウト・コンポーネント
 * ------------------------- */

.container {
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 30px; 
}

/* ヘッダー (★文字色変更) */
.site-header {
    /* ★ 修正: 常に黒背景・白線にする */
    background-color: var(--black-primary); 
    border-bottom: 1px solid var(--white-primary); 
    
    padding: 20px 0;
    position: sticky; 
    top: 0;
    z-index: 1000; 
    transition: background-color 0.3s ease, border-bottom 0.3s ease;
}
.site-header:hover,
.site-header.scrolled { 
    /* (元々黒背景だったので変更なし) */
    background-color: var(--black-primary); 
    border-bottom: 1px solid var(--white-primary); 
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-title {
    font-size: 24px; /* 少し大きくしてインパクトを */
    font-weight: bold;
    margin: 0;
    
    /* ★ 新規追加: インパクトのあるセリフ体を指定 */
    font-family: Georgia, "Times New Roman", Times, serif; 
    font-weight: 700; 
}

/* ★ 新規追加: .site-title 内のリンクスタイル */
.site-title a {
    color: var(--white-primary); 
    text-decoration: none; /* 下線を消す */
    transition: color 0.3s ease;
}
.site-title a:hover {
    color: var(--accent-secondary); /* ホバー色を追加 */
}

/* ★ 既存の .site-header:hover .site-title を .site-title a を含むセレクタに修正 */
.site-header:hover .site-title a,
.site-header.scrolled .site-title a {
    color: var(--white-primary); 
}

/* ★ ホバー時のホバー色（黒背景時）も定義 */
.site-header:hover .site-title a:hover,
.site-header.scrolled .site-title a:hover {
    color: var(--accent-secondary);
}

.site-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-nav li {
    display: inline-block;
    margin-left: 25px; 
}
.site-nav a {
    font-weight: 600;
    color: var(--white-primary); /* ★黒から白に変更 */
    text-decoration: none; /* ヘッダーのリンクには下線不要 */
    transition: color 0.3s ease;
    font-size: 15px; 
}
.site-header:hover .site-nav a,
.site-header.scrolled .site-nav a {
    color: var(--white-primary); 
}
.site-nav a:hover,
.site-nav a:focus {
    color: var(--accent-secondary); /* ホバー色はピンク系 */
    text-decoration: none;
}
.site-header:hover .site-nav a:hover,
.site-header.scrolled .site-nav a:hover {
    color: var(--accent-secondary); 
}


/* メインコンテンツ */
main {
    padding: 60px 0; 
    
    /* ★ Sticky Footer対応: 追加 */
    flex-grow: 1; /* main要素が残りの高さをすべて埋める */
}

/* ヒーローセクション (★ 白背景・黒文字に変更) */
.hero-section {
    background-color: transparent; /*var(--white-primary); */
    color: var(--white-primary); /* ★文字色を黒に */
    padding: 160px 300px 190px; 
    text-align: center;
    margin-bottom: 60px; 
    /* border と box-shadow を削除 (べた塗り感) */
    position: relative; 
    z-index: 1;
}

/* ★ 修正: ヒーローセクションのモバイル対応 */
@media (max-width: 992px) {
    .hero-section {
        /* タブレットサイズでは少し狭める */
        padding-left: 150px; 
        padding-right: 150px;
    }
}
@media (max-width: 768px) {
    .hero-section {
        /* スマートフォンサイズでは大幅に狭める */
        /* 上下の余白も調整 */
        padding: 100px 30px 120px; 
    }
}

/* ★ 白セクション内のリンク色を再設定 */
.hero-section a {
    color: var(--accent-primary);
    text-decoration: none;
}
.hero-section a:hover,
.hero-section a:focus {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.hero-title {
    font-size: 48px; 
    color: var(--white-primary);
    margin-bottom: 15px; 
}
.hero-subtitle {
    font-size: 17px; 
    color: var(--hite-primary);
    opacity: 0.8;
    margin-bottom: 40px; 
}

/* ボタン (★ 白背景・文字色変更、枠線削除) */
.cta-button {
    display: inline-block;
    background-color: var(--white-primary); /* 白背景 */
    color: var(--accent-primary);     /* ★文字色を赤に */
    padding: 12px 35px; 
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none; /* ★枠線を削除 */
}
.cta-button:hover,
.cta-button:focus {
    background-color: var(--gray-primary); /* ホバー時グレー */
    color: var(--accent-primary); /* ホバー時も赤文字 */
    text-decoration: none;
    border: none; /* ホバー時も枠線なし */
}

/* コンテンツセクション (赤背景・白文字) */
.content-section {
    margin-bottom: 60px; 
    position: relative; 
    z-index: 1;
}
.content-section:last-child {
    margin-bottom: 0;
}
.content-section h2 {
    font-size: 26px; 
    /* ★ 境界線を見やすい色に変更 (ピンク) */
    border-bottom: 3px solid var(--accent-secondary);
    padding-bottom: 10px;
    margin-bottom: 25px; 
}
.content-section p {
    font-size: 15px; 
    margin-bottom: 1em;
}
.content-section ul {
    font-size: 15px; 
    padding-left: 25px;
}

/* 左右分割セクション (★ べた塗り感対応) */
.split-section {
    display: flex;
    align-items: center;
    gap: 40px; 
    margin-bottom: 60px;
    position: relative; 
    z-index: 1;
}
.split-section .text-content {
    flex: 1; 
}
.split-section .image-content {
    flex: 1; 
}
.split-section .image-content img {
    
}

@media (max-width: 768px) {
    .split-section {
        flex-direction: column; 
    }
}

/* 全幅画像セクション (★ 白背景・黒文字に変更) */
.fullwidth-image-section {
    margin-bottom: 60px;
    padding: 20px;
    background-color: var(--white-primary); /* ★白背景 */
    color: var(--black-primary);      /* ★黒文字 */
    text-align: center; 
    position: relative; 
    z-index: 1;
     /* border を削除 (べた塗り感) */
}
/* ★ 白セクション内のリンク色を再設定 */
.fullwidth-image-section a {
    color: var(--accent-primary);
    text-decoration: none;
}
.fullwidth-image-section a:hover,
.fullwidth-image-section a:focus {
    color: var(--accent-secondary);
    text-decoration: underline;
}
.fullwidth-image-section img {
    width: 100%; 
    object-fit: cover; 
    max-height: 500px; 
    margin: 0 auto;
}


/* フッター */
.site-footer {
    background-color: var(--black-primary); 
    color: var(--white-primary);          
    padding: 40px 0; 
    text-align: center;
    font-size: 14px;
    border-top: 1px solid var(--white-primary); 
    position: relative; 
    z-index: 1;
    
    /* ★ Sticky Footer対応: mainが伸びるため、footerは伸縮不要 */
    flex-shrink: 0; 
}
.site-footer p {
    margin: 0;
}

/* -------------------------
 * ページ共通レイアウト (★新規追加)
 * ------------------------- */
.page-title {
    font-size: 38px;
    font-weight: bold;
    color: var(--white-primary);
    border-bottom: 4px solid var(--accent-secondary);
    padding-bottom: 15px;
    margin-bottom: 60px;
}

/* -------------------------
 * ページ共通レイアウト (★新規追加)
 * ------------------------- */
.page-title {
    font-size: 38px;
    font-weight: bold;
    color: var(--white-primary);
    border-bottom: 4px solid var(--accent-secondary);
    padding-bottom: 15px;
    margin-bottom: 60px;
}

/* -------------------------
 * レイアウト: コンテンツ左右 (★ .split-section に統合)
 * (index.html と works.html で共通使用)
 * ------------------------- */
.split-section {
    display: flex;
    align-items: center;
    gap: 40px; 
    margin-bottom: 60px;
    position: relative; 
    z-index: 1;
}
.split-section .text-content {
    flex: 1; 
}
.split-section .image-content {
    flex: 1; 
    /* ★ 修正: デフォルトは中身(画像)を右寄せにする */
    display: flex;
    justify-content: flex-end;
}
.split-section .image-content img {
    /* ★ 修正: ご希望の最大幅を設定 */
    max-width: 400px; 
    width: 100%; /* 親コンテナが400pxより狭い場合は追従 */
    height: auto;
}

/* works.html 用のテキストスタイル */
.split-section .text-content h3 {
    font-size: 24px;
    color: var(--white-primary);
    margin-top: 0;
    margin-bottom: 15px;
}
.split-section .text-content p {
    font-size: 15px; 
    margin-bottom: 25px;
}

/* 左右反転バージョン */
.split-section.reverse {
    flex-direction: row-reverse;
}

/* ★ 修正: reverseバージョンは画像を左寄せにする */
.split-section.reverse .image-content {
    justify-content: flex-start;
}


/* モバイル対応 (縦積み) */
@media (max-width: 768px) {
    .split-section {
        flex-direction: column; 
    }
    .split-section.reverse {
        flex-direction: column; /* 反転も解除 */
    }
    /* ★ 追加: モバイル時は画像寄せを解除 (中央揃え推奨) */
    .split-section .image-content {
        justify-content: center;
    }
    /* ★ 追加: モバイル時は .reverse の左寄せも解除 (中央揃え) */
    .split-section.reverse .image-content {
        justify-content: center;
    }
}


/* -------------------------
 * レイアウト: ギャラリー (★新規追加)
 * (変更なし)
 * ------------------------- */
.layout-gallery {
    display: grid;
    /* 5列 (1fr = 利用可能なスペースを均等に分割) */
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
}

.gallery-item {
    position: relative;
    /* アスペクト比 1:1 (正方形) */
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: transparent; /* ★ 修正: 画像読み込み中の背景を透明に */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ★ 修正: 画像をトリミング(中央切り抜き) */
    transition: transform 0.3s ease;
}

/* ホバー時のオーバーレイ (黒フェード) */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white-primary);
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    opacity: 0; /* 通常時は透明 */
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1; /* ホバー時に表示 */
}
.gallery-item:hover img {
    transform: scale(1.05); /* 画像を少し拡大 */
}

.gallery-title {
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
    text-align: center;
}

/* モバイル対応 (2列にする) */
@media (max-width: 768px) {
    .layout-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* -------------------------
 * レイアウト: napcons (★新規追加)
 * (napcons.html 用のコンテナ定義のみ残す)
 * ------------------------- */
.layout-napcons {
    display: grid;
    /* 7列 (1fr = 利用可能なスペースを均等に分割) */
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* モバイル対応 (3列にする) */
@media (max-width: 768px) {
    .layout-napcons {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}


/* -------------------------
 * レイアウト: リスト (★新規追加)
 * (blog.html 用)
 * ------------------------- */
.layout-list {
    position: relative;
    z-index: 1;
}

.list-item {
    display: flex;
    align-items: baseline; /* 日付とタイトルの上部を揃える */
    padding: 20px 0;
    border-bottom: 1px solid var(--accent-secondary); /* 境界線は補助アクセント */
    text-decoration: none; /* リンクの下線は消す */
    color: var(--white-primary);
    transition: background-color 0.2s ease;
}

/* リストの最初のアイテムの上線 */
.list-item:first-child {
    border-top: 1px solid var(--accent-secondary);
}

.list-item:hover {
    background-color: rgba(0, 0, 0, 0.2); /* ホバー時にうっすら黒く */
}

.list-date {
    font-size: 15px;
    font-weight: 600;
    color: var(--white-primary);
    opacity: 0.8;
    margin-right: 25px;
    flex-shrink: 0; /* 日付が縮まないように */
}

.list-title {
    font-size: 18px;
    font-weight: bold;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .list-item {
        flex-direction: column; /* 縦並びにする */
        align-items: flex-start; /* 左揃え */
        padding: 15px 0;
    }
    .list-date {
        margin-right: 0;
        margin-bottom: 5px;
        font-size: 14px;
    }
    .list-title {
        font-size: 16px;
    }
}

/* -------------------------
 * レイアウト: リンク (★新規追加)
 * (links.html 用)
 * ------------------------- */
.layout-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* PCでは4列 */
    gap: 20px;
    position: relative;
    z-index: 1;
}

.link-item {
    background-color: rgba(0, 0, 0, 0.2); /* 背景をうっすら黒く */
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--white-primary);
    transition: background-color 0.3s ease, color 0.3s ease; /* ★ colorのtransitionを追加 */
    border-radius: 5px; /* 少し角丸 */
}

.link-item:hover {
    /* background-color: rgba(0, 0, 0, 0.4); */ /* ← 削除 */
    background-color: var(--hover-color, rgba(0, 0, 0, 0.4)); /* ★ カスタムプロパティを使用 */
    color: var(--hover-text-color, var(--white-primary)); /* ★ カスタムプロパティを使用 */
    text-decoration: none;
}

.link-icon {
    font-size: 48px; /* アイコン(仮)のサイズ */
    margin-bottom: 15px;
    /* 将来的にFontAwesomeなどのアイコンフォントやSVGに差し替えることを推奨します */
}

.link-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

/* モバイル対応 */
@media (max-width: 992px) {
    .layout-links {
        grid-template-columns: repeat(3, 1fr); /* タブレットでは3列 */
    }
}
@media (max-width: 768px) {
    .layout-links {
        grid-template-columns: repeat(2, 1fr); /* スマホでは2列 */
        gap: 15px;
    }
}

/* -------------------------
 * レイアウト: About (★新規追加)
 * (about.html 用)
 * ------------------------- */
.layout-about {
    display: flex;
    align-items: flex-start; /* テキストが長くても上が揃うように */
    gap: 50px;
    position: relative;
    z-index: 1;
    background-color: var(--white-primary); /* 白背景カード */
    color: var(--black-primary); /* 黒文字 */
    padding: 50px;
    border-radius: 5px; /* 角を少し丸める */
}

.layout-about .profile-image {
    flex: 0 0 250px; /* 画像の幅を250pxで固定 */
}

.layout-about .profile-image img {
    width: 100%;
    border-radius: 50%; /* 画像を円形にする */
    border: 5px solid var(--gray-primary);
}

.layout-about .profile-text {
    flex: 1; /* 残りの幅をすべてテキストが取る */
}

.layout-about .profile-text h3 {
    font-size: 28px;
    font-weight: bold;
    color: var(--black-primary);
    margin-top: 0;
    margin-bottom: 10px;
}

.layout-about .profile-text .profile-name-sub {
    font-size: 16px;
    font-weight: normal;
    color: var(--black-primary);
    opacity: 0.7;
    margin-bottom: 25px;
    display: block;
}

.layout-about .profile-text p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--black-primary);
}

/* aboutページ内のリンク色を調整 */
.layout-about a {
    color: var(--accent-primary);
    text-decoration: none;
}
.layout-about a:hover,
.layout-about a:focus {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .layout-about {
        flex-direction: column; /* 縦並び */
        padding: 30px;
        gap: 30px;
    }
    .layout-about .profile-image {
        flex-basis: auto; /* 幅固定を解除 */
        width: 60%; /* 画面幅の60% */
        margin: 0 auto; /* 中央揃え */
    }
}

/* -------------------------
 * レイアウト: Home Hub (★新規追加)
 * (index.html 専用)
 * ------------------------- */
.home-hub {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列 */
    gap: 30px;
    position: relative;
    z-index: 1;
}

.hub-item {
    background-color: var(--white-primary); /* 白背景 */
    color: var(--black-primary); /* 黒文字 */
    padding: 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* 浮遊感を出す影 */
}

.hub-item:hover {
    transform: translateY(-5px); /* ホバー時に少し浮き上がる */
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    color: var(--black-primary);
    text-decoration: none;
}

.hub-item .hub-icon {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent-primary); /* アイコン(仮)は赤 */
    display: block;
    margin-bottom: 15px;
}

.hub-item .hub-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--black-primary);
    margin: 0 0 10px 0;
}

.hub-item .hub-description {
    font-size: 15px;
    color: var(--black-primary);
    opacity: 0.8;
    margin: 0;
}

/* モバイル対応 */
@media (max-width: 992px) {
    .home-hub {
        grid-template-columns: 1fr; /* 1列 (縦積み) */
    }
}

/* -------------------------
 * ライトボックス (画像拡大) (★新規追加)
 * ------------------------- */
.lightbox {
    /* 画面全体を覆う (通常は非表示) */
    display: none; 
    position: fixed;
    z-index: 9000; /* ノイズ(10000)より手前、ヘッダー(1000)より奥 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* 暗い背景 */
    
    /* JavaScriptで .show クラスが付いたら表示 */
    &.show {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    /* アニメーション */
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 90vh; /* 画面の高さの90%まで */
    object-fit: contain; /* アスペクト比を保つ */
}

/* 閉じるボタン */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: var(--white-primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--gray-primary);
}

/* 表示時のアニメーション */
@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* -------------------------
 * 装飾ディバイダー (★新規追加)
 * (コンテンツの仕切り用)
 * ------------------------- */
.decorative-divider {
    position: relative;
    z-index: 1;
    padding: 60px 0; /* 上下の余白 */
    text-align: center; /* 中身を中央揃え */
}

.decorative-divider img {
    display: inline-block;
    width: 200px; /* ★画像の幅 (小さめ) */
    height: auto;
    max-width: 100%;
    /* べた塗り感を維持するため、影や枠はつけない */
}

.decorative-divider .divider-image-link {
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.decorative-divider .divider-image-link:hover {
    transform: scale(1.1); /* ホバー時に少し拡大 */
    filter: brightness(1.2); /* ホバー時に少し明るく */
}

.decorative-divider .divider-image-link img {
    display: block;
    width: 200px; /* ★画像の幅 (小さめ) */
    height: auto;
    max-width: 100%;
    /* べた塗り感を維持するため、影や枠はつけない */
}

/* -------------------------
 * レイアウト: ブログ記事 (★新規追加)
 * (blog-post-template.html 用)
 * ------------------------- */
.layout-post {
    position: relative;
    z-index: 1;
    
    /* 読みやすいように横幅を制限し、中央揃え */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ★ 新規追加: 記事の「戻る」ボタン */
.post-back-link {
    display: inline-block; /* ブロック要素として配置 */
    margin-bottom: 20px; /* タイトルとの余白 */
    
    color: var(--white-primary); /* 要求: 白文字 */
    text-decoration: none; /* 下線は不要（ボタン風） */
    font-size: 16px;
    font-weight: 600;
    
    transition: color 0.3s ease;
}

.post-back-link:hover,
.post-back-link:focus {
    color: var(--accent-secondary); /* ホバー色 (既存のaタグに合わせる) */
    text-decoration: underline; /* ホバー時は下線 */
}

.post-header {
    margin-bottom: 40px;
    /* ページタイトルと似たスタイルだが、記事用に調整 */
    border-bottom: 3px solid var(--accent-secondary);
    padding-bottom: 20px;
}

.post-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--white-primary);
    margin: 0;
    line-height: 1.3;
}

.post-date {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--white-primary);
    opacity: 0.8;
    margin-top: 10px;
}

/* 記事本文エリア */
.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--white-primary);
}

.post-content h2,
.post-content h3 {
    font-weight: bold;
    color: var(--white-primary);
    margin-top: 2.5em; /* 見出しの前の余白 */
    margin-bottom: 1em;
    border-bottom: 1px solid var(--accent-secondary);
    padding-bottom: 5px;
}

.post-content h2 {
    font-size: 24px;
}

.post-content h3 {
    font-size: 20px;
    border-bottom: none; /* h3は下線なし */
}

.post-content p {
    margin-top: 0;
    margin-bottom: 1.5em; /* 段落ごとの余白 */
}

.post-content a {
    color: var(--white-primary);
    text-decoration: underline;
    font-weight: bold;
}
.post-content a:hover {
    color: var(--accent-secondary);
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.post-content blockquote {
    margin: 1.5em 0;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.15); /* 少し暗くする */
    border-left: 4px solid var(--accent-secondary);
    color: var(--white-primary);
    opacity: 0.9;
}

.post-content blockquote p {
    margin-bottom: 0;
}

/* ★ 新規追加: 記事内の画像(キャプション付き) */
.post-content figure {
    margin: 2.5em 0; /* h2などと余白を合わせる */
    padding: 0;
}

.post-content figure img {
    max-width: 80%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px; /* 少し角を丸める */
}

.post-content figure figcaption {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--white-primary);
    opacity: 0.8; /* 日付と同じスタイル */
    text-align: center; /* 画像に合わせて中央揃え */
}


/* -------------------------
 * ページ共通レイアウト (★h2用セクション見出し)
 * ------------------------- */
.section-title {
    font-size: 26px; /* h2の基本サイズ */
    font-weight: 600;
    color: var(--white-primary);
    
    /* page-title (4px) より少し細い仕切り線 */
    border-bottom: 3px solid var(--accent-secondary); 
    
    padding-bottom: 10px;
    margin-bottom: 30px; /* page-title (60px) より余白を抑える */
    
    position: relative; /* z-indexを有効にするため */
    z-index: 1;
}

/* -------------------------
 * ページ共通レイアウト (ページ説明文)
 * ------------------------- */
.page-description {
    /* (0,0,0,0.15) = 15%のうっすら黒背景 */
    background-color: rgba(0, 0, 0, 0.15); 
    color: var(--white-primary);
    padding: 30px 40px;
    border-radius: 5px; /* 少し角丸 */
    
    /* 読みやすさのため、横幅を制限 */
    max-width: 1000px; 
    
    /* h1(.page-title)とh2(.section-title)の間に配置 */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 60px; /* 次のセクションまでの余白 */
    
    position: relative;
    z-index: 1;
    
    /* フォント調整 */
    font-size: 16px;
    line-height: 1.8;
}

/* h1の直後に説明文が来た場合、h1の下余白を自動調整 */
.page-title + .page-description {
    /* h1.page-title の margin-bottom: 60px; を打ち消し、
       カード自身の上余白として 30px を確保します */
    margin-top: -30px; 
}

/* -------------------------
 * ページ共通レイアウト (インライン型目次)
 * ------------------------- */
.toc-inline {
    /* page-description とデザインを合わせる */
    background-color: rgba(0, 0, 0, 0.15); 
    color: var(--white-primary);
    padding: 30px 40px;
    border-radius: 5px;
    max-width: 1000px; /* page-description と合わせる */
    margin: 0 auto 60px auto; /* 上下中央揃え、下に余白 */
    position: relative;
    z-index: 1;
}

/* h1 + 説明文 + 目次 の場合の余白調整 */
.page-description + .toc-inline {
    margin-top: -30px; /* 説明文のすぐ下に配置 */
}

.toc-inline h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--accent-secondary);
    padding-bottom: 10px;
}

.toc-inline ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-inline li {
    margin-bottom: 10px;
}
.toc-inline li:last-child {
    margin-bottom: 0;
}

.toc-inline a {
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--white-primary);
}

.toc-inline a:hover,
.toc-inline a:focus {
    color: var(--accent-secondary);
    text-decoration: underline;
}
