/*
Theme Name: JSSTE（日本教師教育学会）
Description: concrete5 版 jsste テーマ（2014〜）の WordPress 移植。見た目は旧サイトを踏襲し、スマートフォン表示とレイアウト崩れを修正している。
Author: EPOCH-NET
Version: 1.0.0
Requires at least: 6.8
Requires PHP: 8.1
Text Domain: jsste
*/

/* =========================================================
   0. 基本
   ========================================================= */

:root {
	--c-text: #333;
	--c-link: #2a6ebb;
	--c-blue: #006dd9;
	--c-blue-dark: #0972db;
	--c-blue-border: #0f65bb;
	--c-bg: #f9f8f7;
	--c-line: #dddad5;
	--c-muted: #878477;
}

html { scroll-behavior: smooth; }
body {
	color: var(--c-text);
	font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
	font-size: 14px;
	overflow-wrap: anywhere; /* 長い URL のはみ出し対策（旧: word-wrap） */
	background: #fff;
}
a { color: var(--c-link); }
img { max-width: 100%; height: auto; }
.sr-only-focusable:focus { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 8px 12px; background: #fff; }

/* =========================================================
   1. 全体レイアウト（PC：幅 1000px 固定。旧テーマの寸法どおり）
   ========================================================= */

#wrapAll {
	border-top: 5px solid #f1efed;
	background: url(assets/img/common/bgMain.gif) 0 0 repeat;
	overflow: hidden;
}

#blockContent {
	position: relative;
	width: 1000px;
	margin: 0 auto;
	padding: 30px 30px 50px 20px;
	background: var(--c-bg);
	min-height: 900px;
}

.l-columns { display: flex; align-items: flex-start; gap: 10px; }
.l-side { position: relative; z-index: 10; flex: 0 0 250px; width: 250px; margin-top: 165px; }
.l-main { flex: 0 0 690px; width: 690px; min-width: 0; padding-top: 55px; }
.is-home .l-main { padding-top: 235px; }

/* ---------- ヘッダー ---------- */

.site-header { position: absolute; left: 20px; top: 30px; width: 950px; height: 165px; }

#ttlLogo { position: absolute; left: 0; top: 0; margin: 0; z-index: 11; }
#ttlLogo a {
	display: block; width: 240px; height: 165px;
	background: url(assets/img/common/btnGnavi.gif) 0 0 no-repeat;
	text-indent: -9999px; overflow: hidden;
}

#blockHeadnavi {
	position: absolute; right: 0; top: 0;
	display: flex; flex-direction: row; align-items: center; gap: 0;
	height: 25px;
}
.header-links { display: flex; margin: 0; padding: 0; list-style: none; }
.header-links li a {
	display: inline-block;
	background: url(assets/img/common/triHeader01.gif) right center no-repeat;
	padding: 0 15px 0 0; margin: 3px 15px 0 0;
}
.header-search { display: flex; }
.header-search input {
	width: 150px; height: 25px; margin: 0; padding: 0 6px;
	border: 1px solid var(--c-line); border-right: 0; background: #fff;
}
.header-search button {
	width: 50px; height: 25px; margin: 0; padding: 0; border: 0;
	background: url(assets/img/common/btnSearch.gif) 0 0 no-repeat;
}
.header-search button:hover, .header-search button:focus { background-position: 0 -25px; }

.menu-toggle { display: none; }

/* ---------- メインビジュアル（トップ） ---------- */

#blockMainvisual {
	position: absolute; left: -80px; top: 75px; z-index: 1;
	width: 1080px; height: 170px;
	background: url(assets/img/top/mainVisualNormal02.jpg) 0 0 no-repeat;
}
#boxMainvisual01 { width: 950px; height: 170px; margin: 0 auto; }
#boxMainvisual01 a {
	display: block; float: right;
	width: 120px; height: 35px; margin-top: 10px;
	background: url(assets/img/top/btnMainvisual01.gif) 0 0 no-repeat;
	text-indent: -9999px; overflow: hidden;
}
#boxMainvisual01 a:hover, #boxMainvisual01 a:focus { background-position: -120px 0; }

/* ---------- グローバルナビ ---------- */

.gnavi, .gnavi ul { margin: 0; padding: 0; list-style: none; }
.global-nav { width: 240px; }
.gnavi > li > a.navi {
	display: block; width: 240px; height: 50px;
	background-image: url(assets/img/common/btnGnavi.gif); background-repeat: no-repeat;
	text-indent: -9999px; overflow: hidden;
}
#btnGnavi01 > a.navi { background-position: 0 -165px; }
#btnGnavi02 > a.navi { background-position: 0 -215px; }
#btnGnavi03 > a.navi { background-position: 0 -265px; }
#btnGnavi04 > a.navi { background-position: 0 -315px; }
#btnGnavi05 > a.navi { background-position: 0 -365px; }
#btnGnavi06 > a.navi { background-position: 0 -415px; }
#btnGnavi07 > a.navi { background-position: 0 -465px; }
#btnGnavi01 > a.navi:hover, #btnGnavi01.is-current > a.navi, #btnGnavi01 > a.navi:focus { background-position: -240px -165px; }
#btnGnavi02 > a.navi:hover, #btnGnavi02.is-current > a.navi, #btnGnavi02 > a.navi:focus { background-position: -240px -215px; }
#btnGnavi03 > a.navi:hover, #btnGnavi03.is-current > a.navi, #btnGnavi03 > a.navi:focus { background-position: -240px -265px; }
#btnGnavi04 > a.navi:hover, #btnGnavi04.is-current > a.navi, #btnGnavi04 > a.navi:focus { background-position: -240px -315px; }
#btnGnavi05 > a.navi:hover, #btnGnavi05.is-current > a.navi, #btnGnavi05 > a.navi:focus { background-position: -240px -365px; }
#btnGnavi06 > a.navi:hover, #btnGnavi06.is-current > a.navi, #btnGnavi06 > a.navi:focus { background-position: -240px -415px; }
#btnGnavi07 > a.navi:hover, #btnGnavi07.is-current > a.navi, #btnGnavi07 > a.navi:focus { background-position: -240px -465px; }

/* 8 個目以降（スプライトにない項目）は文字で表示 */
.gnavi > li > a.navi:not(.navi-sprite) {
	text-indent: 0; height: auto; padding: 14px 20px;
	background: #2f8ae6; color: #fff; border-bottom: 1px solid #5aa3ee;
}
.gnavi > li > a.navi:not(.navi-sprite):hover { background: var(--c-blue-dark); text-decoration: none; }

.gnavi .sub-menu { display: none; }
.gnavi > li.is-current > .sub-menu { display: block; }
.gnavi .sub-menu a {
	display: block; width: 240px; min-height: 40px; line-height: 1.4;
	padding: 11px 20px;
	color: #fff; background-color: var(--c-blue-dark);
	border-bottom: 1px solid var(--c-blue-border);
}
.gnavi .sub-menu a:hover, .gnavi .sub-menu a:focus { text-decoration: none; background-color: #0862bd; }

/* ---------- 左サイドバー（旧 Recommendation） ---------- */

#blockPublication { width: 250px; margin-top: 50px; }
#blockPublication h2 {
	font-size: 1em; border-left: 5px solid var(--c-blue);
	padding-left: 10px; margin: 0 0 15px;
}
#blockPublication hr { border-top: 1px solid #e5e2dd; margin: 20px 0; }
#blockPublication p { margin: 0 0 10px; }
#blockPublication img { max-width: 100%; }

/* =========================================================
   2. 下層ページ
   ========================================================= */

#blockMaincontent { width: 690px; max-width: 100%; }

#blockbread { width: 660px; max-width: 100%; margin: 0 auto; background: url(assets/img/common/dot01.gif) 0 bottom repeat-x; }
#blockbread ul { margin: 0; padding: 15px 0; width: 100%; background: url(assets/img/common/dot01.gif) 0 0 repeat-x; list-style: none; display: flex; flex-wrap: wrap; }
#blockbread li a { display: inline-block; background: url(assets/img/common/triHeader01.gif) right center no-repeat; padding: 0 15px 0 0; margin: 3px 15px 0 0; }
#blockbread li.current span { display: inline-block; margin: 3px 0 0; }

#blockPagetitle { width: 660px; max-width: 100%; margin: 0 auto; padding: 40px 0; }
#blockPagetitle h1 { margin: 0; padding: 0; font-size: 2em; line-height: 1.3; }

#metaInfo { margin: 15px 0 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 10px; }
#metaInfo li { list-style: none; }

#blockMaincontent_inner { background-color: #fff; padding: 25px; line-height: 2; }
.back-to-parent { padding: 10px; margin-top: 20px; background-color: var(--c-bg); }

/* ---------- 本文の装飾（旧 base.css。本文 HTML がこれらのクラスを使っている） ---------- */

.entry-content > *:first-child { margin-top: 0; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 { font-size: 1.3em; margin: 20px 0; line-height: 1.4; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 20px; }
.entry-content ul, .entry-content ol { padding-left: 30px; }
.entry-content ul.list-unstyled { padding-left: 0; }
.entry-content li { line-height: 1.8; }
.entry-content table { margin-bottom: 20px; font-size: .9em; }
.entry-content tr { border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--c-line); border-right: 1px solid var(--c-line); line-height: 1.5; padding: 10px; vertical-align: top; }
.entry-content th[scope="col"] { background: var(--c-bg); }
.entry-content th[scope="row"] { background: url(assets/img/common/bgTable01.gif) 0 0 repeat; }
.entry-content .table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content iframe, .entry-content video { max-width: 100%; }

.h_01 { padding: 5px 0 5px 20px; background: url(assets/img/common/decoH02.gif) 0 12px no-repeat; }
.h_02 { padding: 0 0 15px; background: url(assets/img/common/decoH03.gif) 0 bottom no-repeat; }
.h_03 { background: url(assets/img/common/decoH01.gif) 0 0 repeat-y; padding: 0 0 0 20px; }
.h_04 { background: url(assets/img/common/dot01.gif) 0 bottom repeat-x; padding: 0 0 15px; }
/* 本文中で <span class="h_01"> のように行内要素に付けられ、<br> で改行されると枠が行ごとに割れるため、1 つの箱にまとめる */
span.h_01, span.h_02, span.h_03, span.h_04 { display: inline-block; max-width: 100%; vertical-align: top; }
.box_01 { border: 1px dotted var(--c-line); padding: 20px; margin-bottom: 20px; }
.box_02 { background-color: var(--c-bg); padding: 20px; margin-bottom: 20px; }
.box_01 > *:first-child, .box_02 > *:first-child { margin-top: 0; }
.box_01 > *:last-child, .box_02 > *:last-child { margin-bottom: 0; }

/* concrete5 のレイアウト（列分割） */
.jsste-layout { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 0 20px; margin-bottom: 20px; }

/* 旧本文中の Bootstrap ドロップダウン（JS は theme.js で代替） */
.entry-content .dropdown-menu { max-height: 60vh; overflow-y: auto; }

/* =========================================================
   3. お知らせ一覧・トップページ
   ========================================================= */

.info-item {
	display: flex; flex-wrap: wrap; align-items: flex-start;
	padding: 15px 0; margin: 0;
	background: url(assets/img/common/dot01.gif) 0 bottom repeat-x;
}
.info-item .date { flex: 0 0 100px; line-height: 1.5; }
.info-item h3 { flex: 1 1 0; min-width: 0; margin: 0 0 0 20px; padding: 0; font-size: 1em; line-height: 1.5; }
.info-item p { margin: 0; }
.info-item .label { margin-left: 6px; vertical-align: middle; }

.cate { display: inline-block; flex: 0 0 70px; width: 70px; height: 20px; overflow: hidden; text-indent: -9999px; background-repeat: no-repeat; }
.cate01 { background-image: url(assets/img/top/lblCateinfo01.gif); }
.cate02 { background-image: url(assets/img/top/lblCateinfo02.gif); }
.cate03 { background-image: url(assets/img/top/lblCateinfo03.gif); }
.cate04 { background-image: url(assets/img/top/lblCateinfo04.gif); }
.cate-text { width: auto; height: auto; flex: 0 0 auto; min-width: 70px; text-indent: 0; padding: 1px 6px; font-size: 11px; line-height: 18px; color: #fff; background: #777; text-align: center; }

.jsste-pager .pager { margin: 30px 0 0; display: flex; justify-content: space-between; align-items: center; }
.jsste-pager .pager-count { color: var(--c-muted); }
.jsste-pagination .nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }

#blockTopcontent { position: relative; }
#blockInformation, #blockTopics { background: #fff; margin-bottom: 20px; padding: 10px 20px; }
.block-title { display: flex; justify-content: space-between; align-items: center; height: 30px; margin: 0 -10px 5px; }
.block-title h2 { width: 100px; height: 30px; margin: 0; text-indent: -9999px; overflow: hidden; background: 0 center no-repeat; }
#titleInformation h2 { background-image: url(assets/img/top/ttlInformation.gif); }
#titleTopics h2 { background-image: url(assets/img/top/ttlTopics.gif); }
.block-title span a {
	display: inline-block; width: 75px; height: 30px;
	text-indent: -9999px; overflow: hidden;
	background: url(assets/img/top/btnTopics.gif) 0 0 no-repeat;
}
.block-title span a:hover, .block-title span a:focus { background-position: -75px 0; }

/* TOPICS 本文。話題ごとの体裁は jsste_topics_normalize() でそろえる（見出しのアイコンもここで付ける） */
.topics-body { padding: 10px 0; line-height: 1.8; }
.topics-item { padding: 22px 0; border-top: 1px dotted var(--c-line); }
.topics-item:first-child { padding-top: 5px; border-top: 0; }
.topics-item:last-child { padding-bottom: 5px; }
.topics-item > :last-child { margin-bottom: 0; }
.topics-body .topics-title {
	position: relative; margin: 0 0 12px; padding-left: 28px;
	font-size: 1.15em; font-weight: bold; line-height: 1.5;
}
.topics-body .topics-title::before {
	content: ""; position: absolute; left: 0; top: .15em;
	width: 20px; height: 20px; background: url(assets/img/top/topics-icon.jpg) 0 0 / 20px 20px no-repeat;
}
.topics-body .topics-sub { font-size: 1em; font-weight: bold; line-height: 1.6; margin: 0 0 8px; }
.topics-body p, .topics-body .topics-item > div { margin: 0 0 8px; }
.topics-body .topics-item h4:not(.topics-sub) { font-size: 1em; margin: 0 0 8px; }
.topics-body img { max-width: 100%; height: auto; }

/* =========================================================
   4. フッター
   ========================================================= */

#wrapSns { background: url(assets/img/common/bgSns.jpg) 0 0 repeat; }
#blockSns { width: 960px; max-width: 100%; height: 58px; margin: 0 auto; }
#boxPagetop { float: right; }
#boxPagetop a { display: block; width: 100px; height: 58px; text-indent: -9999px; overflow: hidden; background: url(assets/img/common/btnPagetop.gif) 0 0 no-repeat; }
#boxPagetop a:hover, #boxPagetop a:focus { background-position: -100px 0; }

.site-footer { background: url(assets/img/common/bgFooter.gif) 0 0 repeat-x; }
#blockFooter { display: flex; gap: 0; width: 960px; margin: 0 auto; padding: 60px 0; }
#blockFooter_L { flex: 0 0 240px; font-size: .86em; }
#ttlFooter { width: 157px; height: 49px; margin: 0; background: url(assets/img/common/ttlFoot01.gif) 0 0 no-repeat; text-indent: -9999px; overflow: hidden; font-size: 14px; }
#ttlOffice { font-size: 1em; margin: 30px 0 0; font-weight: bold; }
#blockFooter_L p { margin: 0 0 10px; }
#blockFooter_R { flex: 1 1 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.footer-col { background: url(assets/img/common/bar02.gif) 0 0 repeat-y; padding: 0 10px 0 15px; min-height: 200px; }
.footer-col h4 { font-size: 1em; margin: 0 0 15px; line-height: 1.4; }
.footer-col h4 a { color: #000; }
.footer-col ul { margin: 0 0 15px; padding: 0; list-style: none; }
.footer-col ul a { display: block; background: url(assets/img/common/triFoot01.gif) 0 5px no-repeat; padding-left: 15px; margin-bottom: 5px; font-size: .86em; text-decoration: underline; }
#blockCopyright { background: url(assets/img/common/bar01.gif) 0 0 repeat-x; text-align: center; color: var(--c-muted); padding: 15px; font-size: .86em; }

/* =========================================================
   5. フォーム
   ========================================================= */

.jsste-form__hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.jsste-form__table th { width: 30%; background: var(--c-bg); }
.jsste-form__table td { background: #fff; }
.jsste-form .radio-inline, .jsste-form .checkbox-inline { margin: 0 15px 5px 0; padding-left: 20px; }
.jsste-form .help-block { margin: 5px 0 0; font-size: .9em; line-height: 1.5; }

/* =========================================================
   6. 画面幅 999px 以下（旧サイトは viewport 固定でスマホ表示が崩れていた）
   ========================================================= */

@media (max-width: 999px) {
	#blockContent { width: auto; padding: 0 0 40px; min-height: 0; }

	.site-header {
		position: relative; left: auto; top: auto; width: auto; height: auto;
		display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
		padding: 0 16px; background: linear-gradient(180deg, #2c86e8 0%, #1a6fd3 100%);
	}
	#ttlLogo { position: static; }
	#ttlLogo a { width: 240px; height: 130px; background-position: 0 -10px; margin-left: -16px; }

	.menu-toggle {
		display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
		padding: 10px; border: 1px solid rgba(255,255,255,.6); border-radius: 4px;
		background: transparent; color: #fff; font-size: 11px; line-height: 1;
	}
	.menu-toggle__bar, .menu-toggle__bar::before, .menu-toggle__bar::after {
		display: block; width: 24px; height: 2px; background: #fff; content: ""; position: relative;
	}
	.menu-toggle__bar::before { position: absolute; top: -7px; }
	.menu-toggle__bar::after { position: absolute; top: 7px; }
	.menu-toggle__bar { margin: 8px 0 6px; }

	#blockHeadnavi {
		position: static; flex: 1 0 100%; height: auto;
		display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
		margin: 0 -16px; padding: 10px 16px; background: var(--c-bg);
	}
	.header-links { flex-wrap: wrap; }
	.header-search { flex: 1 1 160px; justify-content: flex-end; }
	.header-search input { width: auto; flex: 1 1 auto; max-width: 220px; }

	#blockMainvisual {
		position: relative; left: auto; top: auto; width: auto; height: 0; padding-top: 15.2%;
		background-size: cover; background-position: 30% 0;
	}
	#boxMainvisual01 { position: absolute; top: 0; right: 10px; width: auto; height: auto; }
	#boxMainvisual01 a { margin-top: 8px; }

	.l-columns { flex-direction: column; gap: 0; padding: 0 16px; }
	.l-side { display: contents; }
	.global-nav { order: -1; width: auto; margin: 0 -16px; display: none; }
	.global-nav.is-open { display: block; }
	.l-main, .is-home .l-main { flex: none; width: 100%; padding-top: 0; order: 0; }
	#blockPublication { order: 1; width: 100%; max-width: 360px; margin: 40px auto 0; }

	/* スマホのナビは文字で表示（画像の文字は小さく読めないため） */
	.gnavi > li > a.navi, .gnavi > li > a.navi.navi-sprite {
		width: auto; height: auto; padding: 14px 44px 14px 20px;
		background: #2f8ae6; color: #fff; text-indent: 0;
		border-bottom: 1px solid #5aa3ee; position: relative;
	}
	.gnavi > li.is-current > a.navi, .gnavi > li > a.navi:hover { background: var(--c-blue-dark); text-decoration: none; }
	.gnavi > li.has-children > a.navi::after { content: "\f105"; font-family: FontAwesome; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
	.gnavi .sub-menu a { width: auto; padding-left: 36px; }

	#blockbread, #blockPagetitle { width: auto; }
	#blockPagetitle { padding: 24px 0; }
	#blockPagetitle h1 { font-size: 1.6em; }
	#blockMaincontent { width: auto; }
	#blockMaincontent_inner { padding: 20px 16px; margin: 0 -16px; }

	#blockTopcontent { margin-top: 20px; }
	#blockInformation, #blockTopics { margin-left: -16px; margin-right: -16px; padding: 10px 16px; }
	.block-title { margin: 0 0 5px; }

	.jsste-layout { grid-template-columns: minmax(0, 1fr); }

	#blockFooter { flex-direction: column; width: auto; padding: 40px 16px; gap: 30px; }
	#blockFooter_L { flex: none; }
	#blockFooter_R { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
	.footer-col { min-height: 0; }
	#blockSns { padding: 0 16px; }
}

@media (max-width: 599px) {
	body { font-size: 15px; }
	.info-item .date { flex-basis: auto; margin-right: 12px; }
	.info-item h3 { flex: 1 0 100%; margin: 6px 0 0; }
	.entry-content img[style*="float"], .entry-content img.pull-left, .entry-content img.pull-right { float: none !important; display: block; margin: 0 auto 15px !important; }
	.entry-content .pull-left, .entry-content .pull-right { float: none !important; }
	.jsste-form__table, .jsste-form__table tbody, .jsste-form__table tr, .jsste-form__table th, .jsste-form__table td { display: block; width: 100%; }
	#blockFooter_R { grid-template-columns: minmax(0, 1fr); }
}

@media print {
	.site-header, .global-nav, #blockPublication, #wrapSns, .site-footer, #blockMainvisual { display: none !important; }
	#blockContent { width: auto; padding: 0; }
	.l-main { width: auto; padding: 0; }
}
