/* KLIVF/css/style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
  background-color: #f4f6f9;
  color: #333;
}

/* ナビゲーションバー */
nav {
  background-color: #0d47a1;
  color: white;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

#lang-select {
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
}

/* ヘッダーセクション（PC・標準表示） */
.hero-section {
  background-image: linear-gradient(rgba(13, 71, 161, 0.75), rgba(13, 71, 161, 0.85)), url('../images/back.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 50px 20px;
}

.hero-section h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

.hero-section p {
  font-size: 16px;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* 検索・操作パネル */
.control-panel {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 15px;
}

/* ==========================================================================
   📱 検索コントロールパネルのスマホ対応（JP/CNの文字伸び対策）
   ========================================================================== */

/* 検索窓とボタンを包むコンテナ */
.search-container {
  display: flex;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* 入力検索エリア */
.search-container input[type="text"] {
  flex: 1; /* 残りの幅をすべて使う */
  min-width: 0; /* フレックスアイテムの縮み文字崩れ防止 */
  height: 48px; /* 高さを統一 */
  padding: 0 15px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}
/* Near Me (現在地から探す) ボタン */
#near-me-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap; /* ボタン内のテキストを無理に改行させない */
  padding: 0 16px;
  height: 48px; /* 入力欄と高さを揃える */
  font-size: 14px;
  font-weight: bold;
  background-color: #0288d1;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box;
}
/* 📱 画面幅が非常に狭いスマホ（横幅430px以下）の場合のセーフティネット */
@media (max-width: 430px) {
  /* 文字数が多いJP/CNでボタンがはみ出る場合、綺麗に2行にスタックさせる */
  .search-container {
    flex-direction: column; /* 縦並びに切り替え */
  }
  
  .search-container input[type="text"],
  #near-me-btn {
    width: 100%; /* 両方とも横幅いっぱいに広げる */
  }
}

/* フィルタータグ */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.tag-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background-color: white;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.tag-btn.active, .tag-btn:hover {
  background-color: #0d47a1;
  color: white;
  border-color: #0d47a1;
}

/* カウンター・SNS共有エリア */
.meta-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

#counter-box {
  font-size: 15px;
  font-weight: bold;
}
#match-count {
  background-color: #0d47a1;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
}

.sns-share-box {
  display: flex;
  gap: 8px;
}
.sns-btn {
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-line { background-color: #06C755; }
.btn-wa { background-color: #25D366; }
.btn-wc { background-color: #7BB32E; }
.btn-copy { background-color: #607D8B; }

/* ショップリストグリッド */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto 50px auto;
  padding: 0 15px;
}

.shop-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #eef2f5;
}

.shop-header {
  background-color: #f8fafc;
  padding: 15px;
  border-bottom: 1px solid #eef2f5;
}
.shop-header h3 {
  font-size: 17px;
  color: #0d47a1;
}
.distance-badge {
  display: inline-block;
  background-color: #e3f2fd;
  color: #0d47a1;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 5px;
  font-weight: bold;
}

.shop-body {
  padding: 15px;
  flex: 1;
  font-size: 13px;
  line-height: 1.6;
}
.shop-body p {
  margin-bottom: 8px;
  border-bottom: 1px dashed #f0f0f0;
  padding-bottom: 4px;
}
.shop-body p:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.status-badge {
  font-weight: bold;
}

/* ボタン */
.shop-footer-btns {
  padding: 15px;
  background: #f8fafc;
  display: flex;
  gap: 8px;
}
.btn {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
}
.btn-web { background-color: #e1f5fe; color: #0288d1; }
.btn-gmap { background-color: #e8f5e9; color: #2e7d32; }
.btn-waze { background-color: #fffde7; color: #fbc02d; }

/* ==========================================================================
   スマートフォン最適化レイアウト（バグ対策強化）
   ========================================================================== */
@media (max-width: 768px) {
  .hero-section { 
    height: 160px !important;
    min-height: 160px !important;
    padding: 0 15px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  .hero-section h1 {
    font-size: 24px !important;
    margin-bottom: 4px !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  }
  .hero-section p {
    font-size: 13px !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  }
  .search-container {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }
  .filter-tags {
    gap: 6px !important;
    margin-bottom: 10px !important;
  }
  .tag-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
  .meta-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
/* 📄 フッター・免責事項のスタイル */
footer {
  background-color: #1a237e;
  color: #ffffff;
  padding: 30px 20px;
  margin-top: 50px;
  font-size: 12px;
  line-height: 1.6;
  border-top: 4px solid #0d47a1;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.disclaimer {
  opacity: 0.75;
  margin-bottom: 15px;
  text-align: justify;
}

.copyright {
  font-weight: bold;
  opacity: 0.9;
}