/* =========================
   基本設定
========================= */
body {
  margin: 0;
  padding-top: 60px; /* 固定ヘッダー分の余白 */
  font-family: sans-serif;
}

/* =========================
   固定ヘッダー（共通）
========================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  box-sizing: border-box;
  z-index: 1000;

  background: #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 1rem; /* 上下0・左右1rem */
  overflow: visible;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ロゴ */
.logo {
  height: 60px;
  display: flex;
  align-items: center;
  line-height: 1;
}

/* =========================
   ハンバーガーメニュー（スマホ）
========================= */
.hamburger {
  width: 30px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 30;
}

.hamburger .bar {
  width: 100%;
  height: 3px;
  background: #333;
  transition: 0.3s ease;
}

/* バツに変形 */
.hamburger.active .bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* =========================
   ナビゲーション（スマホ）
========================= */
.nav {
  position: fixed;
  top: 60px;
  right: 0;
  width: 180px; /* ← あなたの希望の幅 */
  height: calc(100vh - 60px);
  background: white;
  padding: 2rem 1rem;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);

  transform: translateX(100vw); /* 画面幅基準でスライド */
  transition: transform 0.3s ease;
  z-index: 20;
}

.nav.active {
  transform: translateX(0);
}

.nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav li {
  margin-bottom: 1.5rem;
}

/* =========================
   オーバーレイ（スマホ）
========================= */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10;
}

.overlay.active {
  display: block;
}

/* =========================
   スライドショー
========================= */
.slideshow {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* キャプション */
.caption {
  position: absolute;
  bottom: 40%;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0,0,0,0.7);
}

/* 右下テキスト */
.caption-bottom-right {
  position: absolute;
  bottom: 15px;
  right: 15px;
  color: white;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  text-shadow: 0 0 6px rgba(0,0,0,0.6);
}

/* =========================
   スマホレイアウト
========================= */
.below-area {
  width: 100%;
  margin-top: 20px;
}

.left-space {
  width: 100%;
  margin-bottom: 20px;
}

.x-post {
  width: 100%;
}

/* =========================
   更新履歴
========================= */
#updates-area {
  margin-top: 5px;
  padding: 8px 15px 15px 15px;
  border-radius: 6px;
}

.updates-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  border-left: 4px solid #333;
  padding-left: 8px;
}

.updates-list li {
  margin-bottom: 6px;
  line-height: 1.4;
}

/* =========================
   フッター
========================= */
.site-footer {
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  background: #f0f0f0;
  border-top: 1px solid #ddd;
}

.footer-icons {
  margin-bottom: 10px;
}

.footer-icons a {
  display: inline-block;
  margin: 0 10px;
}

.footer-icons img {
  width: 28px;
  height: 28px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-icons img:hover {
  opacity: 1;
}

/* フォーム全体（カード） */
.form-wrapper {
  max-width: 800px;
  margin: 100px auto 40px;
  padding: 30px 25px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 見出し */
.form-wrapper h1 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  border-left: 6px solid #333;
  padding-left: 12px;
}

/* 各項目（ラベル＋入力欄） */
.form-group {
  margin-bottom: 16px; /* ← 少し狭くした */
  display: flex;
  flex-direction: column;
}

/* ラベルと入力欄の距離を狭く */
.form-group label {
  font-weight: bold;
  margin-bottom: 4px; /* ← 6px → 4px に調整 */
}

/* 入力欄 */
.form-input,
.form-textarea,
input[type="file"],
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bbb;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

/* テキストエリア */
.form-textarea {
  resize: vertical;
}

/* チェックボックス */
.checkbox-group {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
}

/* セクション区切り（見やすさUP） */
.form-section {
  margin-top: 28px;      /* ← セクションの上に余白 */
  padding-top: 18px;     /* ← 少し内側にも余白 */
  border-top: 1px solid #ddd; /* ← 薄い区切り線 */
}

/* 送信ボタン */
.submit-btn {
  width: 100%;
  padding: 14px;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 20px;
}

.submit-btn:hover {
  background: #555;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.photo-preview img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.form-errors {
  background: #ffe5e5;
  border: 1px solid #ff7b7b;
  color: #b30000;
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.input-error {
  border: 2px solid #ff4d4d !important;
  background: #fff5f5;
}

.error-message {
  color: #b30000;
  font-size: 0.85rem;
  margin-top: 4px;
}

.weekday-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 6px;
}

.weekday-checkboxes label {
  font-size: 0.95rem;
  cursor: pointer;
}

.business-type-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 6px;
}

.business-type-checkboxes label {
  font-size: 0.95rem;
  cursor: pointer;
}

.time-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-separator {
  font-size: 1rem;
}

.store-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}

.store-name {
  margin: 0;
}

.closed-label {
  color: #c00;
  font-size: 0.9rem;
}

.store-category {
  color: #666;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ▼ モバイル（基本スタイル） */
.pagination {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.pagination a,
.pagination span {
  padding: 6px 10px;
  background: #eee;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-size: 0.85rem;
}

.current-page {
  background: #333;
  color: #fff;
}

/* ▼ スマホでは「最初へ」「最後へ」を短縮表示 */
.pagination a[data-short] {
  font-size: 0; /* 元の文字を消す */
}

.pagination a[data-short]::after {
  content: attr(data-short);
  font-size: 0.85rem;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-bar input,
.filter-bar select,
.filter-bar button {
  padding: 8px;
  font-size: 1rem;
}

.store-accessibility {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}

.store-accessibility label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

.confirm-accessibility p {
  margin: 4px 0;
  font-size: 0.95rem;
}

.result-count {
  display: block;
  width: 100%;
  text-align: center; /* 好みで中央寄せ */
  margin: 0px 0 20px;
  font-size: 0.9rem;
  color: #555;
}

.store-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 10px 0 15px;
  gap: 20px;
}

.store-info-left {
  flex: 1;
}

.store-info-photo {
  width: 120px; /* 好きなサイズに調整 */
  flex-shrink: 0;
}

.store-info-photo img.thumb {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

.detail-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

/* 店名 */
.store-title {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.closed-label {
  color: #c00;
  font-size: 1rem;
  margin-left: 6px;
}

/* カテゴリ */
.store-category {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

/* メイン写真 */
.main-photo img {
  width: 100%;
  aspect-ratio: 16 / 9; /* ← これで比率を固定 */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* サブ写真ギャラリー */
.sub-photo-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.sub-photo-gallery .sub-thumb {
  width: 30%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sub-photo-gallery .sub-thumb:hover {
  opacity: 0.8;
}

/* 見出し */
.detail-wrapper h2 {
  font-size: 1.2rem;
  margin: 22px 0 10px;
  border-left: 4px solid #333;
  padding-left: 8px;
}

/* 基本情報 */
.info-box {
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 12px 15px;
  border-radius: 8px;
  line-height: 1.7;
}

/* アイコン */
.icon-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 20px;
}

.icon-box .icon {
  background: #f0f0f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Googleマップ */
.map-box iframe {
  width: 100%;
  height: 260px;
  border-radius: 8px;
  border: none;
}

/* モーダル全体（非表示） */
.img-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* 拡大画像 */
.modal-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  object-fit: contain;
}

/* 閉じるボタン */
.close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.nav-btn:hover {
  opacity: 1;
}

.nav-left {
  left: 15px;
}

.nav-right {
  right: 15px;
}

/* 公式サイト＋SNSアイコンを横並びにする */
.official-sns-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap; /* ← 折り返し禁止 */
}

/* 公式サイト部分が横幅を占領しないようにする */
.official-site {
  display: inline-flex; /* ← これが最重要 */
  align-items: center;
  white-space: nowrap;  /* ← 改行禁止 */
  flex-shrink: 0;       /* ← 幅を縮めない */
}

/* SNSアイコン */
.sns-link {
  display: inline-flex; /* ← アイコンもインライン扱いに */
}

.sns-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sns-icon:hover {
  opacity: 0.7;
}

.map-open-link {
  display: none;
}

.map-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0078ff;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: bold;
  transition: background 0.2s, opacity 0.2s;
}

.map-button:hover {
  background: #005fcc;
  opacity: 0.9;
}

.map-pin-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* =========================
   タブレットレイアウト
========================= */
/* ▼ タブレット以上（幅600px〜）で少し広げる */
@media (min-width: 600px) {
  .pagination {
      gap: 8px;
  }

  .pagination a,
  .pagination span {
      padding: 6px 12px;
      font-size: 0.9rem;
  }

  .pagination a[data-short] {
      font-size: 0.9rem; /* 元の文字を表示 */
  }

  .pagination a[data-short]::after {
      content: "";
  }

  .filter-bar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .filter-bar input {
      flex: 1; /* 入力欄を広く */
  }

  .store-accessibility {
      flex-direction: row;
      flex-wrap: wrap;
      gap: 12px 20px;
  }

  .store-title {
      font-size: 1.9rem;
  }

  .main-photo img {
    aspect-ratio: 16 / 9; /* ← モバイルと同じ比率 */
    max-height: none;     /* ← 高さ制限を解除 */
  }

  .sub-photo-gallery .sub-thumb {
      width: 120px;
      height: 80px;
  }

  .info-box {
      padding: 15px 20px;
  }

  .icon-box {
      gap: 10px 20px;
  }

  .map-box iframe {
      height: 300px;
  }

  .modal-content {
      max-width: 70%;
      max-height: 80%;
  }

  .nav-btn {
      font-size: 3rem;
      padding: 15px;
  }

  .sns-icon {
      width: 32px;
      height: 32px;
  }

  .map-open-link {
      display: block;
      margin-top: 10px;
  }

}

/* =========================
   PCレイアウト
========================= */
@media (min-width: 768px) {

  .hamburger {
    display: none;
  }

  .logo {
    height: 60px;
    display: flex;
    align-items: center;
    line-height: 1;
    font-size: 1.1rem;
  }
  
  .nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    padding: 0;
    transform: none;
    transition: none;
    top: auto;
  }

  .nav ul {
    display: flex;
    gap: 2rem;
    height: 60px;
    align-items: center;
  }

  .nav ul li a {
    display: flex;
    align-items: center;
    height: 60px;
    font-size: 1.1rem;
    padding-top: 20px; /* 上部からの位置の微調整 */
  }

  .overlay {
    display: none !important;
  }

  .slideshow {
    height: 500px;
  }

  .below-area {
    display: flex;
    width: 100%;
    margin-top: 30px;
  }

  .left-space {
    width: 60%;
    padding-right: 20px;
  }

  .x-post {
    width: 40%;
    height: 500px;
    overflow-y: auto;
    padding-right: 10px;
  }

  .pagination {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .pagination a,
  .pagination span {
      padding: 6px 14px;
      background: #eee;
      border-radius: 4px;
      text-decoration: none;
      color: #333;
      font-size: 1rem;
  }

  .current-page {
      background: #333;
      color: #fff;
  }

  .filter-bar {
    gap: 16px;
  }

  .filter-bar input,
  .filter-bar select,
  .filter-bar button {
      font-size: 1rem;
      padding: 10px;
  }

  .closed-filter {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 0.9rem;
  }

  .store-accessibility {
      flex-direction: row;
      flex-wrap: wrap;
      gap: 12px 20px;
  }

  .store-title {
      font-size: 1.9rem;
  }

  .main-photo img {
      aspect-ratio: 16 / 9; /* ← モバイルと同じ比率 */
      max-height: none;     /* ← 高さ制限を解除 */
  }

  .sub-photo-gallery .sub-thumb {
      width: 120px;
      height: 80px;
  }

  .info-box {
      padding: 15px 20px;
  }

  .icon-box {
      gap: 10px 20px;
  }

  .map-box iframe {
      height: 300px;
  }

  .modal-content {
      max-width: 70%;
      max-height: 80%;
  }

  .nav-btn {
      font-size: 3rem;
      padding: 15px;
  }

  .official-sns-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap; /* ← PCでも折り返し禁止 */
  }

  .official-site {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sns-link {
    display: inline-flex;
  }

  .sns-icon {
    width: 32px;
    height: 32px;
  }

  .map-open-link {
      display: block;
      margin-top: 10px;
  }

}