@font-face{
  font-family: 'hahen';
  src: url('/wp-content/themes/fukasawa-child/fonts/hahen.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+E000;
}

.hahen { font-family: 'hahen', sans-serif !important; }


/*
Theme Name: Fukasawa Child
Description: Fuksawaテーマの子テーマ
Template: fukasawa
Version: 1.0.0
*/

@import url("../fukasawa/style.css");

/* =================================================================
   フォント定義
   ================================================================= */

@font-face {
  font-family: 'SatsukiMincho';
  src: url('/wp-content/themes/fukasawa-child/fonts/SatsukiMincho.woff2') format('woff2');
  font-weight: 100 900; /* すべての太さに対応 */
  font-style: normal;
  font-display: swap; /* 読み込み中の空白を防ぐ */
}

/* =================================================================
   基本レイアウト・背景
   ================================================================= */

/* 周縁のグレーを白に */
html, body {
  background-color: #ffffff !important;
  background-image: none !important;
  font-family: 'SatsukiMincho', serif;
}

/* デスクトップのフォントサイズ */
body {
    font-size: 22px;
}

/* スマートフォンのフォントサイズ */
@media (max-width: 768px) {
    body {
        font-size: 18px;
    }
}

/* =================================================================
   コンテンツ幅設定
   ================================================================= */

/* .post-inner 要素の最大幅を設定 */
.post-inner {
    max-width: 1200px;
    width: 80%;
    margin: 0 auto;
}

/* .post-content 要素の幅を設定 */
.post-content {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    margin-top: 60px; /* 適切な数値に調整 */
}

/* =================================================================
   サイトタイトル・ヘッダー
   ================================================================= */

/* サイトタイトル（ホームリンク）の黒い枠を完全オフ */
a[rel="home"] {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  text-decoration: none !important;
  padding: 0 !important;
  display: inline !important;
}

/* 擬似要素で線を描いている場合も潰す */
a[rel="home"]::before,
a[rel="home"]::after {
  content: none !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
  background-image: none !important;
}

/* サイトタイトル（h1.blog-title）のサイズ変更・レスポンシブ対応 */
.blog-title,
.blog-title a {
  font-family: 'SatsukiMincho', serif !important;
  font-size: clamp(2.2rem, 4vw + 0.5rem, 3.6rem) !important;
  line-height: 1.1;
  white-space: nowrap; /* デスクトップでの食い込み防止 */
}

@media (max-width: 768px) {
  .blog-title,
  .blog-title a {
    font-size: 2rem !important;
  }
}

/* サイトタイトルにマウスを乗せたときの色をグレーに */
.blog-title a:hover {
  color: #aaaaaa !important;
}

/* サイトサブタイトル */
.site-subtitle {
    font-size: 22px;
}

@media (min-width: 768px) {
    .site-subtitle {
        font-size: 20px;
    }
}

/* =================================================================
   見出し・タイトル関連
   ================================================================= */

/* サイトタイトルだけ明朝 */
.site-title a { 
  font-family: 'SatsukiMincho', serif !important; 
}

/* トップや記事の見出し（安全網） */
.post-title, .post-title a,
.entry-title, .entry-title a,
.widget-title {
  font-family: 'SatsukiMincho', serif !important;
}

/* 投稿タイトル・ページタイトルを非表示 */
.post-title,
.page-title,
.entry-title {
    display: none !important;
}

/* =================================================================
   投稿メタ情報の非表示
   ================================================================= */

/* 日付を非表示 */
.post-date,
.entry-date,
.post-meta .post-date {
    display: none !important;
}

/* カテゴリーを非表示 */
.post-categories,
.entry-categories,
.post-meta .post-categories {
    display: none !important;
}

/* 投稿メタ情報全体を非表示 */
.post-meta {
    display: none !important;
}

/* 既存のクレジット行は非表示 */
.credits p { 
  display: none !important; 
}

/* =================================================================
   ギャラリー表示設定
   ================================================================= */

/* ギャラリーブロックを1列に縦並び */
/*
.wp-block-gallery.is-layout-flex {
  flex-direction: column !important;
  align-items: center;
}
*/

/* 各画像を幅50%で表示 */
/*
 .wp-block-gallery.is-layout-flex .wp-block-image {
  width: 50% !important;
  max-width: 800px;
  margin-bottom: 5rem !important; 
}
*/

/* ギャラリー内の画像を全体縮小表示 */
.wp-block-gallery.is-layout-flex .wp-block-image img {
  max-height: 800px;
  height: auto;
  width: auto;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
  background-color: #fff;
}

/* =================================================================
   Lightbox キャプション設定
   ================================================================= */

/* Lightbox のキャプションを さつき源代明朝 に */
.sl-caption {
  font-family: 'SatsukiMincho', serif !important;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

/* Simple Lightbox のキャプションをさつき源代明朝に変更 */
.slb_caption,
.slb_data,
.slb_data_title,
.slb_data_desc {
  font-family: 'SatsukiMincho', serif !important;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #000;
}

/* =================================================================
   特定ページの設定
   ================================================================= */

/* ページID 143 の特別設定 */
.page-id-143 .post-content.entry-content {
    display: block;
}

.page-id-143 .post-content.entry-content .wp-block-image {
    display: inline-block;
    margin: 0 10px;
}

.page-id-143 .post-content.entry-content .wp-block-image img {
    width: 100%;
    height: auto;
}

/* =================================================================
   固定バナー
   ================================================================= */

.fixed-post-banner {
    background: #f9f9f9;
    border-left: 4px solid #333;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.fixed-post-banner p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.fixed-post-banner a {
    color: #333;
    text-decoration: underline;
}

.fixed-post-banner a:hover {
    text-decoration: none;
}

/* =================================================================
   モバイルナビゲーション
   ================================================================= */

/* モバイル表示でメニューテキストを表示 */
@media (max-width: 768px) {
.nav-toggle p {
    opacity: 0 !important;
    font-size: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}
   
    /* ボタンのパディングを調整 */
    .nav-toggle {
        padding: 20px !important;
        min-width: auto !important;
        height: auto !important;
        min-height: 60px !important;
        width: auto !important;
    }
    
    /* ハンバーガーアイコン全体をもっと大きく */
    .nav-toggle .bars {
        transform: scale(1.5) !important;
    }
    
    /* 各バーの太さを統一 */
    .nav-toggle .bar {
        height: 2px !important;
    }
}

/* クレジットの表示 */
.credits {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #fff; /* 白色のテキスト */
}

.credits p {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.credits a {
    color: #ccc; /* 薄いグレー */
    text-decoration: none;
}

.credits a:hover {
    color: #fff; /* ホバー時は白 */
    text-decoration: underline;
}

/* ギャラリー表示設定（レスポンシブ対応） */
.wp-block-gallery.is-layout-flex {
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  text-align: center !important;
}

.wp-block-gallery.is-layout-flex .wp-block-image {
  width: 50% !important;
  max-width: 800px !important;
  margin: 0 auto 5rem auto !important;
  display: flex !important;
  justify-content: center !important;
}

/* スマートフォン・タブレット対応 */
@media (max-width: 768px) {
  .wp-block-gallery.is-layout-flex .wp-block-image {
    width: 90% !important;
    max-width: none !important;
    margin: 0 auto 5rem auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: translateX(0) !important;
  }
}

@media (max-width: 480px) {
  .wp-block-gallery.is-layout-flex .wp-block-image {
    width: 95% !important;
    margin: 0 auto 5rem auto !important;
  }
}

/* Chrome iOS 対応 */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    .wp-block-gallery.is-layout-flex .wp-block-image {
      -webkit-transform: translateX(0) !important;
      transform: translateX(0) !important;
      position: relative !important;
    }
  }
}

/* スマホ・タブレット表示でサイトタイトルを中央配置、ハンバーガーメニューを右配置 */
@media screen and (max-width: 768px) {
    .sidebar {
        position: relative;
    }
    
    /* タイトルを中央配置 */
    .blog-title {
        text-align: center;
        margin: 20px 0;
        position: relative;
        z-index: 1;
    }
    
    .blog-title a {
        display: inline-block;
        text-align: center;
    }
    
    /* ハンバーガーメニューをタイトルと同じ高さに配置 */
    .nav-toggle {
        position: absolute;
        top: 45%;
        right: 20px;
        transform: translateY(-50%);
        margin: 0;
        z-index: 10;
    }
    
    /* メニューは通常通り */
    .main-menu {
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }
    
    .main-menu li {
        text-align: center;
    }
    
    /* クレジット部分も中央配置 */
    .credits {
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }
}

/* タブレット専用の調整 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        position: relative;
    }
    
    .blog-title {
        text-align: center;
        margin: 25px 0;
    }
    
    .nav-toggle {
        position: absolute;
        top: 50%;
        right: 25px;
        transform: translateY(-50%);
        margin: 0;
    }
}

/* collection_of_works投稿タイプでパンくずリストとタイトルを非表示 */
.single-collection_of_works .breadcrumb {
    display: none !important;
}

.single-collection_of_works .post-content h1 {
    display: none !important;
}

// /* デスクトップ */
// .acf-custom-profile h3 {
//     font-size: 12px;
// }

// .shubun-content {
//     font-size: 28px;
// }
// 
// .misc-content {
//     font-size: 18px;
// }
// 
// /* タブレット */
// @media (max-width: 768px) {
//     .shubun-content {
//         font-size: 24px;
//     }
//     
//     .misc-content {
//         font-size: 16px;
//     }
// }
// 
// /* スマートフォン */
// @media (max-width: 480px) {
//     .shubun-content {
//         font-size: 20px;
//     }
//     
//     .misc-content {
//         font-size: 14px;
//     }
// }

/* WordPress画像キャプションのスタイル修正 */
.wp-element-caption {
    font-style: normal !important;  /* 斜体を標準に */
    font-size: 1.1em !important;    /* フォントサイズを少し大きく */
    text-align: left !important;  /* 中央揃え */
    margin-top: 0.5em;              /* 画像との間隔を調整 */
}

/* より具体的なセレクタでの指定（必要に応じて使用） */
.wp-block-image .wp-element-caption {
    font-style: normal !important;
    font-size: 1.1em !important;
    text-align: left !important;
    margin-top: 0.5em;
}

/* figcaptionタグ全般への適用 */
figcaption.wp-element-caption {
    font-style: normal !important;
    font-size: 1.1em !important;
    text-align: left !important;
    margin-top: 0.5em;
}

/* Contact Form 7の入力欄を統一 */
.wpcf7-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* メールアドレス欄を他の入力欄と同じスタイルに */
.wpcf7-email {
    /* 他のテキスト入力欄と同じスタイルを適用 */
    appearance: none;
    -webkit-appearance: none;
}

/* Contact Form 7の入力欄をすべて統一 */
.wpcf7-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #ffffff !important;
    appearance: none;
    -webkit-appearance: none;
}

/* テキストエリア（メッセージ本文）も同じスタイルに */
.wpcf7-textarea {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
}

/* Contact Form 7の入力欄をすべて統一 */
.wpcf7-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #ffffff !important;
    appearance: none;
    -webkit-appearance: none;
}

/* テキストエリア（メッセージ本文）も同じスタイルに */
.wpcf7-textarea {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
}

/* 送信ボタンのスタイルを修正 */
.wpcf7-submit {
    background-color: #0073aa !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: bold !important;
}

/* 送信ボタンのホバー効果 */
.wpcf7-submit:hover {
    background-color: #005a87 !important;
}

/* 特定のページ（ID: 569）でのみタイトルを表示 */
.page-id-569 .post-title {
    display: block !important;
}

/* 全ての画像ブロックを中央揃えにする */
.wp-block-image {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-image img {
    margin: 0 auto;
}

/* Groupブロック内の画像も中央揃えにする */
.wp-block-group.is-layout-flex {
    justify-content: center !important;
}

.wp-block-group.is-layout-flex .wp-block-image {
    margin: 0 auto !important;
}

/* より具体的な指定でフレックスレイアウトに対応 */
.wp-block-group .wp-block-image {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}