/* ============================================================
   Phase 2: モダン化 CSS  (site-modern.css)
   適用: index.html / ryokan.html / kankou.html / access.html
   Phase 4 追記: Bootstrap 5 + スマホファースト + スライダー + イベント枠
   ============================================================ */

/* ================================================================
   Phase 4: スマホファースト グローバル
   ================================================================ */

/* clamp フォントサイズ */
body {
  font-size: clamp(0.95rem, 0.9rem + 0.35vw, 1.15rem);
}

p {
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ================================================================
   Phase 4: サイトヘッダー
   ================================================================ */
.site-header {
  background: #fff;
  border-bottom: 3px solid #efc300;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.site-name-wrap {
  line-height: 1;
}

/* ================================================================
   Phase 4: Offcanvas (スマホメニュー)
   ================================================================ */
.offcanvas-lang-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: #2d2d2d;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
}
.offcanvas-lang-link:hover,
.offcanvas-lang-link.active-lang {
  background: #efc300;
  border-color: #efc300;
  color: #fff;
}

.offcanvas-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "游明朝", serif;
  color: #2d2d2d;
  text-decoration: none;
  border-radius: 6px;
  border-left: 4px solid #efc300;
  background: #fafaf6;
  transition: background 0.15s ease;
}
.offcanvas-nav-link:hover {
  background: #f5f0e0;
  color: #2d2d2d;
}

/* ================================================================
   Phase 4: ヒーロー画像
   ================================================================ */
.hero-img {
  width: 100%;
  height: clamp(200px, 40vw, 480px);
  object-fit: cover;
  display: block;
}

/* ================================================================
   Phase 4: おすすめ旅館スライダー (Pure CSS 無限左→右スクロール)
   ================================================================ */
.recommended-ryokan-slider {
  overflow: hidden;
  padding: 1.5rem 0 1rem;
  background: linear-gradient(135deg, #faf8f2 0%, #f5f0e4 100%);
  border-top: 3px solid #efc300;
  border-bottom: 3px solid #efc300;
}

.slider-header {
  text-align: center;
  margin-bottom: 1rem;
}
.slider-title {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "游明朝", serif;
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  color: #2d2d2d;
  letter-spacing: 0.1em;
  margin: 0;
  display: inline-block;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid #efc300;
}

/* スライダービューポート */
.slider-viewport {
  overflow: hidden;          /* はみ出しを隠す */
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.slider-viewport:active {
  cursor: grabbing;
}

/* スライダートラック: 26枚 (13 × 2) を横並び */
.slider-track {
  display: flex;
  gap: 16px;
  padding: 0 8px;
  /* 13カード × (220px + 16px gap) × 2sets ≒ 6136px; translateX(-50%) でループ */
  animation: slider-scroll 38s linear infinite;
  width: max-content;
}
.slider-track:hover {
  animation-play-state: paused;
}

@keyframes slider-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 各旅館カード */
.ryokan-card {
  flex: 0 0 220px;
  width: 220px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.09);
  text-decoration: none;
  color: #2d2d2d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}
.ryokan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  color: #2d2d2d;
  text-decoration: none;
}
.ryokan-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.ryokan-card-name {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: clamp(0.78rem, 0.75rem + 0.2vw, 0.9rem);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "游明朝", serif;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* スマホ: スクロールスナップ + 指スワイプ */
@media (max-width: 767px) {
  .slider-viewport {
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .slider-viewport::-webkit-scrollbar {
    display: none;
  }
  /* スマホではアニメーションを止めてスワイプ優先 */
  .slider-track {
    animation: none;
    /* 最初の13枚だけ表示して snap */
    scroll-snap-align: none;
  }
  .ryokan-card {
    scroll-snap-align: start;
    flex: 0 0 180px;
    width: 180px;
  }
  .ryokan-card img {
    height: 110px;
  }
}

/* ================================================================
   Phase 4: メインコンテンツ
   ================================================================ */
.content-section {
  padding-bottom: 1.5rem;
}

.content-food-img {
  max-width: 180px;
  height: auto;
  border-radius: 4px;
}

@media (max-width: 575px) {
  .content-food-img {
    max-width: 130px;
  }
}

/* 特産品リスト */
.umai-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.umai-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.umai_img {
  flex: 0 0 auto;
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}
.umai-body {
  flex: 1;
  min-width: 0;
}
.umai-body p {
  font-size: clamp(0.78rem, 0.75rem + 0.2vw, 0.88rem);
  margin: 0;
  line-height: 1.7;
}

@media (max-width: 575px) {
  .umai-item {
    flex-direction: column;
  }
  .umai_img {
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: cover;
  }
}

/* ================================================================
   Phase 4: イベント情報セクション
   ================================================================ */
.events-section {
  position: sticky;
  top: 80px; /* ヘッダー高さに合わせる */
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 0;
  overflow: hidden;
}

.events-section-header {
  background: linear-gradient(135deg, #efc300 0%, #d4a900 100%);
  padding: 0.75rem 1rem;
}
.events-section-title {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "游明朝", serif;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  color: #fff;
  margin: 0;
  letter-spacing: 0.08em;
}

.info_wrap {
  padding: 0.75rem;
  max-height: 680px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #efc300 #f5f0e8;
}
.info_wrap::-webkit-scrollbar {
  width: 6px;
}
.info_wrap::-webkit-scrollbar-thumb {
  background: #efc300;
  border-radius: 3px;
}

/* イベントカード */
.event-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
  background: #fafaf6;
  border-radius: 8px;
  border-left: 4px solid #efc300;
  transition: background 0.15s ease;
}
.event-card:last-child {
  margin-bottom: 0;
}
.event-card:hover {
  background: #f5f0e0;
}

.event-date {
  flex: 0 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #efc300;
  border-radius: 6px;
  padding: 0.4rem 0.3rem;
  min-height: 54px;
}
.event-month {
  font-size: 0.7rem;
  font-family: "Yu Gothic", sans-serif;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}
.event-day {
  font-size: 1.3rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "游明朝", serif;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.event-body {
  flex: 1;
  min-width: 0;
}
.event-title {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "游明朝", serif;
  font-size: clamp(0.82rem, 0.78rem + 0.25vw, 0.95rem);
  margin: 0 0 0.2rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  white-space: normal;
  color: #2d2d2d;
}
.event-meta {
  font-size: 0.75rem;
  color: #666;
  margin: 0 0 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-period {
  font-size: 0.75rem;
  color: #888;
  margin: 0 0 0.3rem;
}
.event-link {
  display: inline-block;
  font-size: 0.75rem;
  color: #1a5fa0;
  text-decoration: none;
}
.event-link:hover {
  text-decoration: underline;
}

/* イベント画像 (2026-05-28 追加、コンパクト版) */
/* イベントカード = 日付バッジ + サムネ + テキスト の 3 カラム横並び */
.event-card .event-image-wrap {
  flex: 0 0 70px;       /* 固定 70px サムネ、縮小禁止 */
  width: 70px;
  height: 70px;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #efe9d4;
  position: relative;
  align-self: center;
}
.event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.event-image-wrap:hover .event-image {
  transform: scale(1.06);
}
/* 画像読み込み完全失敗時 (onerror で no-image クラス付与) */
.event-card.no-image .event-image-wrap {
  display: none;
}
/* event-body は flex: 1 で残り領域を埋める */
.event-body {
  flex: 1;
  min-width: 0; /* flex 子要素のテキストオーバーフロー対策 */
}
/* タイトルは 2 行まで */
.event-title {
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  font-size: 0.95rem;
  margin: 0 0 0.25rem 0;
}
/* タイトル内リンクの色を継承 */
.event-title a {
  color: inherit;
  text-decoration: none;
}
.event-title a:hover {
  color: #b58800;
  text-decoration: underline;
}

.events-more-wrap {
  padding: 0.75rem 1rem;
  text-align: right;
  border-top: 1px solid #f0ece0;
  background: #fafaf6;
}
.events-more-link {
  font-size: 0.85rem;
  color: #1a5fa0;
  text-decoration: none;
  font-family: "Yu Gothic", sans-serif;
}
.events-more-link:hover {
  text-decoration: underline;
}

/* スマホではスティッキーOFF */
@media (max-width: 991px) {
  .events-section {
    position: static;
    margin-top: 1rem;
  }
  .info_wrap {
    max-height: 500px;
  }
}

/* ---- フォント ---- */
body {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "游ゴシック", "メイリオ", Meiryo, sans-serif;
  color: #2d2d2d;
}

h1, h2, h3,
.item_title p,
.info_title,
.info_month a,
.info_day a,
.kankou-spot-title,
.access-section-title {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "游明朝", "ヒラギノ明朝 ProN W3", serif;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ---- ナビボタン: フォント + hover 改善 ---- */
.navBtn {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "游ゴシック", "メイリオ", sans-serif;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.navBtn:hover {
  transform: translateY(-2px);
}

/* ================================================================
   旅館カード (ryokan.html)
   ================================================================ */
.item_wrap {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  margin: 0.75rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  width: 280px;
}
.item_wrap:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.13);
}

/* リンク装飾リセット */
.item_wrap a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.item_wrap a:hover {
  text-decoration: none;
  color: inherit;
}

/* 旅館タイトル行 */
.item_title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f5f0e8 0%, #ede8d6 100%);
  border-bottom: 2px solid #efc300;
}
.item_title p {
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.4;
}
.item_detail {
  font-size: 0.7rem;
  background: #efc300;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-family: "Yu Gothic", sans-serif;
}

/* 画像: 統一サイズ + object-fit */
.item_pic img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* 説明・料金 */
.item_content {
  padding: 0;
}
.item_desc {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.82rem;
  line-height: 1.6;
}
.item_desc p {
  margin: 0;
}
.item_foot {
  padding: 0.25rem 1rem 0.75rem;
  font-size: 0.78rem;
  color: #555;
  border-top: 1px solid #f0ece0;
  line-height: 1.6;
}
.item_foot p {
  margin: 0;
}
.item_foot .biko {
  font-size: 0.72rem;
  color: #888;
}

/* 施設タイプバッジ */
.item_type {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0.5rem 1rem 0.75rem;
}
.item_type div {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: "Yu Gothic", sans-serif;
}
.type_business { background: #d4eaff; color: #1a5fa0; }
.type_gassyuku { background: #d4f0d4; color: #1a6620; }
.type_kanko    { background: #ffecd4; color: #8a4400; }
.type_onsen    { background: #ffe0e0; color: #8a1010; }
.type_ski      { background: #e0eaff; color: #20358a; }
.type_student  { background: #f0e4ff; color: #5a1a8a; }

/* 旅館グリッド全体 (PC: 3列, タブレット: 2列, スマホ: 1列) */
.d-flex.flex-wrap.justify-content-center {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

@media (max-width: 767px) {
  .item_wrap {
    width: 90vw;
    max-width: 380px;
    margin: 0.5rem auto;
  }
}

/* ================================================================
   観光マップ (kankou.html) — Bootstrap未使用版の再スタイル
   ================================================================ */
.kankou-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.kankou-map-wrap {
  width: 100%;
  max-width: 920px;
  aspect-ratio: 16 / 7;
  margin: 1.5rem auto 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.kankou-map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.kankou-link-label {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 2rem;
}
.kankou-link-label a {
  color: #1a5fa0;
}

.kankou-spot {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kankou-spot:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}
.kankou-spot-img {
  flex: 0 0 280px;
  width: 280px;
  height: 187px;
  object-fit: cover;
  border-radius: 6px;
}
.kankou-spot-body {
  flex: 1;
}
.kankou-spot-title {
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  color: #2d2d2d;
  border-bottom: 2px solid #efc300;
  padding-bottom: 0.3rem;
}
.kankou-spot-body p {
  font-size: 0.88rem;
  line-height: 1.75;
  margin: 0 0 0.4rem;
}
.kankou-spot-body a {
  color: #1a5fa0;
  font-size: 0.85rem;
}

@media (max-width: 767px) {
  .kankou-spot {
    flex-direction: column;
  }
  .kankou-spot-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    flex: none;
  }
  .kankou-map-wrap {
    aspect-ratio: 4 / 3;
  }
}

/* ================================================================
   アクセス (access.html)
   ================================================================ */
.access-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.access-section-title {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #efc300;
  color: #2d2d2d;
}

/* Google Maps embed */
.map-embed {
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  margin: 1.5rem auto 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* 経路カード */
.access-routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.access-route-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1rem 1.25rem;
  border-top: 4px solid #efc300;
}
.access-route-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: #555;
}
.access-route-card p {
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 0;
}

/* 既存画像 (手書きアクセス地図) */
.access-img-wrap {
  margin: 1.5rem auto;
  max-width: 600px;
  text-align: center;
}
.access-img-wrap img {
  max-width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ================================================================
   セクション余白統一
   ================================================================ */
.page-section {
  padding: 2.5rem 0 1rem;
}

/* フッター */
.bg_footer {
  margin-top: 3rem;
}

/* ================================================================
   レスポンシブ共通
   ================================================================ */
@media (max-width: 768px) {
  .item_title p { font-size: 1rem; }
  .access-routes { grid-template-columns: 1fr; }
}

/* === Phase 2.5: 多言語フォント (2026-05-28) === */
/* 英語: Cormorant Garamond (見出し) + Inter (本文) */
body.lang-en {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.01em;
}
body.lang-en h1,
body.lang-en h2,
body.lang-en h3,
body.lang-en .content-section-title,
body.lang-en .slider-title,
body.lang-en .events-section-title {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.005em;
}

/* 中国語簡体字: Noto Serif SC 見出し + Noto Sans SC 本文 */
body.lang-zh {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  letter-spacing: 0.02em;
}
body.lang-zh h1,
body.lang-zh h2,
body.lang-zh h3,
body.lang-zh .content-section-title,
body.lang-zh .slider-title,
body.lang-zh .events-section-title {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-weight: 600;
}

/* 共通: 画像タイトルを置き換える h2 のスタイル */
.content-section-title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: #5a4a30;
  font-weight: 700;
  padding-bottom: 0.4rem;
}

/* イベント情報: 言語別 month/day 表示の整形 */
body.lang-en .event-month { font-size: 0.85rem; }
body.lang-zh .event-month { font-size: 0.9rem; }

/* === Phase 2.6: 拡張フッター 公共機関リンク集 (2026-05-28) === */
.footer-links-section {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.footer-links-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1.1rem;
  color: #fff;
  letter-spacing: 0.04em;
}
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem 1.5rem;
}
.footer-link-col {
  min-width: 0;
}
.footer-link-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: #efc300;
  margin: 0 0 0.55rem;
  letter-spacing: 0.03em;
  text-transform: none;
}
.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-link-list li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}
.footer-link-list a {
  color: #f4ead0;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.footer-link-list a:hover,
.footer-link-list a:focus {
  color: #ffd957;
  border-bottom-color: rgba(255, 217, 87, 0.6);
}

/* 既存フッター本体 (組合住所行) の余白調整 */
.footer-bottom-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0;
}

/* スマホ: カテゴリ列は 2 列に */
@media (max-width: 540px) {
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .footer-link-heading {
    font-size: 0.8rem;
  }
  .footer-link-list a {
    font-size: 0.78rem;
  }
}
