/* ==========================================================================
   日本大学工学部 糖質生命化学研究室 - style.css
   ========================================================================== */

/* --- 基本設定（暖色系・アカデミック） --- */
:root {
    --primary-color: #e67e22;    /* メインのオレンジ */
    --secondary-color: #d35400;  /* 濃いオレンジ（アクセント・見出し用） */
    --bg-color: #fffaf5;         /* 極めて薄いベージュの背景 */
    --text-color: #4a2c2a;       /* 読みやすい濃い茶色の文字 */
    --white: #ffffff;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    margin: 0;
    line-height: 1.8;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* --- ヘッダー・ナビゲーション --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 0.95rem;
    transition: 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* --- メインビジュアル（ヒーローエリア） --- */
.hero {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: var(--white);
    text-align: center;
    padding: 60px 20px; /* 上下幅を少し詰めました */
}

.hero h1 {
    font-size: 2.2rem;    /* 「でかすぎ」を解消：3rem程度から2.2remへ縮小 */
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* --- コンテンツレイアウト --- */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

section {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

h2 {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

/* --- Newsエリア設定 --- */
#news-box {
    white-space: pre-wrap; /* 改行を反映 */
    font-size: 0.95rem;
    background: #fffdfa;   /* ほんのり色を付けて視認性アップ */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    max-height: 250px;
    overflow-y: auto;      /* 溢れたらスクロール */
    line-height: 1.8;
}

/* ニュース内のスクロールバーを綺麗に */
#news-box::-webkit-scrollbar {
    width: 7px;
}
#news-box::-webkit-scrollbar-track {
    background: #f1f1f1;
}
#news-box::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* --- 研究（Research）項目 --- */
.research-item {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.research-item:last-child {
    border-bottom: none;
}

/* --- リンク集 --- */
#links ul li a {
    transition: 0.3s;
}

#links ul li a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

/* --- スマホ対応（レスポンシブ） --- */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        padding: 10px;
    }

    nav ul {
        margin-top: 15px;
        gap: 10px;
    }

    nav a {
        font-size: 0.85rem;
    }

    .hero h1 {
        font-size: 1.8rem; /* スマホではさらに少し小さく */
    }

    section {
        padding: 20px;
    }
}
/* お知らせボックスの専用デザイン */
#news-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 5px solid #d32f2f;
    line-height: 1.8;
    white-space: pre-wrap;
    
    /* --- スクロール設定 --- */
    max-height: 200px;    /* ボックスの最大高さを指定（5行分くらい） */
    overflow-y: auto;     /* 中身が溢れた時だけスクロールバーを出す */
    border: 1px solid #eee; /* 枠線を少し付けて境界をはっきりさせる */
}

/* スクロールバーのデザインを少し細くお洒落にする（任意） */
#news-box::-webkit-scrollbar {
    width: 8px;
}
#news-box::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}