/*
 * J-CLASSIC theme styles
 * Written from scratch for this theme.
 */

:root {
	--jc-primary: #084df9;
	--jc-primary-hover: #0046f9;
	--jc-text: #000;
	--jc-line: #ddd;
	--jc-pale: #f7f7f7;
	--jc-gray: #c6c6c6;
	--jc-muted: #cecece;
	--jc-nav-hover: rgba(153, 153, 153, .8);
	--jc-glass: rgba(255, 255, 255, .8);
	--jc-font: Arial, "Hiragino Sans", "Yu Gothic Medium", Meiryo, sans-serif;
	--jc-inner: 1200px;
	--jc-bar: 100px;
	--jc-gap: 80px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: #fff;
	color: var(--jc-text);
	font-family: var(--jc-font);
	font-size: 14px;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure, blockquote { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; }
ul, ol { padding: 0; list-style: none; }
img, video { max-width: 100%; height: auto; vertical-align: bottom; }
a { color: inherit; text-decoration: none; transition: color .2s, background-color .2s, opacity .2s; }
a:hover { color: var(--jc-primary-hover); }
button { font: inherit; color: inherit; }
table { border-collapse: collapse; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	left: 8px; top: 8px; z-index: 1000;
	padding: 10px 16px; background: #fff; color: #000;
}

.c-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; flex: none; }

.l-inner { width: 88.8888%; max-width: var(--jc-inner); margin-left: auto; margin-right: auto; }

.u-visible-sm { display: none !important; }

/* ---------- Header ---------- */

.l-header { position: relative; z-index: 100; }

.p-header__top { border-bottom: 1px solid var(--jc-line); }
.p-header__top .l-inner { display: flex; align-items: center; height: 58px; }
.p-header__desc { font-size: 14px; line-height: 1.6; }

.p-header__bottom { display: none; }

.p-header__bar-wrap { height: calc(var(--jc-bar) + 1px); }
.p-header__bar {
	position: relative;
	background: var(--jc-glass);
	border-bottom: 1px solid var(--jc-line);
}
.p-header__bar-inner { display: flex; align-items: stretch; height: var(--jc-bar); }

.p-logo { display: flex; align-items: center; flex: none; margin: 0 30px 0 0; font-size: inherit; font-weight: inherit; }
.p-logo a { display: block; flex: none; }
.p-logo img { display: block; width: 125px; height: auto; }
.p-logo__text { font-size: 28px; }

/* Fixed bar after scrolling past the description line */
.is-fixed .p-header__bar { position: fixed; top: 0; left: 0; right: 0; }
.has-adminbar.is-fixed .p-header__bar { top: 32px; }

.p-menu-button { display: none; }

.p-global-nav__container { flex: 1 1 auto; display: flex; justify-content: flex-end; min-width: 0; }
.p-global-nav { display: flex; flex-wrap: nowrap; height: 100%; min-width: 0; }
.p-global-nav > li { position: relative; flex: 0 1 auto; min-width: 0; }
.p-global-nav > li > a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 0 clamp(6px, 1vw, 20px);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	color: var(--jc-text);
}
@media (min-width: 992px) {
	.p-global-nav > li > a { max-width: 8.5em; font-size: 13px; line-height: 1.45; }
}
.p-global-nav > li > a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 4px;
	background: var(--jc-text);
	transform: scaleX(0);
	transition: transform .25s;
}
.p-global-nav > li > a:hover { background: var(--jc-nav-hover); color: var(--jc-text); }
.p-global-nav > .current-menu-item > a::after,
.p-global-nav > .current-menu-ancestor > a::after,
.p-global-nav > .current-menu-parent > a::after,
.p-global-nav > .current_page_item > a::after,
.p-global-nav > li > a:hover::after { transform: scaleX(1); }

.p-global-nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: #fff; visibility: hidden; opacity: 0; transition: opacity .2s;
}
.p-global-nav li:hover > .sub-menu,
.p-global-nav li:focus-within > .sub-menu { visibility: visible; opacity: 1; }
.p-global-nav .sub-menu a { display: block; padding: 15px 20px; line-height: 1.5; }
.p-global-nav .sub-menu a:hover { background: #999; color: #000; }

/* ---------- Front: hero slider ---------- */

.p-hero { position: relative; overflow: hidden; background: #000; }
.p-hero__track { position: relative; aspect-ratio: 1450 / 600; }
.p-hero__slide {
	position: absolute; inset: 0;
	transform: translateX(100%);
	transition: transform 1s ease;
}
.p-hero__slide.is-active { transform: translateX(0); z-index: 2; }
.p-hero__slide.is-prev { transform: translateX(-100%); z-index: 1; }
.p-hero__slide.no-anim { transition: none; }
.p-hero__slide a, .p-hero__slide img { display: block; width: 100%; height: 100%; }
.p-hero__slide img { object-fit: cover; }

.p-hero__dots {
	position: absolute; left: 0; right: 0; bottom: 36px; z-index: 3;
	display: flex; justify-content: center;
}
.p-hero__dot {
	width: 15px; height: 15px; margin: 0 0 0 10px; padding: 0;
	border: 1px solid var(--jc-line); border-radius: 50%;
	background: #fff; cursor: pointer;
}
.p-hero__dot:first-child { margin-left: 0; }
.p-hero__dot.is-active, .p-hero__dot:hover { background: var(--jc-primary); border-color: var(--jc-primary); }

/* ---------- Front: blocks ---------- */

.p-front { padding-top: var(--jc-gap); }
.p-block { position: relative; margin-bottom: var(--jc-gap); }
.p-block:last-child { margin-bottom: 0; }

/* full-bleed background behind a block inside .l-inner */
.p-block--bg { padding: var(--jc-gap) 0; }
.p-block--bg::before {
	content: "";
	position: absolute; top: 0; bottom: 0;
	left: 50%; width: 100vw; margin-left: -50vw;
	background: var(--jc-pale);
	z-index: -1;
}
.p-block--gray::before { background: var(--jc-gray); }
.p-front { position: relative; z-index: 0; }
body { overflow-x: hidden; }

.p-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.p-boxes__item { aspect-ratio: 380 / 240; }
.p-boxes__link { display: block; height: 100%; }
.p-boxes__link img { width: 100%; height: 100%; object-fit: cover; }

/* hover: slow zoom + slight tilt */
.c-zoom { display: block; overflow: hidden; }
.c-zoom img { transition: transform .75s ease; }
a:hover .c-zoom img, a.c-zoom:hover img { transform: scale(1.2) rotate(2deg); }

.p-block__header { display: flex; align-items: center; margin-bottom: 50px; }
.p-block__title { font-size: 34px; font-weight: 500; line-height: 1.2; margin-right: 30px; }
.p-block__desc { flex: 1; font-size: 14px; line-height: 1.8; }
.c-button {
	display: inline-flex; align-items: center; justify-content: center;
	width: 180px; height: 50px;
	background: var(--jc-primary); color: #fff !important;
	font-size: 14px; line-height: 1.4; text-align: center;
}
.c-button:hover { background: var(--jc-primary-hover); }
.p-block__footer { margin-top: 30px; text-align: center; }

/* cards */
.p-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 30px; }
.p-card__link { display: block; color: var(--jc-text); }
.p-card__link:hover { color: var(--jc-text); }
.p-card__thumb { aspect-ratio: 740 / 460; background: #eee; }
.p-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-card__title { margin-top: 15px; font-size: 14px; line-height: 1.8; font-weight: 400; }

/* sponsor block */
.p-sponsor .p-entry__body h3,
.p-sponsor .jc-sponsor__title { color: #fff; font-size: 18.2px; margin-bottom: 24px; }
.p-entry__body img.jcsponser { width: 32%; margin: 0 1.33% 10px 0; }
.p-entry__body img.jcsponser_s { width: 20%; margin: 0 1.2% 10px 0; }
.p-sponsor .p-entry__body p { margin-bottom: 0; line-height: 0; }
.p-sponsor .p-entry__body a { display: inline; }

/* ---------- Inner page header & breadcrumb ---------- */

.p-page-header { background: var(--jc-pale); }
.p-page-header .l-inner { display: flex; align-items: center; height: 100px; }
.p-page-header__title { font-size: 32px; line-height: 1.2; font-weight: 400; color: var(--jc-muted); }

.p-breadcrumb { border-bottom: 1px solid var(--jc-line); margin-bottom: 60px; }
.p-breadcrumb__inner { display: flex; flex-wrap: wrap; align-items: center; min-height: 52px; padding: 10px 0; }
.p-breadcrumb__item { font-size: 14px; line-height: 1.6; }
.p-breadcrumb__item + .p-breadcrumb__item::before {
	content: ""; display: inline-block;
	width: 5px; height: 5px; margin: 0 9px 2px 6px;
	border-top: 1px solid currentColor; border-right: 1px solid currentColor;
	transform: rotate(45deg);
}
.p-breadcrumb__item--home .c-icon { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- Entry ---------- */

.p-entry__body { font-size: 14px; line-height: 2.4; word-wrap: break-word; }
.p-entry__body > *:last-child { margin-bottom: 0; }
.p-entry__body p { margin-bottom: 2em; }
.p-entry__body a { color: var(--jc-primary); }
.p-entry__body a:hover { color: var(--jc-primary-hover); }
.p-entry__body h1 { font-size: 1.5em; line-height: 1.4; margin: 0 0 24px; }
.p-entry__body h2 { font-size: 1.4em; line-height: 1.4; margin: 0 0 24px; }
.p-entry__body h3 { font-size: 1.3em; line-height: 1.4; margin: 0 0 24px; }
.p-entry__body h4 { font-size: 1.2em; line-height: 1.4; margin: 0 0 24px; }
.p-entry__body h5, .p-entry__body h6 { font-size: 1.1em; line-height: 1.4; margin: 0 0 24px; }
.p-entry__body strong, .p-entry__body b { font-weight: 700; }
.p-entry__body ul, .p-entry__body ol { margin: 0 0 24px 1.3em; }
.p-entry__body ul { list-style: disc; }
.p-entry__body ol { list-style: decimal; }
.p-entry__body li { line-height: 2.4; }
.p-entry__body .style3a { margin: 3em 0 24px; padding: 1.1em .2em 1em; border-top: 1px solid #222; border-bottom: 1px solid #222; }
.p-entry__body table { width: 100%; margin-bottom: 24px; border: 0; }
.p-entry__body table.alignleft, .p-entry__body table.alignright { margin: 0 0 24px; }
.p-entry__body th, .p-entry__body td { padding: 10px 15px; border: 1px solid var(--jc-line); background: #fff; line-height: 2; vertical-align: middle; }
.p-entry__body th { background: var(--jc-pale); font-weight: 400; }
.p-entry__body blockquote { position: relative; margin: 0 0 25px; padding: 27px 30px 0; border: 1px solid var(--jc-line); }
.p-entry__body blockquote::before,
.p-entry__body blockquote::after { position: absolute; width: 30px; height: 30px; font-size: 30px; line-height: 40px; color: #5cbcd7; content: "\""; }
.p-entry__body blockquote::before { top: 5px; left: 10px; }
.p-entry__body blockquote::after { right: -2px; bottom: 7px; }
.p-entry__body blockquote p { margin-bottom: 28px; }
/* Contact Form 7 */
.p-entry__body .wpcf7 { margin: 0 0 35px; border: 1px solid var(--jc-line); background: #fafafa; }
.p-entry__body .wpcf7 form { position: relative; margin: 21px 21px 0; padding-bottom: 37px; }
.p-entry__body .wpcf7 p { margin: 0 0 12px; font-size: 12px; line-height: 2.4; }
.p-entry__body .wpcf7 input[type="text"],
.p-entry__body .wpcf7 input[type="email"],
.p-entry__body .wpcf7 input[type="tel"],
.p-entry__body .wpcf7 input[type="url"],
.p-entry__body .wpcf7 input[type="number"],
.p-entry__body .wpcf7 input[type="date"],
.p-entry__body .wpcf7 select,
.p-entry__body .wpcf7 textarea { box-sizing: border-box; width: 100%; padding: 8px; border: 1px solid var(--jc-line); border-radius: 0; background: #fff; font: inherit; font-size: 12px; line-height: 1.2; color: #000; }
.p-entry__body .wpcf7 textarea { height: 300px; }
.p-entry__body .wpcf7 .wpcf7-list-item { margin: 0 1em 0 0; }
.p-entry__body .wpcf7 input[type="submit"] { display: block; width: 225px; height: 48px; margin: 30px auto 0; padding: 8px; border: 0; border-radius: 0; background: #333; font: inherit; font-size: 14px; line-height: 1.5; color: #fff; cursor: pointer; transition: background-color .2s; -webkit-appearance: none; appearance: none; }
.p-entry__body .wpcf7 input[type="submit"]:hover { background: var(--jc-primary); }
.p-entry__body .wpcf7 .wpcf7-spinner { position: absolute; bottom: 13px; left: 50%; margin: 0 0 0 -12px; }
.p-entry__body .wpcf7 .wpcf7-response-output { margin: 20px 0 0; }
.p-entry__body hr { margin: 14px 0; border: 0; border-top: 1px solid var(--jc-line); }
.p-entry__body iframe { max-width: 100%; }
.p-entry__body .alignleft { float: left; margin: 0 20px 20px 0; }
.p-entry__body .alignright { float: right; margin: 0 0 20px 20px; }
.p-entry__body .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.p-entry__body .wp-caption { max-width: 100%; }
.p-entry__body .wp-caption-text { font-size: 12px; line-height: 1.6; text-align: center; }
.p-entry__body::after { content: ""; display: table; clear: both; }

.p-entry--single { border: 1px solid var(--jc-line); }
.p-entry__inner { padding: 50px; }
.p-entry__label { font-size: 12px; line-height: 1.6; color: #666; margin-bottom: 15px; text-transform: uppercase; }
.p-entry__title { font-size: 32px; font-weight: 500; line-height: 1.5; margin-bottom: 40px; }

.p-entry__meta {
	display: flex; align-items: center; gap: 8px;
	margin-top: 40px; padding: 18px 18px;
	background: var(--jc-pale); font-size: 12px; line-height: 1.5;
}
.p-entry__meta .c-icon { color: #aaa; font-size: 14px; }

.p-entry-nav { display: flex; border-top: 1px solid var(--jc-line); }
.p-entry-nav__item { flex: 1; min-height: 113px; }
.p-entry-nav__item + .p-entry-nav__item { border-left: 1px solid var(--jc-line); }
.p-entry-nav__item a {
	display: flex; align-items: center; gap: 30px;
	height: 100%; padding: 30px 40px;
	font-size: 14px; line-height: 1.6;
}
.p-entry-nav__item--next a { justify-content: flex-end; text-align: right; }
.p-entry-nav .c-icon { font-size: 16px; }

/* ---------- Archives ---------- */

.p-pager { margin-top: 50px; }
.p-pager__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.p-pager__item .page-numbers {
	display: flex; align-items: center; justify-content: center;
	width: 45px; height: 45px;
	background: var(--jc-pale); font-size: 14px;
}
.p-pager__item .current,
.p-pager__item a:hover { background: var(--jc-primary); color: #fff; }
.p-pager__item .dots { background: none; }
.p-archive__empty { font-size: 14px; line-height: 2; }

/* ---------- Footer ---------- */

.l-footer { margin-top: 150px; }
.p-footer { background: var(--jc-pale); }
.p-footer__inner { padding: 75px 0; }
.p-footer__title { font-size: 36px; font-weight: 300; line-height: 1.2; margin-bottom: 20px; }
.p-footer__desc { font-size: 14px; line-height: 2; margin-bottom: 20px; }
.p-social { display: flex; gap: 14px; }
.p-social a { display: block; color: var(--jc-text); font-size: 15px; line-height: 1; }
.p-social a:hover { color: #006689; }
.p-footer-nav { margin-top: 30px; }
.p-footer-nav__list { display: flex; flex-wrap: wrap; gap: 10px 30px; font-size: 14px; }
.p-footer-nav__list a:hover { color: #006689; }
.p-copyright {
	display: flex; align-items: center; justify-content: center;
	height: 58px; border-top: 1px solid var(--jc-line);
	font-size: 12px; line-height: 1.5;
}
.p-pagetop {
	position: fixed; right: 0; bottom: 0; z-index: 90;
	display: flex; align-items: center; justify-content: center;
	width: 58px; height: 58px;
	background: #000; color: #fff;
	font-size: 18px;
	opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, background-color .2s;
}
.p-pagetop.is-visible { opacity: 1; visibility: visible; }
.p-pagetop:hover { background: var(--jc-primary-hover); color: #fff; }

.p-404 .c-button { margin-top: 10px; }

/* ---------- Tablet / mobile (below 992px) ---------- */

@media (max-width: 991px) {
	:root { --jc-bar: 59px; --jc-gap: 29px; }

	.u-hidden-sm { display: none !important; }
	.u-visible-sm { display: block !important; }

	.p-header__top { display: none; }
	.p-header__bottom { display: block; border-bottom: 1px solid var(--jc-line); }
	.p-header__bottom .l-inner { padding: 15px 0; }

	.has-adminbar.is-fixed .p-header__bar { top: 46px; }

	.p-header__bar-inner { width: 100%; max-width: none; padding-left: 21px; }
	.p-logo { margin-right: auto; }
	.p-logo img { width: auto; max-width: 150px; max-height: 44px; }

	.p-menu-button {
		display: flex; align-items: center; justify-content: center;
		width: 69px; height: 100%;
		padding: 0; border: 0; border-left: 1px solid var(--jc-line);
		background: none; cursor: pointer; font-size: 20px;
	}
	.p-menu-button__close { display: none; }
	.is-menu-open .p-menu-button__open { display: none; }
	.is-menu-open .p-menu-button__close { display: inline-block; }

	.p-global-nav__container {
		position: absolute; top: 100%; left: 0; right: 0;
		display: none;
		max-height: calc(100vh - 120px); overflow-y: auto;
		background: var(--jc-glass);
		border-top: 1px solid var(--jc-line);
	}
	.is-menu-open .p-global-nav__container { display: block; }
	.p-global-nav { display: block; height: auto; }
	.p-global-nav > li > a {
		display: block; height: auto;
		padding: 13px 41px 13px 22px;
		font-size: 14px; line-height: 1.4; text-align: left; white-space: normal;
	}
	.p-global-nav > li > a::after { display: none; }
	.p-global-nav .sub-menu { position: static; visibility: visible; opacity: 1; background: none; }
	.p-global-nav .sub-menu a { padding: 10px 41px 10px 40px; }

	.p-hero__dots { bottom: 12px; }
	.p-hero__dot { width: 11px; height: 11px; margin-left: 8px; }

	.p-front { padding-top: var(--jc-gap); }
	.p-boxes { grid-template-columns: 1fr; gap: 29px; }
	.p-block__header { display: block; margin-bottom: 29px; }
	.p-block__title { font-size: 26px; margin: 0; }
	.p-block__desc { margin-top: 10px; }
	.p-block__footer .c-button { width: 200px; height: 45px; }
	.p-cards { grid-template-columns: 1fr; gap: 29px; }

	.p-entry__body img.jcsponser { width: 98%; margin-right: 0; }
	.p-entry__body img.jcsponser_s { width: 48%; margin-right: 2%; }

	.p-page-header .l-inner { height: 50px; }
	.p-page-header__title { font-size: 20px; }
	.p-breadcrumb { margin-bottom: 30px; }
	.p-breadcrumb__inner { min-height: 40px; }
	.p-breadcrumb__item { font-size: 12px; }

	.p-entry__inner { padding: 25px 20px; }
	.p-entry__title { font-size: 20px; margin-bottom: 25px; }
	.p-entry-nav { display: block; }
	.p-entry-nav__item { min-height: 0; }
	.p-entry-nav__item + .p-entry-nav__item { border-left: 0; border-top: 1px solid var(--jc-line); }
	.p-entry-nav__item a { padding: 20px; gap: 15px; }
	.p-entry__body .alignleft, .p-entry__body .alignright { float: none; margin: 0 0 20px; }

	.l-footer { margin-top: 80px; }
	.p-footer__inner { padding: 30px 0 60px; }
	.p-footer__title { font-size: 26px; }
	.p-pagetop { width: 50px; height: 50px; }
	.p-copyright { height: auto; padding: 18px 60px 18px 15px; font-size: 11px; text-align: center; }
}

@media (min-width: 783px) and (max-width: 991px) {
	.has-adminbar.is-fixed .p-header__bar { top: 32px; }
}
@media (max-width: 600px) {
	.has-adminbar.is-fixed .p-header__bar { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.p-hero__slide, .c-zoom img { transition: none; }
}

@media print {
	.p-header__bar, .p-pagetop, .p-hero__dots { position: static !important; }
}

/* Wide tables scroll sideways on small screens */
@media (max-width: 767px) {
	.p-entry__body .s_table { overflow: auto; white-space: nowrap; margin-bottom: 2em; }
	.p-entry__body .s_table table { margin-bottom: 0; }
}
