/*
Theme Name: allkumamoto
Description: よみやすくするよ
Author: ビズラボ
Version: 1.0
*/

/* ====================================
   1. 基本設定 (Base)
   ==================================== */
body, h1, h2, h3, p, ul, li { margin: 0; padding: 0; }

body {
    font-family: "source-han-serif-japanese", "YuMincho", "Yu Mincho", serif;
    color: #333;
    line-height: 1.6;
    
    /* ▼▼▼ 背景変更：胡粉（ごふん）＋雲竜（うんりゅう）風 ▼▼▼ */
    /* ベースの色：真っ白ではなく、少し温かみのある胡粉色 */
    background-color: #fcfaf2;
    
    /* 繊維のムラを表現するノイズとライン */
    background-image: 
        /* 全体的なざらつき（ノイズ） */
        repeating-linear-gradient(45deg, rgba(0,0,0,0.01) 0px, rgba(0,0,0,0.01) 2px, transparent 2px, transparent 4px),
        /* 長い繊維のようなムラ */
        repeating-linear-gradient(110deg, rgba(0,0,0,0.02) 0px, rgba(0,0,0,0.02) 1px, transparent 1px, transparent 30px),
        repeating-linear-gradient(20deg, rgba(0,0,0,0.02) 0px, rgba(0,0,0,0.02) 1px, transparent 1px, transparent 50px);
}

a { text-decoration: none; color: inherit; transition: opacity 0.3s; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }


/* ====================================
   2. メインビジュアル (Main Visual)
   ==================================== */
.main-visual {
    width: 100%;
    height: 50vh; 
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.mv-link,
.mv-img-wrap {
    display: block;
    width: 100%;
    height: 100%;
    position: relative; 
}

/* 1層目：後ろのぼかし画像 */
.mv-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.6);
    transform: scale(1.1); 
    z-index: 1;
}

/* 2層目：手前のメイン画像 */
.mv-main-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background-color: transparent; /* 透過 */
    box-shadow: 0 0 20px rgba(0,0,0,0.5); 
}

/* ホバー時の動き */
.mv-link:hover .mv-main-img {
    transform: scale(1.02);
    transition: transform 0.5s ease;
}

/* オーバーレイ（テキスト） */
.mv-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.2); 
}

.mv-container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    color: #fff;
    text-align: center; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.mv-title {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.mv-excerpt {
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 1;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
/* ====================================
   3. PCナビゲーション (Sticky + Logo)
   ==================================== */
.pc-nav-bar, .pc-nav-bar-single {
    width: 100%;
    height: auto;
    background: #fff;
    border-bottom: 1px solid #ddd;
    
    /* 上部固定の設定 */
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ▼▼▼ 親枠：ここでロゴとメニュー全体を左右に分ける ▼▼▼ */
.nav-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    
    /* Flexboxで「ロゴ」と「メニューの塊」を横並びにする */
    display: flex;
    justify-content: space-between; /* 両端に配置 */
    align-items: center;            /* 上下中央揃え */
    padding: 0 20px;
}

/* ロゴエリア */
.nav-logo {
    padding: 10px 0;
    /* ロゴが縮まないようにする */
    flex-shrink: 0;
}

.nav-logo a {
    display: block;
    line-height: 1;
}

.nav-logo img {
    height: 50px; /* ロゴの大きさ調整 */
    width: auto;
    object-fit: contain;
}

/* ▼▼▼ メニューリスト：ここで「歴史」「イベント」等を横に並べる ▼▼▼ */
.gnav-list {
    /* これがないとメニュー項目が縦積みになります */
    display: flex; 
    
    list-style: none;
    margin: 0;
    padding: 0;
}

.gnav-list > li {
    /* 念のためリセット */
    margin: 0;
}

.gnav-list > li > a {
    display: block;
    padding: 25px 20px; /* 項目の間隔 */
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    color: #333;
    transition: color 0.3s;
    white-space: nowrap; /* メニュー文字が折り返されないようにする */
}

.gnav-list > li > a:hover {
    color: #b09258;
}

/* ====================================
   4. 記事一覧エリア (Grid Layout)
   ==================================== */
.content-area {
    padding: 80px 0;
    /* 背景色を透明にして、bodyの和紙模様を見せる */
    background-color: transparent; 
}

.content-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    letter-spacing: 0.1em;
    /* タイトルにも少し影をつけて読みやすく */
    text-shadow: 1px 1px 0 #fff; 
}

.article-grid {
    display: grid;
    /* PC: 4カラム */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.grid-card {
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.grid-card:hover {
    transform: translateY(-5px);
}

.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #333;
}

/* 画像エリア */
.card-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-visual img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.grid-card:hover .card-visual img { transform: scale(1.1); }

/* 画像に重ねるタイトル */
.card-title {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: normal;
    margin: 0;
    line-height: 1.4;
}

/* 本文・ボタンエリア */
.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-excerpt {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-btn {
    display: block;
    text-align: center;
    background: #333;
    color: #fff;
    padding: 8px;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.grid-card:hover .card-btn { background: #b09258; }


/* ====================================
   5. 個別記事ページ (Single)
   ==================================== */
.single-header {
    padding: 80px 20px 40px;
    text-align: center;
    background: #fff;
}

.single-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: 20px 0;
    line-height: 1.4;
}

.single-meta {
    font-size: 0.9rem;
    color: #999;
}

.single-cat {
    display: inline-block;
    background: #eee;
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 10px;
    font-size: 0.8rem;
}

.single-thumbnail {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 60px;
}
.single-thumbnail img { width: 100%; height: auto; }

.single-content {
    max-width: 800px;
    margin: 0 auto 100px;
    padding: 0 20px;
    font-size: 1.05rem;
    line-height: 1.9;
    text-align: justify;
    /* 読みやすさのため、本文エリアには薄い白を敷く */
    background: rgba(255,255,255,0.8); 
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* 記事内の装飾 */
.single-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin: 60px 0 30px;
}
.single-content p { margin-bottom: 2em; }
.single-content img { margin: 30px 0; }


/* ====================================
   6. フッター (Footer)
   ==================================== */
.site-footer {
    padding: 60px 0;
    background-color: #222;
    color: #fff;
    text-align: center;
    
    /* ▼▼▼ 背景変更：矢絣（やがすり）パターン ▼▼▼ */
    /* グラデーションを組み合わせて矢印のような形を作ります */
    background-image: 
        linear-gradient(135deg, #333 25%, transparent 25%),
        linear-gradient(225deg, #333 25%, transparent 25%),
        linear-gradient(45deg, #333 25%, transparent 25%),
        linear-gradient(315deg, #333 25%, transparent 25%);
    background-position: 20px 0, 20px 0, 0 0, 0 0;
    background-size: 40px 40px;
}


/* ====================================
   7. スマホ対応 (Mobile Responsiveness)
   ==================================== */

.sp-fixed-bar, .sp-drawer-menu { display: none; }

@media (max-width: 768px) {
    .pc-nav-bar, .pc-nav-bar-single { display: none; }
    .main-visual { height: 60vh; } 
    .mv-title { font-size: 1.8rem; }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .article-grid article:nth-child(n+6) {
        display: none;
    }

    .sp-fixed-bar {
        display: flex;
        position: fixed;
        bottom: 0; left: 0;
        width: 100%; height: 60px;
        background: #111;
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid #333;
    }
    
    .sp-icon {
        color: #fff;
        font-size: 0.85rem;
        font-weight: bold;
        cursor: pointer;
        padding: 10px;
    }

    .sp-drawer-menu {
        display: block;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.95);
        z-index: 10000;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sp-drawer-menu.active { transform: translateY(0); }

    .drawer-inner { text-align: center; width: 100%; }
    .drawer-inner ul li a {
        color: #fff;
        font-size: 1.4rem;
        display: block;
        padding: 20px;
        border-bottom: 1px solid #333;
    }
    
    .close-btn {
        margin-top: 40px;
        color: #fff;
        border: 1px solid #fff;
        display: inline-block;
        padding: 10px 40px;
        cursor: pointer;
    }
}
/* ====================================
   9. アーカイブページ (Archive)
   ==================================== */

/* タイトルの装飾（中央寄せ＆見やすく） */
.archive-header {
    padding: 80px 0 60px; /* 上下の余白を広げてゆったりさせる */
    text-align: center;   /* 【重要】中央寄せ */
    background-color: transparent;
}

.archive-title {
    display: inline-block; /* 文字の長さの分だけ背景などをつけやすくする */
    font-size: clamp(2rem, 5vw, 3rem); /* PCで大きく、スマホで調整 */
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 0 #fff; /* 文字を浮き上がらせる */
    border-bottom: 2px solid #b09258; /* 下線を入れて強調（和風ゴールド） */
    padding-bottom: 10px;
}

.archive-description {
    font-size: 1rem;
    color: #555;
    max-width: 800px;
    margin: 15px auto 0;
    line-height: 1.8;
}

/* ページネーション */
.pagination {
    margin-top: 80px;
    text-align: center;
}

/* --- スマホ対応：表示件数の制御 --- */
@media (max-width: 768px) {
    /* アーカイブページでも、記事一覧（.article-grid）の中の
       6番目以降の記事（articleタグ）を非表示にする */
    .article-grid article:nth-child(n+6) {
        display: none;
    }
}

/* ====================================
   10. 固定ページ (Page)
   ==================================== */

.page-header {
    padding: 80px 0 40px;
    text-align: center;
    background: transparent; /* 背景は透過して和紙を見せる */
}

.page-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 500;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    /* 下線を入れて区切りを明確に */
    display: inline-block;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.page-thumbnail {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 60px;
}
.page-thumbnail img { width: 100%; height: auto; }

/* 本文エリア（個別記事と同じスタイルを適用） */
.page-content {
    max-width: 800px; /* 読みやすい幅 */
    margin: 0 auto 100px;
    padding: 60px 40px; /* 余白をたっぷりとる */
    font-size: 1.05rem;
    line-height: 1.9;
    text-align: justify;
    
    /* 半透明の白背景を敷いて、文字を読みやすくする */
    background: rgba(255,255,255,0.85); 
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* スマホ対応 */
@media (max-width: 768px) {
    .page-content {
        padding: 40px 20px; /* スマホでは余白を少し減らす */
        font-size: 1rem;
    }
}

/* ====================================
   11. パンくずリスト (Breadcrumb)
   ==================================== */
.breadcrumb-area {
    width: 95%;
    max-width: 1400px; /* 他のコンテンツ幅と合わせる */
    margin: 20px auto 0; /* 上に少し余白 */
    padding: 0 10px;
    font-size: 0.85rem; /* 小さめの文字 */
    color: #888;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap; /* スマホで折り返すように */
    align-items: center;
}

.breadcrumb-list li {
    display: inline-block;
}

.breadcrumb-list a {
    color: #666;
    text-decoration: underline; /* リンクだとわかるように下線 */
    text-decoration-color: #ccc; /* 下線は薄く */
    transition: 0.3s;
}

.breadcrumb-list a:hover {
    color: #b09258; /* 和風ゴールド */
    text-decoration: none;
}

/* 区切り文字 (>) */
.delimiter {
    margin: 0 10px;
    font-size: 0.7rem;
    color: #ccc;
}

/* 現在のページ（リンクなし） */
.breadcrumb-list span[aria-current="page"] {
    color: #333;
    font-weight: bold;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .breadcrumb-area {
        margin-top: 15px;
        font-size: 0.75rem; /* スマホではさらに小さく */
    }
    .delimiter {
        margin: 0 6px;
    }
}

/* ====================================
   12. 404ページ (Error Page)
   ==================================== */

.error-404-area {
    padding: 100px 0;
    text-align: center;
    min-height: 50vh; /* 中身が少なくてもフッターが浮かないように */
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: bold;
    color: #ddd; /* 薄いグレーで背景っぽく */
    line-height: 1;
    margin-bottom: 0;
}

.error-sub {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
    color: #333;
}

.error-message {
    font-size: 1rem;
    line-height: 2;
    margin-bottom: 50px;
    color: #666;
}

/* トップへ戻るボタン */
.btn-home {
    display: inline-block;
    padding: 15px 40px;
    background: #333;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 0.1em;
    transition: 0.3s;
}

.btn-home:hover {
    background: #b09258; /* 和風ゴールド */
    color: #fff;
}

/* スマホ用の改行調整 */
.sp-only { display: none; }

@media (max-width: 768px) {
    .sp-only { display: block; }
}

/* ====================================
   13. 検索機能 (Search)
   ==================================== */

/* ヘッダーの虫眼鏡アイコン */
.nav-search-icon {
    cursor: pointer;
    padding: 10px;
    margin-left: 20px;
    color: #333;
    transition: color 0.3s;
}
.nav-search-icon:hover {
    color: #b09258;
}

/* モーダル全体（最初は非表示） */
.search-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

/* activeクラスがついたら表示 */
.search-modal.active {
    opacity: 1;
    visibility: visible;
}

/* 背景（半透明の黒） */
.search-modal-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); /* 濃いめの墨色 */
    backdrop-filter: blur(5px);   /* 背景をぼかす */
}

/* 中身（フォーム） */
.search-modal-inner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    text-align: center;
    color: #fff;
}

.search-modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    margin-bottom: 30px;
    color: #b09258;
}

/* 検索フォームのデザイン */
.search-form {
    display: flex;
    border-bottom: 1px solid #fff; /* 下線のみのシンプルなデザイン */
}

.search-field {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    padding: 15px;
    outline: none;
}

.search-field::placeholder {
    color: #ccc;
}

.search-submit {
    background: transparent;
    border: none;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    padding: 0 20px;
    transition: 0.3s;
}

.search-submit:hover {
    color: #b09258;
}

/* 閉じるボタン */
.search-modal-close {
    position: absolute;
    top: -80px; right: 0;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}
.search-modal-close:hover {
    color: #b09258;
}

/* 検索結果ページの「0件」表示 */
.no-result {
    text-align: center;
    padding: 100px 0;
    color: #666;
}