/* ==========================================================================
   1. 基本設定
   ========================================================================== */
body {
    margin: 0; padding: 0;
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    color: #111;
    line-height: 1.8;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p, li, dd { font-weight: 500; color: #222; }

main {
    margin-bottom: 80px; /* 60〜100pxで調整 */
}

/* ==========================================================================
   2. 共通パーツ（ロゴ・ナビ・フッター）
   ========================================================================== */
.header-logo h1 { font-size: 2.4rem; margin: 0; line-height: 1.1; }
.header-logo p {
    font-size: 1rem; margin: 0;
    border-top: 1px solid #fff; display: inline-block;
    color: #fff;
}
.header-home-link { text-decoration: none; color: #fff; }

/* ハンバーガーメニュー */
.hamburger {
    position: fixed; top: 40px; right: 40px;
    width: 36px; height: 24px;
    cursor: pointer; z-index: 9999;
}
.hamburger span {
    display: block; position: absolute;
    width: 100%; height: 3px;
    background-color: #000;
    transition: 0.4s; border-radius: 2px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 1);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }
.hamburger.active span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.slide-nav {
    position: fixed; top: 0; right: -300px;
    width: 280px; height: 100%;
    background-color: #111; z-index: 9998;
    transition: 0.5s ease-in-out;
    padding: 100px 40px; box-sizing: border-box;
}
.slide-nav.active { right: 0; }
.slide-nav ul { list-style: none; padding: 0; margin: 0; }
.slide-nav a {
    color: #fff; text-decoration: none; display: block;
    padding: 15px 0; font-size: 1.1rem; border-bottom: 1px solid #222;
}

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); opacity: 0; visibility: hidden;
    transition: 0.5s; z-index: 9997;
}
.overlay.active { opacity: 1; visibility: visible; }

/* ==========================================================================
   3. 【重要】トップページ（index.html）専用設定
   ========================================================================== */
/* ホームの巨大ヘッダー */
.header {
    background-color: #000; color: #fff;
    padding-left: 60px; position: relative;
    min-height: 550px; display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;
}
.header::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('./imgs/ex_setup.JPG');
    background-size: cover; background-position: center; opacity: 0.5; z-index: 0;
}
.header-inner { position: relative; z-index: 1; }
.header-nav ul { list-style: none; padding: 0; margin-top: 30px; }
.header-nav li { margin-bottom: 12px; }
.header-nav a { color: #fff; text-decoration: none; font-size: 1.1rem; }

/* ヒーローセクション */
.hero-section { padding: 80px 10% 40px; text-align: center; }
.hero-text-centered { max-width: 900px; margin: 0 auto; }
.hero-text-centered h1 { font-size: 2.5rem; color: #000; margin-bottom: 30px; }
.hero-lead { font-size: 1.1rem; line-height: 2.2; text-align: justify; text-align-last: center; }

/* 研究テーマのグリッド */
.content-container { max-width: 1000px; margin: 0 auto; padding: 0 5%; }
.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.research-card { 
    text-decoration: none; color: inherit; border: 1px solid #eee; 
    transition: 0.3s; background: #fff;
}
.research-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-content { padding: 20px; }
.card-content h3 { margin: 0; font-size: 1.1rem; color: #000; }

/* 共通ボタン */
.btn-primary {
    display: inline-block; padding: 12px 40px;
    background-color: #000; color: #fff !important;
    text-decoration: none; font-weight: bold; margin-top: 20px;
}


/* ニュース欄 */
#news {
    padding: 80px 0;
    background-color: #f7f9fc;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 40px 0 20px;
    max-width: 800px;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    font-size: 1rem;
}

.news-date {
    min-width: 110px;
    color: #555;
    font-weight: 500;
}

.news-item a {
    color: #004098;
    text-decoration: none;
}

.news-item a:hover {
    text-decoration: underline;
}

.news-more {
    margin-top: 20px;
}

.news-more a {
    color: #004098;
    font-weight: bold;
    text-decoration: none;
}

.news-more a:hover {
    text-decoration: underline;
}



/* ==========================================================================
   4. サブページ共通ヘッダー（Member, Research等）
   ========================================================================== */
.sub-page.header {
    min-height: 400px; position: relative; background-color: #000;
    display: flex; align-items: center; justify-content: center; padding-left: 0;
}
.sub-page.header::before { display: none; } /* ホーム用の背景を消す */
.header-content {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; opacity: 0.6; z-index: 1;
}
.sub-page.header .back {
    position: absolute; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; padding: 20px 60px; z-index: 10;
}
.page-title { position: relative; z-index: 10; text-align: center; }
.page-title h1 { font-size: 3.5rem; color: #fff; margin: 0; }

/* ==========================================================================
   5. Memberページ個別
   ========================================================================== */
.section-title-container {
    /* border-bottom: 2px solid #000;  ← この行を消すか、下のように none にします */
    border-bottom: none !important;
    margin-bottom: 20px; /* 線を消した後の余白を調整したい場合はここをいじります */
}
.section-title { text-align: center; color: #000; font-size: 1.8rem; margin-bottom: 40px; }
.personal { display: flex; gap: 40px; margin-bottom: 60px; align-items: flex-start; }
.face img { width: 160px; height: 200px; object-fit: cover; border-radius: 5px; }
.intro-text .name { font-size: 1.6rem; font-weight: 500; color: #000; text-decoration: none; display: block; }
.grade { font-size: 0.9rem; font-weight: 700; color: #666; display: block; }

/* ==========================================================================
   6. フッター（デザイン改良版）
   ========================================================================== */
.footer {
    background-color: #000;
    color: #fff;
    padding: 60px 10%; /* 上下の余白を広げてゆとりを持たせる */
    margin-top: auto;
    border-top: 1px solid #333; /* 境界にうっすら線を入れる */
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* 左側のコピーライト */
.copyright {
    font-size: 0.8rem;
    color: #888; /* 少し薄くして目立たせない */
    letter-spacing: 0.05em;
}

/* 右側のナビゲーション */
.footer-nav ul {
    display: flex;
    list-style: none;
    gap: 30px; /* リンク同士の間隔を広げる */
    padding: 0;
    margin: 0;
}

.footer-nav a {
    color: #ccc; /* 真っ白より少し落とすと上品です */
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em; /* 文字の間隔を広げてモダンに */
    transition: 0.3s;
    position: relative;
    padding-bottom: 4px;
}

/* ホバー時に下線がスッと出るアニメーション */
.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #fff;
    transition: 0.3s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-nav a:hover::after {
    width: 100%; /* マウスを乗せると線が伸びる */
}

/* スマホ表示の調整 */
@media (max-width: 768px) {
    .footer {
        padding: 40px 20px;
    }
    .footer-inner {
        flex-direction: column-reverse; /* スマホではコピーライトを下にする */
        gap: 30px;
        text-align: center;
    }
    .footer-nav ul {
        flex-direction: column; /* スマホではリンクを縦に並べる */
        gap: 15px;
    }
}

/* =========================================
   スマホ表示用の調整 (画面幅768px以下に適用)
   ========================================= */
@media (max-width: 768px) {
    /* 1. グリッドを1列に変更 */
    .research-grid {
        display: grid !important;
        grid-template-columns: 1fr !important; /* 強制的に1列にする */
        gap: 20px !important;                 /* カード同士の上下間隔 */
        padding: 0 10px;                      /* 左右に少し余白を作る */
    }

    /* 2. カード自体の横幅を調整 */
    .research-card {
        width: 100% !important;
        max-width: none !important;
        margin: 0 auto;
        display: block;
    }

    /* 3. カード内の画像の高さを調整（潰れないように） */
    .card-image {
        height: 200px !important; /* スマホで見やすい高さに固定 */
    }

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}