/*
Theme Name: asaminami-zenbu
Author: NAKKI & Collaboration
Description: 安佐南区の「ぜんぶ」をアーカイブする、プレミアム・ローカルメディア・テーマ。
Version: 1.0.0
*/

:root {
    --primary-color: #1a202c;
    --bg-color: #f8f9fa;
    --text-color: #1a202c;
    --border-color: #e2e8f0;
}

/* ===================================================================
   タイポグラフィ・全体設計
   =================================================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--bg-color);
}

.entry-content, .post-content, .prose {
    font-size: 1.05rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 見出し H2: 強力なセクション区切り */
.entry-content h2, .post-content h2, .prose h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    border-left: 6px solid var(--primary-color);
    background: #f1f3f5;
    padding: 0.8rem 1.2rem;
    margin: 3.5rem 0 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* 見出し H3: シンプルで上品な下線 */
.entry-content h3, .post-content h3, .prose h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin: 2.5rem 0 1.2rem;
}

/* 段落・リストの余白 */
.entry-content p, .post-content p, .prose p {
    margin-bottom: 1.6rem;
}

.entry-content ul, .entry-content ol, 
.post-content ul, .post-content ol,
.prose ul, .prose ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.entry-content li, .post-content li, .prose li {
    margin-bottom: 0.5rem;
}

/* 強調表示 */
.entry-content strong, .post-content strong, .prose strong {
    font-weight: 700;
    color: #000;
}

/* ===================================================================
   テーブルのモバイル対応（横スクロール）
   =================================================================== */
.entry-content table,
.post-content table,
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5em 0;
}

@media (max-width: 768px) {
    .entry-content table,
    .post-content table,
    .prose table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        font-size: 0.85rem;
    }
    .entry-content th,
    .entry-content td,
    .post-content th,
    .post-content td,
    .prose th,
    .prose td {
        display: table-cell;
        min-width: 100px;
    }
}

/* ===================================================================
   マイクロデザイン（テーブル内の装飾）
   =================================================================== */
.entry-content th,
.post-content th,
.prose th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
}

.entry-content td,
.post-content td,
.prose td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e2e2;
    vertical-align: top;
}

/* ゼブラストライピング */
.entry-content tbody tr:nth-child(even),
.post-content tbody tr:nth-child(even),
.prose tbody tr:nth-child(even) {
    background-color: #f3f4f5;
}

/* 「要確認」等のテキストを目立つコールアウトにする */
.entry-content td:has(> :is(:empty)),
.post-content td:has(> :is(:empty)),
.prose td:has(> :is(:empty)) {
    color: #999;
}

/* ===================================================================
   内部リンク・あわせて読みたいボックス
   =================================================================== */
.internal-link-box {
    background-color: #f3f4f5; /* surface-container-low */
    border-left: 5px solid #1a202c; /* sumiiro */
    padding: 1.5rem;
    margin: 2.5rem 0;
    transition: all 0.2s ease;
}

.internal-link-box:hover {
    background-color: #e7e8e9; /* surface-container-high */
    transform: translateX(5px);
}

.internal-link-box-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 900;
    color: #ffffff;
    background-color: #1a202c;
    padding: 2px 10px;
    margin-bottom: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.internal-link-box a {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a202c;
    text-decoration: none;
    line-height: 1.4;
}

.internal-link-box a:hover {
    text-decoration: underline;
}

/* ===================================================================
   お問い合わせフォーム (Contact Form 7) モバイル対応
   =================================================================== */
.wpcf7-form-control {
    max-width: 100%;
    box-sizing: border-box;
}
/* 入力欄をコンテナの幅いっぱいに広げる */
.wpcf7-text,
.wpcf7-textarea,
.wpcf7-email,
.wpcf7-tel,
.wpcf7-number,
.wpcf7-select {
    width: 100% !important;
}

/* ===================================================================
   ページネーション
   =================================================================== */
.navigation.pagination {
    margin-top: 3rem;
    text-align: center;
}

.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: #fff;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.navigation.pagination .page-numbers:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.navigation.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.navigation.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    min-width: auto;
    padding: 0 0.25rem;
}

