/*
Theme Name: Original
Version: 1.0
*/

:root {
    --text-color: #333;
    --bg-color: #f4f5f7;
    --card-bg: #fff;
    --accent-color: #F6812D;
    --font-base: "Helvetica Neue", Arial, sans-serif;
}

/* Base Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-base); background: var(--bg-color); color: var(--text-color); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--card-bg); padding: 20px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 40px; }
.site-title img { height: 50px; }
.site-title a { color: var(--text-color); }

/* Card Grid System */
.post-grid {
    display: grid;
    /* 魔法の1行：画面幅に応じて自動で列数を調整 */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Card Design */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }

.card-img { height: 200px; overflow: hidden; background: #ddd; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-tag {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 5px;
    /* タグっぽさを出すためのスタイル調整 */
    display: inline-block;
    opacity: 0.8;
}
.card-title { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.4; }
.card-excerpt { font-size: 0.95rem; color: #666; margin-bottom: 15px; flex-grow: 1; }
.card-meta { font-size: 0.8rem; color: #999; border-top: 1px solid #eee; padding-top: 10px; margin-top: auto; }

/* Pagination */
.pagination { text-align: center; margin: 40px 0; }
.pagination .page-numbers { padding: 10px 15px; background: var(--card-bg); margin: 0 5px; border-radius: 4px; }
.pagination .current { background: var(--accent-color); color: #fff; }

/* Footer */
.site-footer { text-align: center; padding: 20px; color: #666; font-size: 0.9rem; margin-top: 40px; }

/* ------------------------------------------------
   Single Post Styles (詳細ページ用)
------------------------------------------------ */

/* 読みやすくするために幅を制限して中央寄せ */
.single-container {
    max-width: 800px;
    margin: 0 auto 60px;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* スマホ表示時の調整 */
@media (max-width: 768px) {
    .single-container {
        padding: 20px;
        margin-bottom: 30px;
    }
}

/* ヘッダー周り */
.entry-header { text-align: center; margin-bottom: 30px; }
.entry-tag {
    margin-bottom: 15px;
    text-align: center; /* 中央寄せ */
}

.entry-tag a { 
    background: #f0f0f0; /* 背景を少しグレーに */
    color: #555;        /* 文字色を落ち着かせる */
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    text-decoration: none;
    display: inline-block;
    margin: 0 5px 5px 0; /* 複数タグがある場合の隙間 */
    transition: background 0.3s;
}

.entry-tag a:hover {
    background: var(--accent-color);
    color: #fff;
}
.entry-title { font-size: 2rem; line-height: 1.3; margin-bottom: 15px; }
.entry-meta { color: #888; font-size: 0.9rem; }

/* アイキャッチ画像 */
.entry-thumbnail { margin-bottom: 40px; border-radius: 8px; overflow: hidden; }
.entry-thumbnail img { width: 100%; height: auto; }

/* ------------------------------------------------
   Article Content (記事本文のデザイン)
   ※リセットCSSの影響を受けないよう再定義
------------------------------------------------ */
.entry-content { font-size: 1.05rem; line-height: 1.8; color: #333; }

/* 本文内の余白 */
.entry-content > * { margin-bottom: 1.5em; }

/* 本文内の見出し */
.entry-content h2 { 
    font-size: 1.5rem; 
    border-bottom: 2px solid var(--accent-color); 
    padding-bottom: 10px; 
    margin-top: 40px; 
    margin-bottom: 20px; 
}
.entry-content h3 { 
    font-size: 1.3rem; 
    border-left: 5px solid var(--accent-color); 
    padding-left: 15px; 
    margin-top: 30px; 
    margin-bottom: 20px; 
}

/* 本文内のリスト */
.entry-content ul, .entry-content ol { padding-left: 20px; margin-bottom: 20px; }
.entry-content li { margin-bottom: 5px; }

/* 本文内の引用 */
.entry-content blockquote {
    background: #f9f9f9;
    border-left: 4px solid #ccc;
    padding: 15px;
    color: #555;
    font-style: italic;
    margin: 20px 0;
}

.entry-content a {
    text-decoration: underline;
}

/* 記事フッター（タグ） */
.entry-tags { margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; font-size: 0.85rem; }
.entry-tags a { color: #666; margin-right: 10px; }

/* ページナビゲーション */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.post-navigation a { font-weight: bold; color: var(--accent-color); }
.post-navigation a:hover { text-decoration: underline; }

/* ------------------------------------------------
   Archive Header (タグ一覧ページなどの見出し)
------------------------------------------------ */
.archive-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 0;
    background: #fff; /* 背景を白にして区切りをつける */
    border-bottom: 1px solid #eee;
}

.archive-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
}

/* タグページの場合はアクセントカラーに */
.archive-title:first-letter {
    color: var(--accent-color); /* 先頭の#だけ色を変える */
}

.archive-description {
    margin-top: 15px;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ------------------------------------------------
   Stylish 404 Page Styles
------------------------------------------------ */
.error-container {
    position: relative;
    height: 70vh; /* 画面の70%の高さ */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* はみ出た背景文字をカット */
    text-align: center;
}

/* 背景の巨大な「404」文字（アウトラインデザイン） */
.error-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30vw; /* 画面幅の30%という巨大サイズ */
    font-weight: 900;
    line-height: 1;
    color: transparent; /* 文字色は透明 */
    -webkit-text-stroke: 2px #e0e0e0; /* 縁取りのみ表示 */
    z-index: 1; /* コンテンツの後ろへ */
    user-select: none; /* 選択不可にする */
    opacity: 0.6;
}

/* 手前のコンテンツエリア */
.error-content {
    position: relative;
    z-index: 2; /* 背景より手前に表示 */
    max-width: 500px;
    padding: 0 20px;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 1px;
    color: var(--text-color);
}

.error-text {
    color: #666;
    margin-bottom: 40px;
    font-size: 1rem;
    line-height: 1.8;
}

/* スタイリッシュなボタン */
.btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--text-color); /* 黒（または濃いグレー）で引き締める */
    color: #fff;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1); /* なめらかな動き */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-arrow {
    margin-left: 10px;
    transition: transform 0.3s;
}

/* ホバー時のアクション */
.btn-home:hover {
    background: var(--accent-color); /* アクセントカラーに変化 */
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

.btn-home:hover .btn-arrow {
    transform: translateX(5px); /* 矢印だけ少し右へ動く */
}

/* スマホ表示時の調整 */
@media (max-width: 768px) {
    .error-bg-text {
        font-size: 40vw; /* スマホではさらに大きく */
        -webkit-text-stroke: 1px #eee;
    }
    .error-title {
        font-size: 1.8rem;
    }
}

/* ------------------------------------------------
   High Impact CTA Box
------------------------------------------------ */
.cta-box {
    margin: 80px 0 60px; /* 上に少しスペースを空ける（ラベル用） */
    padding: 50px 30px 40px;
    background: #fffaf5; /* ほんのりオレンジがかった白 */
    border: 3px solid var(--accent-color); /* 太めの枠線 */
    border-radius: 16px;
    text-align: center;
    position: relative; /* ラベルの位置調整用 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* ふんわりした影 */
}

/* 枠の上に飛び出すラベル */
.cta-label {
    position: absolute;
    top: -20px; /* 枠の上に半分飛び出させる */
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: #fff;
    padding: 8px 25px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(246, 129, 45, 0.4);
    white-space: nowrap;
}

.cta-headline {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

.cta-desc {
    font-size: 1rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* クリックしたくなるボタンデザイン */
.cta-btn {
    display: block; /* 横幅いっぱいにしないためのブロック化 */
    width: 100%;
    max-width: 420px; /* ボタンの最大幅 */
    margin: 0 auto 15px;
    background: var(--accent-color); /* オレンジ */
    color: #fff !important; /* 文字色を強制的に白に */
    font-weight: bold;
    font-size: 1.1rem;
    padding: 20px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 5px 0 #d66a1c, 0 10px 20px rgba(246, 129, 45, 0.3); /* 立体的な影 */
    transition: all 0.2s ease;
    position: relative;
    top: 0;
}

/* ホバー時の「押し込み」アクション */
.cta-btn:hover {
    top: 3px; /* ボタンが沈む */
    box-shadow: 0 2px 0 #d66a1c, 0 5px 10px rgba(246, 129, 45, 0.3);
    opacity: 1;
}

.cta-arrow {
    margin-left: 10px;
    display: inline-block;
    transition: transform 0.2s;
}

.cta-btn:hover .cta-arrow {
    transform: translateX(5px); /* 矢印が動く */
}

.cta-note {
    font-size: 0.8rem;
    color: #888;
    margin-top: 15px;
}

/* スマホ表示の調整 */
@media (max-width: 768px) {
    .cta-box {
        margin-top: 60px;
        padding: 40px 20px 30px;
    }
    .cta-headline {
        font-size: 1.3rem;
    }
    .cta-btn {
        font-size: 1rem;
        padding: 15px;
    }
}

/* ------------------------------------------------
   Mobile Header Adjustment
------------------------------------------------ */

/* デフォルト（PC）のスタイル */
.site-description {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* スマホ表示時の設定 */
@media (max-width: 768px) {
    /* descriptionを非表示にしてスッキリさせる */
    .site-description {
        display: none;
    }

    /* ついでにヘッダー自体の余白も少し詰める */
    .site-header {
        padding: 15px 0;
        margin-bottom: 20px;
    }
    
    .site-title {
        font-size: 1.2rem; /* タイトルも少し小さくしてバランスを取る */
    }
}

/* ------------------------------------------------
   Mobile Title Adjustment (スマホ時のH1調整)
------------------------------------------------ */
@media (max-width: 768px) {
    .entry-title {
        font-size: 1.35rem; /* PCの2remからサイズダウン */
        line-height: 1.3;   /* 行間を少し詰める */
        margin-bottom: 10px; /* 下の余白を減らす */
        font-weight: bold;  /* 太さは維持 */
    }

    /* ついでにヘッダー周りの余白も詰めて、本文開始位置を上げる */
    .entry-header {
        margin-bottom: 20px; /* 本文までの距離を縮める */
    }
    
    .entry-cat a, .entry-tag a {
        font-size: 0.7rem; /* カテゴリ/タグも少し小さく */
        margin-bottom: 10px;
    }
}