/* リセットCSS & 基本設定 */
:root {
    --primary-color: #302e41; /* 研究室テーマカラー */
    --accent-color: #5a5675;
    --bg-color: #f4f4f7;
    --text-color: #333;
    --link-color: #0056b3;
    --white: #ffffff;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

/* レイアウト共通 */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid #ddd;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    /* ★重要：これで左右の端に配置されます */
    justify-content: space-between; 
    align-items: center; /* 垂直方向の中央揃え */
    flex-wrap: wrap;
}

/* ロゴエリアの指定（削除した .logo-area の代わりに個別に設定） */

/* メインロゴ（川井・丸山研究室） */
.main-logo img {
    display: block;
    /* ★変更：60px → 80px (約1.3倍) */
    height: 80px; 
    width: auto;
}

/* サブロゴ（熊本大学） */
.sub-logo img {
    display: block;
    /* ★変更：メインロゴとのバランスを見て72pxに設定 */
    height: 72px; 
    width: auto;
}

/* --- レスポンシブ対応（スマホ向け）の修正 --- */
/* ファイルの一番下にある @media (max-width: 768px) の中身も修正が必要です */

/* ナビゲーション */
.global-nav {
    background-color: var(--primary-color);
    width: 100%;
}

.global-nav ul {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    /* 下のコンテンツエリア(container)と同じ余白を持たせて、開始・終了位置を揃える */
    padding: 0 20px; 
    /* justify-content: flex-start; を削除 */
}

.global-nav li {
    /* 均等幅に引き伸ばす */
    flex: 1; 
    /* 文字をボタンの中央に配置 */
    text-align: center; 
}

.global-nav a {
    display: block;
    color: var(--white);
    padding: 15px 20px;
    font-weight: 500;
}

.global-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

/* メインビジュアル（ヒーローエリア） */
.hero-section {
    position: relative;
    width: 100%;
    /* PC表示時の高さ設定 */
    padding-top: 25%; 
    min-height: 300px;
    overflow: hidden;
    color: var(--white);
    margin-bottom: 30px;
    
    /* ★追加：上のナビゲーションとの間に隙間を空ける */
    margin-top: 40px; 
    
    border-radius: 8px;
}

/* --- ここから追加 --- */

/* 背景画像の配置エリア */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 1;
}

/* 左側の画像（残響室） */
.bg-left {
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center bottom; /* 下側を基準に表示 */
}

/* 右側の画像（無響室） */
.bg-right {
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center center;
}

/* --- ここまで追加 --- */

/* 画像の上に重ねるフィルター（修正：薄くして画像を見えやすく） */
.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ★修正：0.75(濃い) → 0.3(薄い) に変更 */
    background: rgba(48, 46, 65, 0.3);
}

/* テキストのスタイル（修正：スローガンのみのデザインに調整） */
.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* 背景が明るくなった分、文字の影を少し強めて読みやすくする */
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
}

/* スローガン用スタイル */
.hero-text {
    font-size: 1.8rem; /* 文字サイズ調整 */
    font-weight: 700;
    line-height: 1.8;
    margin: 0;
    padding: 0 20px; /* スマホで端が切れないように余白 */
}

/* --- レスポンシブ対応（スマホ向け）の修正 --- */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 0;
        height: 300px; /* スマホでの高さ */
        margin-top: 20px; /* スマホでの上の隙間 */
    }

    .hero-text {
        font-size: 1.2rem; /* スマホでの文字サイズ */
    }
}

/* メインコンテンツレイアウト (2カラム) */
.main-container {
    display: flex;
    gap: 40px;
    padding-bottom: 60px;
}

.left-column {
    flex: 2; /* 左側を広く */
}

.right-column {
    flex: 1; /* 右側（動画） */
    max-width: 400px;
}

/* セクションスタイル */
.section-title {
    font-size: 1.4rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* ニュースリスト */
.news-section {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.news-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list .date {
    font-weight: bold;
    color: #666;
    min-width: 100px;
    font-size: 0.9rem;
    margin-right: 10px;
}

.more-link {
    text-align: right;
    margin-top: 15px;
}

.more-link a {
    font-weight: bold;
    color: var(--primary-color);
}

/* 所属リスト */
.affiliation-section {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.affiliation-list li {
    margin-bottom: 10px;
    padding-left: 1em;
    text-indent: -1em;
}

.affiliation-list li::before {
    content: "・";
    font-weight: bold;
}

/* 右カラム（動画） */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 アスペクト比 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* フッター */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* --- レスポンシブ対応（スマホ向け） --- */
@media (max-width: 768px) {
    .header-inner {
        justify-content: center;
        text-align: center;
    }

    .logo-area {
        flex-direction: column;
        gap: 10px;
    }

    .global-nav ul {
        flex-direction: column; /* 縦並び */
        text-align: center;
    }
    
    .global-nav a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .main-container {
        flex-direction: column; /* カラムを縦積みに */
    }

    .right-column {
        max-width: 100%;
    }

    .news-list li {
        flex-direction: column;
    }
    
    .news-list .date {
        margin-bottom: 4px;
    }

    /* スマホではロゴを少し小さくして縦並びにする */
    .header-inner {
        flex-direction: column; /* 縦並び */
        gap: 15px;
        padding-bottom: 15px;
    }

    /* .logo-area 関連の記述があれば削除してください */

    .main-logo img {
        height: 50px; /* スマホ用に縮小 */
    }

    .sub-logo img {
        height: 45px; /* スマホ用に縮小 */
    }
}