/* おもてなしMAP - 守成クラブ洛都風デザイン */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヘッダー - 洛都おもてなしMap */
header {
  background: #fff100;
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.header-logo img {
  height: 50px;
}

.home-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #333;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.home-link:hover {
  background: rgba(0,0,0,0.1);
}

.home-link svg {
  width: 20px;
  height: 20px;
}

/* コントロールバー */
.controls {
  background: white;
  padding: 0.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* フィルターボタン */
.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  font-weight: bold;
  border: 2px solid #ddd;
  border-radius: 25px;
  background: white;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #c00;
  color: #c00;
}

.filter-btn.active {
  background: #c00;
  border-color: #c00;
  color: white;
}

.stats {
  font-size: 0.9rem;
  color: #666;
  margin-left: auto;
}

.stats span {
  font-weight: bold;
  color: #c00;
}

/* メインコンテンツ（地図 + リスト） */
.main-content {
  flex: 1;
  display: flex;
  min-height: 500px;
}

#map {
  flex: 1;
  min-height: 500px;
}

/* 会員リスト（右サイドバー） */
.member-list {
  width: 320px;
  background: white;
  border-left: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.member-list.hidden {
  display: none;
}

.member-list-header {
  background: #c00;
  color: white;
  padding: 0.75rem 1rem;
}

.member-list-header h3 {
  font-size: 1rem;
  margin: 0;
}

.member-list-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

/* 会員カード */
.member-card {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: #f8f8f8;
  border-radius: 6px;
  cursor: pointer;
  border-left: 4px solid #ddd;
  transition: all 0.2s;
}

.member-card:hover {
  background: #fff3cd;
  border-left-color: #ffc107;
  transform: translateX(3px);
}

.member-card.active {
  background: #ffe066;
  border-left-color: #c00;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.member-card .card-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #333;
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: bold;
  line-height: 1;
}

.member-card .card-row1 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.member-card .company-name {
  font-weight: bold;
  font-size: 0.9rem;
  color: #333;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-card .card-industry {
  flex-shrink: 0;
  font-size: 0.6rem;
  color: #fff;
  background: #c00;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

.member-card .card-row2 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.member-card .representative {
  font-size: 0.8rem;
  color: #666;
}

.member-card .card-phone {
  font-size: 0.75rem;
  color: #c00;
  font-weight: bold;
  text-decoration: none;
  margin-left: auto;
  white-space: nowrap;
}

.member-card .card-phone:hover {
  text-decoration: underline;
}

.member-card .card-hours {
  font-size: 0.7rem;
  color: #888;
  margin-top: 0.1rem;
}

/* フッター - 簡素化 */
footer {
  background: #333;
  color: #999;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
}

/* ===== InfoWindow（ポップアップ）スタイル ===== */
.info-window {
  max-width: 320px;
  padding: 0.5rem;
  font-size: 0.9rem;
}

.info-window .shop-photo {
  margin: -0.5rem -0.5rem 0.5rem -0.5rem;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.info-window .shop-photo img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.info-window .company-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
  border-bottom: 3px solid #c00;
  padding-bottom: 0.4rem;
}

.info-window .representative {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.info-window .representative::before {
  content: "代表：";
  color: #999;
}

.info-window .industry-tag {
  display: inline-block;
  background: #c00;
  color: white;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

.info-window .address {
  font-size: 0.85rem;
  color: #666;
  margin: 0.5rem 0;
  line-height: 1.5;
}

/* 店舗情報セクション（事業内容・電話・営業時間） */
.info-window .shop-info-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.info-window .shop-info-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.83rem;
  line-height: 1.5;
}

.info-window .shop-info-label {
  flex-shrink: 0;
  color: #fff;
  background: #888;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  height: fit-content;
  margin-top: 0.1rem;
}

.info-window .shop-info-value {
  color: #444;
}

.info-window .shop-info-tel {
  color: #c00;
  font-weight: bold;
  text-decoration: none;
}

.info-window .shop-info-tel:hover {
  text-decoration: underline;
}

.info-window .links {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.info-window .link-btn {
  display: inline-block;
  background: #3498db;
  color: white;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}

.info-window .link-btn:hover {
  background: #2980b9;
}

.info-window .link-btn.profile {
  background: #c00;
}

.info-window .link-btn.profile:hover {
  background: #a00;
}

.info-window .link-btn.route {
  background: #27ae60;
}

.info-window .link-btn.route:hover {
  background: #1e8449;
}

/* チラシ拡大モーダル */
.chirashi-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  cursor: pointer;
}

.chirashi-modal.hidden {
  display: none;
}

.chirashi-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
}

.chirashi-modal .close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* レスポンシブ */
@media (max-width: 900px) {
  .main-content {
    flex-direction: column;
  }
  
  .member-list {
    width: 100%;
    max-height: 200px;
    border-left: none;
    border-top: 1px solid #ddd;
  }
  
  .member-list-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  .member-card {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0.5rem 1rem;
  }

  .header-logo img {
    height: 36px;
  }

  .home-link span {
    display: none;
  }

  .home-link {
    padding: 0.4rem;
  }

  .controls {
    padding: 0.5rem 1rem;
    gap: 0.75rem;
  }

  .filter-buttons {
    flex: 1 1 100%;
    justify-content: center;
  }

  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .stats {
    flex: 1 1 100%;
    text-align: center;
    margin-left: 0;
  }

  #map {
    min-height: 350px;
  }

  .info-window {
    max-width: 280px;
  }

  .info-window .shop-info-item {
    font-size: 0.78rem;
  }
}
