body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    background-color: white;
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 13vh;
    background: linear-gradient(135deg, rgba(106, 144, 59, 0.9), rgba(78, 116, 35, 0.9));
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav {
    display:flex;
    justify-content: space-around;
    align-items: center;
    height: 13vh;
    background-color: rgb(106, 144, 59, 0.65);
}

.nav-links {
    display: flex;
    justify-content: space-around;
    width: 56%;
    transition: all 0.3s ease-in-out;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 15px;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
            background-color: rgba(255, 255, 255, 0.2);
            transform: translateY(-1px);
}

/* burger */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease-in-out;
}

.nav-active {
    transform: translateX(0%) !important;
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* アニメーション */
        .fade-in {
            animation: fadeIn 0.6s ease-in;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInSlide {
            from {
                opacity: 0;
                transform: translateX(30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        /* アニメ終わり */

@media screen and (max-width: 2500px) {
    .zoom-out1 img {
    object-fit: contain; /* 必要に応じて調整 */
    margin-top: 12vh;
}

.zoom-out2 img {
    object-fit: contain; /* 必要に応じて調整 */
    margin-top: 12vh;
    
    
}
.zoom-out3 img {
    object-fit: contain; /* 必要に応じて調整 */
    margin-top: 12vh;
    
}

.zoom-out6 img {
    margin-top: 11vh;
}

.zoom-out4 img {
    margin-top: 5vh;
}

.zoom-out7 img {
    margin-top: 7vh;
}

.zoom-out8 img {
    object-fit: contain; /* 必要に応じて調整 */
    margin-top: 12vh;
    
}
}

@media screen and (max-width: 1200px) {
    body {
        overflow-x: hidden;
    }
    
    .nav-links {
        right: 0;
        height: 87vh;
        flex-direction: column;
        position: absolute;
        align-items: center;
        top: 13vh;
        background-color: rgb(106, 144, 59, 0.8);
        width: 40%;
        transform: translateX(100%);
        z-index: 10;
    }

    .nav-links li {
        opacity: 0;
        z-index: 3;
    }

    .burger {
        display: block;
    }

    .zoom-out1 img {
    object-fit: contain; /* 必要に応じて調整 */
    margin-top: 8vh;
}

.zoom-out2 img {
    object-fit: contain; /* 必要に応じて調整 */
    margin-top: 8vh;
    
    
}
.zoom-out3 img {
    object-fit: contain; /* 必要に応じて調整 */
    margin-top: 8vh;
    
}

.zoom-out6 img {
    margin-top: 7vh;
}

.zoom-out7 img {
    margin-top: 4vh;
}

.zoom-out8 img {
    object-fit: contain; /* 必要に応じて調整 */
    margin-top: 8vh;
    
}
}

@keyframes navLinksFade {
    0% {
        opacity: 0;
        transform: translateX(50%);
    }

    100% {
        opacity: 1;
        transform: translateX(0%);
    }
}

.labo-name {
    color: white;
}

.labo-name h1 {
    font-size: 15px;
}

.labo-name h2  {
    font-size: 35px;
}

.break-on-small {
    display: none;
}

@media screen and (max-width: 700px) {
            body {
                padding-top: 10vh;
            }

            header {
                height: 10vh;
            }

            nav {
                height: 10vh;
                padding: 0 15px;
            }

            .labo-name h1 {
                font-size: 12px;
            }

            .labo-name h2 {
                font-size: 20px;
            }

            .nav-links {
                top: 10vh;
            }

            .about-main {
                font-size: 1.8em;
            }

            .about-sub {
                font-size: 1em;
            }

            .wrapper {
                padding: 30px 15px;
            }

.zoom-out1 img {
    object-fit: contain; /* 必要に応じて調整 */
}

.zoom-out2 img {
    object-fit: contain; /* 必要に応じて調整 */
    
    
}
.zoom-out3 img {
    object-fit: contain; /* 必要に応じて調整 */
    
}

.zoom-out6 img {
    object-fit: cover;
    margin-top: 0vh;
}

.zoom-out7 img {
    object-fit:cover;
    margin-top: 0vh;
}




.zoom-out4 img {
    object-fit: cover; /* 必要に応じて調整 */
    margin-top: 0vh;
}
        }

        @media screen and (max-width: 600px) {
            .labo-br {
        display: inline;
        }
        }

        @media screen and (max-width: 500px) {
            .labo-name h1 {
                font-size: 10px;
            }

            .labo-name h2 {
                font-size: 18px;
            }

            .about-main {
                font-size: 1.5em;
            }

            .footerWrapper h4 {
                font-size: 14px;
            }

            
        }

.your-class img {
    width: 100%;
    height: auto;
    max-height: 600px; /* 任意で高さの上限もつけると安定します */
    object-fit: cover; /* はみ出す画像を綺麗に切り取る */
    align-items: center;
}



/* About */
.wrapper {
    max-width: 960px;
    margin: 75px auto 50px auto;
    font-size: 0.9em;
    padding: 0 4%;
}

.sec-title {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.sec-title .about-main {
    font-size: 1.5em;
}
.sec-title .about-sub {
    font-size: 1.1em;
    margin-left: 12px;
    color: #333;
    font-weight: normal;
}

/* .sec-title の前に緑の棒を表示 */



#about ul {
    margin-bottom: 30px;
    list-style: none;
}

#about p {
    margin-bottom: 20px;
}

.red { color: red; }

figure.research-image-container {
    margin: 0 auto; /* figure要素自体を中央揃えにする場合 */
    max-width: 800px; /* 画像コンテナの最大幅（必要に応じて調整） */
    margin-bottom: 30px;
}

img.responsive-image {
    max-width: 100%; /* 親要素の幅を超えないようにする */
    height: auto;    /* アスペクト比を維持する */
    display: block;  /* 画像下の余白を防ぐ */
    margin: 0 auto;  /* 画像自体をコンテナ内で中央揃えにする */
}

/* ★★ 05.新着情報 と 06.今後の予定, 07.外部リンク をFlexboxで横並びにするための親コンテナ */
div.under-contents-wrapper {
    display: flex;
    flex-wrap: wrap; /* 小画面で折り返し */
    gap: 30px; /* 要素間の隙間を少し広げる */
}

/* ★★ 05.新着情報
------------------------------------------------------------*/
div#update {
    flex: 2;
    min-width: 280px;
    /* padding-top: 10px; under-font h3 のマージンで調整 */
}

ul.update-scroll {
    list-style-type: none;
    width: 100%;
    max-height: 400px; /* 高さを少し調整 */
    overflow-y: auto;
    border: 1px solid #bbb;
    padding: 15px; /* 内側余白を少し広げる */
    border-radius: 4px; /* 角丸 */
}

    ul.update-scroll li {
        margin-top: 0.7em; /* 上マージン */
        line-height: 1.6;
    }
    ul.update-scroll li:first-child {
        margin-top: 0;
    }

    ul.update-scroll a {
        text-decoration: none;
        color: #595858;
    }
    ul.update-scroll a:hover {
        color: #e73a51;
        text-decoration: underline;
    }

/* ★★ 06.今後の予定 と 07.外部リンク をまとめるコンテナ */
div.sidebar-contents {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 30px; /* 要素間の隙間 */
}


/* ★★ 06.今後の予定
------------------------------------------------------------*/
div#next {
    /* padding: 10px 0 0 0; */ /* under-font h3 のマージンで調整 */
}

div.next-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}
div.next-item img {
    width: 170px;
    height: 100px;
    margin-right: 10px;
    flex-shrink: 0; /* アイコンが縮まないように */
}

div.next-details {
    display: flex;
    flex-direction: column;
}

div.next-theme {
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

div.next-date {
    font-size: 0.9em;
    color: #777;
    line-height: 1.4;
}

div#next-end h4 {
    margin-top: 15px; /* 少しマージン追加 */
    line-height: 1.5;
    text-align: right; /* 右寄せ */
}

div#next-end a {
    font-size: 1em;
    color: #595858;
    text-decoration: none;
    font-weight: 600;
}

    div#next-end a:link,
    div#next-end a:visited {
        color: #686349;
    }

    div#next-end a:hover {
        color: #e73a51;
        text-decoration: underline;
    }

/* ★★ 07.外部リンク
------------------------------------------------------------*/
div#other-link {
    /* padding: 10px 0 0 0; */ /* under-font h3 のマージンで調整 */
}

div#other-link-title h3 { /* .under-font h3 と共通化しても良い */
    font-weight: 600;
    border-left: 8px solid #4caf50;
    margin-bottom: 15px;
    line-height: 1.5;
    padding-left: 10px;
    font-size: 1.3em;
}

div.link-image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* 画像間の隙間 */
}

div.link-image a {
    display: block; /* 画像全体をリンクに */
}
div.link-image img {
    max-width: 200px; /* 画像の最大幅を少し大きく */
    max-height: 50px;
    border-radius: 4px;
    transition: opacity 0.2s ease-in-out;
}
div.link-image img:hover {
    opacity: 0.6;
}


/* ★★ 08.フッター
------------------------------------------------------------*/
footer {
    width: 100%;
    min-height: 80px;
    background-color: #2f5167;
    padding: 30px 15px; /* 上下パディングを少し増やす */
    color: white;
    margin-top: 40px; /* フッターの上のマージン */
}

div.footerWrapper {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px; /* 要素間の隙間 */
}

    div.footerWrapper h4 {
        color: white;
        margin: 0;
        font-size: 1.1em;
        line-height: 1.4;
    }

    div.footerWrapper p {
        color: white;
        margin: 0;
        font-size: 0.9em;
        text-align: right;
        line-height: 1.4;
    }

/* ★★ 03.5.under部分の基本設定
------------------------------------------------------------*/
div#under { /*枠の設定*/
    width: 100%;
    max-width: 960px; /* 最大幅を設定 */
    margin: 20px auto; /* 中央配置 */
    padding: 0 15px; /* 左右にパディング */
}

div.under-font h3 { /*新着情報の効果*/
    font-weight: 600;
    border-left: 8px solid #4caf50;
    margin-bottom: 15px; /* マージン調整 */
    line-height: 1.5; /* 行の高さ調整 */
    padding-left: 10px;
    font-size: 1.5em; /* フォントサイズ調整 */
}

/* ============================================================
メディアクエリ - Responsive Breakpoints
============================================================ */



/* タブレット縦向き・大きめのスマートフォン (〜768px) */
@media (max-width: 768px) {

    div#under {
        margin: 15px auto;
        padding: 0 10px;
    }
    div.under-font h3 {
        font-size: 1.4em;
        margin-bottom: 10px;
    }

    div.under-contents-wrapper {
        flex-direction: column;
        gap: 25px;
    }
    div#update,
    div.sidebar-contents {
        flex-basis: auto;
        width: 100%;
    }

    ul.update-scroll {
        max-height: 300px;
    }

    div#other-link-title h3 {
        font-size: 1.2em;
    }

    div.footerWrapper {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    div.footerWrapper h4,
    div.footerWrapper p {
        text-align: center;
    }
}

/* スマートフォン (〜480px) */
@media (max-width: 480px) {
    

    div.under-font h3 {
        font-size: 1.3em;
        border-left-width: 6px;
        padding-left: 8px;
    }

    ul.update-scroll {
        padding: 10px;
        max-height: 250px;
    }
    ul.update-scroll li {
        line-height: 1.5;
    }

    div.next-item img {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    div.next-theme {
        font-size: 1em;
    }
    div.next-date {
        font-size: 0.85em;
    }

    div#other-link-title h3 {
        font-size: 1.1em;
    }
    div.link-image-container {
        justify-content: center; /* 画像を中央寄せ */
    }
    div.link-image img {
        max-width: 100px;
    }

    footer {
        padding: 20px 10px;
    }
    div.footerWrapper h4 {
        font-size: 1em;
    }
    div.footerWrapper p {
        font-size: 0.85em;
    }
}
