@charset "UTF-8";

/* ==========================================================================
   1. 変数定義
   ========================================================================== */
:root {
    --primary-color: #0E2F92;
    --secondary-color: #DAF1F2;
    --accent-color: #CC3629;
    --text-color: #222222;
    --bg-white: #FFFFFF;
    --bg-grey: #EEEEEE;
    
    --max-width: 1200px;
    --spacing-base: 20px;
    --header-offset: 160px; 
    
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en-body: 'Roboto', sans-serif;
    --font-en-head: 'Outfit', sans-serif;
}

/* ==========================================================================
   2. 基本設定
   ========================================================================== */
html {
    font-size: 14pt; 
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-jp);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    background-color: var(--bg-white);
    padding-top: var(--header-offset);
    letter-spacing: 0.06em;
}

main {
    width: 100%;
    margin-bottom: 50px;
}

.en-font {
    font-family: var(--font-en-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-jp);
    letter-spacing: 0.02em;
    line-height: 1.4;
    color: var(--text-color);
    font-weight: 500;
}

a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

/* ==========================================================================
   3. レイアウト
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-base);
}

section {
    margin-bottom: 160px;
    scroll-margin-top: var(--header-offset);
}

section#open-badge {
    margin-bottom: 160px;
}

/* ==========================================================================
   4. タイポグラフィ（スタイルガイド準拠）
   ========================================================================== */
h1 {
    font-size: 2.4rem;
    margin-top: 60px;
    margin-bottom: 80px;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 15px;
}

h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-top: 60px;
    margin-bottom: 40px;
    border-left: 4px solid var(--primary-color);
    padding-left: 25px;
    line-height: 1;
    letter-spacing: 0.1em;
}

h3 {
    font-size: 1.4rem;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    color: var(--text-color);
}

h4 {
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 10px;
}

h5 {
    font-size: 1.0rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

h6 {
    font-size: 0.9rem;
    margin-top: 15px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 20px;
    text-align: justify;
}

/* ==========================================================================
   5. ヘッダー
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 100px;
    background: var(--bg-white);
    z-index: 1000;
    box-shadow: none;
    display: flex;
    align-items: center;
    padding-top: 30px;
    padding-bottom: 30px;
}

.header__inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0 40px;
}

.header__logo-group {
    display: flex;
    align-items: center;
    gap: 30px;
    min-width: 0;
}

.logo {
    text-decoration: none;
    color: var(--text-color);
    display: inline-flex;
    flex-direction: column;
    width: min-content;
    padding-right: 20px;
}

.logo__main {
    font-size: 30px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.05em;
    white-space: nowrap;
    margin: 0;
}

.logo__sub {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 5px;
}

.header__copy {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    margin-bottom: 0;
}

/* ==========================================================================
   ナビゲーション（ハンバーガー）
   ========================================================================== */
.nav {
    flex-shrink: 0;
    position: relative;
    padding: 0;
    margin-left: auto;
}

.nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    z-index: 2000;
    position: relative; 
    margin-left: auto;
}

.nav__toggle:hover {
    background-color: #081d5a;
}

.nav__toggle-box {
    position: relative;
    width: 24px;
    height: 18px;
}

.nav__toggle-inner,
.nav__toggle-inner::before,
.nav__toggle-inner::after {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle-inner { top: 50%; transform: translateY(-50%); }
.nav__toggle-inner::before { top: -8px; }
.nav__toggle-inner::after { bottom: -8px; }

.nav.is-active .nav__toggle-inner { background-color: transparent; }
.nav.is-active .nav__toggle-inner::before { transform: translateY(8px) rotate(45deg); }
.nav.is-active .nav__toggle-inner::after { transform: translateY(-8px) rotate(-45deg); }

.nav__list {
    position: fixed;
    top: 0;
    right: -100%;
    width: auto;
    min-width: 320px;
    height: 100vh;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 40px 0 24px;
    gap: 15px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.nav.is-active .nav__list {
    right: 0; 
}

.nav__link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ==========================================================================
   6. 各種コンポーネント
   ========================================================================== */

/* 目標リスト（箇条書き） */
.goal-list {
    margin-bottom: 30px;
    padding-left: 0;
    list-style: none !important;
}

.goal-list li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.6;
}

.goal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* アコーディオン */
.accordion {
    width: 100%;
    margin-bottom: 7px;
}
.accordion > summary {
    display: flex; 
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    margin-bottom: 10px;
    list-style: none;
    border-bottom: 1px solid var(--bg-grey);
    transition: color 0.3s ease;
}

.accordion > summary::-webkit-details-marker {
    display: none;
}

.accordion > summary h3 {
    margin: 0;
    font-size: 1.4rem;
    border: none;
    padding: 0;
    color: inherit;
}

.accordion > summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border-bottom: 2px solid var(--text-color);
    border-right: 2px solid var(--text-color);
    transform: rotate(45deg); 
    transition: transform 0.3s, border-color 0.3s;
    margin-right: 10px;
}

.accordion[open] > summary::after {
    transform: rotate(225deg); 
}

.accordion > summary:hover {
    color: var(--primary-color);
}

.accordion > summary:hover::after {
    border-color: var(--primary-color);
}

/* 入れ子になったアコーディオン（講義をくわしく見る等） */
.accordion .accordion {
    margin-top: 20px;
    margin-bottom: 30px;
}

.accordion .accordion > summary {
    font-size: 1.1rem;
    font-weight: 500;
}

/* 講義一覧 */
.lecture-list {
    margin-bottom: 30px;
    padding-left: 0;
    list-style: none !important;
}

.lecture-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-grey);
    color: var(--text-color);
}

/* ==========================================================================
   共通ボタン（スタイルガイド・スクショ準拠）
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: var(--bg-white);
    color: var(--text-color);
    border: 1px solid var(--text-color);
    border-radius: 50px;
    padding: 12px 60px; /* 左右の余白を多めにとり、文字と矢印の重なりを防ぐ */
    min-width: 240px;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-sizing: border-box;
    cursor: pointer;
}

/* 矢印（擬似要素）の作成 */
.btn-primary::after {
    content: ''; /* 擬似要素に必須 */
    position: absolute;
    right: 30px; /* 右端からの距離 */
    top: 50%;
    /* 枠線の右と上だけを表示して「>」の形を作る */
    width: 6px;
    height: 6px;
    border-top: 1.5px solid var(--primary-color);
    border-right: 1.5px solid var(--primary-color);
    transform: translateY(-50%) rotate(45deg); /* 45度回転させて矢印にする */
    transition: all 0.3s ease;
}

/* マウスホバー時のボタン全体 */
.btn-primary:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
    text-decoration: underline !important; /* テキスト全体に下線 */
    text-underline-offset: 4px;
}

/* マウスホバー時の矢印の動きと色 */
.btn-primary:hover::after {
    border-color: var(--bg-white); /* 色を白に変更 */
    right: 25px; /* 5pxほど右へ移動（30pxから25pxへ） */
}


/* ==========================================================================
   シンプルリストグループ
   ========================================================================== */
.simple-list-group {
    margin-bottom: 40px;
}

.simple-list {
    padding: 0;
    list-style: none;
}

.simple-list li {
    position: relative;
    padding: 20px 0;
    border-bottom: 1px dotted #ccc;
    display: flex;
    align-items: baseline;
    gap: 30px;
}

.simple-list li:last-child {
    border-bottom: none;
}

.simple-list h4 {
    font-size: 1.2rem;
    font-weight: 500; 
    margin: 0; 
    width: 260px;
    flex-shrink: 0;
    line-height: 1.6;
    color: var(--text-color);
}

.simple-list h4 a {
    font-size: inherit;
    text-decoration: none;
    color: var(--primary-color);
    transition: opacity 0.3s;
    display: inline-block;
}

.simple-list h4 a:hover {
    text-decoration: underline;
    opacity: 0.7;
}

.simple-list-content {
    flex: 1;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* ==========================================================================
   総合系教養科目
   ========================================================================== */
.sogo-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sogo-item {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.sogo-desc {
    flex: 1;
    margin-bottom: 0;
    align-self: center;
}

/* ==========================================================================
   オープンバッジセクション
   ========================================================================== */
.badge-desc {
    margin-bottom: 40px;
}

.badge-btn-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 50px;
}

.badge-container-new {
    background: var(--bg-white);
    border: 1px solid var(--bg-grey);
    border-radius: 8px;
    padding: 40px;
}

.badge-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    justify-items: center;
    align-items: center;
    margin-bottom: 30px;
}

.badge-figure-new {
    margin: 0;
    width: 100%;
    max-width: 220px;
}

.badge-figure-new img {
    width: 100%;
    height: auto;
    display: block;
}

.badge-pdf-wrap {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px dashed #ccc;
}

.badge-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: underline;
    transition: opacity 0.3s;
}

.badge-pdf-link:hover {
    opacity: 0.7;
}

/* ==========================================================================
   フッター
   ========================================================================== */
.footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 80px 0;
    text-align: left;
    margin-top: 0 !important;
}

.footer__inner {
    max-width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
}

.footer__list {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin-bottom: 10px;
}

.footer__item {
    position: relative;
    padding: 8px 0;
    border: none;
}

.footer_link {
    color: var(--bg-white);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer_icon {
    font-size: 0.8em;
    color: var(--bg-white);
}

.footer_link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.footer__copyright {
    margin-top: 20px;
    font-size: 0.9rem; 
    color: var(--bg-white);
    opacity: 0.8; 
    font-family: var(--font-en-body);
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   モーダル（部会詳細のみに整理）
   ========================================================================== */
#department-modal {
    display: none; 
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 99999 !important;
    overflow-y: auto !important;
}

#department-modal.active {
    display: block !important; 
}

.modal-content {
    background: #fff !important;
    width: 80% !important;
    max-width: 1100px !important;
    margin: 50px auto !important;
    padding: 30px 40px 40px !important;
    border-radius: 8px !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

.header-bar {
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 15px !important;
    margin-bottom: 30px !important;
}

#dept-title {
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--text-color);
    letter-spacing: 0.1em;
}

.btn-back {
    background: none !important;
    border: none !important;
    font-size: 2.5rem !important;
    line-height: 1 !important;
    color: var(--primary-color) !important;
    cursor: pointer !important;
}

#dept-body {
    white-space: pre-wrap;
    line-height: 1.8;
    margin-bottom: 30px;
}

#dept-link-area {
    text-align: center;
}

/* ==========================================================================
   モーダル内の画像表示ルール
   ========================================================================== */

/* 1枚の画像（ESDやグローバルエキスパート等）を中央寄せにする */
#dept-body img {
    display: block;
    margin: 30px auto;
    max-width: 30%;
    height: auto;
}

/* 2枚の画像（数理・データサイエンス等）を横並び・中央寄せにするコンテナ */
.modal-image-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

/* コンテナの中に入った画像の設定 */
.modal-image-row img {
    margin: 0;
    max-width: 30%;
}


/* ==========================================================================
   7. レスポンシブ対応
   ========================================================================== */
@media (max-width: 1239px) {
    .header__copy { display: none; }
}

@media (max-width: 767px) {
    body { padding-top: 0; font-size: 12px; }
    h1 { font-size: 2rem; margin-bottom: 40px; }
    h2 { font-size: 1.2rem; padding-left:20px; margin-top: 40px; margin-bottom: 30px; line-height: 1.5; }
    h3 { font-size: 1.0rem; }
    
    .container { padding: 20px 5%; }
    
    .header { height: auto; position: relative; padding: 15px 0; }
    .logo__main { font-size: 28px; }
    .header__inner { flex-direction: column; align-items: flex-start; gap: 20px; padding-right: 0; padding-left: 20px; }
    .header__logo-group { width: 100%; justify-content: space-between; flex-wrap: wrap; padding-right: 20px; }
    
    .nav { width: 100%; border-radius: 0; padding: 15px; justify-content: flex-end; margin-left: 0; position: absolute; right: 0; top: 50%; transform: none; }
    .nav__toggle { position: fixed; top: 20px; right: 20px; }
    .nav__list { flex-direction: column; gap: 15px; width: 260px; }
    
    section#open-badge {  margin-bottom: 80px; }

    .simple-list li { flex-direction: column; gap: 12px; padding: 15px 0; }
    .simple-list h4 { width: 100%; font-size: 1.0rem; display: flex; align-items: center; }
    .simple-list h4 a { position: relative; padding-left: 15px; }
    .simple-list h4 a::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 1em; background-color: var(--primary-color); border-radius: 2px; }
    .simple-list-content { padding-left: 15px; font-size: 0.8rem; }
    .btn-back { font-size: 1.5rem!important; }
    
    .sogo-item { flex-direction: column; gap: 10px; }
    .btn-primary { width: 100%; }
    
    .badge-row { flex-direction: column; gap: 30px; align-items: center; }
    .footer { padding:60px 0 30px; }
    .footer__item { padding: 12px 0; }
    .footer_link { font-size: 0.9rem; }
    .footer__copyright { font-size: 0.8rem; }
    
    .modal-content { width: 90% !important; margin: 20px auto !important; padding: 15px !important; }
}