/* ===== 基本フォントサイズのリセット =====
   CMS(bge_style.css)は :root を 62.5%(1rem=10px)、body を 1.6rem(=16px) にしている。
   本CSSは 1rem = 16px（ブラウザ標準）前提で書かれているため、標準値に戻す。
   ※ :root は bge_style.css と同じセレクタで打ち消す必要がある（html だと詳細度が足りない） */
:root {
    font-size: 100%; /* 1rem = 16px */
}

body {
    font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
    background: #f4f7fb;
    margin: 0;
    font-size: 1rem; /* 16px。CMSの body{1.6rem}(=25.6px相当) を打ち消す */
}

.c-page-sub__header {
    margin: 25px 25px 1rem;
}

.c-header {
    font-size: 1.6rem;
    padding: 0;
    position: relative;
}

.c-header__site-name {
    margin: 0;
    width: 158px;
    z-index: 150;
}

.c-header__site-name a {
    display: block;
    text-decoration: none;
}

.c-page-sub__header img {
    width: 100%;
    height: auto;
    display: block;
}

@media screen and (max-width: 767px) {
    .c-page-sub__header {
        margin: 0 0 1rem;
        width: 100%;
    }

    .c-header {
        align-items: center;
        display: flex;
        height: 16vw;
        left: 0;
        padding: 0 5.33333vw;
        top: 0;
        z-index: 100;
    }

    .c-header__site-name {
        position: relative;
        width: 29.33333vw;
    }
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1 {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}

.search-box {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    max-width: 700px;
    margin: 1.5rem auto;
}

.filter-title {
    font-weight: bold;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #005bac;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.filter-title::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #005bac;
    transition: transform 0.2s;
}

.filter-title.is-open::before {
    transform: rotate(180deg);
}

.official-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.official-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.official-filter-item input {
    accent-color: #005bac;
    cursor: pointer;
}

.filter-count {
    font-size: 0.8rem;
    color: #666;
}

.search-form {
    display: flex;
    gap: 0.8rem;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.search-form input:focus {
    outline: none;
    border-color: #005bac;
    box-shadow: 0 0 0 3px rgba(0,91,172,0.2);
}

.search-form button {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: #005bac;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

.search-form button:hover {
    background: #003f7d;
}

.cards {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.6rem;
    padding: 0;
}

@media (min-width: 700px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 2rem;
    }
}

@media (min-width: 1180px) {
    .cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 2rem;
    }
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    padding: 1rem;
    color: white;
    font-weight: bold;
    background: var(--card-header-bg, #546e7a);
    font-size: 1.3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.35rem;
}

.card-title {
    min-width: 0;
    width: 100%;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-align: left;
    padding: 0;
}

.card-title-subrow {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.75rem;
    width: 100%;
}

.card-degree,
.card-position,
.card-title-kana {
    font-size: 0.8rem;
    font-weight: normal;
}

/* 研究室名（漢字）の下に表示する全角カタカナ表記 */
.card-title-kana {
    width: 100%;
    line-height: 1.3;
}

.card-url-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem 0.75rem;
    padding: 0.65rem 0.85rem;
    padding-bottom: 0;
    background: #fff;
    border-top: 1px solid #ddd;
}

.card-url {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1;
    color: #005bac;
    background: #fff;
    border: 1px solid #005bac;
    text-decoration: none;
    white-space: nowrap;
}

.card-url:hover {
    background: #005bac;
    color: #fff;
    border-color: #005bac;
}

.card-url:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 91, 172, 0.25);
}

.card-mspe { --card-header-bg: #6b326c; }

.card-iise { --card-header-bg: #9f374b; }

.card-ie { --card-header-bg: #9f3824; }

.card-sec { --card-header-bg: #a46e2c; }

.card-ime { --card-header-bg: #aba235; }

.card-ee { --card-header-bg: #698a3f; }

.card-cse { --card-header-bg: #097848; }

.card-cin { --card-header-bg: #077948; }

.card-ise { --card-header-bg: #027b76; }

.card-sme { --card-header-bg: #175786; }

.card-ses { --card-header-bg: #342e6d; }

.card-copy {
    color: var(--card-header-bg);
    font-size: 1.2rem;
    margin: 0 0 0.6rem;
    font-weight: inherit;
}

.card-meta-row {
    display: flex;
    align-items: stretch;
    font-size: 0.9rem;
}

.card-reserarchguidance {
    flex: 0 1 auto;
    min-width: max-content;
    padding: 0.6rem 0.8rem;
    background: #dbdbdb;
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-department-group {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

.card-department {
    padding: 0.6rem 0.8rem;
}

.card-department + .card-department {
    padding-top: 0;
}

.card-reserarch-row {
    display: flex;
    align-items: stretch;
    font-size: 0.7rem;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.card-reserarch-head {
    flex: 0 0 4rem;
    background: #555555;
    color: #fff;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-reserarch {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.3rem 0.4rem;
    background: #fff;
}

.card-body {
    padding: 1rem;
    background: #f9fbfd;
}

.card-body p {
    margin: 0 0 1rem;
}

.card-body h3 {
    font-size: 0.9rem;
    margin: 1rem 0 0.6rem;
    border-bottom: 1px solid #ddd;
}
.card-image {
    margin-bottom: 10px;
}
.card-image img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
}
/* 画像クリックでモーダル（colorbox）が開くことを分かるようにする */
.card-image-link {
    display: block;
    cursor: zoom-in;
    transition: opacity 0.2s;
}
.card-image-link:hover {
    opacity: 0.75;
}

/* 検索語・専攻の絞り込みにヒットした箇所を黄色マーカーで示す */
mark.search-hit {
    background: linear-gradient(transparent 55%, #ffe95c 55%);
    color: inherit;
    font-weight: 700;
    padding: 0;
    border-radius: 2px;
}
/* 濃い背景の上（カード見出し・専攻名など）では下地に負けないよう塗りつぶす */
.card-header mark.search-hit,
.card-department mark.search-hit,
.card-reserarchguidance mark.search-hit {
    background: #ffe95c;
    color: #333;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin: 3px;
    color: #333333;
    background: #e5e5e5;
    cursor: pointer;
}

@media (max-width:600px) {
    .search-form { flex-direction: column; }
    .search-form button { width: 100%; }

    .card-meta-row { flex-direction: column; }
    .card-reserarchguidance {
        flex-basis: auto;
        min-width: 0;
        white-space: normal;
    }
}

/* ===== laboguide 専用フッター ===== */

.lg-footer {
    margin-top: 2rem;
    font-size: 62.5%;
    width: 100%;
}

.lg-footer .c-footer {
    background: url(/img/bg_ft.jpg);
    color: #fff;
    letter-spacing: 1.3px;
    position: relative;
    width: 100%;
}

@media screen and (min-width: 768px) {
    .lg-footer .c-footer {
        z-index: 2;
    }
}

.lg-footer .c-footer:before {
    background-image: url(/img/obj-ft.png);
    background-repeat: no-repeat;
    background-size: cover;
    bottom: 0;
    content: "";
    height: 265px;
    position: absolute;
    right: 0;
    width: 655px;
}

@media screen and (min-width: 768px) {
    .lg-footer .c-footer:before {
        z-index: -1;
    }
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer:before {
        height: 24.66667vw;
        width: 58vw;
    }
}

.lg-footer .c-footer a {
    color: #fff;
    text-decoration: none;
}

.lg-footer .c-footer__panel {
    display: flex;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__panel {
        flex-flow: column;
    }
}

.lg-footer .c-footer__panel-item {
    overflow: hidden;
}

@media screen and (min-width: 768px) {
    .lg-footer .c-footer__panel-item {
        min-height: 250px;
        width: 50%;
    }
}

@media print {
    .lg-footer .c-footer__panel-item {
        min-height: 250px;
        width: 50%;
    }
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__panel-item {
        height: 40vw;
        width: 100%;
    }
}

.lg-footer .c-footer__panel-item[data-item=documents] a:before {
    background-image: url(/img/bg-document.jpg);
}

.lg-footer .c-footer__panel-item[data-item=contact] a:before {
    background-image: url(/img/bg-contact.jpg);
}

.lg-footer .c-footer__panel-item p {
    height: 100%;
    margin: 0;
    width: 100%;
}

.lg-footer .c-footer__panel-item a {
    align-items: center;
    display: flex;
    flex-flow: column;
    font-weight: 500;
    height: 100%;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 0;
    color: #fff;
    text-decoration: none;
}

.lg-footer .c-footer__panel-item a:before {
    background-repeat: no-repeat;
    background-size: cover;
    bottom: 0;
    content: "";
    left: 0;
    margin: auto;
    position: absolute;
    right: 0;
    top: 0;
    transition: transform .8s;
    width: 100%;
    z-index: -1;
}

@media screen and (min-width: 768px) {
    .lg-footer .c-footer__panel-item a:hover:before {
        transform: scale(1.05);
    }
}

.lg-footer .c-footer__panel-item [data-lang=ja] {
    font-size: 3em;
    letter-spacing: .08em;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__panel-item [data-lang=ja] {
        font-size: 4.8vw;
    }
}

.lg-footer .c-footer__panel-item [data-lang=en] {
    font-family: Roboto, Noto Sans JP, sans-serif;
    font-size: 1.6em;
    letter-spacing: .05em;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__panel-item [data-lang=en] {
        font-size: 3.33333vw;
    }
}

.lg-footer .c-footer__body {
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    margin-left: 12px;
    margin-right: 12px;
    max-width: 1260px;
    min-width: 0;
    padding: 70px 70px 60px;
    width: calc(100% - 24px);
}

@media print {
    .lg-footer .c-footer__body {
        max-width: none;
    }
}

@media screen and (min-width: 1284px) {
    .lg-footer .c-footer__body {
        margin-left: auto;
        margin-right: auto;
        width: 1260px;
    }
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__body {
        flex-flow: column;
        margin-left: 12px;
        margin-right: 12px;
        padding: 13.33333vw 8vw;
        width: calc(100% - 24px);
    }
}

.lg-footer .c-footer__about {
    flex: 0 0 auto;
    min-width: 0;
}

@media screen and (min-width: 768px) {
    .lg-footer .c-footer__about {
        width: 345px;
    }
}

.lg-footer .c-footer__logo {
    margin: 0 0 25px;
    width: 345px;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__logo {
        margin-bottom: 8vw;
        width: 54.93333vw;
    }
}

.lg-footer .c-footer__logo a {
    display: block;
}

.lg-footer .c-footer__logo img {
    height: auto;
    width: 100%;
}

.lg-footer .c-footer__connection-link {
    margin: 0;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__connection-link {
        align-self: center;
        margin-bottom: 9.33333vw;
        text-align: center;
    }
}

.lg-footer .c-footer__connection-link a {
    border: 1px solid #69779a;
    display: inline-block;
    font-size: 1.6em;
    font-weight: 500;
    padding: 10px 45px 10px 15px;
    position: relative;
    transition: opacity .5s;
    color: #fff;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__connection-link a {
        font-size: 4vw;
        padding: 3.33333vw 8vw 3.33333vw 6.66667vw;
    }
}

.lg-footer .c-footer__connection-link a:after {
    background: url(/img/icon-blank.png) no-repeat;
    background-size: cover;
    bottom: 0;
    content: "";
    height: 14px;
    margin: auto 0;
    position: absolute;
    right: 15px;
    top: 0;
    transition: transform .3s;
    width: 14px;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__connection-link a:after {
        height: 3.33333vw;
        right: 2.66667vw;
        width: 3.33333vw;
    }
}

@media screen and (min-width: 768px) {
    .lg-footer .c-footer__connection-link a:hover {
        opacity: .6;
    }

    .lg-footer .c-footer__connection-link a:hover:after {
        transform: scale(1.1);
    }
}

.lg-footer .c-footer__sub {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 1 auto;
    margin-left: auto;
    min-width: 0;
}

.lg-footer .c-footer__links,
.lg-footer .c-footer__sns {
    display: flex;
    flex-wrap: wrap;
    font-size: 1.4em;
    justify-content: flex-end;
    list-style: none;
    margin: 0 0 20px;
    max-width: min(445px, 100%);
    padding: 0;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__links,
    .lg-footer .c-footer__sns {
        font-size: 3.73333vw;
        margin-bottom: 10.66667vw;
    }
}

.lg-footer .c-footer__links li:not(:first-child),
.lg-footer .c-footer__sns li:not(:first-child) {
    margin-left: 20px;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__links li:not(:first-child),
    .lg-footer .c-footer__sns li:not(:first-child) {
        margin-left: 6.66667vw;
    }
}

.lg-footer .c-footer__links li a,
.lg-footer .c-footer__sns li a {
    display: inline-block;
    transition: opacity .5s;
}

@media screen and (min-width: 768px) {
    .lg-footer .c-footer__links li a:hover,
    .lg-footer .c-footer__sns li a:hover {
        opacity: .6;
    }
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__links {
        align-self: flex-start;
        flex-flow: column;
        justify-content: flex-start;
    }
}

.lg-footer .c-footer__links li {
    margin-bottom: 8px;
    margin-top: 8px;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__links li {
        margin-bottom: 0;
        margin-top: 0;
    }

    .lg-footer .c-footer__links li:not(:first-child) {
        margin-left: 0;
        margin-top: 6vw;
    }
}

.lg-footer .c-footer__links li a {
    padding-left: 18px;
    position: relative;
    color: inherit;
    text-decoration: none;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__links li a {
        padding-left: 5.33333vw;
    }
}

.lg-footer .c-footer__links li a:after,
.lg-footer .c-footer__links li a:before {
    bottom: 0;
    content: "";
    margin: auto 0;
    position: absolute;
    top: 0;
}

.lg-footer .c-footer__links li a:before {
    background-color: #fff;
    border-radius: 50%;
    height: 13px;
    left: 0;
    width: 13px;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__links li a:before {
        height: 3.46667vw;
        width: 3.46667vw;
    }
}

.lg-footer .c-footer__links li a:after {
    border: 1px solid #1a3571;
    border-width: 1px 1px 0 0;
    height: 4px;
    left: 4px;
    transform: rotate(45deg);
    width: 4px;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__links li a:after {
        height: 1.06667vw;
        left: 1.06667vw;
        width: 1.06667vw;
    }
}

.lg-footer .c-footer__sns {
    align-items: center;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__sns {
        align-self: center;
        justify-content: center;
    }
}

.lg-footer .c-footer__sns li {
    height: 28px;
    line-height: 1;
    width: 28px;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__sns li {
        height: 6.66667vw;
        width: 6.66667vw;
    }
}

.lg-footer .c-footer__sns li.c-footer__sns-x {
    width: 23px;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__sns li.c-footer__sns-x {
        width: 6vw;
    }
}

.lg-footer .c-footer__sns li a {
    height: 100%;
}

.lg-footer .c-footer__sns li a,
.lg-footer .c-footer__sns li img {
    align-items: center;
    display: flex;
    justify-content: center;
}

.lg-footer .c-footer__sns li img {
    height: auto;
    width: 100%;
}

.lg-footer .c-footer__copyright {
    display: block;
    font-family: Roboto, Noto Sans JP, sans-serif;
    text-align: right;
}

@media screen and (max-width: 767px) {
    .lg-footer .c-footer__copyright {
        align-self: center;
        font-size: 2.93333vw;
        text-align: center;
    }
}

.lg-footer .c-footer__connection-link[data-device="pc"] {
    display: block;
}

.lg-footer .c-footer__connection-link[data-device="sp"] {
    display: none;
}

@media screen and (max-width: 767px) {
    .lg-footer {
        padding-top: 1.5rem;
    }

    .lg-footer .c-footer {
        padding: 0 1rem 1.5rem;
    }

    .lg-footer .c-footer__body {
        flex-direction: column;
    }

    .lg-footer .c-footer__about,
    .lg-footer .c-footer__sub {
        flex: 1 1 auto;
        margin-left: 0;
    }

    .lg-footer .c-footer__connection-link[data-device="pc"] {
        display: none;
    }

    .lg-footer .c-footer__connection-link[data-device="sp"] {
        display: block;
        margin-top: 0.75rem;
    }
}
