/**
 * トップページ用スタイル（Bootstrap の reboot の上に、素の CSS で書く）
 *
 * 対象: front-page.php / header-ijcee_top.php / footer-ijcee_top.php / template-parts/top/
 * 寸法はデザイン（Figma 書き出し）の実測値。書き出し画像: Redmine/#38600-コーディング/_docs/design/
 *
 * 切り替え:
 *   1024px 以上 … PC 表示（ヘッダーに固定メニュー・SNS、研修・講座は3カラム）
 *   1023px 以下 … SP 表示（これらはメニューの中へ、研修・講座はアコーディオン）
 *   js/top/ijcee-top.js の SP_MAX_WIDTH と合わせること。
 */
/* ===============================================================
 * 変数（固定高さ・色は、ここだけを直す）
 * ============================================================= */
:root{--top-green:#91bc1a;--top-green-footer:#92bd1c;--top-orange:#f5910b;--top-red:#ff5032;--top-text:#3f3f3f;--top-heading:#2b2b2b;--top-gray-bg:#f8f8f8;--top-line:#ebebeb;--top-bar:#333;--top-header-h:40px;

  /* 高さを固定し、一覧が長いときはエリア内でスクロールする */
--top-news-h:200px;--top-topics-h:380px;--top-card-list-h:240px}

/* ===============================================================
 * ベース
 * ============================================================= */
body.top{margin:0;color:var(--top-text);background:#fff;font-family:Noto Sans JP,Hiragino Kaku Gothic ProN,Hiragino Sans,Meiryo,sans-serif;font-size:14px;line-height:1.6;text-size-adjust:100%}

/* リセットは詳細度を 0 にして、各部品のクラスで上書きできるようにする */
:where(body.top) a{color:inherit;text-decoration:none}:where(body.top) ul{margin:0;padding:0;list-style:none}:where(body.top) h1,:where(body.top) h2,:where(body.top) h3,:where(body.top) p{margin:0}:where(body.top) img{max-width:100%;height:auto;vertical-align:top}:where(body.top) button{font:inherit;color:inherit}body.top :focus-visible{outline:2px solid var(--top-green);outline-offset:2px}

/* bootstrap.css の button:focus（黒い枠）を、マウス操作のときだけ消す。キーボード操作では上の緑の枠が出る */
body.top button:focus:not(:focus-visible){outline:0}.top-skip{position:absolute;top:0;left:0;z-index:200;padding:8px 16px;background:#fff;transform:translateY(-120%)}.top-skip:focus{transform:none}.top-container{width:100%;max-width:1140px;margin:0 auto;padding:0 20px}html.is-menu-open{overflow:hidden}

/* 一覧エリア: 高さ固定 + 右端の細い縦のスクロールバー */
.top-scroll{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--top-bar) transparent}.top-scroll::-webkit-scrollbar{width:4px}.top-scroll::-webkit-scrollbar-track{background:transparent}.top-scroll::-webkit-scrollbar-thumb{border-radius:2px;background:var(--top-bar)}

/* ===============================================================
 * ヘッダー
 * ============================================================= */
.top-header{position:sticky;top:0;z-index:100;height:var(--top-header-h);background:#fff}.top-header__inner{display:flex;align-items:center;height:100%;padding:0 9px}.top-header__logo{flex:none;width:137px;font-size:0;line-height:0}.top-header__logo img{width:100%}.top-header__links,.top-header__sns{display:none}.top-menu-btn{display:flex;flex-direction:column;align-items:center;margin:0 0 0 auto;padding:0;border:0;background:none;cursor:pointer;color:var(--top-green-footer)}.top-menu-btn__bars{position:relative;display:block;width:22px;height:2px;margin-bottom:10px;background:currentcolor;box-shadow:0 5px currentcolor,0 10px currentcolor}.top-menu-btn__label{margin-top:4px;font-size:6px;font-weight:500;line-height:1;letter-spacing:.1em}

/* 開いているときは × にする（文字は読み上げ用に残し、見た目では隠す） */
.top-menu-btn__bars:after,.top-menu-btn__bars:before{content:"";position:absolute;top:5px;left:-1px;width:24px;height:2px;background:currentcolor;opacity:0}.is-menu-open .top-menu-btn__bars{background:none;box-shadow:none}.is-menu-open .top-menu-btn__bars:after,.is-menu-open .top-menu-btn__bars:before{opacity:1}.is-menu-open .top-menu-btn__bars:before{transform:rotate(45deg)}.is-menu-open .top-menu-btn__bars:after{transform:rotate(-45deg)}.is-menu-open .top-menu-btn__label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* JS が使えないときは、メニューをページ内に出すため、ボタンは出さない */
html:not(.js) .top-menu-btn{display:none}@media(width>=1024px){:root{--top-header-h:80px;--top-news-h:218px;--top-topics-h:405px;--top-card-list-h:270px}.top-header__inner{padding:0 18px 0 29px}.top-header__logo{width:240px}.top-header__links{display:block;margin-left:auto}.top-header__links ul{display:flex;gap:clamp(20px,calc(9.6vw - 78px),35px)}.top-header__links a{font-size:16px;font-weight:500;letter-spacing:.06em;color:#3b3b3b}.top-header__links a:hover{color:var(--top-green)}.top-header__sns{display:flex;gap:25px;margin-left:clamp(20px,calc(7.7vw - 59px),32px)}.top-header__sns img{width:32px;height:32px}.top-menu-btn{width:48px;margin-top:2px;margin-left:clamp(40px,calc(5.77vw - 19px),49px)}.top-menu-btn__bars{width:48px;height:3px;margin-bottom:22px;box-shadow:0 11px currentcolor,0 22px currentcolor}.top-menu-btn__label{margin-top:11px;font-size:10px;letter-spacing:.15em}.top-menu-btn__bars:after,.top-menu-btn__bars:before{top:11px;left:5px;width:38px;height:2px}}

/* ===============================================================
 * メニュー（パネル）
 * ============================================================= */
.top-menu{position:fixed;inset:var(--top-header-h) 0 0 0;z-index:90;overflow-y:auto;background:#fff;transform:translateX(100%);visibility:hidden;transition:transform .4s,visibility 0s linear .4s}.top-menu.is-open{transform:translateX(0);visibility:visible;transition:transform .4s,visibility}

/* JS が使えないときは、ヘッダーの下にそのまま並べる */
html:not(.js) .top-menu{position:static;transform:none;visibility:visible}.top-menu__body{width:100%;max-width:1140px;margin:0 auto;padding:0 20px 30px}.top-menu__list li{border-top:1px solid #e2e2e2}.top-menu__list li:last-child{border-bottom:1px solid #e2e2e2}.top-menu__item{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:51px;padding:0;border:0;background:none;color:#3a3a3a;font-size:16px;font-weight:500;text-align:left;cursor:pointer}.top-menu__chevron{flex:none;width:8px;height:8px;margin-right:17px;border-top:2px solid var(--top-green);border-right:2px solid var(--top-green);transform:rotate(45deg)}

/* 第二階層: 第一階層と入れ替えて表示する（ドリルダウン） */
.top-menu.is-sub-open .top-menu__list,.top-menu__sub{display:none}.top-menu__sub.is-active{display:block;animation:top-menu-in-right .35s ease}

/* 第二階層から戻るときは、第一階層が左から入る */
.top-menu.is-back .top-menu__list{animation:top-menu-in-left .35s ease}@keyframes top-menu-in-right{0%{transform:translateX(40px);opacity:0}}@keyframes top-menu-in-left{0%{transform:translateX(-40px);opacity:0}}

/* JS が使えないときは、第二階層もすべて出す */
html:not(.js) .top-menu__sub{display:block}.top-menu__back{display:flex;align-items:center;width:calc(100% + 40px);height:40px;margin:0 -20px;padding:0 20px;border:0;background:var(--top-gray-bg);color:#474747;font-size:14px;cursor:pointer}.top-menu__back-icon{width:7px;height:7px;margin:0 10px 0 3px;border-bottom:1px solid #b5b5b5;border-left:1px solid #b5b5b5;transform:rotate(45deg)}.top-menu__sub-title{padding:22px 0 19px;border-bottom:1px solid #e2e2e2;color:#3d3d3d;font-size:18px;font-weight:700;line-height:1.4}.top-menu__sub-list a{display:flex;align-items:center;justify-content:space-between;min-height:37px;padding:6px 0;color:#4e4e4e;font-size:15px}.top-menu__sub-list .top-menu__chevron{margin-right:29px;width:6px;height:6px}

/* SP のみ: 固定メニュー・SNS */
.top-menu__aside{padding-top:20px}.top-menu__fixed li{margin-bottom:11px}.top-menu__fixed a{display:flex;align-items:center;font-size:14px;font-weight:500;color:#3a3a3a}.top-menu__fixed a:before{content:"";flex:none;width:16px;height:16px;margin-right:9px;border-radius:50%;

  /* 緑の丸の中に白い「›」 */
background:#95bf22 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2.6 1.2L5.4 4 2.6 6.8' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") 50%/8px 8px no-repeat}.top-menu__sns-title{margin-top:24px;font-size:16px;font-weight:700;color:#3a3a3a}.top-menu__sns{display:flex;gap:26px;margin-top:14px}.top-menu__sns img{width:32px;height:32px}@media(width>=1024px){
  /* 画面全体は覆わず、中身の高さだけにする（下に本文が見える）。長いときだけ内側でスクロール */
.top-menu{bottom:auto;max-height:calc(100vh - var(--top-header-h));box-shadow:0 8px 16px rgba(0,0,0,.12)}.top-menu__body{padding-bottom:20px}.top-menu__aside{display:none}

  /* 第一階層: 2カラム（左右左右の順に、1行ずつ並べる）、緑 150px + グレーの下線 */
.top-menu__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px;padding-top:42px}.top-menu__list li,.top-menu__list li:last-child{border:0;margin-bottom:23px}.top-menu__item{min-height:0;padding:0 0 12px;font-size:18px;background:linear-gradient(var(--top-green),var(--top-green)) 0 100%/150px 2px no-repeat,linear-gradient(#d9d9d9,#d9d9d9) 0 100%/100% 2px no-repeat}.top-menu__item:hover,.top-menu__sub-list a:hover{color:var(--top-green)}.top-menu__chevron{margin-right:0;width:9px;height:9px}

  /* 第二階層: 戻る帯 + 見出し + 2カラムのリンク（デザインの3カラムから変更） */
.top-menu__back{height:60px;padding-left:calc(max(20px,50vw - 550px));width:100vw;margin:0 calc(50% - 50vw);font-size:16px}.top-menu__sub-title{padding:46px 0 11px;border-bottom:0;font-size:20px;background:linear-gradient(var(--top-green),var(--top-green)) 0 100%/150px 2px no-repeat,linear-gradient(#d9d9d9,#d9d9d9) 0 100%/100% 2px no-repeat}.top-menu__sub-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px;padding-top:22px}.top-menu__sub-list a{align-items:flex-start;justify-content:flex-start;min-height:39px;padding:6px 0;font-size:16px}.top-menu__sub-list a:before{content:"";flex:none;width:10px;height:2px;margin:.85em 6px 0 0;background:#9fc539}.top-menu__sub-list .top-menu__chevron{display:none}}

/* ===============================================================
 * メインビジュアル
 * 画像は <picture> で出し分け、コピーは画像の右下に重ねる（PC 1600×504 / SP 375×243）
 * ============================================================= */
.top-mv{position:relative}.top-mv__image{display:block;width:100%;height:auto}.top-mv__inner{position:absolute;right:0;bottom:0;left:0;padding-bottom:12px;pointer-events:none}.top-mv__copy{color:#fff;font-family:"Noto Serif JP",Hiragino Mincho ProN,Yu Mincho,serif;font-size:calc(clamp(18px,5.3vw,22px));font-weight:300;line-height:1.4;text-align:right;text-shadow:0 0 12px rgba(0,0,0,.35)}

/* SP は「／」のところで2行にする */
.top-mv__copy span{display:block}

/* ===============================================================
 * バナーのスライダー
 * ============================================================= */
.top-banner{position:relative;min-height:178px;background:var(--top-gray-bg)}@media(width>=1024px){.top-mv__inner{padding-bottom:14px;padding-right:30px;max-width:none}.top-mv__copy{font-size:calc(clamp(36px,3vw,48px));letter-spacing:.02em}.top-mv__copy span{display:inline}
  /* キャプションが1行でも、帯の高さを保つ（デザインは 260px） */
.top-banner{min-height:260px}}.top-banner__viewport{padding:18px 0 20px}.top-banner__track{display:flex;gap:15px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.top-banner__track::-webkit-scrollbar{display:none}.top-banner__item{flex:none;width:165px;scroll-snap-align:start}.top-banner__item img{width:100%;height:92px;object-fit:cover}.top-banner__text{display:block;margin-top:14px;color:#575757;font-size:13px;line-height:1.55}.top-banner a:hover .top-banner__text{text-decoration:underline}.top-banner__btn{position:absolute;top:56px;width:38px;height:40px;padding:0;border:0;background:hsla(0,0%,98%,.9);cursor:pointer}.top-banner__btn:before{content:"";position:absolute;top:50%;left:50%;width:10px;height:10px;border-top:2px solid #333;border-left:2px solid #333}.top-banner__btn--prev{left:7px}.top-banner__btn--prev:before{transform:translate(-30%,-50%) rotate(-45deg)}.top-banner__btn--next{right:10px}.top-banner__btn--next:before{transform:translate(-70%,-50%) rotate(135deg)}.top-banner__btn:disabled{opacity:.35;cursor:default}

/* JS が使えないときは、ボタンを出さず、横にスクロールして見る */
html:not(.js) .top-banner__btn{display:none}@media(width>=1024px){.top-banner__viewport{padding:40px 0 42px}.top-banner__track{gap:30px}.top-banner__item{width:250px}.top-banner__item img{height:130px}.top-banner__text{color:#494949;font-size:16px;line-height:1.45}.top-banner__btn{top:74px;width:56px;height:56px}.top-banner__btn--prev{left:30px}.top-banner__btn--next{right:30px}.top-banner__btn:before{width:14px;height:14px}}

/* ===============================================================
 * お知らせ
 * ============================================================= */
.top-news{padding-top:44px}.top-news__title{color:var(--top-heading);font-size:24px;font-weight:700;line-height:1.4}.top-news__scroll{height:var(--top-news-h);margin-top:20px;padding-right:20px}.top-news__item{padding:22px 0 24px;border-bottom:1px solid #e2e2e2}.top-news__item:first-child{padding-top:4px}.top-news__date{display:block;margin-bottom:8px;color:var(--top-green);font-size:14px;font-weight:700;line-height:1.5}.top-news__text{display:block;color:var(--top-text);font-size:14px;line-height:1.6;letter-spacing:.04em}body.top a.top-news__text{text-decoration:underline;text-underline-offset:3px}body.top a.top-news__text:hover{color:var(--top-green)}@media(width>=1024px){.top-news{padding-top:96px}.top-news__inner{display:grid;grid-template-columns:1fr 2fr;column-gap:0}.top-news__title{font-size:32px}.top-news__scroll{margin-top:0}.top-news__item{border-bottom-color:var(--top-line)}.top-news__date,.top-news__text{font-size:16px}}

/* ===============================================================
 * 研修トピックス
 * ============================================================= */
.top-topics{padding-top:52px}.top-topics__cols{margin-top:0}.top-topics__col+.top-topics__col{margin-top:40px}.top-topics__heading{color:var(--top-heading);font-size:24px;font-weight:700;line-height:1.4}.top-topics__scroll{height:var(--top-topics-h);margin-top:8px;padding-right:20px}.top-topics__item{padding:14px 0 16px;border-bottom:1px solid #e2e2e2;font-size:14px;line-height:1.6}.top-topics__item a{color:#444}.top-topics__item a:hover{color:var(--top-green)}.top-topics__empty{padding:20px 0;color:#777}.top-badge{display:inline-block;margin-bottom:8px;padding:0 10px;border-radius:2px;color:#fff;font-size:11px;font-weight:700;line-height:22px;letter-spacing:.03em}.top-badge--new{background:var(--top-orange)}.top-badge--deadline{background:var(--top-red)}.top-topics__item .top-badge{display:table}@media(width>=1024px){.top-topics{padding-top:96px}.top-topics__cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px}.top-topics__col+.top-topics__col{margin-top:0}.top-topics__heading{font-size:32px}.top-topics__scroll{margin-top:28px;padding-right:20px}.top-topics__item{border-bottom-color:var(--top-line);font-size:16px;line-height:1.7}.top-topics__item a{color:#353535}.top-topics__list--plain .top-topics__item{padding:24px 0}}

/* ===============================================================
 * 研修・講座（コンテンツブロック）
 * ============================================================= */
.top-courses{margin-top:62px;padding:62px 0 60px;background:var(--top-gray-bg)}.top-courses__title{color:#333;font-size:24px;font-weight:700;line-height:1.4}.top-courses__grid{margin-top:22px}

/* SP: アコーディオン */
.top-card{margin-top:-1px;border:1px solid #e1e1e1;background:#fff}.top-card__toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:43px;padding:8px 8px 8px 11px;border:0;background:none;color:#94be21;font-size:14px;font-weight:700;line-height:1.7;text-align:left;cursor:pointer}.top-card__toggle:disabled{cursor:default}.top-card__icon{position:relative;flex:none;width:15px;height:15px;margin-left:10px;border-radius:50%;background:var(--top-bar)}.top-card__icon:after,.top-card__icon:before{content:"";position:absolute;top:50%;left:50%;background:#fff;transform:translate(-50%,-50%)}.top-card__icon:before{width:7px;height:2px}.top-card__icon:after{width:2px;height:7px}.js .top-card:not(.is-open) .top-card__panel,.top-card.is-open .top-card__icon:after{display:none}.top-card__panel{padding:10px 10px 20px}

/* JS が使えるときだけ、閉じた状態で隠す（使えないときは、すべて開いた状態で出す） */
.top-card__image img{width:100%;aspect-ratio:2;object-fit:cover}.top-card__scroll{max-height:var(--top-card-list-h);margin-top:14px;padding-right:14px}.top-card__links li{position:relative;padding:3px 0 3px 14px;color:#585858;font-size:12px;line-height:19px}.top-card__links li:before{content:"";position:absolute;top:13px;left:0;width:8px;height:2px;background:#98c12a}.top-card__links a:hover{color:var(--top-green)}@media(width>=1024px){.top-courses{margin-top:100px;padding:104px 0 100px}.top-courses__title{font-size:32px}.top-courses__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:21px 22px;margin-top:40px}

  /* PC: カードは常に開いた状態。画像 → カテゴリ名 → リンクの順に並べる */
.top-card{display:flex;flex-direction:column;margin-top:0;border:0}.js .top-card:not(.is-open) .top-card__panel,.top-card__panel{display:contents}.top-card__image{order:1}.top-card__head{order:2}.top-card__scroll{order:3;height:var(--top-card-list-h);max-height:none;margin:20px 20px 24px;padding-right:14px}.top-card__toggle{min-height:0;padding:20px 20px 0;color:#8ebb14;font-size:20px;line-height:1.35}.top-card__icon{display:none}.top-card__links li{padding:6px 0 8px 18px;color:#3b3b3b;font-size:16px;line-height:22px}.top-card__links li:before{top:17px;width:8px}}

/* ===============================================================
 * フッター
 * ============================================================= */
.top-footer{padding:50px 0 12px;background:var(--top-green-footer);color:#f8fbf0}.top-footer__logo{display:block;max-width:335px;margin:0 0 36px}

/* ロゴ画像はカラー版 1 枚だけ。緑地に載せるため白一色にする */
.top-footer__logo img{width:100%;filter:brightness(0) invert(1)}.top-footer__contact{font-size:14px;line-height:1.55}.top-footer__note{max-width:340px;margin-top:10px;font-size:12px;line-height:1.7}.top-footer__title{margin-bottom:12px;color:#fff;font-size:18px;font-weight:700;line-height:1.4}.top-footer__sns{margin-top:44px}.top-footer__sns ul{display:flex;gap:21px}.top-footer__sns img{width:21px;height:21px}.top-footer__guide{margin-top:42px}.top-footer__guide li{margin-bottom:6px;font-size:12px;letter-spacing:.05em}.top-footer__guide a:hover{text-decoration:underline}.top-footer__copy{margin-top:36px;padding:0 20px;color:#f3f8e7;font-size:10px;line-height:1.6;text-align:center}@media(width>=1024px){.top-footer{padding:60px 0 10px}.top-footer__inner{display:grid;grid-template-columns:380px 380px minmax(0,1fr);align-items:start}.top-footer__logo{width:340px;margin:0 0 40px}.top-footer__title{font-size:20px;margin-bottom:16px}.top-footer__guide,.top-footer__sns{margin-top:0}.top-footer__sns img{width:31px;height:31px}.top-footer__sns ul{gap:25px;margin-top:26px}.top-footer__guide li{margin-bottom:11px;font-size:15px}.top-footer__copy{margin-top:80px}}
