@charset "utf-8";

/* ----------------------------------------

- contentsMenuContainer

---------------------------------------- */

.contentsMenuWrapper {
    background-color: #f5f5f5;
}

.contentsMenuContainer {
    margin: 0 auto;
    box-sizing: border-box;
}

@media (min-width: 768px) {

    .contentsMenuContainer {
        width: 1112px;
        min-width: 1112px;
        padding: 40px 16px 48px;
        margin: 141px auto 0;
    }

    .en .contentsMenuContainer {
        margin-top: 141px;
    }

}

.contentsMenuContainerTitle {
    text-align: center;
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    font-weight: normal;
}

.contentsMenuContainerTitle::before,
.contentsMenuContainerTitle::after {
    content: "―";
    margin: 0 15px;
    color: #666;
}

/* タブボタン */
.tab-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 45px;
}

@media (min-width: 768px) {
    .tab-buttons {
        gap: 40px;
    }
}

.tab-button {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
}

.tab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #d0d0d0;
}

/* 非アクティブなタブのホバー時 */
.tab-button:not(.active):hover {
    background: #f0f5ff;  /* 薄い青背景 */
    border-color: var(--colors-student-main);  /* 青い枠線 */
}

.tab-button.researcher:not(.active):hover {
    background: #f5f3f8;  /* 薄い紫背景 */
    border-color: var(--colors-researcher-main);  /* 紫の枠線 */
}

.tab-button.faculty:not(.active):hover {
    background: #fff5f0;  /* 薄いオレンジ背景 */
    border-color: var(--colors-faculty-main);  /* オレンジの枠線 */
}

.tab-button.active {
    background: #7ba8e0;
    border-color: var(--colors-student-main);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(91, 143, 215, 0.3);
}

.tab-button.researcher.active {
    background: #a393c0;
    border-color: var(--colors-researcher-main);
    box-shadow: 0 6px 12px rgba(139, 123, 168, 0.3);
}

.tab-button.faculty.active {
    background: #f5944d;
    border-color: var(--colors-faculty-main);
    box-shadow: 0 6px 12px rgba(232, 124, 62, 0.3);
}

.tab-icon {
    font-size: 48px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    margin: 0 auto 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 画像のサイズをより厳密に制御 */
.tab-icon img {
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
}

.service-icon img {
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
}

/* service-iconの高さも制御 */
.service-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card {
    overflow: hidden; /* はみ出し防止 */
    min-height: 0; /* flexboxの最小サイズ問題を回避 */
}

.tab-text {
    color: var(--colors-student-main);
    font-size: 20px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.tab-button.researcher .tab-text {
    color: var(--colors-researcher-main);
}

.tab-button.faculty .tab-text {
    color: var(--colors-faculty-main);
}

.tab-button.active .tab-text {
    color: white;
}

/* コンテンツエリア */
.content-area {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    border: 3px solid var(--colors-student-main);
    transition: border-color 0.3s ease;
}

.content-area::after {
    content: '';
    position: absolute;
    top: -23px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 28px solid transparent;
    border-right: 28px solid transparent;
    border-bottom: 23px solid var(--colors-student-main);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1; /* -1 から 1 に変更 */
}

.content-area::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 20px solid white;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2; /* ::after より前面に */
}

/* 各タブがアクティブな時の矢印の位置と色 */
.content-area.active-student {
    border-color: var(--colors-student-main);
}

.content-area.active-student::before {
    opacity: 1;
    left: 15%;
}

.content-area.active-student::after {
    opacity: 1;
    left: 15%;
    border-bottom-color: var(--colors-student-main);
}

.content-area.active-researcher {
    border-color: var(--colors-researcher-main);
}

.content-area.active-researcher::before {
    opacity: 1;
    left: 50%;
}

.content-area.active-researcher::after {
    opacity: 1;
    left: 50%;
    border-bottom-color: var(--colors-researcher-main);
}

.content-area.active-faculty {
    border-color: var(--colors-faculty-main);
}

.content-area.active-faculty::before {
    opacity: 1;
    left: 85%;
}

.content-area.active-faculty::after {
    opacity: 1;
    left: 85%;
    border-bottom-color: var(--colors-faculty-main);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.content-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.section-contentsMenuContainerTitle {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: none;
    font-weight: 500;
    transition: border-color 0.3s ease;
    position: relative;
}

.section-contentsMenuContainerTitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--colors-student-main) 0%, var(--colors-student-main) 25%, #f0f0f0 25%, #f0f0f0 100%);
}

/* 基本情報 */
.basic-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.basic-link {
    background: white;
    border: 2px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}



/* サービスカード */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.service-card {
    background: white;
    border: 2px solid #ddd;
    padding: 15px 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    aspect-ratio: 1 / 1;
}

.service-card:hover {
    border-color: var(--colors-student-main);
    background: #f0f5ff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.service-icon {
    font-size: 36px;
    margin-bottom: 8px;
    color: #1e3a5f;
}

.service-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.outerLink .service-text::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    background-image: url('/filesdir/images/icons/icon_target_blank.svg');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-top;
}

.en .outerLink .service-text::after {
    vertical-align: middle;
    margin-left: 4px;
}

.service-subtext {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* 属性ごとの色設定 */
#student-content .section-contentsMenuContainerTitle::after {
    background: linear-gradient(to right, var(--colors-student-main) 0%, var(--colors-student-main) 25%, #f0f0f0 25%, #f0f0f0 100%);
}

#student-content .basic-link {
    border-color: var(--colors-student-main);
    background: #7ba8e0;
    color: white;
    /*background: white;
    border-color: #ddd;*/
}

#student-content .basic-link:hover {
    border-color: var(--colors-student-main);
    background: var(--colors-student-main);
    /*background: #7ba8e0;  /* タブの背景色と同じ */
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

#student-content .service-card:hover {
    border-color: var(--colors-student-main);
    background: #f0f5ff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

#researcher-content .section-contentsMenuContainerTitle::after {
    background: linear-gradient(to right, var(--colors-researcher-main) 0%, var(--colors-researcher-main) 25%, #f0f0f0 25%, #f0f0f0 100%);
}

#researcher-content .basic-link {
    border-color: var(--colors-researcher-main);
    background: #a393c0;
    color: white;
    /*background: white;
    border-color: #ddd;*/
}

#researcher-content .basic-link:hover {
    border-color: var(--colors-researcher-main);
    background: var(--colors-researcher-main);
    /*background: #a393c0;  /* タブの背景色と同じ */
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

#researcher-content .service-card:hover {
    border-color: var(--colors-researcher-main);
    background: #f5f3f8;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

#faculty-content .section-contentsMenuContainerTitle::after {
    background: linear-gradient(to right, var(--colors-faculty-main) 0%, var(--colors-faculty-main) 25%, #f0f0f0 25%, #f0f0f0 100%);
}

#faculty-content .basic-link {
    border-color: var(--colors-faculty-main);
    background: #f5944d;
    color: white;
    /*background: white;
    border-color: #ddd;*/
}

#faculty-content .basic-link:hover {
    border-color: var(--colors-faculty-main);
    background: var(--colors-faculty-main);
    /*background: #f5944d;  /* タブの背景色と同じ */
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

#faculty-content .service-card:hover {
    border-color: var(--colors-faculty-main);
    background: #fff5f0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}


/* レスポンシブ対応 */
@media (max-width: 768px) {

    .header .header_inner {
        padding: 16px 48px 16px 16px;
    }

    .spHdrBtn {
        right: 19px;
    }

    .contentsMenuWrapper {
        margin-top: 50px;
        margin-left: -10px;
        margin-right: -10px;
        padding: 0px;
    }

    .contentsMenuContainer {
        margin-left: 10px;
        margin-right: 10px;
        padding-top: 16px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .en .contentsMenuContainer {
        margin-top: 0px;
    }

    .contentsMenuContainerTitle {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .tab-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .tab-button {
        padding: 12px;
    }

    .tab-icon {
        font-size: 24px;
    }

    .tab-text {
        font-size: 16px;
    }

    .en .tab-text {
        font-size: 14px;
    }

    .content-area {
        padding: 20px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-contentsMenuContainerTitle {
        font-size: 18px;
        text-align: center;
    }

    .basic-link {
        padding: 15px;
        font-size: 14px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card {
        padding: 20px 15px;
    }

    .en .service-card {
        aspect-ratio: inherit;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 0px 0px;
    }

    .contentsMenuContainerTitle::before,
    .contentsMenuContainerTitle::after {
        margin: 0 8px;
    }

    .service-icon {
        font-size: 40px;
    }

    .service-text {
        font-size: 14px;
    }
}


.pattern-switcher {
    background: #f5f5f5;
    padding: 0px 0px 48px 0px;
    margin-bottom: 0px;
    /*border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
    text-align: center;
}

.pattern-switcher h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.pattern-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.pattern-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pattern-btn:hover {
    background: #f0f0f0;
}

.pattern-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}
