/* =========================================
   基本設定 & リセット
   ========================================= */
:root {
    --bg-color: #f9f9f9;
    --text-main: #111;
    --text-sub: #444;
    --font-base: 'Zen Old Mincho', serif;
    --border-color: #ddd;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-base);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; vertical-align: bottom; }
* { box-sizing: border-box; }

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   ヘッダー
   ========================================= */
.site-header {
    text-align: center;
    padding: 50px 0 40px;
}

.site-header h1 {
    font-weight: 900;
    font-size: 2.8rem;
    margin: 0;
    letter-spacing: 0.05em;
    color: #000;
}

/* =========================================
   トップページ (リスト部分)
   ========================================= */
.era-section { margin-bottom: 40px; }

.era-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-left: 0;
    color: #000;
    line-height: 1.2;
}

.case-link { display: block; margin-bottom: 25px; }

.case-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.case-thumb { flex: 0 0 160px; width: 160px; }
.case-thumb img {
    width: 100%; height: 100px; object-fit: cover;
    border-radius: 2px;
    filter: sepia(10%) grayscale(30%) contrast(1.1);
}
.no-image {
    width: 100%; height: 100px; background: #e0e0e0;
    display: flex; align-items: center; justify-content: center;
    color: #888; font-size: 0.7rem; font-weight: bold;
}

.case-info { flex: 1; display: flex; flex-direction: column; }

.case-title {
    font-size: 1.25rem; font-weight: 800;
    margin: 0 0 5px 0; line-height: 1.3; color: #000;
}
.case-meta {
    font-size: 0.9rem; color: var(--text-main);
    margin-bottom: 5px; font-weight: 500;
}
.case-desc {
    font-size: 0.9rem; color: #333; margin: 0;
    line-height: 1.6; text-align: justify; font-weight: 500;
}
.no-data { font-size: 0.9rem; color: #777; padding: 10px 0; }


/* =========================================
   詳細ページ (ここを追加・強化)
   ========================================= */
.detail-wrapper {
    margin-top: 20px;
    /* background: #fff; */
    padding: 40px;
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.03); */
}

.crime-detail {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding-bottom: 40px;
}

.detail-main { flex: 1; }

/* タイトルを画像のように巨大に */
.detail-title {
    font-size: 2.8rem; 
    font-weight: 900;
    margin: 0 0 10px 0;
    line-height: 1.1;
    color: #000;
    letter-spacing: -0.02em;
}

.detail-date {
    font-size: 1.0rem;
    margin: 0 0 25px 0;
    color: #333;
    font-weight: 600;
}

.detail-body {
    font-size: 1.05rem;
    line-height: 1.9;
    text-align: justify;
    color: #111;
}

/* 右側の写真 */
.detail-visual {
    flex: 0 0 280px;
}
.detail-visual img {
    width: 100%;
    height: auto;
    filter: grayscale(100%) contrast(1.1);
    display: block;
}

/* === 掲示板 (スレッド) エリア === */
.bbs-heading {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #000;
}

.post-list {
    border-top: 1px solid var(--border-color);
}

.post-row {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 10px;
    background-color: #fafafa;
}
/* 偶数番目を少し色変える（ストライプ）場合は以下を有効化 */
/* .post-row:nth-child(even) { background-color: #fff; } */

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.95rem;
    color: #000;
    margin-bottom: 8px;
    font-family: sans-serif;
}

.post-left {
    display: flex;
    gap: 15px;
    align-items: baseline;
}

.post-num { font-weight: bold; font-size: 1.1rem; }
.post-name { font-weight: bold; }
.post-time { color: #555; font-size: 0.9rem; }

.post-right {
    font-size: 0.9rem;
    color: #333;
}

.post-content {
    padding-left: 25px;
    font-size: 1.0rem;
    line-height: 1.6;
    color: #111;
    font-weight: 500;
}

/* === 投稿フォーム === */
.post-form-area {
    margin-top: 50px;
    background: #f0f0f0;
    padding: 30px;
}
.post-form-area h3 {
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: 20px;
}
.form-row { margin-bottom: 15px; }

/* DjangoフォームのウィジェットをCSSで強制整形 */
.post-form-area input[type="text"],
.post-form-area textarea {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    font-family: var(--font-base);
}
.post-form-area textarea { height: 100px; resize: vertical; }

.btn-submit {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-base);
}
.btn-submit:hover { background: #333; }


/* =========================================
   フッター
   ========================================= */
.site-footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid #eaeaea;
    /* background-color: #fff; */
}
.site-footer p {
    margin: 0;
    /* color: #999; */
    font-size: 1rem;
    font-weight: 400;
}

/* =========================================
   レスポンシブ
   ========================================= */
@media (max-width: 768px) {
    .site-header h1 { font-size: 2.0rem; }
    .container { width: 100%; padding: 0 15px; }
    
    /* 詳細ページのスマホ対応 */
    .detail-wrapper { padding: 20px; }
    .crime-detail { flex-direction: column-reverse; gap: 20px; }
    .detail-visual { width: 100%; }
    .detail-title { font-size: 2.0rem; }
    
    /* 掲示板スマホ対応 */
    .post-header { flex-direction: column; gap: 5px; }
    .post-content { padding-left: 0; }
}