/* style.css (Final Version) */
/* =================================== */
/* --- 1. 基本設定 --- */
/* =================================== */
body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    background-color: #f9f8f4;
    color: #4a381f;
    line-height: 1.6;
    /* ▼▼▼ フッター固定のための設定 ▼▼▼ */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/* ▼▼▼ フッター固定のための新設クラス ▼▼▼ */
.site-wrapper {
    flex-grow: 1;
}
body.home::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    /* ★★★ パス修正 ★★★ */
    background-image: url('images/main_visual.JPG');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    z-index: -2;
}
h1, h2, h3, h4, .logo, .submit-button, .login-button, .user-menu-link, .logout-button {
    font-family: 'Zen Maru Gothic', sans-serif;
}
main {
    padding-top: 80px;
}
/* =================================== */
/* --- 2. ヘッダーとナビゲーション --- */
/* =================================== */
header {
    background-color: rgba(255, 254, 247, 0.85);
    padding: 15px 30px;
    position: fixed;
    width: 100%;
    box-sizing: border-box;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid #e0d9c5;
    backdrop-filter: blur(8px);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.logo { font-size: 1.8em; font-weight: 700; color: #4a381f; text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
nav li { margin-left: 25px; }
nav a { color: #7d5a2b; text-decoration: none; font-size: 1.1em; font-weight: 500; transition: color 0.3s; }
nav a:hover { color: #f3c678; }
.login-button { background-color: #f3c678; color: #4a381f !important; padding: 8px 15px; border-radius: 50px; transition: background-color 0.3s; }
.login-button:hover { background-color: #e0b460; }
.user-info { display: flex; align-items: center; gap: 15px; }
.user-menu-link { color: #4a381f; text-decoration: none; padding: 8px 15px; border-radius: 50px; font-weight: bold; transition: background-color 0.3s; }
.user-menu-link:hover { background-color: #f7f2e8; }
.logout-button { background-color: #c0392b; color: white !important; padding: 8px 15px; border-radius: 50px; text-decoration: none; font-weight: 500; transition: background-color 0.3s; }
.logout-button:hover { background-color: #a93226; }
/* =================================== */
/* --- 3. 共通レイアウト & コンポーネント --- */
/* =================================== */
.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}
.page-content {
    background-color: rgba(255, 254, 247, 0.9);
    padding: 30px 40px;
    border-radius: 12px;
    border: 1px solid #e0d9c5;
}
.page-content h2 { text-align: center; font-size: 2.2em; margin-bottom: 30px; color: #4a381f; border-bottom: 2px solid #f3c678; padding-bottom: 10px; }
.info-section { margin-bottom: 40px; }
.info-section h3 { font-size: 1.6em; color: #7d5a2b; border-left: 5px solid #f3c678; padding-left: 10px; margin-bottom: 20px; }
.back-link { display: inline-block; margin-bottom: 20px; color: #7d5a2b; text-decoration: none; font-weight: bold; }
.back-link:hover { text-decoration: underline; color: #f3c678; }
.history-table, .schedule-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.history-table th, .schedule-table th, .history-table td, .schedule-table td { border: 1px solid #ddd; padding: 12px; text-align: left; }
.history-table th, .schedule-table th { background-color: #f7f2e8; font-weight: bold; }
/* =================================== */
/* --- 4. トップページ関連 --- */
/* =================================== */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
}
.hero-text { position: relative; z-index: 1; }
.hero-text h1 { font-size: 4.5em; margin: 0; text-shadow: 3px 3px 6px rgba(0,0,0,0.6); }
#topics, #sns-links {
    background-color: rgba(255, 254, 247, 0.85);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(224, 217, 197, 0.5);
}
#topics h2, #sns-links h2 { text-align: center; font-size: 2em; margin-bottom: 30px; color: #4a381f; }
.topic-item { display: flex; align-items: center; border-bottom: 1px solid #e0e0e0; padding: 15px 0; }
.topic-item:last-child { border-bottom: none; }
.topic-date { font-size: 0.9em; color: #777; margin: 0 15px 0 0; white-space: nowrap; }
.topic-title { margin: 0; }
.topic-title a { font-size: 1.2em; color: #7d5a2b; text-decoration: none; font-weight: bold; }
.topic-title a:hover { color: #f3c678; }
#sns-links { margin-top: 40px; }
.sns-container { display: flex; justify-content: center; gap: 20px; }
.sns-button { display: inline-block; padding: 12px 25px; border-radius: 50px; color: white; text-decoration: none; font-size: 1.1em; transition: transform 0.2s; }
.sns-button:hover { transform: scale(1.05); }
.x-button { background-color: #000; }
.marshmallow-button { background-color: #ffc0cb; }
/* =================================== */
/* --- 5. フォーム関連 --- */
/* =================================== */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; }
.form-group input[type="text"], .form-group input[type="password"], .form-group input[type="date"], .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}
.submit-button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #7d5a2b;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
}
.submit-button:hover { background-color: #a37b4c; }
.delete-button { background-color: #c0392b; }
.delete-button:hover { background-color: #a93226; }
.error-message { background-color: #f8d7da; color: #721c24; padding: 10px 15px; border: 1px solid #f5c6cb; border-radius: 4px; margin-bottom: 20px; }
.success-message { background-color: #d4edda; color: #155724; padding: 10px 15px; border: 1px solid #c3e6cb; border-radius: 4px; margin-bottom: 20px; }
/* =================================== */
/* --- 6. 掲示板 & スレッド関連 --- */
/* =================================== */
.post-item { background-color: #f9f8f4; border: 1px solid #eee; border-radius: 8px; margin-bottom: 20px; }
.post-header { background-color: #f7f2e8; padding: 10px 15px; border-bottom: 1px solid #eee; border-radius: 8px 8px 0 0; }
.post-header p { margin: 5px 0 0 0; color: #555; display: flex; justify-content: space-between; align-items: center; }
.post-date { font-size: 0.9em; color: #777; }
.post-content { padding: 15px; }
.post-content p { margin: 0; white-space: pre-wrap; }
.thread-list { display: flex; flex-direction: column; gap: 10px; }
.thread-item { display: block; background-color: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 15px 20px; text-decoration: none; transition: background-color 0.3s, border-color 0.3s, transform 0.3s; }
.thread-item:hover { background-color: #f9f8f4; border-color: #ccc; transform: translateX(5px); }
.thread-title { font-size: 1.2em; font-weight: bold; color: #4a381f; margin-bottom: 5px; }
.thread-meta { font-size: 0.9em; color: #777; display: flex; justify-content: space-between; }
.original-post { border: 2px solid #f3c678; }
/* =================================== */
/* --- 7. アンケート関連 --- */
/* =================================== */
.radio-option { margin-bottom: 10px; }
.radio-option input { margin-right: 10px; }
.radio-option input[type="radio"]:checked + label { font-weight: bold; color: #f3c678; }
.chart-container { max-width: 600px; margin: 20px auto; }
.notice-box { background-color: #f7f2e8; border: 1px solid #e0d9c5; border-left: 5px solid #f3c678; padding: 20px; margin: 20px 0; border-radius: 4px; }

/* =================================== */
/* --- 8. 記事・ギャラリー関連 --- */
/* =================================== */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.page-header h2 { margin-bottom: 0; }

.article-list { display: flex; flex-direction: column; gap: 20px; margin-top: 30px; }

/* ▼▼▼ 一覧ページの画像サイズを修正 ▼▼▼ */
.article-summary-no-link {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    color: inherit;
    border: 1px solid #e0d9c5;
    transition: box-shadow 0.3s, transform 0.3s;
}
.article-summary-no-link:hover { box-shadow: 0 6px 15px rgba(0,0,0,0.1); transform: translateY(-3px); }

/* 画像とプレースホルダーのサイズを固定 */
.article-summary-no-link img, .no-image-placeholder {
    width: 200px;
    height: 130px;
    object-fit: cover; /* 画像の比率を保ったままトリミング */
    background-color: #f0f0f0;
    flex-shrink: 0; /* 画像が縮まないようにする */
}
/* ▲▲▲ ここまで修正 ▲▲▲ */


.summary-text { padding: 15px 20px; }
.summary-text h3 { margin: 0 0 10px 0; }
.summary-text h3 a { text-decoration: none; color: inherit; }
.summary-text p { margin: 0; font-size: 0.9em; }
.author-info { font-size: 0.8em; color: #777; margin-top: 10px; display: block; }
.read-more { font-weight: bold; color: #7d5a2b; text-decoration: underline; }
.read-more:hover { color: #f3c678; }

.article-full h1 { font-size: 2.5em; }
.article-meta { color: #777; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }

/* ▼▼▼ 詳細ページの画像サイズを修正 ▼▼▼ */
.article-image-full {
    width: 100%; /* 横幅をコンテナに合わせる */
    max-height: 500px; /* 高くなりすぎないように制限 */
    object-fit: cover; /* 比率を保ちつつ表示 */
    border-radius: 8px;
    margin-bottom: 20px;
}
/* ▲▲▲ ここまで修正 ▲▲▲ */

.article-content { line-height: 1.8; }
/* =================================== */
/* --- 9. 汎用リスト（部活紹介など） --- */
/* =================================== */
.info-list dt { font-weight: bold; color: #555; float: left; clear: left; width: 120px; }
.info-list dd { margin-left: 140px; padding-bottom: 10px; }
.feature-list { list-style: none; padding-left: 0; margin: 20px 0; }
.feature-list li { background-color: #f9f8f4; padding: 10px 15px; border-left: 4px solid #f3c678; margin-bottom: 8px; border-radius: 4px; }
/* =================================== */
/* --- 10. フッター --- */
/* =================================== */
footer {
    background-color: rgba(74, 56, 31, 0.95);
    color: #fffef7;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}
/* =================================== */
/* --- 11. モバイル対応 --- */
/* =================================== */
@media (max-width: 768px) {
    header {
        padding: 10px 15px;
        position: static;
    }
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    nav { margin-top: 10px; width: 100%; }
    nav ul { flex-direction: column; align-items: flex-start; width: 100%; }
    nav li { margin: 5px 0; width: 100%; }
    nav a { display: block; padding: 10px; border-radius: 4px; }
    nav a:hover { background-color: #f7f2e8; }
    .login-button, .logout-button, .user-menu-link { width: 100%; text-align: center; box-sizing: border-box; }
    main { padding-top: 20px; }
    .hero-section { height: 50vh; }
    .hero-text h1 { font-size: 2.5em; }
    .container { margin: 20px auto; }
    .page-content { padding: 20px; }
    .article-summary { flex-direction: column; }
    .article-summary img { width: 100%; height: 180px; }
}