/* ============================================
   ITS保養施設マップ - 共通記事スタイル
   article.css
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.8;
}

/* ──────────────── コンテナ ──────────────── */
.container {
    max-width: 960px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* ──────────────── ヘッダー ──────────────── */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 30px 20px;
}

.site-title {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.9;
    margin-bottom: 4px;
}

.site-title a {
    color: white;
    text-decoration: none;
}

.site-title a:hover {
    opacity: 0.8;
}

/* グローバルナビ */
.global-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.global-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.global-nav a:hover,
.global-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
}

/* ──────────────── パンくず ──────────────── */
.breadcrumb {
    background: #f8f9fa;
    padding: 10px 30px;
    font-size: 0.82rem;
    color: #666;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

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

.breadcrumb span {
    margin: 0 6px;
    color: #bbb;
}

/* ──────────────── レイアウト（本文+サイドバー）──────────────── */
.page-body {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 0;
    align-items: start;
}

/* ──────────────── メイン本文 ──────────────── */
.main-content {
    padding: 36px 40px;
    border-right: 1px solid #f0f0f0;
}

/* ──────────────── 記事ヘッダー ──────────────── */
.article-header {
    margin-bottom: 28px;
}

.article-label {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.article-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #222;
    line-height: 1.45;
    margin-bottom: 12px;
}

.article-meta {
    font-size: 0.82rem;
    color: #888;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ──────────────── 本文スタイル ──────────────── */
.article-body h2 {
    font-size: 1.2rem;
    color: #333;
    margin: 32px 0 14px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-left: 4px solid #667eea;
    border-radius: 0 8px 8px 0;
}

.article-body h3 {
    font-size: 1.05rem;
    color: #444;
    margin: 22px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px dashed #e0e0e0;
}

.article-body p {
    color: #444;
    margin-bottom: 14px;
    font-size: 0.97rem;
}

.article-body ul,
.article-body ol {
    color: #444;
    padding-left: 1.5em;
    margin-bottom: 14px;
    font-size: 0.97rem;
}

.article-body li {
    margin-bottom: 6px;
}

.article-body a {
    color: #667eea;
    text-decoration: underline;
}

.article-body strong {
    color: #333;
}

/* 注意ボックス */
.info-box {
    background: #e8f4fd;
    border-left: 4px solid #2196f3;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin: 18px 0;
    font-size: 0.92rem;
    color: #444;
}

.tip-box {
    background: #f0fff4;
    border-left: 4px solid #43a047;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin: 18px 0;
    font-size: 0.92rem;
    color: #444;
}

.warn-box {
    background: #fff8e1;
    border-left: 4px solid #ffa000;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin: 18px 0;
    font-size: 0.92rem;
    color: #444;
}

/* 施設カード */
.facility-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.2s;
}

.facility-card:hover {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.facility-card h3 {
    font-size: 1rem;
    color: #333;
    margin: 0 0 6px;
    border: none;
    padding: 0;
}

.facility-card .location {
    font-size: 0.83rem;
    color: #888;
    margin-bottom: 6px;
}

.facility-card .category-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 6px;
}

.badge-chokuei {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-tsuunen {
    background: #f3e5f5;
    color: #6a1b9a;
}

.badge-kaiki {
    background: #fff3e0;
    color: #e65100;
}

.badge-touki {
    background: #e0f2f1;
    color: #00695c;
}

.facility-card a.detail-link {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 16px;
    font-size: 0.82rem;
}

/* ランキング */
.ranking-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
    border: 1px solid #e9ecef;
}

.rank-number {
    min-width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.ranking-item:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #f7c948, #e8a000);
}

.ranking-item:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #b0bec5, #78909c);
}

.ranking-item:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
}

.rank-content h3 {
    font-size: 1rem;
    color: #333;
    margin: 0 0 4px;
    border: none;
    padding: 0;
}

.rank-content p {
    font-size: 0.87rem;
    color: #666;
    margin: 0;
}

/* 目次 */
.toc {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 28px;
    border: 1px solid #e9ecef;
}

.toc h4 {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
    font-weight: 600;
}

.toc ol {
    padding-left: 1.4em;
    margin: 0;
    font-size: 0.9rem;
}

.toc li {
    margin-bottom: 4px;
}

.toc a {
    color: #667eea;
    text-decoration: none;
}

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

/* まとめ */
.article-summary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.07), rgba(118, 75, 162, 0.07));
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 32px;
}

.article-summary h2 {
    font-size: 1.1rem;
    color: #667eea;
    margin: 0 0 12px;
    background: none;
    border: none;
    padding: 0;
}

/* ──────────────── サイドバー ──────────────── */
.sidebar {
    padding: 28px 20px;
    background: #fafafa;
}

.sidebar-widget {
    margin-bottom: 28px;
}

.sidebar-widget h3 {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f4ff;
}

.sidebar-nav a {
    display: block;
    padding: 8px 12px;
    color: #444;
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.map-link-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
}

.map-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

/* 広告枠スペース */
.ad-space {
    background: #f0f0f0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ──────────────── フッター ──────────────── */
footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
    padding: 20px;
}

footer nav {
    margin-bottom: 10px;
    font-size: 0.88rem;
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    gap: 4px 16px;
}

footer nav a {
    color: #667eea;
    text-decoration: none;
}

footer nav a:hover {
    text-decoration: underline;
}

footer p {
    font-size: 0.78rem;
    color: #999;
    margin: 0;
}

/* ──────────────── カード一覧（indexページ用）──────────────── */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.article-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    padding: 20px;
    transition: all 0.25s ease;
    text-decoration: none;
    display: block;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.18);
    border-color: #667eea;
}

.article-card .card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.article-card h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-card p {
    font-size: 0.83rem;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

/* ──────────────── 施設詳細ページ ──────────────── */
.facility-info-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 28px;
    overflow-x: auto;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.info-table th,
.info-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    vertical-align: top;
}

.info-table th {
    white-space: nowrap;
    color: #667eea;
    font-weight: 600;
    width: 7em;
}

.info-table td {
    color: #444;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

/* ──────────────── レスポンシブ ──────────────── */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .page-body {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 24px 20px;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .sidebar {
        padding: 20px;
    }

    .article-header h1 {
        font-size: 1.35rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    header {
        padding: 18px 20px 16px;
    }

    .breadcrumb {
        padding: 10px 20px;
    }
}