/*
Theme Name: Reform Child
Template: lightning
Theme URI: https://example.com/
Author: Your Company
Author URI: https://example.com/
Description: Lightning（G3）用の子テーマ。外壁塗装・屋根リフォーム会社向けに、施工事例／お客様の声／チラシ情報／よくある質問のカスタム投稿タイプ、トップページのセクション群、Google口コミバー、画面下部の固定お問い合わせバーを追加します。親テーマ「Lightning」が必要です。
Version: 2.0.0
Requires at least: 6.6
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: reform-child
*/

/*
 * このファイルは Lightning が自動で読み込みます（functions.php での読み込みは不要）。
 * 独自パーツはすべて .rft-scope の中にあり、Lightning 本体のデザインには影響しません。
 */

/* ==========================================================================
   0. Design tokens
   ========================================================================== */
:root {
	--rft-primary: #d30e1e;
	--rft-primary-dark: #b40b19;
	--rft-secondary: #00479d;
	--rft-line: #06c755;
	--rft-navy: #001332;
	--rft-text: #333;
	--rft-muted: #555;
	--rft-bg-light: #f5f5f5;
	--rft-bg-gray: #e9ecef;
	--rft-border: #e2e6ea;
	--rft-radius: 8px;
	--rft-dock-height: 82px; /* 固定お問い合わせバー（注記＋ボタン）の高さ */
}

html body {
	font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
	padding-bottom: var(--rft-dock-height);
}
html { scroll-padding-top: 100px; }

/* ==========================================================================
   1. Scope reset（Lightning の見出し装飾などを独自パーツ内だけ打ち消す）
   ========================================================================== */
.rft-scope :where(h1, h2, h3, h4, p) {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	line-height: 1.5;
}
.rft-scope :where(h2, h3)::after { content: none; display: none; }
.rft-scope :where(a) { color: inherit; text-decoration: none; }
.rft-scope :where(ul) { margin: 0; padding: 0; list-style: none; }
.rft-scope :where(img) { display: block; max-width: 100%; height: auto; }
.rft-scope :where(button) { font-family: inherit; cursor: pointer; }
.rft-scope .entry-body :where(p) { margin-bottom: 1.2em; line-height: 1.9; }

/* ==========================================================================
   2. 共通パーツ
   ========================================================================== */
.rft-section { padding: 64px 0; }
.rft-inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.rft-heading {
	text-align: center;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--rft-navy);
	margin-bottom: 32px;
}
.rft-heading span {
	display: block;
	margin-top: 4px;
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .15em;
	color: var(--rft-primary);
	text-transform: uppercase;
}
.rft-subheading {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--rft-navy);
	border-left: 5px solid var(--rft-primary);
	padding-left: 12px;
	margin-bottom: 20px;
}
.rft-lead { text-align: center; font-weight: 700; margin-bottom: 24px; }
.rft-center { text-align: center; margin-top: 32px; }

.rft-btn {
	display: inline-block;
	padding: 14px 32px;
	border-radius: 999px;
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color .2s, transform .2s;
}
.rft-btn--primary { background: var(--rft-primary); color: #fff; }
.rft-btn--primary:hover { background: var(--rft-primary-dark); color: #fff; transform: translateY(-1px); }
.rft-back { margin-top: 40px; text-align: center; }

.rft-stars { color: #ffb400; letter-spacing: 1px; }
.rft-tag {
	display: inline-block;
	font-size: .72rem;
	background: var(--rft-bg-light);
	color: var(--rft-muted);
	border-radius: 3px;
	padding: 2px 8px;
}
.work-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* ==========================================================================
   3. Google 口コミバー（ヘッダー直下）
   ========================================================================== */
.rft-google-bar { background: var(--rft-primary); color: #fff; text-align: center; font-size: .82rem; }
.rft-google-bar__inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 8px;
	padding: 7px 12px;
	color: #fff;
}
a.rft-google-bar__inner:hover { color: #fff; opacity: .9; }
.gb-badge { background: #fff; color: #4285f4; font-weight: 700; border-radius: 4px; padding: 1px 6px; font-size: .75rem; }
.rft-google-bar .rft-stars { color: #ffd400; }
.gb-score { font-weight: 700; font-size: 1rem; }
.gb-count { background: rgba(255, 255, 255, .22); border-radius: 10px; padding: 0 8px; font-size: .72rem; }

/* ==========================================================================
   4. 固定お問い合わせバー（画面下）
   ========================================================================== */
.rft-contact-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; }
.rft-contact-note {
	background: var(--rft-navy);
	color: #fff;
	text-align: center;
	font-size: .7rem;
	padding: 4px 8px;
}
.rft-contact-bar { display: flex; height: 58px; }
.cb-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	color: #fff;
	font-size: .78rem;
	font-weight: 700;
}
.cb-item:hover { color: #fff; filter: brightness(1.08); }
.cb-icon { font-size: 1.05rem; line-height: 1; }
.cb-tel { background: var(--rft-primary); }
.cb-mail { background: var(--rft-secondary); }
.cb-line { background: var(--rft-line); }

@media (min-width: 992px) {
	.rft-contact-bar { max-width: 760px; margin: 0 auto; border-radius: 10px 10px 0 0; overflow: hidden; }
	.cb-item { flex-direction: row; gap: 8px; font-size: .95rem; }
}

/* Lightning / VK All in One Expansion Unit の「ページトップへ」ボタンをバーの上に逃がす */
.page_top_btn { bottom: calc(var(--rft-dock-height) + 12px) !important; }

/* ==========================================================================
   5. ヒーロー（ヒーロースライド投稿がある場合のみ）
   ========================================================================== */
.rft-hero { position: relative; background: var(--rft-navy); overflow: hidden; }
.rft-hero-slider .slider-track { display: flex; transition: transform .6s ease; }
.rft-hero-slider .slide { flex: 0 0 100%; position: relative; }
.rft-hero .slide-img { width: 100%; height: clamp(260px, 46vw, 520px); object-fit: cover; }
.rft-hero .slide-caption {
	position: absolute;
	left: 6%;
	top: 50%;
	transform: translateY(-50%);
	max-width: min(600px, 88%);
	color: #fff;
}
.rft-hero .slide-caption h2 {
	font-size: clamp(1.4rem, 4vw, 2.6rem);
	font-weight: 900;
	line-height: 1.4;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
.rft-hero .slide-caption p { margin-top: 10px; font-size: .95rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }

.slider-prev,
.slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--rft-navy);
	font-size: 1.4rem;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.slider-prev { left: 8px; }
.slider-next { right: 8px; }

/* ==========================================================================
   6. トップページ
   ========================================================================== */
/* 固定ページ本文が空のときは本文エリアを出さない */
.rft-front-no-content .site-body-container { display: none; }

/* 新着情報 */
.rft-tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.tab-btn {
	border: 0;
	border-radius: 999px;
	background: #f0f0f0;
	color: var(--rft-muted);
	padding: 9px 26px;
	font-weight: 700;
	font-size: .9rem;
}
.tab-btn.is-active { background: var(--rft-navy); color: #fff; }
.rft-topic-list { border: 1px solid var(--rft-border); border-radius: var(--rft-radius); overflow: hidden; background: #fff; }
.topic-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--rft-border);
	transition: background-color .2s;
}
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: var(--rft-bg-light); }
.topic-row[hidden] { display: none; }
.topic-tag { flex-shrink: 0; font-size: .7rem; color: #fff; border-radius: 3px; padding: 3px 8px; background: var(--rft-muted); }
.topic-tag--case_study { background: var(--rft-secondary); }
.topic-tag--post { background: var(--rft-primary); }
.topic-date { flex-shrink: 0; color: #888; font-size: .82rem; }
.topic-title { flex: 1; font-size: .92rem; min-width: 0; }
.topic-arrow { color: #aaa; }

/* 横スクロールのカード行 */
.rft-scroll-row { position: relative; }
.rft-scroll-row .slider-track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 4px 2px 12px;
}
.rft-scroll-row .slider-track::-webkit-scrollbar { height: 6px; }
.rft-scroll-row .slider-track::-webkit-scrollbar-thumb { background: var(--rft-border); border-radius: 3px; }
.rft-scroll-row .slider-prev,
.rft-scroll-row .slider-next { display: none; }
.rft-scroll-row.has-overflow .slider-prev,
.rft-scroll-row.has-overflow .slider-next { display: block; }
.rft-scroll-row .slider-prev { left: -12px; }
.rft-scroll-row .slider-next { right: -12px; }

.rft-card {
	position: relative;
	flex: 0 0 260px;
	scroll-snap-align: start;
	background: #fff;
	border: 1px solid var(--rft-border);
	border-radius: var(--rft-radius);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.rft-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.rft-card__img { width: 100%; height: 190px; object-fit: cover; }
.rft-card__body { padding: 14px; }
.rft-card__title { font-size: .92rem; font-weight: 700; }
.rft-card__sub { font-size: .78rem; color: #888; margin-top: 4px; }
.voice-video { display: inline-block; margin-top: 8px; font-size: .78rem; font-weight: 700; color: var(--rft-primary); }
.flyer-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: var(--rft-primary);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 3px;
}
.flyer-badge--static { position: static; display: inline-block; }

/* クチコミ */
.rft-inner.rft-reviews { background: var(--rft-navy); color: #fff; border-radius: 12px; padding-top: 40px; padding-bottom: 40px; }
.rft-reviews-heading { text-align: center; font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }
.rft-reviews-heading span { color: #ffd400; }
.reviews-summary {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px 12px;
	background: rgba(255, 255, 255, .08);
	border-radius: var(--rft-radius);
	padding: 14px;
	margin-bottom: 24px;
	font-size: .88rem;
}
.reviews-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.review-card { background: #fff; color: var(--rft-text); border-radius: var(--rft-radius); padding: 16px; }
.review-date { font-size: .75rem; color: #999; margin: 4px 0; }
.review-name { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.review-body { font-size: .82rem; color: var(--rft-muted); line-height: 1.8; }

/* 選ばれる理由 */
.rft-points { background: var(--rft-bg-light); }
.point-block {
	max-width: 1000px;
	margin: 0 auto 40px;
	background: #fff;
	border-radius: var(--rft-radius);
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}
.point-block:last-child { margin-bottom: 0; }
.point-media { position: relative; }
.point-media img { width: 100%; height: 280px; object-fit: cover; }
.point-label {
	position: absolute;
	left: 20px;
	bottom: -18px;
	background: var(--rft-primary);
	color: #fff;
	font-weight: 900;
	font-style: italic;
	font-size: 1.3rem;
	padding: 6px 22px;
	border-radius: 4px;
}
.point-text { padding: 36px 28px 28px; }
.point-text h3 { font-size: 1.2rem; font-weight: 700; color: var(--rft-navy); margin-bottom: 12px; }
.point-text p { font-size: .92rem; color: var(--rft-muted); line-height: 1.9; }

@media (min-width: 992px) {
	.point-block { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
	.point-block:nth-child(odd) .point-media { order: 2; }
	.point-media img { height: 100%; min-height: 300px; }
	.point-label { bottom: auto; top: 20px; }
	.point-text { padding: 36px; }
}

/* 箇所選択 */
.menu-select-buttons { display: flex; flex-wrap: wrap; gap: 20px; max-width: 720px; margin: 0 auto; }
.menu-select-btn {
	flex: 1 1 260px;
	text-align: center;
	padding: 30px 20px;
	border-radius: var(--rft-radius);
	color: #fff;
	font-size: 1.3rem;
	font-weight: 900;
	transition: transform .2s, filter .2s;
}
.menu-select-btn:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.05); }
.menu-select-btn--outside { background: var(--rft-primary); }
.menu-select-btn--inside { background: var(--rft-secondary); }

/* バナー */
.rft-banners-wrap { background: #2b2b2b; }
.rft-banners { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.banner-card { position: relative; display: block; border-radius: var(--rft-radius); overflow: hidden; }
.banner-card img { width: 100%; height: 170px; object-fit: cover; transition: transform .4s; }
a.banner-card:hover img { transform: scale(1.04); }
.banner-title {
	position: absolute;
	inset: auto 0 0 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, .75));
	color: #fff;
	font-weight: 700;
	font-size: .95rem;
	padding: 30px 16px 12px;
}

/* 会社案内カード */
.rft-company-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.company-card {
	position: relative;
	display: block;
	text-align: center;
	border: 1px solid var(--rft-border);
	border-radius: var(--rft-radius);
	overflow: hidden;
	background: #fff;
	transition: box-shadow .2s;
}
.company-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.company-card img { width: 100%; height: 180px; object-fit: cover; }
.company-card__label { display: block; padding: 14px; font-weight: 700; }
.card-arrow {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--rft-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ==========================================================================
   7. フッター上部（サイトマップ＋施工エリア）
   ========================================================================== */
.rft-footer-block { background: var(--rft-bg-gray); padding: 48px 20px 24px; }
.footer-sitemap {
	max-width: 1140px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px;
	padding-bottom: 36px;
}
.footer-col__title { font-size: .9rem; font-weight: 700; color: var(--rft-navy); margin-bottom: 12px; }
.footer-list li { margin-bottom: 8px; }
.footer-list a { font-size: .82rem; color: var(--rft-muted); }
.footer-list a:hover { color: var(--rft-primary); }

.footer-area {
	max-width: 1140px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 28px;
	background: #fff;
	border-radius: var(--rft-radius);
	padding: 24px;
}
.area-badge { flex: 0 0 auto; text-align: center; }
.area-badge strong { display: block; color: var(--rft-navy); }
.pref-tag {
	display: inline-block;
	background: var(--rft-primary);
	color: #fff;
	font-size: .75rem;
	padding: 3px 10px;
	border-radius: 3px;
	margin-bottom: 6px;
}
.area-text { flex: 1 1 300px; }
.area-text__title { font-size: 1.2rem; font-weight: 700; color: var(--rft-navy); }
.area-text__title span { color: var(--rft-primary); font-size: .8rem; margin-left: 8px; }
.area-text p + p { font-size: .82rem; color: var(--rft-muted); margin-top: 8px; line-height: 1.8; }

/* ==========================================================================
   8. 一覧ページ（Lightning のカードに追加する要素）
   ========================================================================== */
.archive-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.filter-chip {
	border: 1px solid var(--rft-border);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: .82rem;
	background: #fff;
}
.filter-chip:hover { border-color: var(--rft-navy); }
.filter-chip.is-active { background: var(--rft-navy); color: #fff; border-color: var(--rft-navy); }
.rft-loop-area { font-size: .8rem; color: #888; margin: 0 0 4px; }
.rft-loop-rating { margin: 0 0 4px; }
.rft-loop-status { margin: 0 0 6px; }
.rft-loop-video { font-size: .78rem; font-weight: 700; color: var(--rft-primary); margin: 8px 0 0; }

/* ==========================================================================
   9. 詳細ページ（施工事例／お客様の声／チラシ）
   ========================================================================== */
.rft-single-meta { margin-bottom: 28px; }
.rft-single-meta__area { font-weight: 700; color: var(--rft-navy); margin-bottom: 12px; }
.rft-single-meta__rating { font-size: 1.2rem; margin-bottom: 6px; }
.rft-single-meta__thumb img { width: 100%; border-radius: var(--rft-radius); }
.rft-single-meta__video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--rft-radius); }

/* ==========================================================================
   10. 固定ページ（会社概要／メニュー／FAQ／お問い合わせ）
   ========================================================================== */
.company-block { margin-bottom: 56px; }
.company-block-inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.company-photo { width: 220px; flex-shrink: 0; border-radius: var(--rft-radius); }
.company-block-text { flex: 1; min-width: 240px; }
.company-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.company-table th,
.company-table td { border-bottom: 1px solid var(--rft-border); padding: 12px 10px; text-align: left; vertical-align: top; }
.company-table th { width: 140px; color: var(--rft-navy); background: var(--rft-bg-light); white-space: nowrap; }
.company-map img,
.company-map iframe { width: 100%; border-radius: var(--rft-radius); }

.menu-group { margin: 40px 0; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.menu-item {
	display: block;
	text-align: center;
	border: 1px solid var(--rft-border);
	border-radius: var(--rft-radius);
	overflow: hidden;
	font-size: .85rem;
	font-weight: 700;
	transition: box-shadow .2s;
}
.menu-item:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.menu-item span { display: block; padding: 10px; }
.menu-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-bottom: 40px; }
.menu-detail img { width: 320px; flex-shrink: 0; border-radius: var(--rft-radius); }
.menu-detail-text { flex: 1; min-width: 240px; }
.menu-detail-text p { color: var(--rft-muted); line-height: 1.9; }

.faq-list { margin-top: 24px; border-top: 1px solid var(--rft-border); }
.faq-item { border-bottom: 1px solid var(--rft-border); }
.faq-question {
	position: relative;
	display: flex;
	width: 100%;
	text-align: left;
	background: none;
	border: 0;
	padding: 18px 36px 18px 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--rft-text);
}
.faq-question::after {
	content: "+";
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.4rem;
	color: var(--rft-primary);
}
.faq-question[aria-expanded="true"]::after { content: "−"; }
.q-mark,
.a-mark { flex-shrink: 0; color: var(--rft-primary); font-weight: 900; margin-right: 12px; }
.faq-answer { display: flex; padding: 0 0 18px; font-size: .92rem; color: var(--rft-muted); }
.faq-answer[hidden] { display: none; }
.faq-answer__body > :last-child { margin-bottom: 0; }

.contact-methods { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.contact-method {
	flex: 1 1 240px;
	text-align: center;
	padding: 24px;
	border-radius: var(--rft-radius);
	color: #fff;
}
.contact-method:hover { color: #fff; filter: brightness(1.06); }
.contact-method--tel { background: var(--rft-primary); }
.contact-method--line { background: var(--rft-line); }
.cm-icon { display: block; font-size: 1.5rem; }
.cm-label { display: block; font-size: 1.2rem; font-weight: 900; margin: 8px 0 4px; }
.cm-sub { font-size: .78rem; }

/* ==========================================================================
   11. Responsive
   ========================================================================== */
@media (max-width: 767px) {
	.rft-section { padding: 44px 0; }
	.rft-inner { padding: 0 16px; }
	.rft-heading { font-size: 1.45rem; }
	.topic-row { flex-wrap: wrap; gap: 6px 10px; padding: 14px 16px; }
	.topic-title { flex-basis: 100%; }
	.topic-arrow { display: none; }
	.point-media img { height: 190px; }
	.rft-hero .slider-prev,
	.rft-hero .slider-next { display: none; }
	.rft-hero .slide-caption { left: 16px; right: 16px; max-width: none; }
	.rft-scroll-row .slider-prev,
	.rft-scroll-row.has-overflow .slider-prev,
	.rft-scroll-row .slider-next,
	.rft-scroll-row.has-overflow .slider-next { display: none; }
	.company-block-inner,
	.menu-detail { flex-direction: column; }
	.company-photo,
	.menu-detail img { width: 100%; }
	.company-table th { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
	.rft-scope *,
	.rft-hero-slider .slider-track { transition: none !important; }
}
