/* =========================================
   全体設定
   ========================================= */
main {
  width: 100%;        
  max-width: none;   
  margin: 0 auto;
}

body {
  margin: 0;
  background-color: #f4f7f6; /* 少しグレーがかった白で目に優しく */
  font-family: 'Noto Sans JP', sans-serif; /* 導入したフォントを適用 */
  color: #333;
  line-height: 1.6;
}

/* =========================================
   ページレイアウト（スマホアプリ風カード）
   ========================================= */
.page {
  width: 100%;
  max-width: 1000px; /* PCでの最大幅 */
  background: #ffffff;
  min-height: 100vh; /* コンテンツが少なくても画面いっぱい確保 */
  box-shadow: 0 0 20px rgba(0,0,0,0.05); /* 影を薄く広げる */
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0 auto; /* 中央寄せ */
  box-sizing: border-box;
  /* 下だけ丸くして、上はヘッダーっぽく繋げるモダンデザイン */
  border-radius: 0 0 20px 20px; 
}

/* =========================================
   タブ（iOS Segmented Control風）
   ========================================= */
.tabs {
  display: flex; /* 横並びにするために必須 */
  justify-content: center;
  background: #eef1f5;
  padding: 4px;
  border-radius: 12px;
  gap: 0; /* 隙間をなくす */
  margin: 10px 0 20px;
}

.tabs button {
  flex: 1; /* 等分に広げる */
  padding: 10px 0;
  border-radius: 8px;
  background: transparent;
  color: #666;
  font-weight: 500;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* ホバー時の挙動 */
.tabs button:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* アクティブ（選択中）のデザイン：白背景＋浮き上がり */
.tabs button.active {
  background: #fff;
  color: #0d4c8d; /* 国民民主ブルー */
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* 浮き上がる演出 */
}

/* =========================================
   地図関連
   ========================================= */
#map-container svg #highlight { pointer-events:none; }
#map-container svg {
  display: block;
  margin: 0 auto;
  max-width: 600px;
  width: 100%;
  height: auto;
}

/* =========================================
   見出しデザイン
   ========================================= */
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 50px 0 20px;
  padding: 0 0 8px 0;
  color: #0d4c8d; /* 国民民主ブルー */
  background: none;
  border-left: none;
  border-bottom: 3px solid #F5B800; /* 国民民主イエローのライン */
  position: relative;
  border-radius: 0;
}

/* =========================================
   スマホ対応・レスポンシブ
   ========================================= */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body {
    display: block;
  }
  .page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 15px; /* スマホでは少し余白を狭く */
    box-sizing: border-box;
    border-radius: 0; /* スマホ全画面時は角丸なし */
    box-shadow: none;
  }
}

/* =========================================
   パンくずリスト
   ========================================= */
.breadcrumb {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}
.breadcrumb a {
  color: #0040ff;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb span {
  margin: 0 4px;
  color: #999;
}

/* =========================================
   候補者・ニュース・動画 カードデザイン
   ========================================= */
.candidates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

/* 個別のカード（候補者、ニュース、動画共通） */
.candidate, 
a[href*="news.google.com"], 
a[href*="videos"] { 
  background: #fff;
  border: none !important;
  border-radius: 16px !important; /* 角丸 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important; /* ふんわりした影 */
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  display: flex;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0 !important;
}

/* タップ/ホバー時の沈み込みエフェクト */
.candidate:active,
a[href*="news.google.com"]:active,
a[href*="videos"]:active {
  transform: scale(0.98);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

/* 候補者画像 */
.candidate img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  margin: 12px;
}

.candidate-content {
  padding: 12px 12px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.candidate-content .fullname {
  font-size: 18px;
  margin: 5px 0 0;
  color: #0d4c8d;
  font-weight: bold;
}

.candidate-content .area-election {
  font-size: 12px;
  color: #666;
  background: #f0f4f8;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  align-self: flex-start;
  margin-bottom: 4px;
}

.candidate-content .date {
  font-size: 11px;
  color: #272626;
}