/* ========================================
   top/style.css  – トップページ固有スタイル
   ======================================== */

/* --- セクション共通 --- */
.top-section {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    padding: 28px 28px 24px;
    margin-bottom: 28px;
}

.top-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: bold;
    color: #1a1612;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8c97a;
}

.top-section-title i {
    color: #e8c97a;
    font-size: 1rem;
}

/* ========================================
   お知らせ
   ======================================== */
.news-list {
    list-style: none;
}

.news-list--scroll {
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* スクロールバーを控えめに表示 */
    scrollbar-width: thin;
    scrollbar-color: #c8b07a #f4f0e8;
}

.news-list--scroll::-webkit-scrollbar {
    width: 5px;
}

.news-list--scroll::-webkit-scrollbar-track {
    background: #f4f0e8;
    border-radius: 10px;
}

.news-list--scroll::-webkit-scrollbar-thumb {
    background: #c8b07a;
    border-radius: 10px;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid #f0ede8;
    transition: background-color 0.15s;
    border-radius: 4px;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background-color: #faf9f5;
}

.news-date {
    font-size: 0.78rem;
    color: #9c9080;
    white-space: nowrap;
    flex-shrink: 0;
    background: #f4f0e8;
    padding: 2px 8px;
    border-radius: 20px;
}

.news-message {
    flex: 1;
    color: #2d2926;
    font-size: 0.95rem;
    line-height: 1.55;
    transition: color 0.15s;
}

.news-message:hover {
    color: #b8943a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.news-arrow {
    color: #c8b07a;
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* ========================================
   主要機能カード
   ======================================== */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px 24px;
    border: 2px solid #ede9e0;
    border-radius: 10px;
    background-color: #faf9f6;
    gap: 6px;
    transition: border-color 0.2s, background-color 0.2s, transform 0.18s, box-shadow 0.18s;
    cursor: pointer;
}

.feature-card:hover {
    border-color: #e8c97a;
    background-color: #fffdf5;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(200, 160, 60, 0.15);
}

.feature-icon {
    font-size: 2.2rem;
    color: #e8c97a;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.12);
}

.feature-name {
    font-weight: bold;
    font-size: 1rem;
    color: #1a1612;
}

.feature-desc {
    font-size: 0.8rem;
    color: #9c9080;
    line-height: 1.5;
    margin-top: 4px;
}

/* ========================================
   著作（書影グリッド）
   ======================================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 16px;
}

@media (min-width: 600px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

.book-item {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.book-cover {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   お役立ち情報
   ======================================== */
.useful-list {
    list-style: none;
}

.useful-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 4px;
    border-bottom: 1px solid #f0ede8;
}

.useful-item:last-child {
    border-bottom: none;
}

.useful-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    color: #b8943a;
    transition: color 0.15s;
}

.useful-title:hover {
    color: #8a6a20;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.useful-ext-icon {
    font-size: 0.7rem;
    opacity: 0.7;
}

.useful-headline {
    font-size: 0.82rem;
    color: #9c9080;
    padding-left: 2px;
    line-height: 1.5;
}

/* ========================================
   お知らせ詳細
   ======================================== */
.news-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9c9080;
    font-size: 0.875rem;
    margin-bottom: 20px;
    transition: color 0.15s;
}

.news-back-link:hover {
    color: #b8943a;
}

.news-detail-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #9c9080;
    margin-bottom: 10px;
}

.news-detail-date i {
    font-size: 0.75rem;
}

.news-detail-title {
    font-size: 1.35rem;
    font-weight: bold;
    color: #1a1612;
    line-height: 1.5;
    padding-bottom: 14px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e8c97a;
}

.markdown-body {
    line-height: 1.8;
    color: #2d2926;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin: 1.4em 0 0.6em;
    font-weight: bold;
    color: #1a1612;
}

.markdown-body h1 { font-size: 1.4rem; border-bottom: 2px solid #e8c97a; padding-bottom: 8px; }
.markdown-body h2 { font-size: 1.15rem; border-bottom: 1px solid #ede9e0; padding-bottom: 6px; }
.markdown-body h3 { font-size: 1rem; }

.markdown-body p {
    margin-bottom: 1em;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 1.6em;
    margin-bottom: 1em;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: 0.9rem;
}

.markdown-body th,
.markdown-body td {
    border: 1px solid #ede9e0;
    padding: 8px 12px;
    text-align: left;
}

.markdown-body th {
    background-color: #f4f0e8;
    font-weight: bold;
}

.markdown-body code {
    background: #f4f0e8;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.875em;
}

.markdown-body pre {
    background: #2d2926;
    color: #f0ede8;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1em;
    font-size: 0.875rem;
}

.markdown-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}
