/* ===== Soccer School Hub Page Styles ===== */
/* ブランドカラーは base.css の :root 変数を継承して使用 */

/* CSS変数（base.css の値をここでも参照） */
:root {
  --hub-primary:      #E1701A; /* == --main-color */
  --hub-secondary:    #F7A440; /* == --sub-color  */
  --hub-accent-light: #F6DCBF; /* == --sub-color2  */
  --hub-accent-pale:  #ffdec6; /* == --sub-color3  */
  --hub-bg:           #F6F6F6; /* == --background-base */
  --hub-text:         #1B1A17; /* == --black */
  --hub-text-muted:   #606060; /* == --dark-gray */
  --hub-border:       #e8e8e8; /* == --very-light-gray */
  --hub-white:        #FCFCFC; /* == --white */
  --hub-gray:         #AAAAAA; /* == --gray */
}

/* ===== Layout ===== */
.hub-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: var(--hub-text);
  line-height: 1.7;
  background: var(--hub-bg);
}

/* ===== Hero ===== */
.hub-hero {
  background: linear-gradient(135deg, #c55a0c 0%, var(--hub-primary) 60%, var(--hub-secondary) 100%);
  color: var(--hub-white);
  padding: 48px 32px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 32px;
  box-shadow: 0 10px 40px rgba(225, 112, 26, 0.2);
}
.hub-hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.hub-hero .hub-hero-sub {
  font-size: 14px;
  opacity: 0.92;
  line-height: 1.8;
  margin: 0 0 12px;
}
.hub-hero .hub-hero-author {
  display: inline-block;
  margin-top: 8px;
  padding: 7px 18px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  font-size: 12px;
}
.hub-hero .hub-updated {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  opacity: 0.75;
}

/* ===== Map Section ===== */
.hub-map-section {
  background: var(--hub-white);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.hub-map-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--hub-text);
}
.hub-map-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--hub-text-muted);
  margin: 0 0 20px;
}
.hub-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.hub-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--hub-text-muted);
}
.hub-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}
.hub-legend-swatch.published  { background: var(--hub-primary); }
.hub-legend-swatch.unpublished { background: var(--hub-border); }

.hub-map-wrapper {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

/* SVG Map styles */
.hub-map-wrapper .geolonia-svg-map {
  width: 100%;
  height: auto;
}
.hub-map-wrapper .geolonia-svg-map .prefecture {
  fill: var(--hub-border);
  stroke: var(--hub-white);
  stroke-width: 1.2;
  stroke-linejoin: round;
  transition: fill 0.2s, transform 0.2s;
  cursor: not-allowed;
}
.hub-map-wrapper .geolonia-svg-map .prefecture.published {
  fill: var(--hub-primary);
  cursor: pointer;
}
.hub-map-wrapper .geolonia-svg-map .prefecture.published:hover {
  fill: #c55a0c;
  /* transform: translateY(-2px) は削除 — SVG要素が動くとcursorが要素外に出てhoverループになるため */
}
.hub-map-wrapper .geolonia-svg-map .boundary-line {
  display: none;
}

/* Tooltip */
.hub-tooltip {
  position: fixed;        /* absolute → fixed: scrollずれを排除し clientX/Y で直接追従 */
  background: var(--hub-text);
  color: var(--hub-white);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;   /* ツールチップ自体がマウスイベントを受け取らないよう必須 */
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -130%); /* カーソルの真上に中央揃えで表示 */
}

/* ===== Stats Bar ===== */
.hub-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.hub-stat-card {
  background: var(--hub-white);
  padding: 20px 12px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.hub-stat-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--hub-primary);
  line-height: 1;
}
.hub-stat-label {
  font-size: 11px;
  color: var(--hub-text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* ===== Region Sections ===== */
.hub-region {
  background: var(--hub-white);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.hub-region-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--hub-border);
}
.hub-region-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--hub-text);
  border-left: 4px solid var(--hub-primary);
  padding-left: 10px;
  margin: 0;
}
.hub-region-count {
  font-size: 11px;
  color: var(--hub-text-muted);
  background: var(--hub-bg);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Prefecture cards */
.hub-pref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.hub-pref-card {
  background: var(--hub-bg);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s;
}
.hub-pref-card:hover {
  background: var(--hub-accent-pale);
  border-color: var(--hub-primary);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}
.hub-pref-card.hub-pref-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.hub-pref-card.hub-pref-disabled:hover {
  background: var(--hub-bg);
  border-color: transparent;
  transform: none;
}
.hub-pref-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.hub-pref-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--hub-text);
}
.hub-pref-badge {
  font-size: 10px;
  padding: 2px 9px;
  background: var(--hub-primary);
  color: var(--hub-white);
  border-radius: 20px;
  font-weight: 600;
  flex-shrink: 0;
}
.hub-pref-badge.hub-pref-badge-soon {
  background: var(--hub-gray);
}
.hub-pref-sub {
  font-size: 11px;
  color: var(--hub-text-muted);
  line-height: 1.5;
}

/* ===== Tokyo 23 Wards Section ===== */
.hub-tokyo-wards {
  background: linear-gradient(135deg, var(--hub-accent-pale) 0%, var(--hub-accent-light) 100%);
  border: 2px solid var(--hub-secondary);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
}
.hub-tokyo-wards .hub-region-header {
  border-bottom-color: var(--hub-accent-light);
}
.hub-tokyo-wards .hub-region-title {
  border-left-color: var(--hub-secondary);
  color: #8B4513;
}
.hub-tokyo-wards .hub-region-count {
  background: var(--hub-secondary);
  color: var(--hub-white);
}

/* Ward chips */
.hub-ward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.hub-ward-chip {
  background: var(--hub-white);
  border: 1px solid var(--hub-accent-light);
  border-radius: 8px;
  padding: 11px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--hub-text);
  text-decoration: none;
  transition: all 0.2s;
  display: block;
}
.hub-ward-chip:hover {
  background: var(--hub-primary);
  color: var(--hub-white);
  border-color: var(--hub-primary);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ===== Kanagawa Cities Section ===== */
.hub-kanagawa-cities {
  background: var(--hub-white);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--hub-border);
}

/* ===== FAQ Section ===== */
.hub-faq {
  background: var(--hub-white);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.hub-faq .hub-region-title {
  margin-bottom: 20px;
}
.hub-faq-item {
  border-bottom: 1px solid var(--hub-border);
  padding: 18px 0;
}
.hub-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.hub-faq-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--hub-text);
  margin: 0 0 8px;
  padding-left: 24px;
  position: relative;
}
.hub-faq-q::before {
  content: 'Q';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--hub-primary);
  font-weight: 700;
  font-size: 16px;
}
.hub-faq-a {
  font-size: 13px;
  color: var(--hub-text-muted);
  line-height: 1.8;
  margin: 0;
  padding-left: 24px;
}

/* ===== CTA Section ===== */
.hub-cta {
  background: linear-gradient(135deg, #c55a0c 0%, var(--hub-primary) 60%, var(--hub-secondary) 100%);
  color: var(--hub-white);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  margin-top: 32px;
  box-shadow: 0 10px 40px rgba(225, 112, 26, 0.2);
}
.hub-cta h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  border: none;
  color: var(--hub-white);
}
.hub-cta p {
  font-size: 13px;
  opacity: 0.92;
  margin: 0 0 20px;
  line-height: 1.8;
}
.hub-cta-btn {
  display: inline-block;
  background: #06C755;
  color: var(--hub-white) !important;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.hub-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: var(--hub-white) !important;
  text-decoration: none !important;
}

/* ===== Compact Map（トップページ用） ===== */
.hub-compact-section {
  background: var(--hub-white);
  padding: 32px 16px;
  margin-top: 32px;
}
.hub-compact-inner {
  max-width: 760px;
  margin: 0 auto;
}
.hub-compact-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--hub-text);
  border-left: 4px solid var(--hub-primary);
  padding-left: 10px;
  margin: 0 0 6px;
}
.hub-compact-sub {
  font-size: 13px;
  color: var(--hub-text-muted);
  margin: 0 0 20px;
}
.hub-map-compact {
  max-width: 560px;
}
.hub-compact-footer {
  text-align: center;
  margin-top: 20px;
}
.hub-compact-cta-link {
  display: inline-block;
  background: var(--hub-primary);
  color: var(--hub-white) !important;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s;
}
.hub-compact-cta-link:hover {
  background: #c55a0c;
  color: var(--hub-white) !important;
  text-decoration: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hub-page {
    padding: 12px 12px 40px;
  }
  .hub-hero {
    padding: 32px 20px;
  }
  .hub-hero h1 {
    font-size: 20px;
  }
  .hub-map-section {
    padding: 20px 16px;
  }
  .hub-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .hub-stat-num {
    font-size: 24px;
  }
  .hub-region,
  .hub-tokyo-wards,
  .hub-kanagawa-cities,
  .hub-faq {
    padding: 20px 16px;
  }
  .hub-region-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .hub-pref-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hub-ward-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hub-cta {
    padding: 28px 20px;
  }
  .hub-cta h2 {
    font-size: 17px;
  }
}
