/* 全体設定（横スクロール禁止とローカルフォントへの切り替え） */
body { 
    margin: 0; 
    /* Google Fontsの指定を外し、OS標準の日本語フォントセットに切り替え */
    font-family: 'BIZ UDPGothic', 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Meiryo, メイリオ, sans-serif; 
    color: #333333; 
    background: #FFFFFF; 
    line-height: 1.6; 
    overflow-x: hidden; 
}

/* -------------------------------------------
   ヘッダーとナビゲーション
------------------------------------------- */
.header { position: sticky; top: 0; z-index: 1000; background: #FFFFFF; padding: 15px 0; border-bottom: 2px solid #E6F2FF; width: 100%; box-sizing: border-box; } 
.header-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; } 

.logo-link { 
    display: flex; align-items: center; text-decoration: none;
    position: relative; z-index: 1002;
}
.header-logo { height: 35px; width: auto; display: block; } 

/* ハンバーガーメニューボタン (スマホ時のみ表示) */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 1002;
}
.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #0055CC;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { bottom: 0; }
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* PC用ナビゲーション */
.nav-links { display: flex; gap: 30px; align-items: center; list-style: none; margin: 0; padding: 0; }

.nav-links > li > a { 
    text-decoration: none; color: #333333; font-weight: bold; 
    position: relative; padding: 10px 0;
    transition: color 0.3s;
}
.nav-links > li > a:hover { color: #0055CC; } 

.nav-links > li:not(:last-child)::after {
    content: ""; position: absolute; right: -15px; top: 50%; transform: translateY(-50%);
    height: 14px; width: 2px; background-color: #E6F2FF; 
}

.dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: -20px;
    background: #FFFFFF; border: 2px solid #0055CC; border-radius: 10px;
    list-style: none; padding: 10px 0; margin: 0; min-width: 180px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 1001;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a { 
    display: block; padding: 10px 20px; color: #333333; text-decoration: none; font-weight: bold; 
    white-space: nowrap; 
}
.dropdown-menu li a:hover { background-color: #E6F2FF; color: #0055CC; }

.btn-primary { 
    background: #F0002A; color: #FFFFFF !important; padding: 12px 30px; border-radius: 50px; 
    text-decoration: none; font-weight: bold; display: inline-block; text-align: center; border: none; cursor: pointer; 
    transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(240, 0, 42, 0.3);
}

/* 共通テキストリンクスタイル（トップに戻る用など） */
.nav-link-style {
    color: #0055CC;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.3s ease, opacity 0.3s ease;
}
.nav-link-style:hover {
    color: #F0002A;
    opacity: 0.8;
}

/* 画面右下の固定ボタン */
.floating-back-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    background-color: #FFFFFF;
    color: #0055CC;
    border: 3px solid #0055CC;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 999;
    transition: all 0.3s ease;
}
.floating-back-btn:hover {
    background-color: #0055CC;
    color: #FFFFFF;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,85,204,0.3);
}

/* -------------------------------------------
   セクション基本設定
------------------------------------------- */
.layout-base { display: flex; flex-direction: column; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 15px; } 
.text-center { text-align: center; }
.section-white { background: #FFFFFF; padding: 60px 0; color: #333333; } 
.section-white .section-title { color: #0055CC; text-align: center; font-size: clamp(24px, 5vw, 28px); margin-bottom: 45px; font-weight: bold; }
.section-alt { background: #E6F2FF; padding: 60px 0; color: #333333; } 
.section-alt .section-title { color: #0055CC; text-align: center; font-size: clamp(24px, 5vw, 28px); margin-bottom: 45px; font-weight: bold; }

/* ★ ファーストビュー (横幅いっぱい・比率維持・縦への拡張を許容) */
.split-mv { 
    width: 100%; 
    height: auto; 
    padding: 0; 
    margin: 0; 
    line-height: 0; 
    overflow: hidden; /* はみ出した余白部分を隠す */
}
.mv-bg-video {
    width: 100%;  
    height: auto; 
    display: block;
    /* PC表示：上に200px引き上げ、下にできる空白も200px詰める */
    margin-top: -3%; 
    margin-bottom: -3%;
}

/* -------------------------------------------
   要素の枠線デザイン
------------------------------------------- */
.card,
.intro-box,
.movie-box,
.faq-item,
.contact-box,
.contact-method,
.voice_clm_item {
    background: #FFFFFF; 
    color: #333333; 
    border: 3px solid; 
    border-color: #0055CC; 
    border-radius: 30px; 
}

/* -------------------------------------------
   各コンテンツのレイアウト
------------------------------------------- */

/* 新着情報・FAQ タブ共通スタイル */
.news-tabs, .faq-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; justify-content: center; }
.news-tab, .faq-tab { 
    padding: 8px 15px; border-radius: 30px; border: 2px solid #0055CC; background: transparent; color: #0055CC; 
    cursor: pointer; font-weight: bold; font-family: 'BIZ UDPGothic', sans-serif; transition: all 0.3s; font-size: 14px; 
}
.news-tab:hover, .faq-tab:hover { background: #E6F2FF; transform: translateY(-2px); } 
.news-tab.active, .faq-tab.active { background: #0055CC; color: #FFFFFF; transform: translateY(0); }

/* 新着情報リスト */
.news-list-container { max-width: 800px; margin: 0 auto; }
.news-list { display: flex; flex-direction: column; gap: 15px; max-height: 320px; overflow-y: auto; padding: 10px; margin: -10px; } 
.news-list::-webkit-scrollbar { width: 8px; }
.news-list::-webkit-scrollbar-track { background: rgba(0, 85, 204, 0.1); border-radius: 10px; } 
.news-list::-webkit-scrollbar-thumb { background: #0055CC; border-radius: 10px; } 

/* 情報内のタグ表示レイアウト調整 */
.news-item { 
    display: flex; gap: 20px; padding: 20px; border-radius: 20px; background: #FFFFFF; color: #333333; align-items: flex-start; 
    transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
} 
.news-item:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 16px rgba(0, 85, 204, 0.15); 
}
.news-meta { display: flex; flex-direction: column; gap: 8px; flex: 0 0 130px; }
.news-date { font-weight: bold; color: #0055CC; display: flex; align-items: center; font-size: 14px; }
.new-tag { color: #F0002A; font-size: 11px; border: 1px solid #F0002A; padding: 2px 4px; border-radius: 10px; margin-left: 5px; }

.category-tag {
    background: #0055CC;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-block;
    width: fit-content;
}

.news-title { font-weight: bold; line-height: 1.5; margin-top: 0; font-size: 15px; }

/* 課題と解決（統合版・画像拡大・丸枠対応） */
.ps-container { display: flex; flex-direction: column; gap: 30px; max-width: 900px; margin: 0 auto; }
.ps-row { display: flex; align-items: center; gap: 20px; }

/* お悩み側 */
.ps-problem { 
    flex: 1; padding: 25px; text-align: center; 
    background: #F5F5F5; border: none; border-radius: 20px;
    display: flex; flex-direction: column; align-items: center; gap: 15px;
}
.ps-problem h3 { color: #333333; margin: 0; font-size: 18px; border-bottom: none; padding-bottom: 0; } 
.ps-problem-img-wrapper {
    width: 180px; 
    height: 180px;
    border-radius: 50%;
    border: 3px solid #0055CC;
    background: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.ps-problem-img {
    width: 130%; 
    height: auto;
    object-fit: contain;
}

.ps-arrow { font-size: 30px; color: #F0002A; font-weight: bold; flex-shrink: 0; }

/* 解決策側（テキスト上・丸画像下） */
.ps-solution { 
    flex: 1; padding: 25px; text-align: center; 
    background: #FFFFFF; 
    border: 3px solid #0055CC;
    border-radius: 20px;
    display: flex; flex-direction: column; align-items: center; gap: 15px;
}
.ps-solution h3 { color: #0055CC; margin: 0; font-size: 18px; border-bottom: none; padding-bottom: 0; }
.ps-solution-img-wrapper {
    width: 180px; 
    height: 180px;
    border-radius: 50%;
    border: 3px solid #0055CC;
    background: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.ps-solution-img {
    width: 130%; 
    height: auto;
    object-fit: contain;
}

/* classtockの紹介 */
.intro-box { padding: 40px 20px; max-width: 800px; margin: 0 auto 30px auto; }
.intro-box-white { background: #FFFFFF; } /* 背景白用 */

.intro-subtitle { font-size: clamp(20px, 4vw, 22px); color: #0055CC; text-align: center; margin-bottom: 20px; }
.intro-text { font-size: 16px; line-height: 1.8; margin: 0; text-align: left; }

/* 詳細説明枠（左テキスト・右画像） */
.details-box { padding: 30px 20px; }
/* ★ここで flex-start に変更しています */
.details-content { display: flex; gap: 30px; align-items: flex-start; }
.details-content.row-reverse { flex-direction: row-reverse; }

.details-text { flex: 1; text-align: left; }
.details-text p { margin: 0 0 15px 0; font-size: 15px; line-height: 1.8; }
.details-text p:last-child { margin-bottom: 0; }

.details-img-wrapper {
    flex: 0 0 450px; 
    background: transparent;
    border: none; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.details-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain; 
    border-radius: 10px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
}

/* PDCAステップ（図解レイアウト - トップページ用） */
.step-flow {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    gap: 15px;
}
.step-flow::before {
    content: "";
    position: absolute;
    top: 50px; 
    left: 10%;
    right: 10%;
    height: 3px;
    background-color: #0055CC;
    z-index: 0;
}
.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    background: transparent; 
    padding: 0 10px;
}
.section-alt .step-item { background: #E6F2FF; }
.intro-box-white .step-item { background: #FFFFFF; }

.step-circle {
    width: 100px; 
    height: 100px; 
    border-radius: 50%;
    border: 3px solid #0055CC;
    background-color: #FFFFFF; 
    margin: 0 auto 15px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
}
.step-circle img {
    width: auto;
    height: 70%; 
    object-fit: contain;
}
.step-label {
    font-weight: bold;
    color: #F0002A;
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-size: 14px;
}
.step-desc {
    font-size: 13px; 
    line-height: 1.6;
    margin: 0;
    text-align: left;
    color: #333333;
}

/* 実績情報のスタイル統一 */
.stats-row { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; margin-top: 30px; padding-top: 20px; border-top: 2px dashed #0055CC; }
.stat-item { text-align: center; color: #0055CC; font-weight: bold; font-size: 14px; flex: 1 1 30%; min-width: 100px; }
.stat-num { display: block; font-size: clamp(28px, 6vw, 40px); color: #F0002A; line-height: 1; margin-bottom: 5px; }

/* 動画 */
.movie-box { display: flex; gap: 30px; align-items: center; padding: 30px 20px; color: #333333; }
.movie-thumb { flex: 1; height: 200px; background: #0055CC; border-radius: 20px; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.play-icon { font-size: 40px; color: #FFFFFF; }
.movie-text { flex: 1; }
.movie-text h3 { color: #0055CC; margin-bottom: 15px; font-size: 18px; }
.movie-text p { font-size: 15px; }

/* 先生方の声 */
.voice-swiper { 
    width: 100%; 
    padding: 20px 0 60px 0; 
    overflow: hidden; 
    position: relative; 
}
.voice_clm_item {
    box-sizing: border-box;
    padding: 30px 20px; 
    height: auto; 
    opacity: 0.4; 
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column; 
    align-items: center;
    width: 85% !important; 
    max-width: 600px;
}
.swiper-slide-active.voice_clm_item { 
    opacity: 1; 
}

.voice_clm_item_fig {
    display: flex;
    flex-direction: column; 
    align-items: center;
    margin-bottom: 20px;
}
.voice_clm_item_fig figure { 
    margin: 0 0 10px 0; 
    padding: 0; 
    display: flex; 
    justify-content: center; 
}
.voice_clm_item_fig img { 
    width: 70px; 
    height: 70px; 
    border-radius: 50%; 
    background: #E6F2FF; 
    object-fit: cover; 
}
.voice_clm_item_fig p { 
    margin: 0; 
    font-weight: bold; 
    color: #0055CC; 
    font-size: 16px; 
    text-align: center;
}
.voice_clm_item_rt {
    text-align: left; 
}
.voice_clm_item_rt p { 
    margin: 0 0 15px 0; 
    line-height: 1.8; 
    font-size: 15px;
}
.voice_clm_item_rt p:last-child { 
    margin-bottom: 0; 
}
.hl-red { color: #F0002A; font-weight: bold; }

.swiper-button-next, .swiper-button-prev { 
    color: #FFFFFF; 
    background: #0055CC; 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    border: 3px solid #FFFFFF; 
    z-index: 10 !important; 
    pointer-events: auto;
    top: 50%;
    transform: translateY(-50%);
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 16px; font-weight: bold; }
.swiper-button-prev { left: 5px; }
.swiper-button-next { right: 5px; }

.swiper-pagination-bullet { background: #0055CC; opacity: 0.3; width: 8px; height: 8px; }
.swiper-pagination-bullet-active { opacity: 1; }

/* -------------------------------------------
   よくあるご質問
------------------------------------------- */
.faq-list-container { max-width: 1000px; margin: 0 auto; }
.faq-list-scrollable {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    align-items: start;
    max-height: 500px; 
    overflow-y: auto;
    padding: 10px; margin: -10px; 
}
@media (min-width: 768px) {
    .faq-list-scrollable {
        grid-template-columns: repeat(2, 1fr);
    }
}
.faq-list-scrollable::-webkit-scrollbar { width: 6px; }
.faq-list-scrollable::-webkit-scrollbar-track { background: rgba(0, 85, 204, 0.1); border-radius: 10px; } 
.faq-list-scrollable::-webkit-scrollbar-thumb { background: #0055CC; border-radius: 10px; } 

.faq-item { 
    padding: 0 20px; 
    overflow: hidden; 
    height: 100%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.3s ease; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}
.faq-item:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 16px rgba(0, 85, 204, 0.15); 
}

.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; cursor: pointer; flex-shrink: 0; }
.q-content { display: flex; gap: 10px; align-items: flex-start; font-weight: bold; font-size: 16px; margin: 0; }
.q-text-wrapper { display: flex; flex-direction: column; gap: 5px; } 
.category-tag-faq {
    background: #0055CC;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-block;
    width: fit-content;
}

.q-icon { display: flex; justify-content: center; align-items: center; width: 28px; height: 28px; background: #F0002A; color: #FFFFFF; border-radius: 50%; font-size: 14px; flex-shrink: 0; margin-top: 2px; }

.toggle-icon { font-size: 20px; color: #0055CC; font-weight: bold; transition: color 0.3s; flex-shrink: 0; margin-left: 10px; }
.toggle-icon::before { content: '+'; }
.faq-item.is-open .toggle-icon::before { content: '-'; }

.faq-a { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease; }
.a-inner { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 20px; }
.a-icon { display: flex; justify-content: center; align-items: center; width: 28px; height: 28px; background: #0055CC; color: #FFFFFF; border-radius: 50%; font-size: 14px; flex-shrink: 0; margin-top: 2px; }
.a-inner p { margin: 0; line-height: 1.6; font-size: 15px; }
.faq-item.is-open .faq-a { max-height: 400px; opacity: 1; }

/* お問い合わせ */
.contact-box { padding: 30px 20px; text-align: center; }
.contact-msg { margin-bottom: 25px; font-size: 16px; font-weight: bold; }
.contact-methods { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.contact-method { padding: 25px; flex: 1 1 300px; }
.contact-method h3 { color: #0055CC; margin-bottom: 15px; font-size: 18px; }
.contact-link, .contact-tel { font-size: clamp(20px, 5vw, 24px); font-weight: bold; color: #0055CC; text-decoration: none; display: block; margin: 15px 0; }

/* フッター */
.footer { background: #E6F2FF; padding: 30px 20px; text-align: center; border-top: 3px solid #0055CC; font-size: 14px; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 15px; flex-wrap: wrap; }
.footer-links a { color: #333333; text-decoration: none; font-weight: bold; }

/* ===========================================
   スマホ向けレスポンシブ調整 (768px以下)
=========================================== */
@media (max-width: 768px) {
    /* ハンバーガーメニューの表示 */
    .hamburger { display: block; }
    
    /* ナビゲーションメニューを画面全体を覆うように変更 */
    .nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .nav.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* スマホ時のリンクのレイアウト */
    .nav-links {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .nav-links > li:not(:last-child)::after {
        display: none; 
    }
    .nav-links > li > a {
        font-size: 20px;
        text-shadow: none; 
    }

    /* ドロップダウンメニューのスマホ対応 */
    .dropdown-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 10px 0 0 0;
    }
    .dropdown-menu li a {
        padding: 8px;
        font-size: 16px;
    }

    /* 新着情報アイテム */
    .news-item { flex-direction: column; gap: 10px; }
    .news-meta { flex: none; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
    .news-date { font-size: 13px; }
    
    /* 課題と解決（スマホ時は縦に矢印を下向きに） */
    .ps-row { flex-direction: column; gap: 10px; }
    .ps-arrow { transform: rotate(90deg); margin: 5px 0; }
    .ps-problem, .ps-solution { width: 100%; box-sizing: border-box; }

    /* 詳細説明枠のスマホレイアウト */
    .details-content { flex-direction: column; gap: 20px; align-items: center; text-align: center; }
    .details-content.row-reverse { flex-direction: column; }
    .details-text { text-align: left; width: 100%; }
    .details-img-wrapper { flex: none; width: 100%; max-width: 300px; margin: 0 auto; } 
    
    /* PDCAステップを縦並びに */
    .step-flow { flex-direction: column; align-items: center; gap: 30px; }
    .step-flow::before { display: none; }
    .step-item { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; }

    /* 動画ボックス */
    .movie-box { flex-direction: column; gap: 20px; }
    .movie-thumb { width: 100%; flex: none; }
    .movie-text { width: 100%; flex: none; text-align: center; }
}