/*
Theme Name: やすらぎ住まいの電気工事
Theme URI: https://example.com/themes/yasuragi-denki
Author: ウォズ
Author URI: https://example.com
Description: 高齢者バリアフリー電気工事専門の個人事業主〜小規模店向けLPテーマ。顧客は要介護高齢者本人、または遠方の家族(発注者)を想定。「タイムライン軸+分割ヒーロー型」の構造で、動線順の工事メニュー、Before/Afterスライダー、常時表示の相談バーを軸に構成する。コンテンツ差し替えのみでLPとして運用できる。
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yasuragi-denki
*/

/* ==========================================================================
   0. Reset / Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--color-white: #ffffff;
	--color-ivory: #faf6ef;
	--color-bg: #f4ecdd;
	--color-bg-alt: #ede0c8;
	--color-wood: #8a6a4b;
	--color-wood-dark: #6b4f36;
	--color-wood-light: #f1e4d2;
	--color-green: #4f6952;
	--color-green-dark: #3a4f3d;
	--color-green-light: #e4ebe1;
	--color-mustard: #c99a3b;
	--color-mustard-dark: #a97e2c;
	--color-text: #3f342a;
	--color-text-light: #756554;
	--color-border: #e3d5bd;
	--font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
	--container-width: 1120px;
	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 6px 20px rgba(107, 79, 54, 0.12);
	--header-height: 64px;
	--contact-bar-height: 64px;
}

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

body {
	margin: 0;
	font-family: var(--font-family);
	color: var(--color-text);
	background: var(--color-ivory);
	line-height: 1.9;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
	padding-top: var(--header-height);
	padding-bottom: var(--contact-bar-height);
}

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

a {
	color: var(--color-wood-dark);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

table {
	width: 100%;
	border-collapse: collapse;
}

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

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--color-wood);
	color: #fff;
	padding: 10px 16px;
	z-index: 10000;
	border-radius: 0 0 8px 0;
}

.skip-link:focus {
	top: 0;
}

/* ==========================================================================
   1. Buttons
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 1rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	text-decoration: none;
}

.btn:hover {
	text-decoration: none;
	transform: translateY(-2px);
}

.btn-primary {
	background: var(--color-wood);
	color: #fff;
	box-shadow: var(--shadow);
}

.btn-primary:hover {
	background: var(--color-wood-dark);
}

.btn-outline {
	background: var(--color-white);
	color: var(--color-wood-dark);
	border-color: var(--color-wood);
}

.btn-outline:hover {
	background: var(--color-wood-light);
}

.btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

/* ==========================================================================
   2. Header(シンプル・最小限。相談導線は下部固定バーに集約)
   ========================================================================== */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	height: var(--header-height);
	display: flex;
	align-items: center;
	background: rgba(250, 246, 239, 0.96);
	backdrop-filter: blur(4px);
	border-bottom: 1px solid var(--color-border);
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 12px;
}

.site-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
}

.site-title a {
	color: var(--color-text);
}

.site-description {
	display: none;
}

.menu-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: transparent;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	cursor: pointer;
}

.menu-toggle .bar {
	display: block;
	height: 2px;
	width: 20px;
	margin: 0 auto;
	background: var(--color-text);
}

.primary-navigation {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--color-white);
	border-bottom: 1px solid var(--color-border);
}

.primary-navigation.is-open {
	display: block;
}

.primary-navigation ul {
	display: flex;
	flex-direction: column;
	padding: 10px 20px 16px;
}

.primary-navigation a {
	display: block;
	padding: 10px 0;
	color: var(--color-text);
	font-weight: 600;
	border-bottom: 1px solid var(--color-border);
}

/* ==========================================================================
   3. 常時表示の相談バー(画面下部固定)
   ========================================================================== */
.contact-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	height: var(--contact-bar-height);
	background: var(--color-green-dark);
	display: flex;
	align-items: stretch;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}

.contact-bar a {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
}

.contact-bar a:hover {
	text-decoration: none;
	background: rgba(255, 255, 255, 0.08);
}

.contact-bar .cb-phone {
	background: var(--color-wood);
}

.contact-bar .cb-phone strong {
	font-size: 1.15rem;
}

.contact-bar .cb-icon {
	font-size: 1.2rem;
}

/* ==========================================================================
   4. Section common
   ========================================================================== */
.section {
	padding: 72px 0;
}

.section--alt {
	background: var(--color-bg);
}

.section-head {
	max-width: 720px;
	margin: 0 0 40px;
}

.section-head.is-centered {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.section-eyebrow {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--color-green-dark);
	background: var(--color-green-light);
	padding: 5px 16px;
	border-radius: 999px;
	margin-bottom: 14px;
}

.section-title {
	font-size: 1.7rem;
	margin: 0 0 14px;
	font-weight: 700;
	line-height: 1.5;
}

.section-lead {
	color: var(--color-text-light);
	margin: 0;
	font-size: 1.02rem;
}

/* ==========================================================================
   5. ヒーロー(左右分割型)
   ========================================================================== */
.hero {
	background: var(--color-white);
}

.hero-split {
	display: grid;
	grid-template-columns: 1fr;
}

.hero-text {
	padding: 56px 20px;
	background: var(--color-wood-light);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hero-text .container {
	padding: 0;
	max-width: 480px;
	margin: 0;
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--color-white);
	color: var(--color-wood-dark);
	font-weight: 700;
	font-size: 0.88rem;
	padding: 8px 18px;
	border-radius: 999px;
	box-shadow: var(--shadow);
	margin-bottom: 22px;
}

.hero-question {
	font-size: 1.55rem;
	line-height: 1.6;
	margin: 0 0 12px;
	font-weight: 700;
}

.hero-question .accent {
	color: var(--color-mustard-dark);
	display: block;
	font-size: 1.9rem;
	margin-top: 6px;
}

.hero-subtitle {
	color: var(--color-text-light);
	margin: 20px 0 28px;
}

.hero-photo {
	aspect-ratio: 1 / 1;
	background: var(--color-bg-alt);
	border: 3px dashed var(--color-wood-light);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
	color: var(--color-text-light);
	font-size: 0.85rem;
}

/* ==========================================================================
   6. 工事メニュー(水平タイムライン+アコーディオン)
   ========================================================================== */
.timeline {
	display: flex;
	flex-direction: column;
	gap: 0;
	counter-reset: tl;
}

.timeline-item {
	border-bottom: 1px solid var(--color-border);
	background: none;
	padding: 0;
}

.timeline-item:first-child {
	border-top: 1px solid var(--color-border);
}

.timeline-item summary {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 22px 4px;
	cursor: pointer;
	list-style: none;
	color: var(--color-text);
}

.timeline-item summary::-webkit-details-marker {
	display: none;
}

.timeline-item summary::before {
	content: "";
}

.timeline-item .tl-num {
	counter-increment: tl;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--color-mustard);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.timeline-item .tl-num::before {
	content: counter(tl);
}

.timeline-item .tl-location {
	flex: 0 0 auto;
	font-size: 0.82rem;
	color: var(--color-green-dark);
	background: var(--color-green-light);
	padding: 4px 12px;
	border-radius: 999px;
	font-weight: 700;
}

.timeline-item .tl-title {
	flex: 1;
	font-size: 1.08rem;
	font-weight: 700;
}

.timeline-item .tl-arrow {
	flex: 0 0 auto;
	transition: transform 0.2s ease;
	color: var(--color-wood);
}

.timeline-item[open] .tl-arrow {
	transform: rotate(180deg);
}

.timeline-item p {
	padding: 0 4px 26px 62px;
	margin: 0;
	color: var(--color-text-light);
}

/* ==========================================================================
   7. 制度案内(比較表)
   ========================================================================== */
.page-content :where(table) {
	background: var(--color-white);
	border-radius: var(--radius-sm);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.page-content :where(th, td) {
	padding: 14px 16px;
	border: 1px solid var(--color-border);
	text-align: left;
	vertical-align: top;
}

.page-content :where(thead th) {
	background: var(--color-wood);
	color: #fff;
}

.page-content :where(p) {
	margin: 0 0 20px;
	color: var(--color-text);
}

.page-content :where(em) {
	color: var(--color-text-light);
	font-size: 0.9rem;
}

/* ==========================================================================
   8. 施工事例(Before/Afterスライダー、縦積み)
   ========================================================================== */
.ba-list {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.ba-item-meta {
	margin-bottom: 14px;
}

.ba-item-tag {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--color-green-dark);
	background: var(--color-green-light);
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 8px;
}

.ba-item-title {
	margin: 0 0 6px;
	font-size: 1.1rem;
}

.ba-item-desc {
	margin: 0 0 18px;
	color: var(--color-text-light);
}

.ba-slider {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	user-select: none;
}

.ba-slider-layer {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	text-align: center;
	padding: 20px;
}

.ba-slider-after {
	background: var(--color-green-light);
	color: var(--color-green-dark);
}

.ba-slider-before {
	background: var(--color-wood-light);
	color: var(--color-wood-dark);
	overflow: hidden;
	width: 50%;
	border-right: 3px solid #fff;
}

.ba-slider-before-inner {
	width: 100vw;
	max-width: calc(var(--container-width) - 40px);
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	position: absolute;
	left: 0;
	top: 0;
}

.ba-slider-label {
	position: absolute;
	top: 12px;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
}

.ba-slider-label.is-before {
	left: 12px;
}

.ba-slider-label.is-after {
	right: 12px;
}

.ba-slider-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}

.ba-slider-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 3px;
	background: #fff;
	pointer-events: none;
	transform: translateX(-50%);
}

.ba-slider-handle::after {
	content: "⇔";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 36px;
	height: 36px;
	background: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow);
	color: var(--color-wood-dark);
}

/* ==========================================================================
   9. 遠方家族向け相談窓口(独立セクション)
   ========================================================================== */
.family-section {
	background: var(--color-green-dark);
	color: #fff;
}

.family-section .section-title,
.family-section .section-lead {
	color: #fff;
}

.family-section .section-lead {
	color: rgba(255, 255, 255, 0.85);
}

.family-section .section-eyebrow {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

/* ==========================================================================
   10. Q&A(縦積みアコーディオン)
   ========================================================================== */
.page-content details {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	padding: 4px 22px;
	margin-bottom: 14px;
}

.page-content summary {
	cursor: pointer;
	font-weight: 700;
	padding: 16px 0;
	color: var(--color-text);
	list-style: none;
}

.page-content summary::-webkit-details-marker {
	display: none;
}

.page-content summary::before {
	content: "Q. ";
	color: var(--color-wood-dark);
}

.page-content details p {
	margin: 0 0 18px;
	color: var(--color-text-light);
}

.page-content details p::before {
	content: "A. ";
	font-weight: 700;
	color: var(--color-green-dark);
}

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer {
	background: var(--color-bg-alt);
	color: var(--color-text);
}

.footer-main {
	padding: 40px 0;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
}

.footer-widget-title {
	font-size: 0.92rem;
	margin: 0 0 10px;
	color: var(--color-wood-dark);
}

.footer-bottom {
	border-top: 1px solid var(--color-border);
	padding: 14px 0;
	font-size: 0.78rem;
	color: var(--color-text-light);
	text-align: center;
}

/* ==========================================================================
   12. index.php(投稿一覧・アーカイブ・検索)
   ========================================================================== */
.site-main {
	padding: 40px 0 64px;
}

.page-header {
	max-width: var(--container-width);
	margin: 0 auto 24px;
	padding: 0 20px;
}

.page-title {
	font-size: 1.4rem;
}

.entry-card {
	max-width: var(--container-width);
	margin: 0 auto 24px;
	padding: 0 20px;
}

.entry-title a {
	color: var(--color-text);
}

.entry-meta {
	color: var(--color-text-light);
	font-size: 0.85rem;
	margin: 4px 0;
}

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

/* ==========================================================================
   13. Responsive
   ========================================================================== */
@media (min-width: 900px) {
	.menu-toggle {
		display: none;
	}

	.primary-navigation {
		display: block;
		position: static;
		background: transparent;
		border-bottom: none;
	}

	.primary-navigation ul {
		flex-direction: row;
		align-items: center;
		padding: 0;
		gap: 4px;
	}

	.primary-navigation a {
		padding: 0 14px;
		border-bottom: none;
		font-size: 0.92rem;
	}

	.hero-split {
		grid-template-columns: 1fr 1fr;
		min-height: 520px;
	}

	.hero-photo {
		aspect-ratio: auto;
		height: 100%;
	}

	.hero-question {
		font-size: 1.9rem;
	}

	.hero-question .accent {
		font-size: 2.3rem;
	}

	.footer-grid {
		grid-template-columns: 2fr 1fr 1fr;
	}
}

@media (min-width: 1200px) {
	body {
		font-size: 18px;
	}
}
