/* ============================================================================
 * 山寺芭蕉記念館（yamadera-basho） Layer 2 スタイル
 * 旧 samidare デザイン（ssl.samidare.jp/~tukiyamaf/basho/p/basho241016.css）を踏襲
 * 変数定義は :root に、各 data-template で scope しない要素は header/footer のみ
 * ========================================================================== */

[data-template="custom-yamadera-basho"] {
  --basho-brown:        #604C3F;
  --basho-brown-dark:   #3f3225;
  --basho-green:        #345720;
  --basho-gold:         #876100;
  --basho-sand:         #D0B580;
  --basho-cream:        #F8F6E3;
  --basho-paper:        #F4F2ED;
  --basho-stone:        #E7E0DC;
  --basho-ink:          #333;
  --basho-mute:         #9E9E9F;
  --basho-maxw:         1120px;

  /* サイト内のテキストはすべて BIZ UDゴシックで統一（旧 mincho 指定箇所も含めて） */
  --basho-font-mincho:  'BIZ UDPGothic', 'BIZ UDGothic', 'メイリオ', Meiryo, 'ヒラギノ角ゴシック','Hiragino Sans', YuGothic, 'Yu Gothic', sans-serif;
  --basho-font-sans:    'BIZ UDPGothic', 'BIZ UDGothic', 'メイリオ', Meiryo, 'ヒラギノ角ゴシック','Hiragino Sans', YuGothic, 'Yu Gothic', sans-serif;
  --basho-font-rounded: 'M PLUS Rounded 1c', sans-serif;
}

/* body 直下に当たるため scope 不要 */
body:has([data-basho-root]) {
  font-family: var(--basho-font-sans);
  color: var(--basho-ink);
  background: var(--basho-paper);
}
/* 保険：Chrome の wrap div に明示適用（body inline-style に負けないよう重ねる） */
[data-basho-root], [data-template="custom-yamadera-basho"] {
  font-family: var(--basho-font-sans);
}

/* ===== ヘッダー（黒背景＋白ロゴ、旧 basho241016 準拠） ===== */
.basho-header {
  position: sticky; top: 0; z-index: 50;
  background: #000;
  border-bottom: 2px solid var(--basho-sand);
}
.basho-header__inner {
  max-width: 100%;
  margin: 0;
  padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.basho-header__logo {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none;
}
.basho-header__logo img {
  display: block; height: 44px; width: auto;
}
.basho-header__logo-en { height: 36px !important; opacity: 0.9; }
@media (max-width: 820px) {
  .basho-header__inner { padding: 14px 18px; }
  .basho-header__logo { gap: 10px; }
  .basho-header__logo img { height: 32px; }
  .basho-header__logo-en { height: 26px !important; }
}
@media (max-width: 480px) {
  .basho-header__logo-en { display: none; }
}

/* ハンバーガー（白線） */
.basho-header__hamburger {
  width: 56px; height: 44px; border: none; background: transparent;
  display: flex; flex-direction: column; justify-content: center; gap: 7px;
  cursor: pointer;
}
.basho-header__hamburger span {
  display: block; height: 2px; width: 37px; background: #fff;
  margin: 0 auto;
  transition: transform .25s, opacity .25s;
}
.basho-header__hamburger.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.basho-header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.basho-header__hamburger.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ドロワー（旧 basho241016 準拠：右から深緑シート） */
.basho-drawer-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; transition: opacity .25s;
  z-index: 60;
}
.basho-drawer-modal.is-open { opacity: 1; pointer-events: auto; }

.basho-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh;
  width: min(520px, 92vw);
  z-index: 70;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  padding: 70px 32px 40px;
  box-shadow: -8px 0 32px rgba(0,0,0,0.25);
  color: #fff;
  background-color: var(--basho-green);
  /* 麻の葉風の控えめな幾何学模様 */
  background-image:
    repeating-linear-gradient( 60deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(-60deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(  0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 32px);
}
.basho-drawer.is-open { transform: translateX(0); }

.basho-drawer__close {
  position: absolute; top: 16px; right: 20px;
  width: 48px; height: 48px; border: none; background: transparent;
  cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.basho-drawer__close svg { display: block; }

.basho-drawer__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* 左カラム：ピル型ナビ */
.basho-drawer__pills {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 16px;
}
.basho-drawer__pill {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 60px; padding: 10px 14px;
  background: #fff;
  color: var(--basho-brown);
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--basho-font-mincho);
  font-size: 20px; letter-spacing: 0.08em;
  line-height: 1.25;
  transition: color .2s, background .2s;
}
.basho-drawer__pill:hover { background: var(--basho-cream); color: var(--basho-green); }

/* 右カラム：言語 / 文字サイズ / SNS */
.basho-drawer__side {
  display: flex; flex-direction: column; gap: 20px;
}
.basho-drawer__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.basho-drawer__list li a {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; text-decoration: none;
  font-family: var(--basho-font-mincho);
  font-size: 20px; letter-spacing: 0.06em;
}
.basho-drawer__list li a:hover { color: var(--basho-cream); }
.basho-drawer__list li a[aria-current="true"] u { text-decoration-thickness: 1px; }
.basho-drawer__arrow {
  color: #fff; opacity: 0.9; margin-right: 4px;
}
.basho-drawer__list--sizes { margin-top: 20px; }

.basho-drawer__sns {
  margin-top: 28px;
  display: flex; gap: 14px;
}
.basho-drawer__sns a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 8px;
  color: var(--basho-green); background: #fff;
}
.basho-drawer__sns a:hover { background: var(--basho-cream); }

@media (max-width: 560px) {
  .basho-drawer__grid { grid-template-columns: 1fr; gap: 28px; }
  .basho-drawer { padding: 70px 24px 32px; }
}

/* ===== main ===== */
.basho-main { min-height: 60vh; margin: 0; padding: 0; }
.basho-top { margin: 0; padding: 0; }

/* ===== TOP ヒーロー ===== */
.basho-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 2100 / 1013;
  max-height: 70vh;
  overflow: hidden;
  background: #000;
}
.basho-hero__slides { position: absolute; inset: 0; }
.basho-hero__slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease-in-out;
}
.basho-hero__slide.is-active { opacity: 1; }
.basho-hero__haiku {
  position: absolute;
  right: 4%; bottom: 6%;
  height: 72%; max-height: 540px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.45));
  transform-origin: 50% 70%;
  /* 初回：音もなく滲み出るようにフェードイン → その後ずっと微揺れ */
  animation:
    basho-haiku-enter 2.2s cubic-bezier(.22,.9,.3,1) 0.3s backwards,
    basho-haiku-float 8s ease-in-out 2.5s infinite;
}
@keyframes basho-haiku-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.985); filter: drop-shadow(0 2px 8px rgba(0,0,0,0.45)) blur(2px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);     filter: drop-shadow(0 2px 8px rgba(0,0,0,0.45)) blur(0); }
}
@keyframes basho-haiku-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-6px) rotate(-0.25deg); }
}
@media (prefers-reduced-motion: reduce) {
  .basho-hero__haiku { animation: none; }
}
@media (max-width: 640px) {
  .basho-hero { max-height: 60vh; }
  .basho-hero__haiku { height: 56%; right: 6%; }
}

/* ===== TOP アンカーボタン（旧UI：淡クリーム＋金縁ピル） ===== */
.basho-anchors {
  max-width: var(--basho-maxw); margin: 48px auto 56px;
  padding: 0 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.basho-anchors__item {
  display: flex; align-items: center; justify-content: center;
  padding: 20px 14px; min-height: 68px;
  background: var(--basho-cream);
  border: 2px solid var(--basho-sand);
  border-radius: 999px;
  color: var(--basho-brown); text-decoration: none;
  font-family: var(--basho-font-sans);
  font-size: 19px; letter-spacing: 0.1em; font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(255,255,255,0.6);
  transition: background .25s, color .25s, border-color .25s, box-shadow .25s, transform .15s;
}
.basho-anchors__item:hover {
  background: var(--basho-brown); color: #fff; border-color: var(--basho-brown);
  box-shadow: 0 4px 10px rgba(0,0,0,0.14);
  transform: translateY(-1px);
}
@media (max-width: 820px) {
  .basho-anchors { grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 32px auto 40px; }
  .basho-anchors__item { font-size: 17px; min-height: 60px; padding: 16px 12px; }
}

/* ===== TOP セクション共通 ===== */
.basho-section {
  max-width: var(--basho-maxw); margin: 48px auto;
  padding: 0 20px;
}
.basho-head01 {
  font-family: var(--basho-font-mincho);
  font-size: 29px; letter-spacing: 0.1em;
  color: var(--basho-brown);
  text-align: center;
  margin: 0 0 32px;
  position: relative; padding-bottom: 14px;
}
.basho-head01::after {
  content: ''; display: block;
  width: 48px; height: 2px; background: var(--basho-brown);
  margin: 10px auto 0;
}

/* ===== 新着記事 ===== */
.basho-news__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px;
}
.basho-news__item {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px;
  padding: 16px; background: #fff;
  border: 1px solid var(--basho-stone);
  transition: box-shadow .25s;
}
.basho-news__item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.basho-news__thumb {
  display: block; width: 220px; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--basho-cream);
}
.basho-news__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.basho-news__item:hover .basho-news__thumb img { transform: scale(1.04); }
.basho-news__thumb--placeholder { background: var(--basho-cream); }
.basho-news__body { display: flex; flex-direction: column; gap: 8px; }
.basho-news__date {
  margin: 0; color: var(--basho-mute); font-size: 16px;
  letter-spacing: 0.08em;
}
.basho-news__title {
  margin: 0; font-size: 20px; line-height: 1.5;
  font-family: var(--basho-font-mincho);
}
.basho-news__title a { color: var(--basho-brown); text-decoration: none; }
.basho-news__title a:hover { color: var(--basho-green); text-decoration: underline; }
.basho-news__excerpt {
  margin: 0; color: var(--basho-ink); font-size: 17px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.basho-news__more {
  margin-top: auto; color: var(--basho-green);
  font-size: 16px; text-decoration: none; align-self: flex-start;
}
.basho-news__more:hover { text-decoration: underline; }
.basho-news__more-link {
  margin-top: 28px; text-align: center;
}
.basho-news__more-link a {
  display: inline-block; padding: 10px 24px;
  color: var(--basho-brown); border: 1px solid var(--basho-brown);
  text-decoration: none; font-family: var(--basho-font-mincho);
  font-size: 18px; letter-spacing: 0.08em;
  transition: background .2s, color .2s;
}
.basho-news__more-link a:hover { background: var(--basho-brown); color: #fff; }

@media (max-width: 640px) {
  .basho-news__item { grid-template-columns: 1fr; gap: 12px; }
  .basho-news__thumb { width: 100%; }
}

/* ===== Footer（深緑1段コンパクト構成：館名 + サイトマップ + 関連リンク） ===== */
.basho-footer {
  margin-top: 64px;
  background-color: var(--basho-green);
  background-image:
    repeating-linear-gradient( 60deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(-60deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(  0deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 32px);
  color: #fff;
}
.basho-footer__inner {
  max-width: var(--basho-maxw); margin: 0 auto;
  padding: 48px 24px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.basho-footer__col-title {
  margin: 0 0 14px;
  font-family: var(--basho-font-mincho);
  font-size: 16px; letter-spacing: 0.12em;
  color: #fff;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}
.basho-footer__arrow { color: var(--basho-sand); margin-right: 6px; }

/* 1列目：館名＋住所＋開館時間＋運営注記 */
.basho-footer__brand-name { margin: 0 0 16px; }
.basho-footer__brand-name .ja {
  display: block; font-family: var(--basho-font-mincho);
  font-size: 30px; letter-spacing: 0.08em; color: #fff;
  line-height: 1.2;
}
.basho-footer__brand-name .en {
  display: block; font-size: 13px; letter-spacing: 0.14em;
  color: #fff; margin-top: 8px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  max-width: fit-content;
}
.basho-footer__brand-info p { margin: 2px 0; font-size: 15px; line-height: 1.8; }
.basho-footer__brand-info a { color: #fff; }
.basho-footer__hours { margin-top: 16px; }
.basho-footer__hours p { margin: 8px 0; font-size: 14px; line-height: 1.6; }
.basho-footer__hours small { font-size: 12px; opacity: 0.85; }
.basho-footer__pill {
  display: inline-block;
  background: var(--basho-cream); color: var(--basho-green);
  padding: 2px 14px; border-radius: 999px;
  font-family: var(--basho-font-mincho);
  font-size: 13px; letter-spacing: 0.1em;
  vertical-align: 2px;
}
.basho-footer__note { margin-top: 14px; font-size: 11px; opacity: 0.75; line-height: 1.6; }

/* 2列目：サイトマップ（2カラムで畳む） */
.basho-footer__sitemap {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px;
}
.basho-footer__sitemap > li { font-size: 13px; line-height: 1.7; }
.basho-footer__sitemap-head {
  display: inline-block; color: #fff;
  font-family: var(--basho-font-mincho);
  font-size: 15px; letter-spacing: 0.05em;
  text-decoration: none; margin: 4px 0 2px;
}
.basho-footer__sitemap-head:hover { color: var(--basho-sand); }
.basho-footer__sitemap > li > ul {
  list-style: none; margin: 0 0 4px 14px; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.basho-footer__sitemap > li > ul > li > a {
  color: #fff; opacity: 0.85; font-size: 12px; text-decoration: none;
}
.basho-footer__sitemap > li > ul > li > a:hover { opacity: 1; text-decoration: underline; }

/* 3列目：関連リンク＋FBアイコン */
.basho-footer__related {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.basho-footer__related > li > a {
  color: #fff; opacity: 0.9; text-decoration: none;
  font-size: 13px; line-height: 1.8;
}
.basho-footer__related > li > a:hover { opacity: 1; color: var(--basho-sand); }
.basho-footer__fb {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  background: #fff; color: var(--basho-green);
  margin-top: 16px;
  transition: background .2s;
}
.basho-footer__fb:hover { background: var(--basho-cream); }

/* 下部：コピーライト＋TOPへ */
.basho-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  max-width: var(--basho-maxw); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.basho-footer__copy { margin: 0; font-size: 12px; opacity: 0.75; }
.basho-footer__totop {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none; opacity: 0.9;
}
.basho-footer__totop:hover { opacity: 1; color: var(--basho-sand); }
.basho-footer__totop span { font-family: var(--basho-font-mincho); font-size: 13px; letter-spacing: 0.1em; }
.basho-footer__totop svg { display: block; }

@media (max-width: 900px) {
  .basho-footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .basho-footer__col--brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .basho-footer__inner { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px 20px; }
  .basho-footer__sitemap { grid-template-columns: 1fr; }
  .basho-footer__bottom { flex-direction: column; gap: 12px; padding: 16px 20px; }
}

/* ===== 外部バナー ===== */
.basho-banners {
  max-width: var(--basho-maxw); margin: 48px auto 72px;
  padding: 0 24px;
  display: grid; gap: 24px;
}
.basho-banners__hero {
  display: block; overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  transition: transform .25s, box-shadow .25s;
}
.basho-banners__hero img {
  display: block; width: 100%; height: auto;
}
.basho-banners__hero:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.16); }

.basho-banners__sns {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.basho-banners__sns-item {
  display: block; overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform .2s, box-shadow .2s;
  background: #fff;
}
.basho-banners__sns-item img {
  display: block; width: 100%; height: auto;
}
.basho-banners__sns-item:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.14); }

@media (max-width: 640px) {
  .basho-banners__sns { grid-template-columns: 1fr; gap: 12px; }
  .basho-banners { margin: 32px auto 48px; }
}
