/* TOPの組み合わせ案（inc/top-mix.php）。全体は .ctm#ctd、D案の部品だけ .ctd で包む（D案のCSSを前のTOPの部品に効かせない） */

/* D案の黒帯（切りかえ・検索）は、大見出しのすぐ下に続ける */
.ctm .ctd-hero { padding-top: 24px; }

/* D案の部品（5ステップ・テーマ・新着）の囲み */
.ctm-blk { padding-top: 56px; padding-bottom: 8px; }
.ctm-blk--articles { padding-bottom: 56px; }
.ctm-blk .ctd-msec:last-child { margin-bottom: 0; }

@media screen and (max-width: 760px) {
    .ctm-blk { padding-top: 40px; }
    .ctm-blk--articles { padding-bottom: 40px; }
}

/* 5ステップと、すぐ下の鉄人先生のバナーの間をあける */
.ctm-blk--flow { padding-bottom: 28px; }

/* スマホ: 大見出しの高さを詰める（人物の写真を小さくし、右に寄せて、ボタンの下に少し重ねる） */
@media screen and (max-width: 639px) {
    .ctm .ct-hero__body { padding-bottom: 0; }
    .ctm .ct-hero__title { margin-top: 12px; }
    .ctm .ct-hero__people { width: 62%; margin: -6px 0 0 auto; }
    .ctm .ct-hero__inner { padding-bottom: 0; } /* 写真の下に隙間を作らない */
}

/* 検索欄の下のキーワード（前のTOPから）。黒帯の上で見やすくする。スマホは1行で横にスワイプ */
.ctm .ctd-hero .ct-search__words { max-width: 760px; margin: 14px auto 0; padding: 0; list-style: none; }
.ctm .ctd-hero .ct-search__words li { margin: 0; padding: 0; }
.ctm .ctd-hero .ct-search__words li::before { content: none; }
.ctm .ctd-hero .ct-search__word { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); }
.ctm .ctd-hero .ct-search__word:hover { background: #FABE00; color: #121212; }
@media screen and (max-width: 639px) {
    .ctm .ctd-hero .ct-search__words { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .ctm .ctd-hero .ct-search__words::-webkit-scrollbar { display: none; }
    .ctm .ctd-hero .ct-search__words li { flex: none; }
}

/* ---------- 新卒／転職の切りかえ（js/top-mix.js） ---------- */
/* 選んでいないほうの部品は出さない */
.ctm[data-mode="shu"] [data-ctm="ten"]:not(.ctm-ttshow),
.ctm[data-mode="ten"] [data-ctm="shu"]:not(.ctm-ttshow) { display: none !important; }
/* お役立ち記事の「テーマから探す」: タブで、選んでいるほうと違うテーマも出す／出さない（js/top-mix.js） */
.ctm .ctm-tthide { display: none !important; }

/* 切りかえ（前のTOPの「いまの悩みから探す」のタブと同じ見た目）。大見出しのすぐ下に、画面の幅いっぱいで置く */
.ctm .ctm-switch { margin: 0; }
.ctm .ctm-switch .ct-tab { border: 0; font: inherit; }

/* スクロールして切りかえが見えなくなったら、画面の上に小さく出す */
.ctm .ctm-fix { position: fixed; left: 0; right: 0; top: 0; z-index: 1500; border-bottom-width: 4px; transform: translateY(-120%); transition: transform .2s ease; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.ctm .ctm-fix.is-show { transform: none; }
.ctm .ctm-fix .ct-tab { height: 46px; flex-direction: row; gap: 0; }
.ctm .ctm-fix .ct-tab__label { font-size: 15px; }
.ctm .ctm-fix .ct-tab__sub { display: none; }
@media (prefers-reduced-motion: reduce) { .ctm .ctm-fix { transition: none; } }


/* いまの悩みから探す: タブは上の切りかえにまとめたので、ここのタブは出さない */
.ctm .ct-needs > .ct-tabs { display: none; }

/* 切りかえたときに、画面が一瞬だけ白くなる（js/top-mix.js が .is-on を付ける） */
.ctm-flash { position: fixed; inset: 0; z-index: 1400; background: #fff; opacity: 0; pointer-events: none; }
.ctm-flash.is-on { animation: ctm-flash .42s ease-out; }
@keyframes ctm-flash { 0% { opacity: 0; } 30% { opacity: .9; } 100% { opacity: 0; } }

/* スマホ・タブレット（下の固定バーが出る幅）: TOPでは、下の固定バー（就活の情報／転職・就職の情報）の代わりに、
   新卒／転職の切りかえを画面の下にずっと出す。PCは今のまま（スクロールしたら画面の上に出す） */
@media screen and (max-width: 1180px) {
    .ct-top-mix .ct-fixbar { display: none !important; }
    .ctm .ctm-fix {
        top: auto !important;
        bottom: 0;
        z-index: 3000;
        border-top: 4px solid var(--ct-amber);
        border-bottom: 0;
        transform: none;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, .18);
        padding-bottom: env(safe-area-inset-bottom);
        background: #000;
    }
    .ctm .ctm-fix .ct-tab { height: 50px; }
    /* 下に切りかえがずっと出るので、大見出しの下の切りかえは出さない */
    .ctm .ctm-switch:not(.ctm-fix) { display: none; }
}

/* 画面の下の切りかえ（スマホ・タブレット）の小さな案内 */
.ctm-fix__hint { display: none; }
@media screen and (max-width: 1180px) {
    .ctm .ctm-fix .ct-tab { flex-direction: column; gap: 3px; height: 54px; }
    .ctm .ctm-fix .ct-tab__label { font-size: 14px; }
    .ctm-fix__hint { display: block; font-size: 10px; font-weight: 600; line-height: 1; opacity: .75; }
}

/* 画面の下の切りかえ（スマホ・タブレット）: 選んでいるほうは太字、選んでいないほうは薄い文字 */
@media screen and (max-width: 1180px) {
    .ctm .ctm-fix .ct-tab[aria-selected="true"] .ct-tab__label { font-weight: 900; font-size: 15px; }
    .ctm .ctm-fix .ct-tab[aria-selected="false"] .ct-tab__label { font-weight: 500; opacity: .55; }
    .ctm .ctm-fix .ct-tab[aria-selected="false"] .ctm-fix__hint { opacity: .5; }
    .ctm .ctm-fix .ctm-fix__hint[hidden] { display: none; }
}

/* AIツールの見出し（就活AIツール／転職AIツール）。プラグインの「.ctai-bn__ttl span」（小さなオレンジの文字）を打ち消す */
.ctm .ctai-bn__ttl .ctm-t { display: inline; margin: 0; color: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; }

/* 入口のアイコン（inc/top-icons.php のSVG） */
.ctm .ctd-ai.ctm-ico svg { display: block; width: 30px; height: 30px; color: #121212; }
.ctm .ctd-agrid a:hover .ctd-ai.ctm-ico { background: #FABE00; }
.ctm .ctd-agrid a:hover .ctd-ai.ctm-ico svg [fill="#FABE00"] { fill: #fff; }
@media screen and (max-width: 760px) {
    .ctm .ctd-ai.ctm-ico svg { width: 26px; height: 26px; }
}

/* お役立ち記事（#guide）: 見出しの下にテーマ・新着を続ける。ヘッダーのリンクで来たとき、固定ヘッダーに隠れないように */
.ctm .ctm-guide { padding-bottom: 0; scroll-margin-top: 72px; }
.ctm .ctm-guide .ctm-blk--articles { padding-top: 32px; }
@media screen and (max-width: 1180px) {
    .ctm .ctm-guide { scroll-margin-top: 60px; }
}
/* 新着記事の見出しと「すべて／新卒／転職」が、スマホで横にはみ出さないように */
@media screen and (max-width: 760px) {
    .ctm .ctd-mh { flex-wrap: wrap; row-gap: 0; }
    .ctm .ctd-ntab button { padding: 5px 11px; }
}

/* 大見出しの「就活の情報を探す／転職・就職の情報を探す」の2つのボタン（.ct-hero__cta）は、PCだけ出す。
   スマホ・タブレット（下に新卒／転職の切りかえが出る幅）では出さない（2026-10-13） */
@media screen and (max-width: 1180px) {
    .ctm .ct-hero__cta { display: none; }
}

/* 入口のアイコンの箱の見出し「すぐ使える便利メニュー」（箱の幅いっぱいの1行目） */
.ctm .ctd-agrid .ctm-acts__ttl { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 0 4px; color: #121212; font-size: 15px; font-weight: 900; line-height: 1.4; }
.ctm .ctd-agrid .ctm-acts__ttl::before { content: ""; width: 5px; height: 16px; border-radius: 2px; background: #FABE00; }
@media screen and (max-width: 760px) {
    .ctm .ctd-agrid .ctm-acts__ttl { font-size: 14px; margin-bottom: 2px; }
}

/* 追従の切りかえ: 下へスクロール中は隠す（js/top-mix.js が .is-hide を付ける）。PCは上へ、スマホ・タブレットは下へ引っこめる */
.ctm .ctm-fix.is-show.is-hide { transform: translateY(-120%); }
@media screen and (max-width: 1180px) {
    .ctm .ctm-fix { transition: transform .25s ease; }
    .ctm .ctm-fix.is-hide { transform: translateY(110%); }
}

/* 新着記事の下の「記事一覧へ」ボタン（新卒／転職で入れかわる）: 一覧に近づけ、下の「いまの悩みから探す」との間をあける */
.ctm-guide .ct-more.ctm-more { margin: -24px 0 0; padding-bottom: 64px; }
@media screen and (max-width: 1180px) {
    .ctm-guide .ct-more.ctm-more { margin-top: -16px; padding-bottom: 48px; }
}

/* 進め方 5ステップ〜無料の診断・ツール を、背景グレーの1つのまとまりにする（企業情報検索と同じグレー） */
.ctm-gray { padding: 0 0 64px; background: #f4f4f4; }
#ctd .ctm-gray > section,
#ctd .ctm-gray .ctd { background: transparent; }
.ctm-gray .ctd-steps a { background: #fff; }
.ctm-gray .ctd-steps a:hover { background: var(--y2, #FFF1B8); }
@media screen and (max-width: 1180px) {
    .ctm-gray { padding: 0 0 48px; }
}

/* 進め方 5ステップ: カードの上に記事のアイキャッチ（inc/top-mix.php の .ctm-sthumb）。番号は画像の左上に重ねる */
.ctm-blk--flow .ctd-steps a { position: relative; gap: 4px; overflow: hidden; padding: 0 0 12px; }
.ctm-sthumb { display: block; aspect-ratio: 16 / 9; margin-bottom: 6px; overflow: hidden; background: #e8e8e4; }
.ctm-sthumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.ctm-blk--flow .ctd-steps a:hover .ctm-sthumb img { transform: scale(1.04); }
.ctm-blk--flow .ctd-steps i { position: absolute; top: 8px; left: 8px; box-shadow: 0 0 0 2px #fff; }
.ctm-blk--flow .ctd-steps b,
.ctm-blk--flow .ctd-steps small { padding: 0 12px; }

/* スマホ: 「動画で学ぶ」と同じく横にスワイプ（次のカードが少し見える） */
@media screen and (max-width: 760px) {
    .ctm-blk--flow .ctd-steps { display: flex; gap: 12px; margin: 0 -16px; padding: 4px 16px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px; -webkit-overflow-scrolling: touch; }
    .ctm-blk--flow .ctd-steps li { flex: 0 0 72%; scroll-snap-align: start; }
    .ctm-blk--flow .ctd-steps a { align-items: stretch; padding: 0 0 12px; background: #fff; text-align: left; }
    .ctm-blk--flow .ctd-steps i { width: 30px; height: 30px; font-size: 14px; }
    .ctm-blk--flow .ctd-steps b { font-size: 15px; }
    .ctm-blk--flow .ctd-steps b wbr { display: none; }
    .ctm-blk--flow .ctd-steps small { display: -webkit-box; overflow: hidden; font-size: 12px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .ctm-blk--flow .ctd-steps::-webkit-scrollbar { height: 4px; }
    .ctm-blk--flow .ctd-steps::-webkit-scrollbar-thumb { border-radius: 2px; background: #bbb; }
}
@media (prefers-reduced-motion: reduce) {
    .ctm-sthumb img { transition: none; }
}

/* 大見出しの下の検索欄の候補（.ct-suggest。見た目は css/theme.css のヘッダー検索と同じ） */
.ctm .ctd-search.ctm-suggest { position: relative; z-index: 30; }
.ctm .ctd-search .ct-suggest { top: calc(100% + 8px); z-index: 30; border-radius: 0; }
.ctm .ctd-search .ct-suggest__count,
.ctm .ctd-search .ct-suggest__none { padding: 10px 14px; text-align: left; }
.ctm .ctd-search .ct-suggest__list { margin: 0; padding: 0; }

/* 大見出しの下の検索欄の上の見出し「気になるキーワードで検索！」（黒い帯の上。虫めがねは黄色） */
.ctm .ctd-hero .ctm-search-ttl { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 14px; color: #fff; font-size: 20px; font-weight: 900; line-height: 1.4; letter-spacing: .04em; text-align: center; }
.ctm .ctd-hero .ctm-search-ttl svg { flex: none; color: #FABE00; }
@media screen and (max-width: 760px) {
    .ctm .ctd-hero .ctm-search-ttl { gap: 6px; margin-bottom: 10px; font-size: 16px; }
    .ctm .ctd-hero .ctm-search-ttl svg { width: 18px; height: 18px; }
}

/* 鉄人先生〜無料の診断・ツールの幅を、ほかのセクション（エージェント・ホワイト企業・動画など）の内容の幅 1080px にそろえる（PC）。
   プラグインの max-width（1000px・920px）を、このTOPの中だけ打ち消す */
@media screen and (min-width: 1024px) {
    .ctm .ct-sensei-bn .ct-sensei-bn__card,
    .ctm .ct-sb2__card { max-width: 1080px; }
    .ctm .ctai-bn__inner,
    .ctm .ct-freetools__inner { max-width: 1160px; padding-left: 40px; padding-right: 40px; }
    .ctm .ctai-bn__list,
    .ctm .ct-freetools__list { max-width: none; }
}

/* 進め方 5ステップ: カードの間の矢印を大きくする（PC）。スマホ（横スワイプ）でも、カードの間に出す。
   矢印はカードの上下の真ん中に置く。プラグインの小さな三角（7px）と、スマホ用の線（2px）を打ち消す */
.ctm-blk--flow .ctd-steps { gap: 28px; }
.ctm-blk--flow .ctd-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -21px;
    left: auto;
    width: 0;
    height: 0;
    border: 11px solid transparent;
    border-left: 13px solid #FABE00;
    border-right: 0;
    background: none;
    transform: translateY(-50%);
    z-index: 1;
}
@media screen and (max-width: 760px) {
    .ctm-blk--flow .ctd-steps { gap: 24px; }
    .ctm-blk--flow .ctd-steps li:not(:last-child)::after {
        right: -19px;
        border-width: 10px;
        border-left-width: 12px;
    }
}

/* お役立ち記事「テーマから探す」の見出しと、右の「すべて／新卒／転職」のタブ（新着記事の .ctd-ntab と同じ見た目） */
.ctm .ctm-thead { margin-bottom: 14px; }
.ctm .ctm-thead h2 { margin-bottom: 0; }
.ctm .ctm-ttab { display: flex; gap: 4px; }
.ctm .ctm-ttab button {
    display: block; padding: 6px 14px; border: 1.5px solid var(--line, #e6e6e0); border-radius: 999px;
    background: #fff; color: var(--k, #121212); font-size: 12px; font-weight: 800; line-height: 1.5; cursor: pointer;
}
.ctm .ctm-ttab button.is-on { border-color: var(--k, #121212); background: var(--k, #121212); color: #fff; }
html.ct-blue .ctm .ctm-ttab button { color: #333; font-weight: 600; }
html.ct-blue .ctm .ctm-ttab button.is-on { border-color: #CFDDE8; background: #1B7FBE; color: #fff; }
@media screen and (max-width: 760px) {
    .ctm .ctm-thead { flex-wrap: wrap; row-gap: 8px; }
    .ctm .ctm-ttab button { padding: 5px 11px; }
}
