/*
Theme Name: yamaorijin
Author: あなたの名前
Description: akihirowoodworks.comを参考にしたオリジナルのWordPressテーマ
Version: 1.0.2
*/

/* --- ここからデザインのCSSを記述 --- */

/* リセットCSSの代わりとして、シンプルなスタイルを適用 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans JP','Meiryo';
  line-height: 1.6;
  color: #333;
  background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url('images/background-pattern.jpg');
  background-attachment: fixed;
  background-position: center top;
}

/* ヘッダーのスタイル - 初期状態 */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid #ccc;
  width: 100%;
  background-color: #fff;
  position: sticky; /* 画面上部に固定 */
  top: 0;
  z-index: 1000; /* side-menu/overlayより低くしないこと */
}

/* スクロール時に適用されるクラス（JSで付与） */
.fixed-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
}

/* ヘッダーがfixedになったときにコンテンツが被らないようにするダミー要素 */
.header-spacer { height: 80px; display: none; }
.fixed-header-active .header-spacer { display: block; }

.site-branding {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
}

.site-title { font-size: 24px; font-weight: normal; }
.site-title a { text-decoration: none; color: #333; }

/* ハンバーガー */
.menu-toggle {
  background: none; border: none; padding: 0;
  cursor: pointer; width: 50px; height: 30px; position: relative;
}
.menu-icon {
  display: block; width: 25px; height: 2px; background-color: #333;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.menu-icon::before, .menu-icon::after {
  content: ''; display: block; width: 100%; height: 100%; background: #333; position: absolute; left: 0;
}
.menu-icon::before { top: -8px; }
.menu-icon::after  { top:  8px; }

/* サイドメニュー */
.side-menu {
  position: fixed; top: 0; left: -300px; width: 300px; height: 100%;
  background: #fff; box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  transition: left 0.3s ease; z-index: 1100; padding: 20px;
}
.side-menu.open { left: 0; }

.side-menu .close-menu {
  background: none; border: none; font-size: 24px; cursor: pointer;
  position: absolute; top: 10px; right: 10px;
}

.side-menu .main-navigation ul { list-style: none; padding-top: 50px; }
.side-menu .main-navigation li { margin-bottom: 15px; }
.side-menu .main-navigation a {
  text-decoration: none; color: #333; font-size: 18px; font-weight: bold;
}

/* サイドバーのフッター部分のスタイル */
ul.sub-menu,
.side-menu-bottom .sub-menu { list-style: none !important; padding: 0; margin-bottom: 20px; }

.side-menu-bottom {
  position: absolute; bottom: 20px; width: calc(100% - 40px);
}
.side-menu-bottom .sub-menu li { margin-bottom: 8px; }
.side-menu-bottom .sub-menu a { text-decoration: none; color: #666; font-size: 14px; font-weight: normal; }

/* ソーシャルアイコン */
.social-icons { display: flex; gap: 15px; }
.social-icons .social-icon img { width: 20px; height: 20px; }

/* オーバーレイ */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: none; z-index: 1090;
}
.overlay.active { display: block; }

/* フッター */
.site-footer { text-align: center; padding: 20px; border-top: 1px solid #ccc; margin-top: 40px; }
.site-footer .site-info { font-size: 14px; color: #666; }

/* ファーストビュー */
.hero-section {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  height: 100vh; display: flex; justify-content: center; align-items: center;
  text-align: center; color: #fff;
}
.hero-content { padding: 20px; background: rgba(0,0,0,0.5); }
.hero-title { font-size: 48px; margin-bottom: 10px; }
.hero-subtitle { font-size: 24px; margin: 0; }

/* 全体コンテナ */
.container { max-width: 85% !important; margin: 0 auto; padding: 0 20px; }

/* セクションタイトル */
.section-title { font-size: 36px; text-align: center; margin-top: 80px; margin-bottom: 10px; }
.section-subtitle { font-size: 18px; text-align: center; color: #666; margin-bottom: 40px; }

/* NEWS */
.news-list-flat { list-style: none; padding: 0; margin: 0; }
.news-item-flat a {
  display: flex; align-items: center; text-decoration: none; line-height: 1.5;
  padding: 10px 0; border-bottom: 1px solid #ddd; color: #333; transition: background-color .3s;
}
.news-item-flat a:hover { background: #f9f9f9; }
.news-date-flat { font-size: 14px; margin-right: 20px; color: #666; flex-shrink: 0; }
.news-title-flat { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ABOUT */
.about-section { padding: 60px 0; }
.about-content { line-height: 2; text-align: center; }
.about-content-layout { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.about-image { flex: 0 0 30%; max-width: 30%; }
.about-image img { width: 100%; height: auto; display: block; border-radius: 8px; object-fit: cover; }
.about-text { flex: 1; max-width: 70%; }

/* PRODUCTS */
.product-section { padding: 60px 0; }
.product-buttons { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.product-button {
  position: relative; display: block; height: 300px; text-decoration: none; color: #fff; overflow: hidden;
}
.product-button::before {
  content: ""; position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s; z-index: 1;
}
.product-button.product-experience::before { background-image: url('images/taiken.jpg'); }
.product-button.product-item-button::before { background-image: url('images/syohin.jpg'); }
.product-button:hover::before { transform: scale(1.05); }
.product-button-content {
  position: relative; height: 100%; display: flex; justify-content: center; align-items: center;
  background: rgba(0,0,0,0.1); z-index: 2; transition: background-color .5s;
}
.product-button:hover .product-button-content { background: rgba(0,0,0,0.5); }
.product-button-title { font-size: 36px; font-weight: bold; color: #fff; margin: 0; }

/* more-link を右寄せに */
.more-link { text-align: right; margin-top: 20px; }

/* DIARY */
.diary-section { padding: 60px 0; }
.diary-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; justify-content: center; }
.diary-item { text-decoration: none; color: #333; display: block; }
.diary-thumbnail .diary-post-thumbnail { width: 100% !important; height: auto; display: block; margin-bottom: 10px; }
.diary-title { font-size: 16px; font-weight: bold; margin-bottom: 5px; }
.diary-date { font-size: 14px; color: #666; }

/* ボタンリンク */
.diary-button {
  display: inline-block; padding: 15px 40px; font-size: 16px; font-weight: bold;
  text-align: center; color: #333; text-decoration: none;
  background: #fff; border: 1px solid #333; border-radius: 50px; transition: background .3s, color .3s;
}
.diary-button:hover { background: #333; color: #fff; }

/* YouTube */
.youtube-section { margin-bottom: 60px; }

/* NEWSLETTER */
.newsletter-section {
  padding: 80px 0; text-align: center; color: #fff; background-size: cover; background-position: center; background-color: #333;
}
.newsletter-section .section-subtitle { color: #fff; }
.newsletter-form-wrapper { margin-top: 40px; }
.newsletter-form-wrapper form {
  display: flex; justify-content: center; align-items: center; max-width: 500px; margin: 0 auto;
  border-radius: 50px; background: #fff; overflow: hidden;
}
.newsletter-form-wrapper input[type="email"] { flex-grow: 1; border: none; padding: 15px 25px; outline: none; font-size: 16px; }
.newsletter-form-wrapper button[type="submit"] { background: transparent; border: none; color: #333; font-size: 24px; padding: 15px 25px; cursor: pointer; }

/* フッター拡張 */
.site-footer { background: #333; color: #fff; padding: 40px 0; font-size: 14px; }
.footer-top { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 20px; }
.footer-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.footer-navigation ul li a { color: #fff; text-decoration: none; transition: opacity .3s; }
.footer-navigation ul li a:hover { opacity: .7; }
.footer-social-icons { display: flex; gap: 10px; }
.footer-social-icon img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.footer-divider { border: none; height: 1px; background: #555; margin: 20px 0; }
.footer-bottom { text-align: center; }

/* Aboutページ */
.about-hero { display: flex; align-items: center; min-height: 80vh; }
.about-hero-image { width: 40%; height: 100%; }
.about-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.about-hero-content { width: 50%; padding: 0 5%; }
.about-hero-content .page-title { font-size: 1.5rem; margin-bottom: 10px; }
.about-hero-content p { font-size: 0.9rem; }
.about-history { padding: 80px 0; }
.about-history .container { display: flex; justify-content: center; }
.history-content { width: 60%; }
.history-title { font-size: 1.5rem; margin-bottom: 10px; }
.history-subtitle { font-size: 0.8rem; color: #666; margin-bottom: 20px; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { font-size: 0.8rem; line-height: 1.8; }

/* 新しいAboutページのメンバー */
.about-members { padding: 80px 0; }
.about-members .section-title { text-align: center; margin-bottom: 50px; }
.member-profiles-wrapper { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.member-profile { flex: 1 1 45%; max-width: 45%; text-align: center; margin-bottom: 30px; }
.profile-image-container { margin-bottom: 20px; }
.profile-image { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; }
.profile-text h3 { margin-bottom: 10px; }
.profile-social-link { margin-top: 20px; text-align: left; }
.profile-social-link a { color: #000; text-decoration: none; font-weight: bold; }
.profile-text .centered-text { text-align: center; }
.profile-text .left-aligned-text { text-align: left; padding-bottom: 3px; }

/* お問い合わせフォーム */
.wpcf7 { max-width: 600px; margin: 0 auto; padding: 20px; background: #f9f9f9; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.wpcf7 p { margin-bottom: 20px; font-size: 16px; color: #333; }
.wpcf7-form-control-wrap { display: block; }
.wpcf7-form-control { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 16px; transition: border-color .3s; }
.wpcf7-form-control:focus { outline: none; border-color: #555; }
.wpcf7-textarea { min-height: 150px; resize: vertical; }
.wpcf7-submit { display: block; width: 100%; padding: 15px; background: #333; color: #fff; border: none; border-radius: 5px; cursor: pointer; font-size: 18px; font-weight: bold; transition: background .3s; margin-top: 10px; }
.wpcf7-submit:hover { background: #555; }
.wpcf7-response-output { margin-top: 20px; padding: 15px; border-radius: 5px; text-align: center; }

/* コメントフォーム */
#comments { margin-top: 60px; }
.comment-reply-title { font-size: 24px; margin-bottom: 20px; }
.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label { display: block; margin-bottom: 5px; font-weight: bold; }
.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
  width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;
}
.comment-form input[type="submit"] {
  background: #333; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer;
}

/* Instagramアイコン */
.profile-social-link { text-align: left; margin-top: 10px; }
.profile-social-link a { color: #c13584; font-size: 2.5rem; transition: transform .3s; }
.profile-social-link a:hover { transform: scale(1.2); }

/* ===== Fixed page typography (“prose”) ===== */

/* 1) 幅・余白（1行あたり60〜75字を目安） */
.page .entry-content {
  padding: 48px 20px 96px; /* 余白は残す */
}

/* 新：.prose が付いている時だけ読みやすい幅にする */
.page .entry-content.prose {
  max-width: 760px;
  margin: 0 auto;
}

/* 2) ベース文字 */
.page .entry-content p,
.page .entry-content li{
  font-size: clamp(16px, 1.9vw, 18.5px);
  line-height: 1.9;
  letter-spacing: .02em;
  color:#2b2b2b;
}

/* 3) 縦リズム（段落間の基本間隔） */
.page .entry-content > * + *{ margin-top: 1.15em; }

/* 4) 見出し（h1はWP側で出る想定） */
.page .entry-title{
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1.25;
  letter-spacing:.02em;
  margin: 24px auto 12px;
}
.page .entry-content h2{
  font-size: clamp(22px, 2.6vw, 28px);
  margin-top: 2.2em; margin-bottom: .6em;
  padding-left: .8em; border-left: 4px solid #111;
}
.page .entry-content h3{
  font-size: clamp(18px, 2.1vw, 22px);
  margin-top: 1.8em; margin-bottom: .4em;
  position: relative;
}
.page .entry-content h3::after{
  content:""; position:absolute; left:0; bottom:-6px;
  width: 64px; height:2px; background:#ddd;
}

/* 5) リスト */
.page .entry-content ul{ padding-left: 1.4em; }
.page .entry-content ol{ padding-left: 1.6em; }
.page .entry-content li + li{ margin-top: .35em; }

/* 6) 引用 */
.page .entry-content blockquote{
  border-left: 4px solid #e5e5e5;
  margin: 1.6em 0; padding: .4em 1.2em; color:#555;
  background:#fafafa;
}

/* 7) 画像・キャプション */
.page .entry-content figure{ margin: 1.6em auto; }
.page .entry-content img{
  width:100%; height:auto; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
}
.page .entry-content figcaption{
  font-size: .9em; color:#666; text-align:center; margin-top:.5em;
}

/* 8) テーブル（スマホ横スクロール許容） */
.page .entry-content .table-wrap{ overflow-x:auto; }
.page .entry-content table{
  width:100%; border-collapse:collapse; font-size: .95em;
}
.page .entry-content th,
.page .entry-content td{
  border-bottom:1px solid #eee; padding:.8em 1em; text-align:left;
}
.page .entry-content thead th{ background:#fafafa; }

/* 9) 強調ボックス（ブロックの「追加CSSクラス」に callout を指定） */
.page .entry-content .callout{
  border:1px solid #e7e7e7; border-left:5px solid #111;
  background:#fff; padding:1.2em 1.2em 1.2em 1.1em; border-radius:10px;
}
.page .entry-content .callout.info{ border-left-color:#4C8BF5; }
.page .entry-content .callout.warn{ border-left-color:#FF9D00; }

/* 10) ボタン（Gutenbergボタンの洗練） */
.page .entry-content .wp-block-button__link{
  border-radius: 999px; padding:.85em 1.4em; font-weight:700;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.page .entry-content .is-style-outline .wp-block-button__link{
  border-width:2px;
}

/* パンくず */
.breadcrumbs{
  max-width: 1200px; margin: 12px auto 8px; padding: 0 20px;
  font-size:.92rem; color:#777;
}
.breadcrumbs a{ color:#777; text-decoration:none; }
.breadcrumbs a:hover{ text-decoration:underline; }
.breadcrumbs .sep{ margin: 0 .4em; color:#bbb; }

/* ページ内リンクのフォーカス（アクセシビリティ） */
.page .entry-content a:focus{ outline: 2px solid #111; outline-offset:2px; }

/* --- Coverブロックは従来のレイアウトに戻す（例外） --- */
.page .entry-content .wp-block-cover img,
.page .entry-content .wp-block-cover video,
.page .entry-content .wp-block-cover__image-background {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Cover内の画像は影や角丸を適用しない（任意） */
.page .entry-content .wp-block-cover img {
  box-shadow: none !important;
  border-radius: inherit !important;
}


/* ===================== カバー写真のリンク設定 ===================== */
.left-cover-link { position: relative; }
.left-cover-link .wp-block-cover__inner-container { position: static !important; }
.left-cover-link .wp-block-cover__inner-container > * { position: relative; z-index: 2; }
.left-cover-link .cover-hit{
  position: absolute; inset: 0; display: block; z-index: 999; pointer-events: auto; border-radius: inherit;
}
.block-editor-page .left-cover-link .cover-hit { display: none; }

/* 背景スクロール抑止（メニュー開時） */
.no-scroll { overflow: hidden; }

/* 視覚的に隠すテキスト（スクリーンリーダー用） */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: static !important; width: auto; height: auto; margin: 0; clip: auto; white-space: normal;
}

/* ====== サイドメニュー：残像スライド（滑らか版） ====== */
/* 初期（少し左に & 透明） */
.side-menu .main-navigation li,
.side-menu .side-menu-bottom .sub-menu li,
.side-menu .social-icons .social-icon {
  opacity: 0;
  transform: translate3d(-10px, 0, 0);
  will-change: transform, opacity;
}
/* 開いたらアニメ開始 */
.side-menu.open .main-navigation li,
.side-menu.open .side-menu-bottom .sub-menu li,
.side-menu.open .social-icons .social-icon {
  animation-name: menuStaggerSoft;
  animation-duration: 1s; /* さらにゆっくりにしたい場合は 1.2s などに */
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
}
@keyframes menuStaggerSoft {
  0%   { opacity: 0; transform: translate3d(-10px, 0, 0); }
  60%  { opacity: 1; transform: translate3d(  2px, 0, 0); } /* ほんの少し通り越す */
  100% { opacity: 1; transform: translate3d(  0, 0, 0); }
}
/* 遅延（0.12s刻み） */
.side-menu.open .main-navigation li:nth-child(1)  { animation-delay: .12s; }
.side-menu.open .main-navigation li:nth-child(2)  { animation-delay: .24s; }
.side-menu.open .main-navigation li:nth-child(3)  { animation-delay: .36s; }
.side-menu.open .main-navigation li:nth-child(4)  { animation-delay: .48s; }
.side-menu.open .main-navigation li:nth-child(5)  { animation-delay: .60s; }
.side-menu.open .main-navigation li:nth-child(6)  { animation-delay: .72s; }
.side-menu.open .main-navigation li:nth-child(7)  { animation-delay: .84s; }
.side-menu.open .main-navigation li:nth-child(8)  { animation-delay: .96s; }
.side-menu.open .main-navigation li:nth-child(9)  { animation-delay: 1.08s; }
.side-menu.open .main-navigation li:nth-child(10) { animation-delay: 1.20s; }
.side-menu.open .side-menu-bottom .sub-menu li:nth-child(1) { animation-delay: 1.32s; }
.side-menu.open .side-menu-bottom .sub-menu li:nth-child(2) { animation-delay: 1.44s; }
.side-menu.open .social-icons .social-icon:nth-child(1) { animation-delay: 1.56s; }
.side-menu.open .social-icons .social-icon:nth-child(2) { animation-delay: 1.68s; }

/* 動きに弱いユーザー配慮 */
@media (prefers-reduced-motion: reduce) {
  .side-menu, .overlay { transition: none !important; }
  .side-menu .main-navigation li,
  .side-menu .side-menu-bottom .sub-menu li,
  .side-menu .social-icons .social-icon {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}