/* CSS Document */

/* 全体設定 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Meiryo', 'Hiragino Maru Gothic Pro', sans-serif;
    background-color: #f3f3f2;  /* 白練 */
    color: #333333;  /* dark charcoal */
    line-height: 1.6;
}
.container {
    max-width: 1800px;
    margin: 0 20px; /* 1つ目が上下, 2つ目が左右 */
    padding: 0 20px;
}

/* ヘッダー */
header {
    background-color:white;
    border-top: 5px solid #2a4073;  /* 深縹 */
    border-bottom: 5px solid #2a4073;  /* 深縹 */
    padding: 20px 0;
}
.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}
.school-name h1 {
    font-size: 24px;
    color:#2a4073;  /* 深縹 */
    letter-spacing: 1px;
}
.school-name p {
    font-size: 18px;
    color: dimgray;
}

/* ナビゲーション */
nav {
    background-color: #2a4073;  /* 深縹 */
    /* position: sticky; ナビゲーションの画面内固定を解除 */
    /* top: 0; ナビゲーションの画面内固定を解除  */
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
nav ul {
    display: flex;
    list-style: none;
}
nav ul li {
    flex: 1;
    text-align: center;
}
nav ul li a {
    display: block;
    padding: 12px 10px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
    border-top: 1px solid rgba(255,255,255,0.1);
}
nav ul li:last-child a {
    border-right: none;
}
nav ul li a:hover {
    background-color: color-mix(in srgb, #2a4073, #000 40%);  /* 40% 暗くする */
}

/* メインビジュアル */
.main-visual {
    background-color: white;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid #e6b422; /* 黄金 */
    width: 100%;
}
/* 画像を横幅いっぱいにして、縦は比率を維持する */
.main-visual-img {
    width: 100%;
    height: auto;
    display: block;
    /* filter: brightness(0.9); */
}
/* 文字などを画像の上に絶対に重ねるための設定 */
.main-visual-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 
    display: flex;
    align-items: center;
    justify-content: center;
     */
    z-index: 2;
    text-align: center;
    color: white; 
}
/* グラデーション（影）を画像の上に重ねる設定 */
.main-visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
    z-index: 1;
    pointer-events: none; /* 下の要素をクリックできるようにする */
}

/* Catchphrase-Box */
.catchphrase-box {
    position: absolute; /* ★絶対配置にする */
    top: 30px;        /* ★上から30px離す */
    left: 30px;       /* ★左から30px離す */
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9); /* 少し視認性を上げるため不透明度を0.8→0.9にアップ */
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 80%;
}
.catchphrase-box h2 {
    font-size: 18px;
    color: #1a365d;
    text-decoration: underline;
    text-underline-offset: 8px;
    margin-bottom: 5px;
    font-weight: 700;
}
.catchphrase-box p {
    font-size: 14px;
    color: dimgray;
    margin-top: 10px;
}

/* メインコンテンツレイアウト */
.main-content {
    padding: 30px 0 20px 0;
    display: grid;
    grid-template-columns: 7fr 4fr;
    gap: 40px;
}
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* セクション共通スタイル */
h3.section-title {
    font-size: 20px;
    color: #2a4073;  /* 深縹 */
    position: relative;
    padding-bottom: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid lightgray;
    display: flex;
    align-items: center;
    gap: 10px;
}
h3.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #e6b422; /* 黄金 */
}

/* 特色・学びのフィールド（カードデザイン） */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.feature-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s;
    border-top: #2a4073;  /* 深縹 */
    /* ★ リンク化のための追加設定 ★ */
    display: block;         /* カード全体を大きなボタンのように扱う */
    text-decoration: none;  /* リンクの下線を消す */
    color: inherit;         /* 文字色を元の指定（継承）のままにする */
}
.fc-general {
    border-top: 4px solid #00a1e9; /* シアン */
}
.fc-industrial {
    border-top: 4px solid #e4007f; /* マゼンタ */
}
.feature-card:hover {
    transform: translateY(-5px);
}
.feature-img {
    height: 140px;
    background-color: #edf2f7;
    background-size: cover;
    background-position: center;
}
.feature-info {
    padding: 15px;
}
.feature-info h4 {
    color: #2a4073;  /* 深縹 */
    font-size: 20px;
    margin-bottom: 8px;
    text-decoration: underline;
}
.h4-small {
    font-size: 16px;
}
.feature-info ul {
    list-style-type:disc;
    margin-left: 15px;
}
.feature-info li {
    font-size: 14px;
    color: dimgray;
}

/* 新着情報・お知らせ */
.news-list {
    background-color: white;
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.news-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid lightgray;
}
.news-item:last-child {
    border-bottom: none;
}
.news-meta {
    min-width: 100px;
}
.news-date {
    font-size: 13px;
    color: #718096;
    display: block;
}
.news-category {
    font-size: 11px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
    margin-top: 4px;
}
.category-important { background-color: #fed7d7; color: #9b2c2c; }
.category-info { background-color: #e2e8f0; color: #4a5568; }
.category-exam { background-color: #feebc8; color: #9c4221; }
.news-title p {
    color: dimgray;
    font-size: 14px;
}
.news-title a {
    color: dimgray;
    text-decoration: none;
    font-size: 14px;
    font-weight:bold;
}
.news-title a:hover {
    color: dimgray;
    text-decoration: underline;
}
.info-title {
    font-size: 20px;
    color: #2a4073;  /* 深縹 */
    position: relative;
    padding: 5px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid lightgray;
    display: flex;
    align-items: center;
    gap: 10px;
}
.info-space p {
    color: dimgray;
    font-size: 14px;
    padding: 10px 0 20px 10px;
}
.info-space a {
    color: dimgray;
    text-decoration: none;
    font-size: 14px;
    font-weight:bold;
}
.info-space a:hover {
    color: dimgray;
    text-decoration: underline;
}

/* サイドバー */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.sidebar a {
    color: dimgray;
    text-decoration: none;
    font-size: 14px;
    font-weight:bold;
}
.sidebar a:hover {
    color: dimgray;
    text-decoration: underline;
}
.btn-banner {
    /* display: block; */
    display: flex;            /* inline-block / block から flex に変更 */
    align-items: center;      /* テキストとロゴを【上下中央】に揃える */
    justify-content: center; /* 全体を左右中央に寄せる */
    gap: 5px;                /* テキストとロゴの間に5pxの程よい隙間を作る */
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: opacity 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}
.btn-blue {
    background: linear-gradient(135deg, #2792c3 /* 縹色 */, #007bbb /* 紺碧 */);
}
.btn-red {
    background: linear-gradient(135deg, #db2777, #9d174d);
}
.btn-note {
    background: linear-gradient(135deg, #2a4073, #0f2350);
}
.btn-banner::after {
    content: '➔';
    position: absolute;
    right: 20px;
    transition: transform 0.3s;
}
.btn-banner:hover {
    opacity: 0.9;
    transform: scale(1.02);
}
.btn-banner:hover::after {
    transform: translateX(5px);
}
.sidebar-widget {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.school-info-widget p {
    font-size: 14px;
    color: dimgray;
    margin-bottom: 10px;
}

/* Safariが自動生成した電話リンク、または手動で作った電話リンクの装飾を解除 */
a[href^="tel:"] {
    color: inherit;          /* 親要素（フッターの文字）と同じ色を継承 */
    text-decoration: none;  /* 下線を消す */
}

/* フッター */
footer {
    background-color: #2a4073;  /* 深縹 */
    color: white;
    padding: 30px 0 20px 0;
    margin-top: 20px;
}
.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 30px;
    margin-bottom: 20px;
}
.footer-info h2 {
    font-size: 20px;
    margin-bottom: 10px;
}
.footer-info p {
    font-size: 13px;
    color: lightgray;
}
.footer-info a {
    font-size: 13px;
    color: lightgray;
    text-decoration: none;
}
.footer-info a:hover {
    color: white;
    text-decoration: underline;
}
.footer-links ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 30px;
}
.footer-links a {
    color: lightgray;
    text-decoration: none;
    font-size: 13px;
}
.footer-links a:hover {
    color: white;
    text-decoration: underline;
}
.copyright {
    text-align: center;
    font-size: 12px;
    color: lightgray;
}

/* ==========================================
   階層メニュー（プルダウン）用の追加CSS
========================================== */

/* 子メニューの初期状態は共通で非表示 */
.dropdown-menu {
    display: none;
}

/* クリックされて「is-open」クラスがついたら表示する */
nav ul li.is-open .dropdown-menu {
    display: block;
}

/* ▼ 矢印アイコンの演出（子メニューがある場合） */
nav ul li.has-child > a::after {
    content: ' ▼';
    font-size: 10px;
    display: inline-block;
    margin-left: 3px;
    transition: transform 0.2s;
}
nav ul li.has-child.is-open > a::after {
    transform: rotate(180deg); /* 開いたときに矢印をひっくり返す */
}

/* ------------------------------------------
   PC表示用のスタイル（画面幅769px以上）
------------------------------------------ */
@media (min-width: 769px) {
    nav ul li {
        position: relative; /* 子メニューの配置基準にする */
    }
    /* 下に絶対に飛び出させるための設定 */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 200px; /* サブメニューの横幅 */
        background-color: color-mix(in srgb, #2a4073, #000 20%);/* 20% 暗くする */
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        z-index: 1000;
        list-style: none;
    }
    .dropdown-menu li {
        text-align: left;
    }
    .dropdown-menu li a {
        padding: 10px 15px;
        font-size: 12px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .dropdown-menu li:last-child a {
        border-bottom: none;
    }
}

/* ------------------------------------------
   スマホ表示用のスタイル（画面幅768px以下）
------------------------------------------ */
@media (max-width: 768px) {
    /* スマートフォン表示のときだけcatchphrase-boxを消す） */
    .catchphrase-box {
        display: none;
    }
    nav .container {
        padding: 0;
    }
    nav ul {
        display: flex;
        flex-direction: column; /* 横並びから縦並びに切り替え */
        width: 100%;
        background-color: #2a4073;  /* 深縹 */
        /* ★ position: absolute などを削除し、通常の配置に戻しました */
    }
    nav ul li {
        width: 100%;
        text-align: left;
    }
    nav ul li a {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 20px;
    }
    
    /* スマホのアコーディオン背景 */
    .dropdown-menu {
        background-color: color-mix(in srgb, #2a4073, #000 20%);/* 20% 暗くする */
        list-style: none;
    }   
    .dropdown-menu li a {
        padding-left: 40px; /* 階層が深く見えるように左側に隙間を空ける */
        font-size: 12px;
        background-color: rgba(0, 0, 0, 0.1);
    }
}