/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Roboto', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #ffffff, #e8f4ff);
    color: #333;
    line-height: 1.6;
}
header {
    background: #1abc9c;
    color: #fff;
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-container {
    display: flex;
    align-items: center; /* 垂直方向に中央揃え */
}
.logo {
    height: 40px; /* ロゴの高さを調整 */
}
header h1 {
    margin: 0;
    font-size: 1.3rem;
    padding-left: 10px;
}
header h1 a {
    color: #fff;
    text-decoration: none;
}
header h1 a:hover {
    color: #fff;
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}
nav ul li {
    margin: 0;
    position: relative;
}
nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}
nav ul li a:hover {
    color: #2c3e50;
}
body#ecology .intro {
    background-image: url('./images/ecology/back_ecology.jpg');
}
body#morphology .intro {
    background-image: url('./images/morphology/back_morphology.jpg');
}
body#lifecycle .intro {
    background-image: url('./images/lifecycle/back_lifecycle.jpg');
    background-color: rgba(0, 0, 0, 0.1);
    background-blend-mode: overlay;
}
body#arachnida .intro {
    background-image: url('./images/arachnida/back_arachnida.jpg');
}
.intro {
    height: 300px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
}
.intro h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: #fff;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.container {
    margin: 0 auto 2rem;
}
.container .chapter {
    width: 90%;
    max-width: 1200px;
    margin: 1rem auto 1rem;
}
.container .chapter::before {
    content: 'CONTENTS';
    position: absolute;
    height: 30px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0 0.5rem;
    color: #fff;
    font-weight: bold;
}
.container .chapter ul {
    width: max-content;
    margin-block-start: 0px;
    padding: 0.5rem 0;
    padding-inline-start: 2rem;
    padding-inline-end: 1rem;
    border-top: 30px solid #16a085;
    border-bottom: 2px solid #16a085;
    border-right: 2px solid #16a085;
    border-left: 2px solid #16a085;
}
.container .chapter ul li {
}
.container .chapter li::marker {
    color: #16a085;
    font-size: 1.1em;
}
.container .chapter a {
    color: #333;
    text-decoration: none;
}
.container .chapter a:hover {
    color: #E74C3C;
    text-decoration: underline;
}
.container h2 {
    font-size: 1.8rem;
    line-height: 3;
    color: #16a085;
    background: #F2F2F2;
    margin: 0 auto 2rem;
    text-align: center;
}
section {
    width: 90%;
    max-width: 1200px;
    margin: 1rem auto 3rem;
}
section a:link {
    color: #006638;
}
section a:visited {
    color: #006638;
}
section a:hover {
    color: #16A085;
    text-decoration: none;
}
section a:active {
/*    color: #16A085;*/
}
section a:focus {
/*    color: #16A085;*/
}
section h3 {
    font-size: 1.3rem;
    margin-block-start: 3rem;
    margin-block-end: 1rem;
}
section ul {
    padding-inline-start: 2rem;
}
section ol {
    padding-inline-start: 2rem;
}
.figure-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-evenly;
}
figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem
}
figure img {
    margin-bottom: 0.8rem;
}
figure figcaption {
    text-align: center;
    font-size: 0.8rem;
}
.ad {
    text-align: center;
}
.bunken {
    width: 90%;
    max-width: 1200px;
    margin: 3rem auto;
}
.bunken ul {
    margin: 1rem 1rem 0 1.5rem;
    padding: 0;
    text-align: left;
    font-size: 1rem;
}
.bunken ul li {
    margin-bottom: 0.5rem;
}
/* 展開用の▼アイコンを消す */
summary {
    display: block;
    border-bottom: 2px solid #1abc9c;
    padding-left: 0.5rem;
}
summary h2 {
    font-size: 1.5rem;
    color: #16a085;
    margin-bottom: 0;
}
/* Safari/Opera用 */
summary::-webkit-details-marker {
    display: none;
}
.update {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: right;
}
.gotop {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    text-align: center;
}
footer {
    background: #1abc9c;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}
footer a {
    color: #fff;
}
footer a:hover {
    color: #2c3e50;
}

/* ecologyの形態比較 */
table.hikaku {
    text-align: center;
    margin: 2rem auto;
}

/* lifecycleの単為生殖リスト */
ul.partheno{
    padding-inline-start: 0px;
}
ul.partheno li{
    list-style-type: none;
}
ul.partheno li ul{
    width: 100%;
    padding-inline-start: 1.5rem;
}
ul.partheno li li{
    list-style-type: circle;
}

/* モバイル対応 */
@media(max-width: 767px) {
    header {
        display: flex;
        flex-direction: column;
        padding: 0.5rem;
        align-items: center;
        justify-content: center;
    }

    header .header-container {
        margin-bottom: 5px;
    }

    header nav ul {
        display: flex;
        flex-direction: row;
        gap: 10px;
        padding: 0;
        list-style: none;
        align-items: center;
    }

    header nav ul li {
        display: inline-block;
    }

    header nav ul li a {
        text-decoration: none;
        padding: 5px 0;
        font-size: 0.9rem;
    }

    .intro {
        height: 200px;
}

    .container h2 {
        font-size: 1.3rem;
    }

    section {
        padding: 0 4%;
    }

    .container .chapter {
        font-size: 0.9rem;
    }

    figure {
        margin: 2rem 1rem;
    }

    img {
        max-width: 100%;
    }

    summary h2 {
        font-size: 1.3rem;
    }

    .bunken ul li {
        font-size: 0.8rem;
    }

    .gotop {
        width: 50px;
        height: 50px;
    }

}
