@charset "UTF-8";

/* ==================================================
 * 外部CSS（Homepage Builder・サーバー側）対策
 * ================================================== */
nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==================================================
 * 基本設定
 * ================================================== */
/* ページ内ジャンプを滑らかにする */
html {
    scroll-behavior: smooth;
}

/* ヘッダー固定時の位置ズレ防止（ヘッダーの高さを吸収） */
section[id],
article[id],
h2[id],
h3[id],
div[id] {
    scroll-margin-top: 80px; /* ヘッダーの高さ＋余白に合わせて調整してください */
}

body {
    margin: 0;
    font-family: "BIZ UDGothic", "Noto Sans JP", sans-serif;
    background: #f5f5f5;
    line-height: 1.8;
    font-size: 1em;
    color: #000;
}

/* メインコンテンツ配置 */
.container {
    max-width: 900px;
    margin: 20px auto;
    background: #ffffff;
    padding: 20px;
    border: 2px solid #1E4F8F;
    border-radius: 8px;
}

h1 {
    font-size: 1.6em;
    border-left: 6px solid #1E4F8F;
    padding-left: 10px;
}

h2 {
    font-size: 1.3em;
    border-left: 4px solid #1E4F8F;
    padding-left: 8px;
    margin-top: 20px;
}

h2 a {
    color: inherit;
    text-decoration: none;
}

.news-box,
.fb-area {
    padding: 16px;
    border: 2px solid #1E4F8F;
    border-radius: 8px;
    background: #F8FBFF;
}

.fb-area {
    margin-top: 16px;
    padding: 12px;
}

/* ==================================================
 * ヘッダー
 * ================================================== */
.header {
    background: #E0ECFF;
    padding: 10px 20px;
    border-bottom: 3px solid #0F2A6A;
    display: flex;
    min-height: 60px;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.school-name {
    font-size: 1.6em;
    font-weight: 800;
    color: #0F2A6A;
}

.school-name a {
    color: #0F2A6A;
    text-decoration: none;
}

/* 右側エリア（SNS ＋ ハンバーガー）の横並び設定 */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* SNSアイコンのエリア設定 */
.header-sns {
    display: flex;
    align-items: center;
}

/* --- SNSロゴ用のコンテナ指定 --- */
.facebook-logo-container,
.instagram-logo-container {
    display: inline-block;
    /* 余白ルール: ロゴ幅の1/4程度のパディングを確保 */
    padding: 8px; 
}

/* --- SNSロゴ本体の指定 --- */
.facebook-logo,
.instagram-logo {
    /* デジタル最小サイズ制限: 幅16px以上 */
    min-width: 16px;
    width: 32px; /* ヘッダー用に収まりの良いサイズ設定 */
    height: auto;
    display: block;
}

/* ハンバーガーボタン (デフォルト非表示) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10000;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #0F2A6A;
    margin: 5px 0;
    transition: 0.3s;
}

/* ナビゲーション共通 */
nav {
    background: #ffffff;
    border-bottom: 2px solid #1E4F8F;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* ==================================================
 * PC版スタイル (769px以上)
 * ================================================== */
@media screen and (min-width: 769px) {
    nav {
        padding: 10px 0;
        text-align: center !important;
    }
    nav > ul {
        display: inline-flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
    }
    nav > ul > li {
        position: relative !important;
    }
    nav > ul > li > a {
        display: inline-block !important;
        padding: 8px 18px;
        border: 2px solid #1E4F8F;
        border-radius: 6px;
        background: #ffffff;
        color: #1E4F8F;
        text-decoration: none;
        font-weight: 700;
        transition: 0.2s;
    }
    nav > ul > li > a:hover {
        background: #0F2A6A;
        border-color: #0F2A6A;
        color: #ffffff;
    }

    /* グリーン系ボタン */
    nav > ul > li > a.btn-green {
        border-color: #76C4B6;
        color: #76C4B6;
    }
    nav > ul > li > a.btn-green:hover {
        background: #76C4B6;
        border-color: #76C4B6;
        color: #ffffff;
    }

    /* ドロップダウンサブメニュー */
    nav li ul {
        display: none;
        position: absolute;
        top: 100% !important;
        left: 0 !important;
        background: #ffffff;
        border: 2px solid #1E4F8F;
        border-radius: 6px;
        padding: 10px 0;
        min-width: 220px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 9999;
        text-align: left;
    }
    nav li ul li {
        display: block !important;
        position: relative;
    }
    nav li ul li a {
        display: block;
        padding: 10px 16px;
        color: #1E4F8F;
        border-bottom: 1px solid #C7DFFF;
        text-decoration: none;
    }
    nav li ul li:last-child > a {
        border-bottom: none;
    }
    nav li ul li a:hover {
        background: #E8F2FF;
    }

    /* ネストされたサブメニュー */
    nav li ul ul {
        top: 0 !important;
        left: 100% !important;
    }

    nav li:hover > ul {
        display: block !important;
    }
}

/* ==================================================
 * ダウンロードエリア＆ボタン設定
 * ================================================== */
.download-area {
    margin: 20px 0;
    text-align: left; /* 基本のテキスト左寄せ */
}

/* 複数のボタンをグループ化して左寄せに並べる設定 */
.download-area.btn-group {
    display: flex;
    flex-wrap: wrap;       /* 画面幅が狭い場合は折り返す */
    justify-content: flex-start; /* ボタン全体を「左寄せ」に配置 */
    gap: 12px;             /* ボタン同士の間隔（縦横） */
}

/* ダウンロードボタン（幅統一） */
.btn-download {
    display: inline-block;
    
    /* 1. ボタンの幅を固定・統一 */
    width: 280px;            /* 設置場所に合わせて260px〜300px程度で調整 */
    max-width: 100%;         /* スマホで画面からはみ出るのを防止 */
    box-sizing: border-box;  /* paddingを含めた幅計算にする */
    
    /* 2. テキストの配置 */
    text-align: center;      /* ボタン内部の文字は中央揃え */
    
    /* デザイン基本設定 */
    padding: 12px 16px;
    background-color: #0056b3;
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.btn-download:hover {
    background-color: #003d80;
    text-decoration: underline;
}

/* ==================================================
 * スマホ版スタイル (768px以下)
 * ================================================== */
@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }

    nav {
        display: none;
        width: 100%;
        background: #ffffff;
    }

    nav.is-active {
        display: block !important;
    }

    nav ul {
        display: block !important;
    }

    nav li a {
        display: block;
        padding: 12px 20px;
        color: #1E4F8F;
        border-bottom: 1px solid #E8F2FF;
        text-decoration: none;
        font-weight: 700;
    }

    nav li a.btn-green {
        color: #76C4B6;
    }

    nav li ul a {
        padding-left: 35px;
        font-weight: normal;
        background: #F8FBFF;
    }
    nav li ul ul a {
        padding-left: 50px;
        background: #EEF5FF;
    }

    .container {
        padding: 10px;
    }

    /* スマホでアイコンサイズを少し小さく調整したい場合 */
    .facebook-logo,
    .instagram-logo {
        width: 24px;
    }
    .facebook-logo-container,
    .instagram-logo-container {
        padding: 4px;
    }
}

/* ==================================================
 * 表（テーブル）全般の横スクロール＆改行設定（共通）
 * ================================================== */

/* 表を包むコンテナ（.table-wrapper）でのスクロール許可 */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* テーブル本体（最小幅を指定して、画面幅が狭い場合のみはみ出させてスクロールを起こす） */
table,
.table-style {
    display: table !important;
    min-width: 700px; /* テーブルの最小幅。この幅を下回ると横スクロールが発生します */
    width: 100%;      /* 画面幅が広い時は自然にフィット */
    border-collapse: collapse;
    background-color: #ffffff;
    box-sizing: border-box;
    margin-bottom: 16px;
}

/* 表セル共通の設定 */
table th,
table td,
.table-style th,
.table-style td {
    border: 1px solid #1E4F8F;
    padding: 10px 12px;
    vertical-align: middle;
    font-size: 0.95em;
    line-height: 1.5;
    white-space: nowrap; /* テキストの自動折り返しを防ぐ */
}

/* ヘッダーのスタイル統一 */
table th,
.table-style th {
    background-color: #E8F2FF;
    color: #0F2A6A;
    font-weight: bold;
    text-align: center;
}

/* 表内のリスト表示調整 */
table ul,
.table-style ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

table li,
.table-style li {
    position: relative;
    padding-left: 1em;
    text-indent: -1em;
    margin-bottom: 4px;
}

/* ==================================================
 * トップへ戻るボタン
 * ================================================== */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background-color: #0056b3;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

#back-to-top.is-active {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    opacity: 0.8;
}

/* ==================================================
 * フッター
 * ================================================== */
footer,
#footer-holder,
.footer {
    background: #0F2A6A;
    color: #fff;
    padding: 20px; /* 全体の内側余白（上下左右均等） */
    text-align: center;
    margin-top: 40px;
    line-height: 1.6;
    display: block;
}

/* フッター内にあるすべてのタグの先頭要素の上余白・パディングを強力除去 */
footer *,
#footer-holder *,
.footer * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 各行の高さや行間を整える設定 */
footer p,
footer address,
footer div,
#footer-holder p,
#footer-holder address,
#footer-holder div {
    margin-bottom: 8px !important; /* 各行の下間隔（最終行を除く） */
}

footer p:last-child,
footer address:last-child,
footer div:last-child,
#footer-holder p:last-child,
#footer-holder address:last-child,
#footer-holder div:last-child {
    margin-bottom: 0 !important; /* 最終行の下余白は0に */
}

footer a,
#footer-holder a,
.footer a {
    color: #C7DFFF;
    text-decoration: none;
}