/*
Theme Name: Kinds
Theme URI: https://benriya-kinds.com/
Author: 調転社
Description: 便利屋キンズ専用テーマ。Lightning + VK プラグイン構成からの置き換え。
Version: 0.1.0
Requires PHP: 8.1
Text Domain: kinds
*/

/* =========================================================
   色・寸法はすべて CSS 変数で持つ。値はカスタマイザー「色」で変更でき、
   inc/front/enqueue.php が :root を上書きする。ここに色を直書きしない。
   ========================================================= */
:root {
	--primary: #00cc00;         /* メインカラー(見出し線・ボタン・フッター線) */
	--primary-dark: #00a300;    /* 濃いメインカラー(アイコン丸・ボタン枠) */
	--primary-vivid: #00e000;   /* ボタンのホバー */
	--on-primary: #ffffff;      /* メインカラー地に乗る文字色 */
	--ink: #333333;             /* 本文の文字色 */
	--ink-light: #666666;       /* 日付など薄い文字 */
	--paper: #ffffff;           /* 背景 */
	--paper-accent: #f5f5f5;    /* お問い合わせ枠などの薄い背景 */
	--border: rgba(0, 0, 0, 0.2);
	--hr: rgba(0, 0, 0, 0.08);
	--link: #666666;
	--link-hover: #1e73be;
	--container: 1140px;
	--content-narrow: 960px;
	--gutter: 15px;
	--font: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

/* ---------- ベース ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.8;
	color: var(--ink);
	background: var(--paper);
	word-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.8em; line-height: 1.5; font-weight: 700; }
p { margin: 0 0 1.5em; }
table { border-collapse: collapse; width: 100%; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: var(--on-primary); padding: 0.5em 1em; z-index: 2000; }
.skip-link:focus { left: 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- ヘッダー ---------- */
.site-header { background: var(--paper); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); position: relative; z-index: 1000; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.site-logo { margin: 0; font-size: 1.5rem; line-height: 1.2; white-space: nowrap; }
.site-logo a { color: var(--ink); text-decoration: none; display: inline-block; padding: 8px 0; }
.site-logo img { display: block; max-height: 60px; width: auto; }
.global-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.global-nav li a { display: block; padding: 14px 1.2em; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 0.95rem; border-bottom: 2px solid transparent; }
.global-nav li a:hover, .global-nav li.current-menu-item > a { color: var(--primary-dark); border-bottom-color: var(--primary); }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 4px; padding: 6px 8px; cursor: pointer; color: var(--ink); }
.menu-toggle svg { width: 24px; height: 24px; display: block; }
@media (max-width: 991px) {
	.site-header .container { min-height: 56px; }
	.site-logo img { max-height: 44px; }
	.menu-toggle { display: block; }
	.global-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-top: 1px solid var(--hr); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); }
	.global-nav.is-open { display: block; }
	.global-nav ul { flex-direction: column; }
	.global-nav li a { border-bottom: 1px solid var(--hr); padding: 12px var(--gutter); }
}

/* ---------- ヒーロー(トップのファーストビュー) ---------- */
.hero { position: relative; overflow: hidden; background: var(--paper-accent); }
.hero-image { display: block; width: 100%; height: auto; }
.hero-text { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); }
.hero-title { font-size: 2.2rem; margin-bottom: 0.3em; color: var(--ink); text-shadow: 0 0 2px #fff; }
.hero-caption { font-size: 1.1rem; margin-bottom: 1em; color: var(--ink); text-shadow: 0 0 2px #fff; }
.hero-btn { display: inline-block; padding: 0.6em 1.6em; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 700; background: transparent; box-shadow: 0 0 2px #fff; transition: 0.3s; }
.hero-btn:hover { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
@media (max-width: 767px) {
	.hero-title { font-size: 1.3rem; }
	.hero-caption { font-size: 0.9rem; margin-bottom: 0.6em; }
	.hero-btn { padding: 0.4em 1em; font-size: 0.9rem; }
}

/* ---------- ページ見出し帯(固定ページ) ---------- */
.page-header { background: var(--primary); color: var(--on-primary); padding: 1.2em 0; }
.page-header + .site-body { padding-top: 2.5rem; }
.breadcrumb { font-size: 12px; background: var(--paper-accent); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0.5em 0; display: flex; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "/"; margin: 0 0.6em; color: var(--ink-light); }
.breadcrumb a { color: var(--ink); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-dark); }
.page-header-title { margin: 0; font-size: 1.5rem; color: var(--on-primary); }

/* ---------- レイアウト ---------- */
.site-body { padding: 2.5rem 0 3rem; }
.home .site-body { padding-top: 2rem; }
.layout { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.layout > .main-section { flex: 1 1 0; min-width: 0; }
.layout > .sub-section { flex: 0 0 300px; }
.layout.no-sidebar > .main-section { max-width: 100%; }
.layout.narrow > .main-section { max-width: var(--content-narrow); margin: 0 auto; }
@media (max-width: 991px) {
	.layout { display: block; }
	.layout > .sub-section { margin-top: 3rem; }
}

/* ---------- 本文(ブロック) ---------- */
.entry-body > * { margin-bottom: 1.5rem; }
.entry-body h2 { font-size: 1.5rem; padding: 0.5em 0; border-top: 2px solid var(--primary); border-bottom: 1px solid var(--hr); margin-top: 2em; }
.entry-body h3 { font-size: 1.25rem; position: relative; padding: 0 0 0.5em; border-bottom: 1px solid var(--border); margin-top: 1.8em; }
.entry-body h3::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 30%; border-bottom: 1px solid var(--primary); }
.entry-body h4 { font-size: 1.1rem; margin-top: 1.5em; }
.entry-body h5 { font-size: 1.05rem; text-align: center; margin-top: 0.8em; }
.entry-body > h2:first-child, .entry-body > h3:first-child { margin-top: 0; }
.entry-body table td, .entry-body table th { border: 1px solid var(--border); padding: 0.6em 0.8em; }
.entry-body .wp-block-image.border img { border: 1px solid var(--hr); }
.entry-body .wp-block-image { margin-left: 0; margin-right: 0; }
.entry-body .wp-block-columns { gap: 2rem; }
.entry-body .wp-block-column > * { margin-bottom: 1rem; }
.entry-body .wp-block-column .wp-block-image { text-align: center; }
.entry-body iframe { max-width: 100%; }
.entry-body .wp-block-cover.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; max-width: 100vw; }
.entry-body .wp-block-cover .wp-block-cover__inner-container { max-width: var(--container); padding: 0 var(--gutter); }
.entry-body .wp-block-gallery img { border-radius: 4px; }
.entry-body .wp-block-table.aligncenter, .entry-body table.has-fixed-layout { table-layout: fixed; }

/* 標準ボタン */
.wp-block-button__link { font-weight: 700; }
.wp-block-button.is-style-outline .wp-block-button__link { border: 1px solid var(--primary-dark); color: var(--primary-dark); background: transparent; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--primary-dark); color: var(--on-primary); }
.wp-block-button .wp-block-button__link.no-border-radius, .wp-block-button.no-border-radius .wp-block-button__link { border-radius: 0; }
.wp-block-button.kinds-btn-lg .wp-block-button__link { font-size: 1.15rem; padding: 0.8em 2.4em; }
.wp-block-button.kinds-btn-primary .wp-block-button__link { background: var(--primary); color: var(--on-primary); border-color: var(--primary-dark); }

/* 共通ボタン(テンプレートから出す) */
.btn { display: inline-block; padding: 0.5em 1.2em; border: 1px solid transparent; border-radius: 4px; text-decoration: none; font-weight: 700; line-height: 1.5; cursor: pointer; transition: 0.2s; }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary-dark); }
.btn-primary:hover { background: var(--primary-vivid); color: var(--on-primary); border-color: var(--primary); }
.btn-sm { font-size: 0.85rem; padding: 0.3em 0.9em; }

/* ---------- お問い合わせセクション(kinds/contact-section ブロック) ---------- */
.kinds-contact { background: var(--paper-accent); padding: 1.6rem 1.5rem; text-align: center; margin: 2rem 0; border-radius: 4px; }
.kinds-contact-catch, .kinds-contact-time { display: block; font-size: 14px; line-height: 1.4; }
.kinds-contact-tel { display: block; padding: 6px 0; font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--primary-dark); text-decoration: none; }
.kinds-contact-tel svg { width: 0.9em; height: 0.9em; vertical-align: -0.08em; margin-right: 0.3rem; }
.kinds-contact-txt { margin: 0 0 1rem; }
.kinds-contact-btn { display: block; max-width: 520px; margin: 0 auto; padding: 0.7rem 1.5rem 0.8rem; background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary-dark); border-radius: 4px; text-decoration: none; line-height: 1.3; transition: 0.2s; }
.kinds-contact-btn:hover { background: var(--primary-vivid); color: var(--on-primary); }
.kinds-contact-btn-txt { display: block; font-size: 1.15rem; font-weight: 700; }
.kinds-contact-btn-txt svg { width: 1em; height: 1em; vertical-align: -0.12em; margin: 0 0.2em; }
.kinds-contact-btn-sub { display: block; font-size: 12px; margin-top: 0.25rem; }
@media (min-width: 768px) {
	.kinds-contact.is-horizontal { display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 1.5rem; }
	.kinds-contact.is-horizontal .kinds-contact-txt { margin: 0; }
	.kinds-contact.is-horizontal .kinds-contact-btn { margin: 0; flex: 0 0 auto; min-width: 320px; text-align: center; }
}

/* ---------- 特徴3つ(同期パターン「キンズの特徴」) ---------- */
.kinds-feature { text-align: center; }
.kinds-feature-icon { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; margin: 0 auto; border-radius: 50%; background: var(--primary-dark); color: var(--on-primary); }
.kinds-feature-icon svg { width: 36px; height: 36px; }
.entry-body .kinds-feature h3 { font-size: 21px; border: none; padding: 0; margin: 0.9em 0 0.6em; text-align: center; }
.entry-body .kinds-feature h3::after { content: none; }
.kinds-feature h3 a { color: inherit; text-decoration: none; }
.kinds-feature h3 a:hover { color: var(--primary-dark); }
.kinds-feature p { line-height: 1.8; margin-bottom: 0.5em; }

/* ---------- 枠付きボックス(core/group に kinds-box) ---------- */
.kinds-box { border: 2px solid var(--primary-dark); padding: 1.2em 1.5em 0.5em; }
.entry-body .kinds-box > h4 { border: none; margin: 0 0 0.6em; padding: 0; font-size: 1.15rem; color: var(--primary-dark); display: flex; align-items: center; gap: 0.4em; }
.entry-body .kinds-box > h4::before { content: ""; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'><path d='M48 0C21.5 0 0 21.5 0 48V464c0 26.5 21.5 48 48 48h96V432c0-26.5 21.5-48 48-48s48 21.5 48 48v80h96c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48H48zM64 240c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V240zm112-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V240c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V240zM80 96h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V112zM272 96h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'><path d='M48 0C21.5 0 0 21.5 0 48V464c0 26.5 21.5 48 48 48h96V432c0-26.5 21.5-48 48-48s48 21.5 48 48v80h96c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48H48zM64 240c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V240zm112-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V240c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V240zM80 96h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V112zM272 96h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16z'/></svg>") center / contain no-repeat; }

/* ---------- 記事(single) ---------- */
.entry-header { margin-bottom: 1.5rem; }
.entry-title { font-size: 1.6rem; margin-bottom: 0.4em; }
.entry-meta { font-size: 0.85rem; color: var(--ink-light); display: flex; flex-wrap: wrap; gap: 1em; }
.entry-meta svg { width: 1em; height: 1em; vertical-align: -0.15em; margin-right: 0.25em; }
.entry-footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--hr); font-size: 0.9rem; }
.entry-footer dl { display: flex; gap: 1em; margin: 0 0 0.5em; }
.entry-footer dt { font-weight: 700; flex: 0 0 auto; }
.entry-footer dd { margin: 0; }
.entry-footer dd a { display: inline-block; margin-right: 0.6em; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.post-nav a { display: block; border: 1px solid var(--hr); padding: 0.8em 1em; text-decoration: none; color: var(--ink); background: var(--paper); }
.post-nav a:hover { border-color: var(--primary); }
.post-nav-label { display: block; font-size: 0.75rem; color: var(--ink-light); }
.post-nav-next { grid-column: 2; text-align: right; }
@media (max-width: 767px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next { grid-column: auto; } }

/* ---------- 記事カード(一覧・関連・サイドバー) ---------- */
.post-list { display: flex; flex-direction: column; gap: 1.5rem; }
.post-card { display: flex; gap: 1.2rem; border-bottom: 1px solid var(--hr); padding-bottom: 1.5rem; }
.post-card-thumb { flex: 0 0 200px; position: relative; }
.post-card-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.post-card-term { position: absolute; left: 0; top: 0; font-size: 11px; line-height: 1; padding: 5px 8px; color: #fff; background: #999; }
.post-card-body { flex: 1 1 0; min-width: 0; }
.post-card-title { font-size: 1.05rem; margin: 0 0 0.4em; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a:hover { color: var(--primary-dark); }
.post-card-date { font-size: 0.8rem; color: var(--ink-light); margin-bottom: 0.5em; }
.post-card-date svg { width: 1em; height: 1em; vertical-align: -0.15em; margin-right: 0.25em; }
.post-card-excerpt { font-size: 0.9rem; margin-bottom: 0.6em; }
.post-card-more { text-align: right; }
@media (max-width: 575px) {
	.post-card { flex-direction: column; }
	.post-card-thumb { flex-basis: auto; }
}
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.post-grid .post-card { flex-direction: column; border: 1px solid var(--hr); border-bottom-width: 1px; padding: 0; }
.post-grid .post-card-thumb { flex-basis: auto; }
.post-grid .post-card-body { padding: 0.9rem 1rem 1rem; }
@media (max-width: 575px) { .post-grid { grid-template-columns: 1fr; } }
.related-title, .sub-section-title { font-size: 1.1rem; position: relative; padding: 0 0 0.5em; border-bottom: 1px solid var(--border); margin: 0 0 1.2rem; }
.related-title::after, .sub-section-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 30%; border-bottom: 1px solid var(--primary); }
.related { margin-top: 3rem; }
.sub-section .widget { margin-bottom: 2.5rem; }
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li { border-bottom: 1px solid var(--hr); padding: 0.5em 0; font-size: 0.95rem; }
.widget-list li a { text-decoration: none; color: var(--ink); }
.widget-list li a:hover { color: var(--primary-dark); }
.widget-posts .post-card { gap: 0.8rem; padding-bottom: 0.8rem; margin-bottom: 0.8rem; }
.widget-posts .post-card-thumb { flex-basis: 96px; }
.widget-posts .post-card-title { font-size: 0.9rem; }
.pagination { display: flex; justify-content: center; gap: 0.3em; margin-top: 2.5rem; }
.pagination .page-numbers { display: inline-block; min-width: 2.2em; padding: 0.4em 0.6em; text-align: center; border: 1px solid var(--hr); text-decoration: none; color: var(--ink); }
.pagination .page-numbers.current { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.archive-title { font-size: 1.4rem; margin-bottom: 1.5rem; padding-bottom: 0.4em; border-bottom: 2px solid var(--primary); }
.search-form { display: flex; gap: 0.4em; }
.search-form input[type="search"] { flex: 1 1 0; padding: 0.5em 0.8em; border: 1px solid var(--border); border-radius: 4px; font-size: 1rem; }
.content-none { padding: 2rem 0; }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--primary); font-size: 13px; margin-top: 2rem; }
.footer-main { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 3rem 0 1.5rem; }
.footer-title { font-size: 1rem; position: relative; padding: 0 0 0.5em; margin: 0 0 1em; border-bottom: 1px solid var(--border); }
.footer-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 30%; border-bottom: 1px solid var(--primary); }
.footer-company p { font-size: 14px; margin-bottom: 1em; }
.footer-sns { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.5em; }
.footer-sns a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-dark); color: var(--on-primary); }
.footer-sns svg { width: 18px; height: 18px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { border-bottom: 1px solid var(--hr); }
.footer-nav li a { display: block; padding: 0.55em 0; text-decoration: none; color: var(--ink); }
.footer-nav li a:hover { color: var(--primary-dark); }
.footer-copyright { text-align: center; padding: 1rem; font-size: 11px; }
.footer-copyright p { margin: 0.5rem; }
@media (max-width: 767px) { .footer-main { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; } }

/* ---------- ページトップへ ---------- */
.pagetop { position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary-dark); color: var(--on-primary); border: none; cursor: pointer; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 900; display: flex; align-items: center; justify-content: center; }
.pagetop.is-visible { opacity: 0.85; pointer-events: auto; }
.pagetop svg { width: 20px; height: 20px; }
@media (max-width: 767px) { .pagetop { display: none; } }

/* ---------- Contact Form 7 ---------- */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea { width: 100%; padding: 0.6em 0.8em; border: 1px solid var(--border); border-radius: 4px; font-size: 1rem; font-family: inherit; }
.wpcf7 input[type="submit"] { display: inline-block; padding: 0.7em 2.4em; background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary-dark); border-radius: 4px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--primary-vivid); }
