/* =========================================
   選挙カード一覧
========================================= */

/* ── 選挙セクションヘッダー ───────────── */
.elections-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.elections-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy-900);
    margin: 0 0 4px;
    line-height: 1.3;
}

.elections-section-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

.elections-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.filter-sep {
    color: var(--border);
    font-size: 0.85rem;
    user-select: none;
}

.see-all-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy-700);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: color 0.15s;
}
.see-all-link:hover { color: var(--navy-900); }

/* ── フィルタタブ ──────────────────────── */
.filter-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* セクションヘッダー内のフィルタタブ（元の border を無効化） */
.elections-section-header .filter-tabs {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-btn {
    background: transparent;
    border: 1.5px solid transparent;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
    font-family: inherit;
}
.filter-btn:hover {
    background: var(--navy-100);
    color: var(--navy-900);
}
.filter-btn.active {
    background: var(--navy-900);
    color: #fff;
    border-color: var(--navy-900);
}

/* ── グリッド ─────────────────────────── */
.election-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 18px;
}

/* ── カード ───────────────────────────── */
.election-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: var(--shadow-sm);
}
.election-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--navy-200);
}

/* サムネイル */
.card-thumb {
    height: 144px;
    background-color: var(--navy-100);
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}
.card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 20, 45, 0.55) 0%, transparent 52%);
}

/* バッジ */
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    z-index: 1;
}
.badge-local    { background: #0d9488; }
.badge-national { background: #c0392b; }

.status-label {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 1;
}
.status-active {
    background: rgba(192, 57, 43, 0.82);
    border-color: transparent;
}

/* カード本文 */
.card-content {
    padding: 18px 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.election-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--navy-900);
    line-height: 1.45;
    margin-bottom: 6px;
}

.election-date {
    font-size: 0.73rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.election-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
}

/* カードフッター */
.card-footer-hint {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--navy-700);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.15s;
}
.election-card:hover .card-footer-hint { gap: 8px; }

/* ── 候補者グリッド（選挙詳細ページ） ──── */
.candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.cand-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 3px solid var(--navy-200);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
    box-shadow: var(--shadow-sm);
    padding: 22px 16px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cand-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--navy-50);
}

/* Party accent colors on top border */
.cand-card.party-ishin  { border-top-color: #2d6a2d; }
.cand-card.party-jimin  { border-top-color: #c9171e; }
.cand-card.party-komei  { border-top-color: #4a90d9; }
.cand-card.party-rikken { border-top-color: #1d4e89; }
.cand-card.party-kyosan { border-top-color: #cc0000; }

.cand-card-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 2px solid var(--navy-200);
    margin-bottom: 12px;
    display: block;
}
.cand-card-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--navy-100);
    color: var(--navy-700);
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.cand-card-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 3px;
    line-height: 1.4;
}
.cand-card-party {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}
.cand-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}
.cand-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
}
.cand-badge-incumbent   { background: #e8f0fe; color: #1e3a6e; }
.cand-badge-challenger  { background: #fff3e0; color: #8a4500; }
.cand-badge-unconfirmed { background: #f5f5f5; color: #888; }

.cand-card-score-area { margin-bottom: 8px; }
.cand-card-score-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.cand-card-score-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy-900);
}
.type-challenger { color: #b45309; }
.cand-card-score-pending {
    font-size: 0.73rem;
    color: var(--text-muted);
}
.cand-card-detail-hint {
    font-size: 0.73rem;
    color: var(--navy-700);
    font-weight: 600;
}

/* upcoming banner */
.upcoming-banner {
    background: var(--navy-100);
    border: 1px solid var(--navy-200);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--navy-700);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.upcoming-banner-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── スコア計算リンク ──────────────────── */
.score-method-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
}
.score-method-link:hover { color: var(--navy-700); text-decoration: underline; }

/* ── 注目の政治家セクション ───────────── */
.featured-politicians-section {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 32px 0;
}

.featured-politicians-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.featured-politicians-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.featured-politicians-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-900);
    margin: 0;
}

.featured-politicians-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.featured-politicians-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    min-width: 0;
}
.featured-politicians-row::-webkit-scrollbar { display: none; }

.pol-feat-card {
    flex: 0 0 130px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 16px 10px 14px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.pol-feat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #fff;
}

.pol-feat-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    background: var(--navy-100);
    display: block;
    margin: 0 auto 10px;
}

.pol-feat-initial {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--navy-100);
    color: var(--navy-700);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.pol-feat-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--navy-900);
    line-height: 1.4;
    margin-bottom: 3px;
}

.pol-feat-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ── お知らせ ─────────────────────────── */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 48px;
}

.news-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.03em;
}

.news-badge--feature {
    background: #e8f0fe;
    color: #1e3a8a;
}

.news-badge--update {
    background: #f0fdf4;
    color: #166534;
}

.news-badge--launch {
    background: #fdf4ff;
    color: #7e22ce;
}

.news-text {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.65;
}

.news-text strong {
    color: var(--navy-700);
}

/* ── スマホ ───────────────────────────── */
@media (max-width: 768px) {
    .election-grid    { grid-template-columns: 1fr; gap: 12px; }
    .candidate-grid   { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .filter-tabs      { gap: 4px; }
    .filter-btn       { padding: 5px 12px; font-size: 0.78rem; }

    .elections-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .elections-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .news-item {
        padding: 14px 16px;
        gap: 8px;
    }
}
