/*タイトル部分ここから*/
.laboratory-detail-title {
    display: flex;
    gap: 4rem;
}
.laboratory-detail-title > * {
    flex: 1; /* 各要素を等しい幅にする */
}

.laboratory-detail-title .research-group {
    margin-top: 0;
}

.laboratory-detail-title-text h1 {
    margin: 1rem 0;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 135%;
}

.educator {
    display: block;
    margin-top: 2rem;
    border-top: 1px solid var(--c-gray-40);
    padding-top: 0.5rem;
    width: 100%;
    color: var(--c-gray-60);
    font-style: normal;
    font-weight: 300;
    font-size: 0.625rem;
    line-height: 100%;
}

.educator-content {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap-reverse;
    width: 100%;
}

.educator-content div {
    flex: 1 1 13rem;
}

.educator-name {
    display: flex;
    align-items: flex-end;
    gap: 0.31rem;
    font-style: normal;
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 100%;
    border-bottom-width: 0;
    padding-block: 0;
    pointer-events: none;
    flex-wrap: wrap;
}

.educator-name font {
    flex-shrink: 0;
}

.educator-name span {
    font-style: normal;
    font-weight: 500;
    font-size: 1rem;
    line-height: 100%;
    white-space: nowrap;
    flex-shrink: 0;
}

.educator-teach {
    margin-top: 0.75rem;
    font-style: normal;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 150%;
}

.educator-content a {
    display: flex;
    align-items: flex-end;
    gap: 0.125rem;
    margin-top: 1.5rem;
    border-bottom: 0.5px solid var(--c-gray-120);
    padding-bottom: 0.12rem;
    width: fit-content;
    font-style: normal;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 100%;
}

@media (hover:hover) {
    .educator-content a:hover {
        border-bottom: 0.5px solid rgba(15,15,15,0);
    }
}

.educator-content picture {
    display: block;
    width: fit-content;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
}

/*デスクトップサイズ以下ここから*/
@media only screen and (max-width: 991.98px) {
    .laboratory-detail-title {
        flex-direction: column-reverse;
        gap: 2rem;
    }
}

/*タブレットサイズ以下ここから*/
@media only screen and (max-width: 767.98px) {
    .educator-content {
        grid-template-columns: 1fr 1fr;
    }
    .educator-content > div {
        justify-self: start;
        text-align: left;
    }
    .educator-content picture img {
        display: block;
        justify-self: end;
        max-width: 100%;
        height: auto;
    }
}

/*タイトル部分ここまで*/

/*研究紹介ここから*/
.research {
    background-color: var(--c-gray-5);
}

.research-content {
    margin-bottom: 6rem;
}

.research-content:last-of-type {
    margin-bottom: 8rem;
}

.research-text {
    margin-bottom: 2rem;
}

.research-text p {
    font-size: 1rem;
    line-height: 175%;
}

.research-text p:not(:last-child) {
    margin-bottom: 1rem;
}

.research-text-small {
    font-size: 0.875rem;
}

.research-img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
    margin-bottom: 2rem;
}

/*研究室詳細ページの画像を3:2の比率で固定表示*/

.research-img-wrapper picture {
    display: flex;
    aspect-ratio: 3/2;

    img {
        object-fit: cover;
    }
}

.research-img-wrapper picture,
.research-img-wrapper img {
    aspect-ratio: 3/2;
}

/*img-containクラスを付与することでobject-fit:cover;に変更可能*/

.img-contain picture {
    background: var(--c-white);

    img {
        margin-inline: auto;
        object-fit: contain;
    }
}

.research-img-wrapper p {
    margin: 0.75rem 0 0;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
}

.research-button-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1440px) {
    .research {
        --s-container-inline: calc((100% - 64.5rem) / 2);
        --s-container-block: 8rem;
    }
}

@media (min-width: 768px) and (max-width: 1439.98px) {
    .research {
        background-color: var(--c-gray-5);
        padding: 8rem 13rem;
    }
}

/*デスクトップサイズ以下ここから*/
@media only screen and (max-width: 991.98px) {
    .research {
        padding: 8rem 10rem;
    }
    .research-content {
        margin-bottom: 5rem;
    }
}

/*タブレットサイズ以下ここから*/
@media only screen and (max-width: 767.98px) {
    .research {
        padding: 6rem 4rem;
    }
    .research-content {
        margin-bottom: 4rem;
    }
    .research-content:last-of-type {
        margin-bottom: 6rem;
    }
}

/*スマホサイズ以下ここから*/
@media only screen and (max-width: 575.98px) {
    .research {
        padding: 4rem 1.5rem;
    }
    .research-content {
        margin-bottom: 3rem;
    }
    .research-content:last-of-type {
        margin-bottom: 4rem;
    }
    .research-img-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
}
/*研究詳細ここまで*/

/*教授についてここから*/
.educator-about-en {
    display: flex;
    align-items: center;
    color: var(--c-gray-60);
    font-style: normal;
    font-weight: 200;
}

.educator-about-en::after {
    flex: 1;
    margin-left: 1rem;
    background-color: var(--c-gray-30);
    height: 1px;
    content: "";
}

.educator-about-content {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 4rem;
    margin-top: 1.75rem;
}

/*2人以上いる場合*/
.educator-about-content:nth-of-type(2):nth-last-of-type(1) {
    border-top: 1px solid var(--c-gray-30);
    padding-top: 2.5rem;
}

.educator-profile-img {
    display: flex;
    flex-flow: column;
    gap: 1.5rem;
}

.educator-profile-img Picture {
    max-width: 100%;
    height: auto;
}

.educator-comment {
    margin-top: 0.75rem;
}

.educator-comment::before {
    content: "“";
    font-size: 1.5rem;
    letter-spacing: 0.25rem;
}

.educator-research-content {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--c-gray-30);
    padding: 2.5rem 0;
    flex-wrap: wrap;
    align-items: start;
}

.educator-research-content:first-child {
    padding-top: 0;
}

.educator-research-content h2,
.educator-research-content p {
    margin: 0;
    flex: 1 1 20rem;
}

.educator-research-content h2 {
    font-style: normal;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 150%;
    width: 100%;
    max-width: 14rem;
}

.educator-about .subpage-button {
    margin-top: 1.5rem;
    margin-left: auto;
}

.return-to-list {
    display: flex;
    justify-content: center;
    margin-top: 8rem;
}

.return-to-list a {
    border-bottom: 1px solid var(--c-gray-30);
    padding: 1.5rem 1rem;
}

@media(hover:hover){

    .return-to-list a {
        transition: border-bottom-color 0.2s ease-out;
    }

    .return-to-list a:hover {
        border-bottom-color: var(--c-gray-120);
    }

}

/*デスクトップサイズ以下ここから*/
@media only screen and (max-width: 991.98px) {
    .educator-about-content {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .educator-profile {
        border-bottom: 1px solid var(--c-gray-30);
        padding-bottom: 1.5rem;
    }

    .educator-profile-img {
        justify-content: flex-start;
    }

    .educator-research-content {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .educator-research-content:first-child {
        padding-top: 2rem;
    }

    .educator-about-content .subpage-button {
        width: 100%;
    }

    .return-to-list {
        margin-top: 4rem;
    }
}

/*教授についてここまで*/
