/*
 * 案件共通CSS: 船橋 火葬式直葬専門サービス
 *
 * ベース(layout.css)の既定スキンを上書きする案件レイヤー。
 * セレクタは必ずサイト構造のルート(.site-header 等)から始め、
 * 素の要素セレクタ・:root へは書かない。
 *
 * 配色: 濃紺 #1a2744 / 電話CTA緑 #1a6b3c (どちらもLP本文と同値)
 * PC/SP分岐: 960px
 */

/* -------------------------------------------------
 * 横方向のはみ出しに対する二次的な保険(Chromium/Android向け)
 *
 * WebKit は word-break:keep-all と併用した overflow-wrap:break-word を
 * 無視するため、実機のみ長文が折り返せず横パン(左右のガタつき)が起きる。
 * 【重要】この clip / hidden は WebKit では横パンを止められない(2026-08-28に
 * 実WebKitで実測。scrollWidth 408 > clientWidth 320 のまま)。したがって
 * 根治はここではなく「はみ出しを出さない」側=長文へ overflow-wrap:anywhere
 * を重ねる(固定514の各セクション一括指定)ことで行っている。
 * ここに残しているのは Chromium/Android 系での残余の突出に対する保険。
 * clip はスクロールコンテナを作らないため position:sticky を壊さない。
 * (site.css は構造ルート起点が原則だが、この指定は html にしか書けない例外)
 * ------------------------------------------------- */

html {
	overflow-x: hidden;
	overflow-x: clip;
}

/* -------------------------------------------------
 * ヘッダー全体の追従(.fc-header)
 *
 * ロゴ(=サービス名)を常に見せるため、上段(白地)ごと sticky で追従させる。
 * 追従状態 is-stuck は assets/js/site.js が付け外しする(影の表示用)。
 * ------------------------------------------------- */

.fc-header {
	position: sticky;
	top: 0;
	z-index: 9980;
}

.fc-header.is-stuck {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
}

/* -------------------------------------------------
 * ヘッダー上段(白地: ロゴ + 電話)
 * ------------------------------------------------- */

.site-header {
	background: #ffffff;
}

.site-header .site-header__inner {
	max-width: 1200px;
	padding: 10px 20px;
	gap: 12px;
}

/* -------------------------------------------------
 * ヘッダーのロゴ
 *
 * 素材: PC 1600x180(比 8.9:1) / SP 1200x240(比 5:1)。
 * 高さだけを決め、幅は素材の比率にまかせる。
 * ベース既定の max-height / flex縮小をそのままにすると、
 * 幅だけが押し縮められて画像が横に潰れるため、両方を解除する。
 * ------------------------------------------------- */

.site-header .site-branding {
	margin: 0;
	line-height: 1;
	flex-shrink: 0;
}

.site-header .site-logo {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
}

.site-header .site-logo__img {
	display: block;
	width: auto;
	height: 56px;
	max-width: none;
	max-height: none;
}

/* SPは2行組の素材(比 5:1)へ切り替わる。電話/メニューのボタンと同居できる高さに段階を切る
 * (flexで縮ませると幅だけ潰れるため、height直値で決める) */
@media (max-width: 959px) {
	.site-header .site-logo__img {
		height: 48px;
	}
}

@media (max-width: 599px) {
	.site-header .site-logo__img {
		height: 42px;
	}
}

@media (max-width: 419px) {
	.site-header .site-logo__img {
		height: 38px;
	}
}

/* 355px以下は「ロゴ+電話+メニュー」の合計(約356px)が入らないため段階的に落とす */
@media (max-width: 355px) {
	.site-header .site-logo__img {
		height: 33px;
	}
}

@media (max-width: 334px) {
	.site-header .site-logo__img {
		height: 29px;
	}
}

/* ロゴ画像が未設定のときのテキストフォールバック */
.site-header .site-logo--text {
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.4;
	text-decoration: none;
}

/* -------------------------------------------------
 * ヘッダー右側: PCは番号を大きく見せる(PCのtel:は発信に繋がらないため)
 * ------------------------------------------------- */

.site-header .fc-head-tel {
	text-align: right;
	line-height: 1.3;
}

.site-header .fc-head-tel__note {
	margin: 0;
	font-size: 12px;
	color: var(--wp--preset--color--sub);
}

.site-header .fc-head-tel__num {
	margin: 0;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #1a2744;
	font-feature-settings: "tnum" 1;
}

/* SP: タップ発信ボタンとメニューボタン */
.site-header .fc-head-telbtn {
	display: none;
}

.site-header .fc-menu-btn {
	display: none;
}

@media (max-width: 959px) {
	.site-header {
		border-bottom: 1px solid var(--wp--preset--color--line);
	}

	.site-header .site-header__inner {
		padding: 8px 10px;
		gap: 6px;
		flex-wrap: nowrap;
	}

	.site-header .fc-head-tel {
		display: none;
	}

	.site-header .fc-head-telbtn {
		display: flex;
		align-items: center;
		gap: 6px;
		margin-left: auto;
		padding: 9px 12px;
		background: #1a6b3c;
		color: #ffffff;
		font-size: 13px;
		font-weight: 700;
		line-height: 1;
		text-decoration: none;
		border-radius: 8px;
		flex-shrink: 0;
	}

	.site-header .fc-head-telbtn svg {
		width: 17px;
		height: 17px;
	}

	.site-header .fc-menu-btn {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 3px;
		padding: 6px 5px;
		color: #1a2744;
		font-size: 10px;
		font-weight: 700;
		line-height: 1;
		flex-shrink: 0;
	}

	.site-header .fc-menu-btn svg {
		width: 22px;
		height: 22px;
	}
}

/* -------------------------------------------------
 * ヘッダー下段(PCのみ): 濃紺のグロナビ帯
 *
 * 追従は親の .fc-header が担う(帯単独の sticky と帯内電話は廃止。
 * 上段の大きい電話番号がロゴと一緒に常時見えるため)。
 * ------------------------------------------------- */

.fc-gnav {
	display: none;
}

@media (min-width: 960px) {
	.fc-gnav {
		display: block;
		background: #1a2744;
	}

	.fc-gnav__inner {
		max-width: 1200px;
		margin-inline: auto;
		padding: 0 16px;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 16px;
		min-height: 48px;
	}

	/* 見切れゼロの保証:
	 * overflow で隠す設計を廃止し、入り切らない幅では折り返す。
	 * ラベル短縮とclamp縮小で通常幅は1行に収まり、折り返しは保険。 */
	.fc-gnav__list {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-wrap: wrap;
		gap: 0;
		min-width: 0;
	}

	.fc-gnav__list a {
		display: flex;
		align-items: center;
		height: 48px;
		padding: 0 clamp(9px, 1vw, 16px);
		color: rgba(255, 255, 255, 0.92);
		font-size: clamp(12px, 1vw, 14px);
		font-weight: 500;
		letter-spacing: 0.04em;
		white-space: nowrap;
		text-decoration: none;
		transition: background 0.2s ease, color 0.2s ease;
	}

	.fc-gnav__list a:hover {
		background: rgba(255, 255, 255, 0.08);
		color: #ffffff;
	}

	/* お問い合わせ先だけボタン化(白地・濃紺文字) */
	.fc-gnav__list a[href*="#contact"] {
		height: 34px;
		margin-left: clamp(6px, 0.6vw, 14px);
		padding: 0 clamp(10px, 1vw, 18px);
		background: #ffffff;
		color: #1a2744;
		font-weight: 700;
		border-radius: 8px;
	}

	.fc-gnav__list a[href*="#contact"]:hover {
		background: rgba(255, 255, 255, 0.88);
		color: #1a2744;
	}

}

/* -------------------------------------------------
 * SPドロワー
 * ------------------------------------------------- */

.fc-drawer {
	position: fixed;
	inset: 0;
	z-index: 99990;
}

.fc-drawer[hidden] {
	display: none;
}

.fc-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 30, 56, 0.55);
}

.fc-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(78vw, 320px);
	background: #ffffff;
	box-shadow: -4px 0 28px rgba(0, 0, 0, 0.12);
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.25s ease;
}

.fc-drawer.is-open .fc-drawer__panel {
	transform: translateX(0);
}

.fc-drawer__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 10px 10px 0 auto;
	border-radius: 50%;
	background: #f4f2ef;
	color: #5b5550;
}

.fc-drawer__close svg {
	width: 16px;
	height: 16px;
}

.fc-drawer__nav ul {
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.fc-drawer__nav a {
	display: block;
	padding: 13px 20px;
	color: var(--wp--preset--color--ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.fc-drawer__nav li:first-child > a {
	border-top: 1px solid var(--wp--preset--color--line);
}

/* 電話CTA(リンク先がtel:の項目だけボタン化。位置に依存しない) */
.fc-drawer__nav a[href^="tel:"] {
	display: block;
	margin: 18px 16px 16px;
	padding: 13px 16px;
	background: #1a6b3c;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	border: none;
	border-radius: 8px;
}

@media (min-width: 960px) {
	.fc-drawer {
		display: none;
	}
}

/* -------------------------------------------------
 * フッター(NAP: 名称・住所・電話)
 * ------------------------------------------------- */

.site-footer {
	margin-top: 0;
	border-top: none;
	background: #1a2744;
	color: #ffffff;
}

.site-footer .site-footer__inner {
	max-width: 1200px;
	display: block;
	padding: 36px 20px 28px;
}

/* SPはLP本文の追従電話バー(約106px)がフッター下端を覆うため、その分の余白を足す */
@media (max-width: 959px) {
	.site-footer .site-footer__inner {
		padding-bottom: calc(28px + 118px + env(safe-area-inset-bottom));
	}
}

.site-footer .fc-footer__name {
	margin: 0 0 10px;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.site-footer .fc-footer__addr {
	margin: 0 0 14px;
	font-size: 13.5px;
	line-height: 1.7;
	opacity: 0.92;
}

.site-footer .fc-footer__tel {
	margin: 0 0 4px;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px 12px;
}

.site-footer .fc-footer__tel a {
	color: #ffffff;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-decoration: none;
	font-feature-settings: "tnum" 1;
}

.site-footer .fc-footer__tel-note {
	font-size: 12px;
	opacity: 0.85;
}

.site-footer .fc-footer__sub {
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.site-footer .site-footer-nav__list {
	font-size: 12.5px;
}

.site-footer .site-footer-nav__list a {
	color: rgba(255, 255, 255, 0.85);
}

.site-footer .site-footer__copy {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.65);
}

/* -------------------------------------------------
 * 帯(旧SWELL全幅帯 wp:loos/full-wide の受け皿)
 *
 * 背景色と上下余白は本文側のCSS変数で持つ:
 *   --ns-band-bg / --ns-band-py-pc / --ns-band-py-sp
 * 幅モードは内側クラスで決まる:
 *   .ns-band__inner            = 全幅
 *   .ns-band__inner--article   = 記事幅(旧SWELL --article_size: 900px)
 * ------------------------------------------------- */

/* 旧テーマのPC/SP出し分け・余白ユーティリティの受け皿(分岐幅は旧テーマと同じ960px) */
@media (min-width: 960px) {
	.ns-sp-only {
		display: none !important;
	}
}

@media (max-width: 959px) {
	.ns-pc-only {
		display: none !important;
	}
}

.ns-u-mb-0 {
	margin-bottom: 0 !important;
}

.ns-band {
	background: var(--ns-band-bg, transparent);
}

@media (min-width: 960px) {
	.ns-band {
		padding-block: var(--ns-band-py-pc, 0);
	}
}

@media (max-width: 959px) {
	.ns-band {
		padding-block: var(--ns-band-py-sp, 0);
	}
}

.ns-band__inner--article {
	max-width: 900px;
	margin-inline: auto;
}

/* 帯内側のブロック余白。
 * 旧SWELL .swell-block-fullWide__inner > * と同値・同詳細度(0,1,0)にする。
 * LP本文内の<style>が同詳細度の margin 指定で上書きする(後勝ち)関係まで含めて
 * 本番と同じカスケードを再現するため、これ以上詳細度を上げない。 */
.ns-band__inner > * {
	margin-bottom: 2em;
}

/* -------------------------------------------------
 * LP(top2)の縦リズム
 *
 * 白紙テンプレートは content.css を読まず reset の margin:0 だけが効くため、
 * 旧SWELL .post_content > * { margin-bottom: 2em } と同じ値を自前で与える。
 * 本文内の空段落スペーサーもこの余白で旧表示と一致する。
 * ------------------------------------------------- */

.ns-lp-top2 > * {
	margin-bottom: 2em;
}

/* セクションは自前の上下paddingでリズムを持つため、外側余白は与えない。
 * これにより背景色付きセクション同士が面で接し、意図しない白帯が出ない。 */
.ns-lp-top2 > section {
	margin-bottom: 0;
}

/* 本文直下の画像ブロック(最終CTA前バナー等)は中央寄せ */
.ns-lp-top2 > figure.wp-block-image {
	display: flex;
	justify-content: center;
	padding-inline: 10px;
}

.ns-lp-top2 > figure.wp-block-image img {
	max-width: 100%;
	height: auto;
}

/* 旧SWELL ".post_content div>:last-child, .post_content>:last-child { margin-bottom:0!important }"
 * の同値再現。!important込みで実挙動を合わせる(乱用ではなく移行互換のための1本) */
.ns-lp-top2 div > :last-child,
.ns-lp-top2 > :last-child {
	margin-bottom: 0 !important;
}

/* PCのアンカー着地オフセットはLP本文側の共通<style>で持つ
 * (本文各セクションの scroll-margin-top 基底値と同じ場所で一元管理する) */

/* -------------------------------------------------
 * お問い合わせフォーム(customer-form)の表・ボタン装飾
 *
 * 旧テーマの投稿別CSS(swell_meta_css post 146)からの移植。
 * 旧テーマ固有のセレクタは除外し、CF7フォーム配下へスコープ。
 * 表(.inquiry)・必須/任意バッジ(.haveto/.any)・送信ボタンは
 * CF7フォーム定義(ID 145)内のマークアップが参照している。
 * ------------------------------------------------- */

.wpcf7-form .inquiry {
	width: 100%;
	border-collapse: collapse;
	border: solid 1px #d7d7d7;
}

.wpcf7-form .inquiry tr {
	border: solid 1px #d7d7d7;
}

.wpcf7-form .inquiry th {
	text-align: left;
	font-size: 14px;
	color: #444444;
	padding: 10px 5px 10px 12px;
	width: 30%;
	background: #f7f7f7;
	border: solid 1px #d7d7d7;
	vertical-align: top;
}

.wpcf7-form .inquiry td {
	font-size: 13px;
	border: solid 1px #d7d7d7;
	padding: 10px 12px;
}

.wpcf7-form .wpcf7-text,
.wpcf7-form .wpcf7-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #cccccc;
	border-radius: 3px;
}

.wpcf7-form .haveto {
	font-size: 10px;
	padding: 3px 6px;
	background: #ff9393;
	color: #ffffff;
	border-radius: 2px;
	margin-right: 5px;
	white-space: nowrap;
}

.wpcf7-form .any {
	font-size: 10px;
	padding: 3px 6px;
	background: #93c9ff;
	color: #ffffff;
	border-radius: 2px;
	margin-right: 5px;
	white-space: nowrap;
}

.wpcf7-form .verticallist .wpcf7-list-item {
	display: block;
}

.wpcf7-form .wpcf7-spinner {
	display: none !important;
}

.wpcf7-form .wpcf7-submit {
	display: block;
	padding: 1em 0;
	width: 100%;
	margin: 20px auto 5px;
	background: #1f408a;
	color: #ffffff;
	font-size: 18px;
	font-weight: 900;
	border-radius: 2px;
	border: none;
	box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

.wpcf7-form .wpcf7-submit:hover {
	background: #ffffff;
	color: #ffaa56;
}

.wpcf7-form .submit-button {
	width: 80%;
	margin: 0 auto;
}

.wpcf7-form .submit-button .cyusyaku {
	font-size: 13px;
	padding-left: 1rem;
}

@media screen and (max-width: 600px) {
	.wpcf7-form .inquiry th,
	.wpcf7-form .inquiry td {
		display: block !important;
		width: 100% !important;
		border-top: none !important;
	}

	.wpcf7-form .inquiry tr:first-child th {
		border-top: 1px solid #d7d7d7 !important;
	}
}

/* -------------------------------------------------
 * 個人情報保護指針(policy): 委託先リンク配下spanの下線抑止
 * (旧テーマの投稿別CSS swell_meta_css post 58 からの移植)
 * ------------------------------------------------- */

.page-id-58 a[href="https://noside-ltd.co.jp/"] span {
	text-decoration: none;
}
