/*
Theme Name: 令和の芝居小屋
Author: あなたの名前
Description: 浮世絵と和紙をモチーフにしたオリジナルテーマ
Version: 1.1
*/

@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;600&family=Yuji+Syuku&display=swap');

/* ----------------------------------------------------
   基本設定 (Variables & Base)
---------------------------------------------------- */
:root {
    --bg-washi: #fcfaf2;
    --text-sumi: #2b2b2b;
    --accent-kaki: #ea5506;
    --accent-ai: #165e83;
    --font-heading: 'Yuji Syuku', serif;
    --font-body: 'Shippori Mincho', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text-sumi);
    background-color: var(--bg-washi);
    line-height: 1.8;
    font-feature-settings: "palt";
}

a { color: var(--accent-ai); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-kaki); }
img { max-width: 100%; height: auto; display: block; }

/* ----------------------------------------------------
   和紙テクスチャ
---------------------------------------------------- */
.site-wrapper.washi-bg {
    position: relative;
    background-color: var(--bg-washi);
    overflow: hidden;
    min-height: 100vh;
}
.site-wrapper.washi-bg::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1; opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------
   ヘッダー & ロゴ
---------------------------------------------------- */
.site-header {
    padding: 20px;
    display: flex; justify-content: center; align-items: center;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    
    /* ↓ これを追加してください！これでヘッダーが一番手前に来ます */
    z-index: 100;
}
.site-title a {
    font-family: var(--font-heading); font-size: 2rem; color: var(--text-sumi);
    letter-spacing: 0.1em; writing-mode: vertical-rl; text-orientation: upright;
    border: 2px solid var(--text-sumi); padding: 10px 5px;
    background-color: #fff; box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    text-decoration: none;
}

/* ハンバーガーボタン（最終奥義版） */
.menu-toggle {
    /* 絶対に画面の右上に固定する設定 */
    position: fixed; 
    right: 20px; 
    top: 20px;
    
    /* 誰よりも手前に表示する設定 */
    z-index: 9999; 
    
    /* ボタンのスタイル */
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--accent-kaki);
    font-family: var(--font-heading);
    
    /* タップ領域を少し広げて押しやすくする */
    padding: 10px;
    margin: -10px;
}
.menu-icon-bar {
    display: block; width: 30px; height: 3px;
    background-color: var(--accent-kaki); margin-bottom: 5px; transition: all 0.3s;
}
.menu-text { font-size: 0.8rem; margin-top: 5px; }

/* ボタンのアニメーション */
.menu-toggle.active .menu-icon-bar:nth-of-type(2) { opacity: 0; }
.menu-toggle.active .menu-icon-bar:nth-of-type(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active .menu-icon-bar:nth-of-type(3) { transform: translateY(-8px) rotate(-45deg); }
.menu-toggle.active .menu-text { font-size: 0; color: transparent; }
.menu-toggle.active .menu-text::after {
    content: "閉"; display: block; font-size: 0.8rem;
    color: var(--accent-kaki); line-height: 1;
}

/* ----------------------------------------------------
   グローバルナビ (ハンバーガーメニュー)
---------------------------------------------------- */
.global-nav {
    display: flex; justify-content: center; align-items: center;
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: rgba(43, 43, 43, 0.98); z-index: 100;
    opacity: 0; visibility: hidden; transition: all 0.5s ease;
}
.global-nav.active { opacity: 1; visibility: visible; }

.global-nav ul {
    list-style: none; writing-mode: vertical-rl; text-orientation: upright;
    width: 100%; height: 60vh;
    display: flex; flex-direction: row; justify-content: center; align-items: center;
    gap: 60px; padding-top: 40px;
}
.global-nav li {
    flex: 0 0 auto; margin: 0;
    border-left: 1px solid rgba(255,255,255,0.2); padding-left: 30px;
}
.global-nav a {
    color: #fff; font-family: var(--font-heading); font-size: 1.5rem;
    letter-spacing: 0.3em; text-decoration: none; position: relative;
    display: inline-block; white-space: nowrap; line-height: 2;
    font-feature-settings: normal;
    outline: none; -webkit-tap-highlight-color: transparent;
}
/* 日の丸演出 */
.global-nav a::before {
    content: ""; position: absolute; top: -25px; left: 50%;
    transform: translateX(-50%) scale(0);
    width: 12px; height: 12px; background-color: var(--accent-kaki);
    border-radius: 50%; z-index: 10; pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.global-nav a:hover { color: var(--accent-kaki); }
.global-nav a:hover::before { transform: translateX(-50%) scale(1); }

/* ----------------------------------------------------
   メインコンテンツ & 共通パーツ
---------------------------------------------------- */
main { max-width: 800px; margin: 40px auto; padding: 0 20px; }

/* 見出し（修正版：Flexboxによる完全中央揃え） */
.section-title {
    font-family: var(--font-heading); font-size: 2rem;
    display: flex; justify-content: center; align-items: center; gap: 20px;
    width: 100%; margin: 0 0 40px 0;
}
.section-title::before, .section-title::after {
    content: "◆"; color: var(--accent-kaki); font-size: 0.8rem; transform: translateY(-2px);
}
.subtitle {
    display: block; width: 100%; text-align: center;
    font-size: 0.9rem; font-family: var(--font-body); color: #666;
    position: absolute; bottom: -25px; left: 0; /* タイトルの親要素の相対位置に依存しないよう注意 */
}
/* ※タイトルのサブタイトル位置調整用ラッパーが必要なら本来はHTML側を変えるべきですが、一旦CSSで調整 */
.section-title { position: relative; } 

/* ヒーローイメージ */
.hero-section { position: relative; margin-bottom: 60px; padding-top: 20px; }
.hero-image {
    position: relative; width: 100%; border: 10px solid #fff;
    outline: 1px solid var(--text-sumi); box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.hero-image img {
    width: 100%; height: 60vh; object-fit: cover; object-position: center top;
    filter: sepia(10%);
}
.hero-message {
    position: absolute; top: 10%; right: 5%;
    background-color: rgba(255, 255, 255, 0.85); padding: 30px 15px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1); z-index: 2;
    writing-mode: vertical-rl; text-orientation: upright;
}
.hero-message p, .hero-message h1 {
    font-family: var(--font-heading); font-size: 1.8rem; color: var(--text-sumi);
    letter-spacing: 0.2em; border-left: 2px solid var(--accent-kaki); padding-left: 15px;
}

/* 瓦版（記事リスト） */
.post-card {
    background-color: #fff; border: 1px solid #ddd; padding: 0;
    margin-bottom: 20px; display: flex; align-items: stretch; overflow: hidden;
    box-shadow: 5px 5px 0px rgba(234, 85, 6, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 8px 8px 0px rgba(234, 85, 6, 0.4); }
.post-thumbnail { flex: 0 0 35%; position: relative; overflow: hidden; border-right: 1px solid #eee; }
.post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.post-card:hover .post-thumbnail img { transform: scale(1.1); }
.post-content { padding: 20px; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.post-title { font-size: 1.2rem; margin-top: 10px; line-height: 1.5; font-family: var(--font-body); font-weight: 600; }
.post-content time { font-size: 0.85rem; color: #888; margin-top: 5px; display: block; }
.cat-label {
    background-color: var(--text-sumi); color: #fff; padding: 3px 8px;
    font-size: 0.8rem; font-family: var(--font-heading); margin-right: 10px;
}
.type-performance .cat-label { background-color: var(--accent-kaki); }
.view-more { text-align: center; margin-top: 40px; }
.btn-standard {
    display: inline-block; border: 1px solid var(--text-sumi); padding: 10px 30px;
    color: var(--text-sumi); transition: all 0.3s;
}
.btn-standard:hover { background-color: var(--text-sumi); color: #fff; }

/* プロフィール */
.profile-inner {
    background-color: #fff;
    padding: 40px;
    display: flex;
    align-items: flex-start; /* 上揃えに変更 */
    gap: 40px;
    border: 1px solid var(--text-sumi);
    position: relative;
    
    /* はみ出し防止の重要設定 */
    max-width: 100%;
    overflow: hidden; 
}
.profile-inner::after {
    content: ""; position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px solid var(--accent-kaki); pointer-events: none;
}

.profile-photo {
    flex: 0 0 200px; /* 写真の幅は固定 */
}
.profile-photo img {
    width: 200px; height: 200px;
    object-fit: cover; border-radius: 50%; border: 3px solid #eee;
}

/* テキストエリアの修正（ここが原因でした） */
.profile-text {
    flex: 1;        /* 残りのスペースを埋める */
    min-width: 0;   /* これがないとFlexbox内ではみ出ることがある */
}

/* SNSアイコンリスト */
.profile-sns-list {
    list-style: none;
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding-left: 0; /* 左の余白を消す */
}
.profile-sns-list li a {
    display: block; width: 24px; height: 24px;
    color: var(--text-sumi); transition: all 0.3s;
}
.profile-sns-list li a:hover {
    color: var(--accent-kaki); transform: translateY(-2px);
}
.profile-sns-list svg { width: 100%; height: 100%; }

/* スマホ対応 */
@media (max-width: 768px) {
    .profile-inner {
        flex-direction: column;
        align-items: center; /* スマホでは中央揃え */
        text-align: center;
        padding: 30px 20px;
    }
    .profile-photo img { width: 150px; height: 150px; }
    
    .profile-sns-list {
        justify-content: center; /* アイコンも中央寄せ */
    }
}
.btn-text-link { color: var(--accent-kaki); font-weight: bold; border-bottom: 1px solid var(--accent-kaki); }

/* スクロールアニメーション */
.scroll-anim { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.scroll-anim.is-visible { opacity: 1; transform: translateY(0); }
.post-card.scroll-anim:nth-child(2) { transition-delay: 0.2s; }
.post-card.scroll-anim:nth-child(3) { transition-delay: 0.4s; }

/* ----------------------------------------------------
   記事詳細ページ (Single)
---------------------------------------------------- */
.post-title-vertical { font-size: 1.5rem; line-height: 1.6; max-height: 400px; }
.single-container {
    max-width: 800px; margin: -50px auto 60px; padding: 60px 40px;
    background-color: #fff; position: relative; z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid #eee;
}
.single-meta {
    display: flex; justify-content: flex-end; align-items: center; gap: 15px;
    margin-bottom: 40px; border-bottom: 1px solid #eee; padding-bottom: 20px;
    color: #888; font-family: var(--font-heading);
}
.entry-content { font-size: 1.05rem; line-height: 2; }
.entry-content p { margin-bottom: 2em; }
.entry-content h2 {
    font-family: var(--font-heading); font-size: 1.6rem;
    border-bottom: 2px solid var(--accent-kaki); padding-bottom: 10px; margin: 3em 0 1.5em;
}
.entry-content h3 {
    font-size: 1.3rem; border-left: 5px solid var(--text-sumi);
    padding-left: 15px; margin: 2.5em 0 1.2em;
}

/* ----------------------------------------------------
   お問い合わせフォーム (Fix版)
---------------------------------------------------- */
.contact-section {
    padding: 60px 20px; background-color: #fff; border-top: 1px solid #eee;
    display: flex; flex-direction: column; align-items: center; /* Flexboxで強制中央寄せ */
}
.contact-intro { margin-bottom: 40px; font-size: 0.95rem; text-align: center; max-width: 600px; }
.contact-form-wrapper { width: 100%; max-width: 600px; }
.wpcf7 { width: 100%; }

.form-row { margin-bottom: 25px; width: 100%; }
.contact-section label {
    display: block; margin-bottom: 8px; font-family: var(--font-heading);
    font-size: 1.1rem; color: var(--text-sumi); text-align: left;
}

/* 入力フォームスタイル */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea {
    width: 100%; padding: 15px; background-color: var(--bg-washi);
    border: none; border-bottom: 2px solid #ccc; border-radius: 0;
    -webkit-appearance: none; appearance: none;
    font-family: var(--font-body); font-size: 16px; color: var(--text-sumi);
    box-sizing: border-box; margin-bottom: 10px;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: none; border-bottom-color: var(--accent-kaki); }

/* 送信ボタン */
.wpcf7 input[type="submit"] {
    display: block; width: 100%; max-width: 300px; margin: 30px auto 0;
    padding: 15px; background-color: var(--text-sumi); color: #fff;
    border: none; font-family: var(--font-heading); font-size: 1.2rem;
    cursor: pointer; box-shadow: 5px 5px 0px rgba(234, 85, 6, 0.4);
    transition: all 0.3s; border-radius: 0; -webkit-appearance: none;
}
.wpcf7 input[type="submit"]:hover {
    background-color: var(--accent-kaki); transform: translateY(2px);
    box-shadow: 3px 3px 0px rgba(234, 85, 6, 0.4);
}

/* ----------------------------------------------------
   フッター & スマホ対応
---------------------------------------------------- */
.site-footer {
    margin-top: 60px; padding: 40px 20px; background-color: var(--text-sumi);
    color: var(--bg-washi); text-align: center; border-top: 5px solid var(--accent-kaki);
}
.btn-primary {
    display: inline-block; background-color: var(--accent-kaki); color: #fff;
    padding: 15px 40px; border-radius: 30px; font-weight: bold; margin-top: 20px;
}
.copyright { opacity: 0.7; margin-top: 20px; }

@media (max-width: 768px) {
    .post-card { flex-direction: column; }
    .post-thumbnail { width: 100%; height: 180px; border-right: none; border-bottom: 1px solid #eee; }
    .profile-inner { flex-direction: column; text-align: center; padding: 30px 20px; }
    .profile-photo img { width: 150px; height: 150px; }
    .single-container { margin: 0 auto; padding: 40px 20px; box-shadow: none; }
}

/* ----------------------------------------------------
   レイアウト微調整（セクション間の距離）
---------------------------------------------------- */
.updates-section {
    margin-bottom: 100px; /* 瓦版の下に100pxの余白を空ける */
}

/* ついでに、プロフィールとコンタクトの間も広げておくと綺麗です */
.profile-section {
    margin-bottom: 100px;
}

/* ----------------------------------------------------
   17. ポッドキャスト用の装飾
---------------------------------------------------- */
/* ポッドキャストのラベル色 */
.type-podcast .cat-label {
    background-color: #7b5ebb; /* 紫色など、Spotifyっぽい色や和風の藤色など */
}

/* 画像の上に「再生ボタン」のようなアイコンを乗せる */
.type-podcast .post-thumbnail::after {
    content: "▶"; /* 三角マーク */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    font-size: 2rem;
    color: #fff;
    background-color: rgba(0,0,0,0.5); /* 半透明の黒丸 */
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid #fff;
    pointer-events: none; /* クリックを邪魔しない */
}

/* ホバー時に少し光らせる */
.type-podcast:hover .post-thumbnail::after {
    background-color: rgba(234, 85, 6, 0.8); /* 柿色に変化 */
    border-color: var(--accent-kaki);
}

/* ----------------------------------------------------
   18. プロフィール内のSNSアイコン
---------------------------------------------------- */
.profile-sns-list {
    list-style: none;
    display: flex;
    gap: 15px; /* アイコン同士の間隔 */
    margin-top: 20px;
    padding: 0;
}

.profile-sns-list li a {
    display: block;
    width: 24px;  /* アイコンのサイズ */
    height: 24px;
    color: var(--text-sumi); /* 通常時は墨色 */
    transition: all 0.3s;
}

/* ホバー時に柿色にする */
.profile-sns-list li a:hover {
    color: var(--accent-kaki);
    transform: translateY(-2px); /* 少し浮き上がる */
}

/* SVG画像の設定 */
.profile-sns-list svg {
    width: 100%;
    height: 100%;
}

/* ----------------------------------------------------
   19. ページネーション (ページ送り)
---------------------------------------------------- */
.pagination {
    margin-top: 60px;
    text-align: center;
    font-family: var(--font-heading);
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid var(--text-sumi);
    color: var(--text-sumi);
    text-decoration: none;
    transition: all 0.3s;
    background-color: #fff;
}

/* 今いるページの色を変える */
.pagination .current,
.pagination .page-numbers:hover {
    background-color: var(--accent-kaki);
    color: #fff;
    border-color: var(--accent-kaki);
}

/* 「次へ」「前へ」の調整 */
.pagination .prev, 
.pagination .next {
    border: none;
    background: none;
    font-weight: bold;
}
.pagination .prev:hover, 
.pagination .next:hover {
    background: none;
    color: var(--accent-kaki);
}

/* ----------------------------------------------------
   ヒーロー画像の文字被せ（修正・強制版）
---------------------------------------------------- */

/* 1. 全体の枠（基準点） */
.hero-section {
    position: relative !important; /* 子要素の基準になる */
}

/* 2. 写真（背景として扱う） */
.hero-image {
    position: relative;
    z-index: 1; /* 奥に配置 */
}

/* 3. 文字の短冊（手前に浮かせて重ねる） */
.hero-message {
    position: absolute !important; /* 浮遊させる命令 */
    top: 10%;            /* 上から10%の位置 */
    right: 5%;           /* 右から5%の位置 */
    z-index: 10;         /* 写真より手前に表示 */
    
    /* デザイン調整（念のため） */
    background-color: rgba(255, 255, 255, 0.85);
    padding: 30px 15px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    writing-mode: vertical-rl; /* 縦書き */
    text-orientation: upright;
}

/* スマホでの位置調整 */
@media (max-width: 768px) {
    .hero-message {
        top: 5%;
        right: 3%;
    }
}

/* ----------------------------------------------------
   ヒーロー画像のレイアウト（グレー削除・位置調整版）
---------------------------------------------------- */

/* 1. 外枠 */
.hero-section {
    margin-bottom: 60px;
    padding-top: 20px;
}

/* 2. 写真と文字をまとめる箱 */
.hero-content-wrapper {
    position: relative;
    width: 100%;
    height: 60vh; /* 高さ固定 */
    
    border: 10px solid #fff;
    outline: 1px solid var(--text-sumi);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    
    /* ★灰色の背景色を削除しました（透明にします） */
    background-color: transparent; 
}

/* 3. 写真の設定 */
.hero-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠に合わせて拡大縮小 */
    
    /* ★ここが重要：写真の「焦点」を決める数字 */
    /* 「center 30%」とは、「左右は真ん中、上下は上から30%の位置」を中心にするという意味です */
    /* 顔が切れやすい場合は、この30%という数字を 20% や 40% に変えてみてください */
    object-position: center 55%; 
    
    filter: sepia(10%);
}

/* 4. 文字（短冊）の設定 */
.hero-message {
    position: absolute;
    top: 10%;
    right: 5%;
    z-index: 10;
    
    background-color: rgba(255, 255, 255, 0.85);
    padding: 30px 15px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.hero-message p {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-sumi);
    letter-spacing: 0.2em;
    border-left: 2px solid var(--accent-kaki);
    padding-left: 15px;
    margin: 0;
}

/* スマホ用 */
@media (max-width: 768px) {
    .hero-content-wrapper { height: 50vh; }
    .hero-message { top: 5%; right: 3%; padding: 20px 10px; }
    .hero-message p { font-size: 1.4rem; }
}

/* ----------------------------------------------------
   ヘッダーの区切り線を消す
---------------------------------------------------- */
.site-header {
    border-bottom: none;
}

/* ----------------------------------------------------
   画像のリンク化対応
---------------------------------------------------- */
.post-thumbnail a {
    display: block;  /* ブロック要素にする */
    width: 100%;
    height: 100%;    /* 親枠いっぱいに広げる */
    color: inherit;  /* 変な色がつかないように */
}

/* ----------------------------------------------------
   スマホ表示の微調整（プロフィールを左寄せ）
---------------------------------------------------- */
@media (max-width: 768px) {
    /* プロフィールの文章エリアを左寄せに戻す */
    .profile-text {
        text-align: left;
        width: 100%; /* 横幅いっぱいに使う */
    }


    
    /* ※もし「写真は真ん中のままがいい」ならこのままでOKです。
       写真も左にしたい場合は .profile-inner { align-items: flex-start; } を追加してください */
}