/*
Theme Name: CAPSOR Corporate
Theme URI: https://capsor.com
Author: Capsor Inc.
Description: 株式会社キャプサー コーポレートサイト用テーマ（フルスクラッチ）
Version: 0.1.21
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: capsor-corporate
*/

:root {
	--color-text: #222;
	--color-bg: #fff;
	--color-primary: #1e73be;
	--color-accent: #f39c12;
	--font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
	--max-width: 1200px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	background: var(--color-bg);
	line-height: 1.7;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--color-primary);
}

.container {
	max-width: var(--max-width);
	margin-inline: auto;
	padding-inline: 20px;
}

/* ===== Header ===== */

.site-header {
	border-bottom: 1px solid #eee;
	background: var(--color-bg);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 70px;
}

.site-branding {
	margin: 0;
}

.site-branding a {
	display: block;
}

.site-branding__logo {
	display: block;
	height: 40px;
	width: auto;
}

/* ハンバーガーメニュー（モバイルのみ表示） */

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
}

.nav-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-text);
}

/* グローバルナビ */

.site-nav__list {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list > li {
	position: relative;
}

.site-nav__list > li > a {
	display: block;
	padding: 24px 18px;
	color: var(--color-text);
	text-decoration: none;
	white-space: nowrap;
}

.site-nav__list > li > a:hover,
.site-nav__list > li > a:focus {
	color: var(--color-primary);
}

/* サブメニュー（ホバーで下に浮かぶ） */

.site-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 10;
	min-width: 220px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: #fff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
	border-radius: 0 0 4px 4px;

	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.site-nav__list li:hover > .sub-menu,
.site-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.site-nav__list .sub-menu a {
	display: block;
	padding: 10px 20px;
	color: var(--color-text);
	text-decoration: none;
	font-size: 0.9rem;
}

.site-nav__list .sub-menu a:hover,
.site-nav__list .sub-menu a:focus {
	background: #f5f5f5;
	color: var(--color-primary);
}

/* ===== Footer ===== */

.site-footer {
	margin-top: 40px;
	padding: 40px 0 24px;
	background: #2b2b2b;
	color: #ccc;
}

.site-footer a {
	color: #ccc;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px;
	margin-bottom: 24px;
}

.footer-widgets .widget-title {
	font-size: 0.95rem;
	color: #fff;
	margin: 0 0 12px;
}

.footer-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	border-top: 1px solid #444;
	padding-top: 20px;
}

.site-footer__copyright {
	margin: 0;
	font-size: 0.8rem;
	color: #999;
}

/* ===== Front page ===== */

.hero-slider {
	position: relative;
	overflow: hidden;
	transform: translateZ(0);
}

.hero-slider__track {
	position: relative;
	height: 600px;
}

.hero-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	background: linear-gradient(135deg, var(--color-primary), #123a5f);
	background-size: cover;
	background-position: center;
	color: #fff;
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

a.hero-slide:hover .hero-slide__title {
	text-decoration: underline;
}

.hero-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.6s ease, visibility 0s linear;
}

/* 背景に実画像が入っている場合、左側にテキスト用の暗いグラデーションを重ねて可読性を確保する */
.hero-slide[style*="background-image"]::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(10, 20, 40, 0.75) 0%, rgba(10, 20, 40, 0.35) 55%, rgba(10, 20, 40, 0.05) 100%);
}

.hero-slide__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 640px;
	margin-left: 0;
	margin-right: 0;
	padding-left: 60px;
}

.hero-slide__eyebrow {
	margin: 0 0 8px;
	font-size: 1rem;
	opacity: 0.85;
}

.hero-slide__title {
	margin: 0;
	font-size: 2rem;
}

.hero-slide__sub {
	margin: 12px 0 0;
	font-size: 1.1rem;
	opacity: 0.9;
}

.hero-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	display: flex;
	justify-content: center;
	gap: 10px;
}

.hero-slider__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
}

.hero-slider__dot.is-active {
	background: #fff;
}

.home-section {
	padding: 56px 0;
}

/* トップページ最後のセクション（製品・サービス情報）はフッターと直接隣接するため、
   カード下の余白（padding-bottom）を除いてフッターとの間の隙間を詰める */
.home-product {
	padding-bottom: 0;
}

.home-section__title {
	position: relative;
	margin: 0 0 40px;
	padding-bottom: 16px;
	font-size: 1.4rem;
	text-align: center;
}

.home-section__title::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 40px;
	height: 3px;
	background: var(--color-primary);
}

/* 事業内容・製品/サービスの縦積みフィーチャーブロック（ヒーロー風、背景画像は任意） */

.feature-list {
	display: flex;
	flex-direction: column;
}

.feature-block {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 600px;
	padding: 40px 0;
	background-size: cover;
	background-position: center;
	color: #fff;
	text-decoration: none;

	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.feature-block.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.feature-block[style*="background-image"]::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(10, 20, 40, 0.85) 0%, rgba(10, 20, 40, 0.5) 55%, rgba(10, 20, 40, 0.25) 100%);
}

.feature-block__inner {
	position: relative;
	z-index: 1;
	max-width: 640px;
	margin-left: 0;
	margin-right: 0;
	padding-left: 60px;
}

.feature-block__title {
	margin: 0 0 14px;
	font-size: 1.6rem;
}

.feature-block__desc {
	margin: 0;
	font-size: 1rem;
	line-height: 1.8;
	opacity: 0.92;
}

.feature-block__cta {
	display: inline-block;
	margin-top: 18px;
	font-size: 0.9rem;
	font-weight: bold;
	letter-spacing: 0.02em;
}

.feature-block:hover .feature-block__cta {
	text-decoration: underline;
}

/* background-image（longhand）を使い、.feature-block本体で指定した background-size/position を上書きしないようにする */
.feature-block--hue-1 { background-image: linear-gradient(135deg, #1e73be, #123a5f); }
.feature-block--hue-2 { background-image: linear-gradient(135deg, #2f9e6f, #0f4a35); }
.feature-block--hue-3 { background-image: linear-gradient(135deg, #b0562c, #5c2a12); }
.feature-block--hue-4 { background-image: linear-gradient(135deg, #6b4fbb, #2c1f5c); }
.feature-block--hue-5 { background-image: linear-gradient(135deg, #c0392b, #5c1710); }
.feature-block--hue-6 { background-image: linear-gradient(135deg, #1f8a8c, #0d3f40); }

@media (prefers-reduced-motion: reduce) {
	.feature-block {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

.home-news {
	background: #f8f8f8;
}

.news-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.news-list__item {
	display: flex;
	gap: 20px;
	padding: 14px 0;
	border-bottom: 1px solid #e5e5e5;
}

.news-list__date {
	flex: none;
	color: #888;
	font-size: 0.9rem;
}

@media (max-width: 782px) {
	.feature-block {
		min-height: 320px;
		padding: 28px 0;
		background-position: right center;
		background-size: cover;
	}

	.feature-block__title {
		font-size: 1.3rem;
	}

	.feature-block__desc {
		font-size: 0.9rem;
	}

	.feature-block__inner,
	.hero-slide__inner {
		padding-left: 20px;
	}

	.hero-slide {
		background-position: right center;
	}

	.hero-slider__track {
		height: 320px;
	}

	.hero-slide__title {
		font-size: 1.5rem;
	}

	.hero-slide__sub {
		font-size: 1rem;
	}

	.site-header__inner {
		flex-wrap: wrap;
		padding-block: 12px;
	}

	.nav-toggle {
		display: flex;
	}

	.site-nav {
		display: none;
		width: 100%;
		order: 3;
		margin-top: 12px;
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav__list {
		flex-direction: column;
	}

	.site-nav__list > li > a {
		display: block;
		padding: 12px;
	}

	/* 子項目を持つ親メニューはタップしても遷移しない見出し扱い（nav.jsでクリックを無効化） */
	.site-nav__list > .menu-item-has-children > a {
		cursor: default;
	}

	.site-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		width: 100%;
		border-left: 2px solid #eee;
		margin-left: 12px;
	}
}

/* ===== 固定ページ本文 ===== */

.page-content {
	padding: 48px 20px;
}

.page-content__title {
	margin: 0 0 28px;
	font-size: 1.6rem;
	border-left: 4px solid var(--color-primary);
	padding-left: 14px;
}

.entry-content {
	max-width: 780px;
	font-size: 1rem;
	line-height: 1.9;
	color: var(--color-text);
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2 {
	margin: 48px 0 20px;
	padding-bottom: 12px;
	font-size: 1.5rem;
	border-bottom: 2px solid var(--color-primary);
}

.entry-content h3 {
	margin: 40px 0 16px;
	padding-left: 14px;
	font-size: 1.25rem;
	border-left: 4px solid var(--color-primary);
}

.entry-content h4 {
	margin: 32px 0 12px;
	font-size: 1.1rem;
	color: var(--color-primary);
}

.entry-content h5,
.entry-content h6 {
	margin: 24px 0 8px;
	font-size: 1rem;
	font-weight: bold;
}

.entry-content p {
	margin: 0 0 20px;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.entry-content a:hover {
	text-decoration: none;
}

.entry-content strong {
	font-weight: bold;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 20px;
	padding-left: 1.4em;
}

.entry-content li {
	margin-bottom: 6px;
}

.entry-content li > ul,
.entry-content li > ol {
	margin-top: 6px;
	margin-bottom: 0;
}

.entry-content blockquote {
	margin: 0 0 20px;
	padding: 4px 20px;
	border-left: 4px solid #ddd;
	color: #555;
	font-style: italic;
}

.entry-content hr {
	margin: 40px 0;
	border: none;
	border-top: 1px solid #e5e5e5;
}

.entry-content figure {
	margin: 0 0 24px;
}

.entry-content img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0;
}

.entry-content figcaption {
	margin-top: 8px;
	font-size: 0.85rem;
	color: #888;
	text-align: center;
}

.entry-content dl {
	margin: 0 0 20px;
	border-top: 1px solid #e5e5e5;
}

.entry-content dt {
	padding: 14px 0 4px;
	font-weight: bold;
	color: var(--color-primary);
}

.entry-content dd {
	margin: 0 0 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid #e5e5e5;
}

/* メディア掲載履歴などの「画像＋説明文」一覧 */
.entry-content .media-list {
	list-style: none;
	padding-left: 0;
}

.entry-content .media-list li {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px 0;
	border-bottom: 1px solid #e5e5e5;
}

.entry-content .media-list figure {
	flex: none;
	width: 160px;
	margin: 0;
}

.entry-content .media-list p {
	margin: 0;
}

@media (max-width: 782px) {
	.entry-content .media-list li {
		flex-direction: column;
		align-items: flex-start;
	}

	.entry-content .media-list figure {
		width: 100%;
		max-width: 240px;
	}
}

.entry-content table {
	width: 100%;
	margin: 0 0 24px;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
	padding: 10px 14px;
	border: 1px solid #e5e5e5;
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: #f8f8f8;
	font-weight: bold;
}

@media (max-width: 782px) {
	.entry-content table,
	.entry-content thead,
	.entry-content tbody,
	.entry-content tr {
		display: block;
	}

	.entry-content th,
	.entry-content td {
		display: block;
		width: auto;
	}

	.entry-content th {
		border-bottom: none;
	}

	.entry-content td {
		border-top: none;
	}
}

/* ===== 個別記事（single.php） ===== */

.entry-meta {
	margin: 0 0 8px;
	color: #888;
	font-size: 0.9rem;
}

.entry-meta__cat {
	margin-left: 12px;
}

.entry-meta__cat a {
	color: #888;
}

.post-nav {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	max-width: 780px;
	margin-top: 48px;
	padding-top: 20px;
	border-top: 1px solid #e5e5e5;
}

.post-nav a {
	text-decoration: none;
}

.post-nav a:hover {
	text-decoration: underline;
}

.post-nav__next {
	text-align: right;
}

/* ===== 投稿一覧（archive.php） ===== */

.post-list {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
	max-width: 780px;
}

.post-list__item {
	display: flex;
	gap: 20px;
	padding: 14px 0;
	border-bottom: 1px solid #e5e5e5;
}

.post-list__date {
	flex: none;
	color: #888;
	font-size: 0.9rem;
}

.pagination {
	display: flex;
	gap: 8px;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

/* ===== お問い合わせフォーム（MW WP Form） ===== */

.mw_wp_form .form th em span {
	color: #cf2e2e;
}
