@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ==================================================
   ドロップダウンメニュー (PC用)
================================================== */
@media screen and (min-width: 768px) {

    /* 親メニューを基準にする */
    .gNavi__item.hasSub {
        position: relative;
    }

    /* サブメニューの初期状態（非表示） */
    .gNavi__item.hasSub .sub-menu {
        position: absolute;
        top: 100%;
        /* 親メニューのすぐ下 */
        left: 50%;
        transform: translateX(-50%);
        /* 中央寄せ */
        background-color: #FFFFFF;
        width: 180px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        padding: 10px 0;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 100;
        display: block;
        /* 崩れ防止 */
    }

    /* ホバー時に表示 */
    .gNavi__item.hasSub:hover .sub-menu {
        opacity: 1;
        visibility: visible;
    }

    /* サブメニューのリンク装飾 */
    .gNavi__item.hasSub .sub-menu li {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .gNavi__item.hasSub .sub-menu li a {
        display: block;
        padding: 12px 20px;
        color: #1A365D;
        /* 文字色 */
        font-size: 1.4rem;
        font-weight: 700;
        text-align: center;
        text-decoration: none;
        transition: background-color 0.3s ease;
        width: 100%;
        box-sizing: border-box;
    }

    .gNavi__item.hasSub .sub-menu li a:hover {
        background-color: #F0F4F8;
        /* ホバー時の背景色 */
        color: #FA8028;
        /* アクセントカラーに変化 */
    }
}

/* ==================================================
   TOPページのお知らせ：バッジの幅と余白を統一してズレを直す
================================================== */
.sec-topics__wrapper .topics-lst__item a .cate {
    width: 130px !important;
    padding: 5px 11px 7px !important;
    text-align: center !important;
    box-sizing: border-box;
    flex-shrink: 0;
    /* ▼ 念のため、ベースの装飾も強制指定しておきます */
    color: #ffffff !important;
    border-radius: 21px !important;
    background-color: #1A365D !important;
    /* スラッグが合わない時の基本色 */
}

/* ==================================================
   TOPページのお知らせ：特定のカテゴリバッジの色指定
================================================== */
/* 採用情報 (スラッグ: recruit) */
.sec-topics__wrapper .topics-lst__item a .cate.badge-recruit {
    background-color: #1A365D !important;
}

/* お知らせ (スラッグ: news) */
.sec-topics__wrapper .topics-lst__item a .cate.badge-news {
    background-color: #FA8028 !important;
}

/* ブログ (スラッグ: blog) */
.sec-topics__wrapper .topics-lst__item a .cate.badge-blog {
    background-color: #F4B942 !important;
}

/* ==================================================
   POLICY & TERMS：タイトル帯（他のページと完全統一）
================================================== */

/* --- 1. PC版の基本設定 --- */
body.page-policy .page-head,
body.page-terms .page-head {
    margin-top: 100px !important;
    padding: 50px 0 !important;
    background-color: #1A365D !important;
    text-align: left !important;
}

body.page-policy .page-head .inner,
body.page-terms .page-head .inner {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* タイトル部分（縦並び・左寄せ） */
body.page-policy .page-head .ttl,
body.page-terms .page-head .ttl {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin: 0 !important;
}

/* 英語タイトル (28px / 不透明度40%) */
body.page-policy .page-head .ttl .en,
body.page-terms .page-head .ttl .en {
    font-size: 28px !important;
    color: #ffffff !important;
    opacity: 0.4 !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    line-height: 1 !important;
}

/* 日本語タイトル (42px) */
body.page-policy .page-head .ttl .jp,
body.page-terms .page-head .ttl .jp {
    font-size: 42px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    line-height: 1.2 !important;
}

/* --- 2. スマホ版の設定 (767px以下) --- */
@media screen and (max-width: 767px) {

    body.page-policy .page-head,
    body.page-terms .page-head {
        margin-top: 70px !important;
        padding: 30px 0 !important;
    }

    body.page-policy .page-head .ttl .en,
    body.page-terms .page-head .ttl .en {
        font-size: 18px !important;
    }

    body.page-policy .page-head .ttl .jp,
    body.page-terms .page-head .ttl .jp {
        font-size: 28px !important;
    }

}

/* ==================================================
   ABOUTページ：スマホ用メッセージ強調帯のサイズ調整
================================================== */
@media screen and (max-width: 767px) {

    /* 「子どもの未来を〜」のオレンジ帯をSTAFFと同じサイズ感に統一 */
    body.page-about .message-sub-box .highlight-txt span {
        font-size: 18px !important;
        /* STAFFと同じ文字サイズ */
        padding: 8px 16px !important;
        /* STAFFと同じ余白サイズ */
        line-height: 1.5 !important;
        margin-bottom: 8px !important;
        /* 上下の行間調整 */
    }

}

/* ==================================================
   ABOUT：スマホ用メッセージ帯（文字数に合わせたサイズ調整）
================================================== */
@media screen and (max-width: 767px) {

    /* 最強の詳細度（html body〜）で確実に上書き */
    html body.page-about .message-sub-box .highlight-txt span {
        font-size: 14px !important;
        /* 長い文章でもスマホ1行に綺麗に収まるサイズ */
        padding: 6px 14px !important;
        /* STAFFと同じコンパクトな余白 */
        line-height: 1.5 !important;
        margin-bottom: 8px !important;
        display: inline-block !important;
        width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

}

/* ==================================================
   ABOUT：代表メッセージ（スマホ用：写真中央寄せ＆左右余白設定）
================================================== */
@media screen and (max-width: 767px) {

    /* ① セクション全体の左右に20pxの余白を追加（他の.innerと位置を統一） */
    body.page-about #greeting.ceo-message-box {
        padding: 0 20px !important;
        box-sizing: border-box !important;
    }

    /* ② 写真エリアを中央揃え ＆ スッキリ収まるサイズに設定 */
    body.page-about #greeting .ceo-img {
        width: 100% !important;
        max-width: 280px !important;
        /* 写真の横幅（適度なサイズ感） */
        margin: 0 auto 30px !important;
        /* 左右margin: auto で中央揃え */
    }

    body.page-about #greeting .ceo-img img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        border-radius: 12px !important;
        /* 写真の角丸設定 */
    }

    /* ③ テキストエリアの調整 */
    body.page-about #greeting .ceo-txt {
        width: 100% !important;
    }

}

/* ==================================================
   ABOUT：動画エリア（スマホ用：左右余白＆文字サイズ調整）
================================================== */
@media screen and (max-width: 767px) {

    /* ① セクション全体の左右に20pxの余白を追加（画面端へのくっつきを防止） */
    body.page-about .sec-movie {
        padding: 0 20px !important;
        margin-bottom: 50px !important;
        box-sizing: border-box !important;
    }

    /* ② 「＼ ウキワクの道のりはこちら〜 ／」の文字サイズ調整 */
    body.page-about .sec-movie .movie-lead {
        font-size: 1.5rem !important;
        /* スマホで見やすいスッキリしたサイズ */
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }

    /* ③ サムネイル画像の調整 */
    body.page-about .sec-movie .movie-wrap img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        border-radius: 12px !important;
        /* 角丸を保持 */
    }

}

/* ==================================================
   ABOUT：スタッフ写真の比率調整（スマホ用：正方形に統一）
================================================== */
@media screen and (max-width: 767px) {

    /* 高さ固定(220px)を解除し、正方形（1:1）に固定 */
    body.page-about .staff-item .thumb,
    .staff-item .thumb {
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        /* ★ 横幅に合わせて高さも自動計算され正方形になります */
    }

    body.page-about .staff-item .thumb img,
    .staff-item .thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        /* 写真が歪まず綺麗にトリミングされます */
    }

}

/* ==================================================
   ABOUT：動画プレイヤーのサイズ固定（再生時の巨大化防止）
================================================== */
/* 動画を囲む枠の幅を固定して中央寄せ */
.sec-movie .movie-wrap {
    max-width: 860px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* videoタグ自体のサイズを枠いっぱいにフィットさせる */
.sec-movie .movie-wrap video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
    display: block !important;
}

@media (max-width: 767px) {
    .page-head {
        margin-top: 70px !important;
        padding: 30px 0 !important;
    }

    /* ==================================================
   ドロップダウンメニュー（PC版のみ適用 / スマホは非表示）
================================================== */
    /* PC時（768px以上）：ホバーで白ボックス表示 */
    @media screen and (min-width: 768px) {
        .gNavi__item.hasSub {
            position: relative;
        }

        .gNavi__item.hasSub .sub-menu {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            background-color: #FFFFFF;
            width: 180px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            padding: 10px 0;
            margin: 0;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 100;
            display: block;
        }

        .gNavi__item.hasSub:hover .sub-menu {
            opacity: 1;
            visibility: visible;
        }

        .gNavi__item.hasSub .sub-menu li {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .gNavi__item.hasSub .sub-menu li a {
            display: block;
            padding: 12px 20px;
            color: #1A365D;
            font-size: 1.4rem;
            font-weight: 700;
            text-align: center;
            text-decoration: none;
            transition: background-color 0.3s ease;
            width: 100%;
            box-sizing: border-box;
        }

        .gNavi__item.hasSub .sub-menu li a:hover {
            background-color: #F0F4F8;
            color: #FA8028;
        }
    }

    /* スマホ時（767px以下）：ハンバーガーメニュー内のサブメニューを完全消去 */
    @media screen and (max-width: 767px) {

        .gNavi__item.hasSub .sub-menu,
        .sub-menu {
            display: none !important;
        }
    }


    /* ==================================================
   ABOUT & BUSINESS：スマホ用 SVG装飾の被り防止（位置修正）
================================================== */
    @media screen and (max-width: 767px) {

        /* ① 右上SVG：見出しの邪魔にならない右上へスッキリ配置 */
        body.page-about .sec-about-message .deco-svg.deco-top-right,
        body.page-business .sec-service-intro .deco-svg.deco-top-right {
            top: -25px !important;
            right: 10px !important;
            width: 40px !important;
            height: 40px !important;
        }

        /* ② 左下SVG：絶対配置を解除し、文章と写真の間にコロンと配置 */
        body.page-about .sec-about-message .deco-svg.deco-bottom-left,
        body.page-business .sec-service-intro .deco-svg.deco-bottom-left {
            position: relative !important;
            top: auto !important;
            bottom: auto !important;
            left: 0 !important;
            right: auto !important;
            transform: none !important;
            margin-top: 20px !important;
            /* 文章との隙間 */
            margin-bottom: 20px !important;
            /* 下の写真との隙間 */
            width: 40px !important;
            height: 40px !important;
            display: block !important;
        }

    }