/* ================================================
   style.css
   最終更新：2026-05-28（Phase 8 CSS整理）
================================================ */

/* ---- container ---- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* ---- 見出し h2 ---- */
h2 {
    font-size: 1.6em;
    font-weight: 600;
    border-left: 6px solid #1976d2;
    padding-left: 12px;
    margin-top: 28px;
    margin-bottom: 16px;
    color: #333;
}

/* ---- 見出し h3 ---- */
h3 {
    font-size: 1.3em;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
    margin-top: 20px;
    margin-bottom: 12px;
    color: #444;
}

/* ================================================
   ナビゲーションバー
================================================ */
.navbar {
    width: 100%;
    background: #2c3e50;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.nav-container {
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-title {
    font-size: 20px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 15px;
}

.nav-menu li a:hover {
    text-decoration: underline;
}

.nav-menu .login-status {
    color: #888;
    font-size: 0.9em;
}

/* ================================================
   パンくずリスト
================================================ */
.breadcrumbs {
    margin: 10px 0 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumbs a {
    color: #1976d2;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #333;
    font-weight: bold;
}

/* ================================================
   カードグリッド（議員一覧）
================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.member-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.member-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: 50% 20%;
    border-radius: 8px;
    margin-bottom: 10px;
}

.member-card .name {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 4px;
}

.member-card .party {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 6px;
}

.member-card a.detail-link {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #1976d2;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
}

.member-card a.detail-link:hover {
    background: #1259a5;
}

/* ================================================
   議員一覧：リスト表示テーブル
================================================ */
.list-table-b {
    display: block;
    border-collapse: collapse;
    margin-top: 15px;
    white-space: nowrap;
    overflow-x: auto;
}

.list-table-b th {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    background: #f0f0f0;
    text-align: left;
}

.list-table-b td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

.list-table-b td a {
    color: #1976d2;
    text-decoration: none;
}

.list-table-b td a:hover {
    text-decoration: underline;
}

/* ================================================
   会議一覧テーブル
================================================ */
.list-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.list-table th,
.list-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.list-table th {
    text-align: left;
    background: #f7f7f7;
    white-space: nowrap;
}

.list-table tr:hover {
    background: #f0f8ff;
}

.list-table a {
    color: #0066cc;
}

/* ================================================
   詳細テーブル（議員・市長・会議）
================================================ */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.detail-table th {
    width: 25%;
    white-space: nowrap;
    background: #f0f0f0;
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
}

.detail-table td {
    width: 75%;
    padding: 8px;
    word-break: break-word;
    border: 1px solid #ddd;
}

/* ================================================
   プロフィールレイアウト（写真 + テーブル）
================================================ */
.flex-row {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.mayor-photo-box img {
    width: 220px;
    height: 260px;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* ================================================
   タブ UI
================================================ */
.tabs {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #ccc;
}

.tab-btn {
    padding: 10px 18px;
    background: #eee;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 6px 6px 0 0;
}

.tab-btn.active {
    background: #fff;
    border-bottom: 2px solid #fff;
    font-weight: bold;
}

.tab-content {
    display: none;
    padding: 15px 0;
}

.tab-content.active {
    display: block;
}

/* ================================================
   公約＋一般質問レイアウト
================================================ */
.promise-grid {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.promise-col {
    flex: 1;
}

.promise-box {
    max-width: 500px;
    margin-bottom: 20px;
}

.manifest-img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.question-block {
    margin-bottom: 20px;
    padding: 10px 15px;
    border-left: 4px solid #2b6cb0;
    background: #f8f8f8;
    border-radius: 4px;
}

/* ================================================
   自動分析レポート
================================================ */
.analysis-box {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 0.9em;
}

.analysis-section {
    margin-top: 10px;
}

.analysis-list {
    margin: 6px 0 0 16px;
}

.analysis-list.dummy {
    color: #888;
}

.analysis-note {
    margin-top: 6px;
    color: #666;
    font-size: 0.85em;
}

.policy-pie-img {
    max-width: 500px;
    width: 100%;
    height: auto;
}

/* ================================================
   自治体一覧（カード表示）
================================================ */
.city-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 10px;
}

.city-item {
    display: block;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    color: #000;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.city-item:hover {
    background: #f0f8ff;
    transform: translateY(-3px);
}

.city-name-jp {
    font-size: 1.3rem;
    font-weight: bold;
}

.city-name-en {
    font-size: 0.9rem;
    color: #666;
    margin-top: 3px;
}

/* ================================================
   自治体一覧（indexページ　5列表示）
================================================ */
.cities-list {
    column-count: 5;
    column-gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cities-list li {
    padding: 2px 0;
    break-inside: avoid;
}

@media (max-width: 768px) {
    .cities-list {
        column-count: 2;
    }
}

/* ================================================
   検索フォーム
================================================ */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    width: 360px;
    height: 30px;
    padding: 6px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.search-button {
    height: 40px;
    padding: 0 16px;
    font-size: 16px;
    border: none;
    background: #1976d2;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.search-button:hover {
    background: #135a9e;
}

.search-section-heading {
    margin-top: 20px;
}

.search-result-limit {
    color: var(--color-text-danger, #c0392b);
    font-size: 12px;
    margin-left: 6px;
}

.search-city-select {
    width: 230px;
    height: 45px;
    padding: 6px 10px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-right: 6px;
}

.search-error {
    color: #c0392b;
}

/* ================================================
   共通テキストクラス
================================================ */
.update-date {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
}

.policy-note {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

/* ================================================
   policy.html 専用（TODOを解消）
================================================ */
.toc {
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    padding: 12px 16px;
    border-radius: 8px;
}

.toc ul {
    margin: 0;
    padding-left: 1.2em;
}

.note {
    background: #fff8e6;
    border: 1px solid #ffe0a3;
    padding: 12px 16px;
    border-radius: 8px;
}

.small {
    color: #666;
    font-size: 0.95em;
}

/* ================================
   city.html 専用
=================================*/
.city-analysis-note {
    font-size: 0.9em;
    color: #666;
}

.city-domain-table {
    width: 100%;
    font-size: 0.95em;
    margin-top: 10px;
}

.city-domain-table th,
.city-domain-table td {
    padding: 4px 8px;
}

.city-domain-table .col-right {
    text-align: right;
}

.city-keywords-heading {
    margin-top: 12px;
}
/* ================================================
   一般質問リスト
================================================ */
.question-list {
    padding-left: 0;
    list-style: none;
}

.question-item {
    padding: 10px;
    margin-bottom: 10px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* ================================================
   レスポンシブ（768px 以下）
================================================ */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .card-grid,
    .city-list {
        grid-template-columns: 1fr !important;
    }

    .member-card img {
        height: 180px;
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 8px;
        padding-left: 5px;
    }

    .search-form {
        flex-direction: column;
        width: 100%;
    }

    .search-input {
        width: 100%;
        height: 40px;
        font-size: 16px;
    }

    .search-button {
        width: 100%;
        height: 42px;
    }

    .detail-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .detail-table th,
    .detail-table td {
        white-space: nowrap;
    }

    .list-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .flex-row {
        flex-direction: column;
        align-items: center;
    }

    .mayor-photo-box img {
        width: 90%;
        height: auto;
    }

    .promise-grid {
        display: block;
    }

    .promise-col {
        margin-bottom: 25px;
    }
}

/* ================================================
   レスポンシブ（480px 以下）
================================================ */
@media (max-width: 480px) {
    h2 {
        font-size: 1.3em;
    }

    .member-card .name {
        font-size: 1.1em;
    }

    .member-card img {
        height: 150px;
    }

    .nav-title {
        font-size: 18px;
    }
}

/* ================================================
   検索機能改善
================================================ */
.search-result-count {
    color: var(--color-text-secondary);
    font-size: 13px;
    margin: 0 0 6px;
}
.question-meta {
    color: var(--color-text-secondary);
    font-size: 13px;
}
.status-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}
.status-resigned {
    background: var(--color-background-danger);
    color: var(--color-text-danger);
}
.status-retired {
    background: var(--color-background-secondary);
    color: var(--color-text-secondary);
}

/* ================================================
   how_to_use.htmlページ
================================================ */
.how-to-steps { display: flex; flex-direction: column; gap: 24px; margin: 24px 0; }
.how-to-step { border-left: 4px solid var(--color-primary); padding: 0 0 0 16px; }
.step-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.step-number { font-size: 12px; font-weight: bold; color: var(--color-primary); letter-spacing: 0.05em; }
.step-title { font-size: 16px; font-weight: bold; }
.step-body { font-size: 14px; line-height: 1.8; }
.step-example { display: inline-flex; align-items: center; gap: 8px; background: var(--color-background-secondary); border-radius: 4px; padding: 6px 12px; margin: 8px 0; }
.example-label { font-size: 12px; color: var(--color-text-secondary); }
.example-value { font-weight: bold; font-size: 15px; }
.step-note { background: var(--color-background-secondary); border-radius: 4px; padding: 8px 12px; margin: 8px 0; font-size: 13px; color: var(--color-text-secondary); }
.note-icon { margin-right: 4px; }
.step-screenshot-placeholder { border: 2px dashed var(--color-border); border-radius: 4px; padding: 24px; margin: 12px 0; text-align: center; color: var(--color-text-secondary); font-size: 13px; }
kbd { background: var(--color-background-secondary); border: 1px solid var(--color-border); border-radius: 3px; padding: 1px 6px; font-size: 13px; font-family: monospace; }
.how-to-footer { font-size: 13px; color: var(--color-text-secondary); }
.search-hint { font-size: 13px; margin-top: 8px; }