@charset "UTF-8";
/*
    Template: swell
    Theme Name: SWELL CHILD
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.0
    Author: LOOS WEB STUDIO
    Author URI: https://loos-web-studio.com/

    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/

/* ▼ 静的フッター由来のページトップボタン(#scrollUp)を非表示にし、SWELLのページトップボタンに統一 */
#scrollUp {
	display: none !important;
}

/* ▼ ブログ上部のメインビジュアル(SWELL MV)を非表示 */
#main_visual,
.p-mainVisual {
	display: none !important;
}

/* ▼ ヘッダー下ビジュアル(#headline)の重なり対策
   ・静的の top:90px(見た目だけ下げる) を解除
   ・PCは #header が position:fixed(高さ90px) なので margin-top で90px確保しヘッダーと重ねない
   ・下も余白を取りカードと重ねない
   ※静的の「#headline { margin:0 auto !important }」が後から読まれて勝つため、
     詳細度を上げた #headline.headlineImgnews で確実に上書きする */
#headline.headlineImgnews {
	top: 0 !important;
	/* [2026-06-05] PC固定ヘッダー#header(90px)＋影分のクリアランス（他ページ同様かぶらないように） */
	margin-top: 110px !important;
	/* [2026-06-04] 中央寄せ：max-width:1500px の箱を margin auto でセンタリング
	   （以前は margin-left/right:20px で左寄せになっていた） */
	margin-right: auto !important;
	margin-bottom: 32px !important;
	margin-left: auto !important;
}
/* [2026-06-04] ヘッダー下ビジュアル内のテキストは左寄せ（ユーザー指示で center→left に変更） */
#headline.headlineImgnews .inner {
	text-align: left !important;
}
/* [2026-06-05] SP(1000px以下)は #headerSp が position:fixed(高さ60px) のため、
   その分の上余白を確保してヘッダーとかぶらないようにする（旧: 0 で重なっていた） */
@media only screen and (max-width: 1000px) {
	#headline.headlineImgnews {
		margin-top: 70px !important;
	}
}

/* ▼ [2026-06-04] パンくずが #content と重なる対策
   静的CSS の「#breadcrumb { position:relative; top:90px }」が SWELL のパンくず
   (同一 id="breadcrumb") に適用され、90px 下にずれて content へ被るのが原因。
   id+class で詳細度を上げて通常フローに戻す（SWELL本来のパンくず表示に任せる） */
#breadcrumb.p-breadcrumb {
	position: static !important;
	top: auto !important;
}

/* ▼ [2026-06-04] ④ 固定(フローティング)SNSシェアサイドバーを非表示 */
.c-shareBtns.-fix.-style-block {
	display: none !important;
}

/* ▼ [2026-06-04] ⑤ 投稿日時メタ(公開日/更新日)を非表示 */
.p-articleMetas__times.c-postTimes.u-thin {
	display: none !important;
}

/* ▼ [2026-06-04] ⑥ 記事下のシェア欄・コメント欄を非表示
   （コメントは WP 側でも受付終了に設定。CSS は保険） */
.c-shareBtns.-bottom {
	display: none !important;
}
.l-articleBottom__section.-comment,
#comments {
	display: none !important;
}

/* ▼ [2026-06-04] 記事下の「前後記事ナビ」「この記事を書いた人」「関連記事」を非表示 */
.p-pnLinks,
.l-articleBottom__section.-author,
.l-articleBottom__section.-related {
	display: none !important;
}

/* ▼ [2026-06-04] カテゴリラベル(タグ)の色分け
   お知らせ(id2)=紺 #1c3d5a ／ 施工事例系(親id3＋子: 木の伐採4/重量物運搬5/建設サポート6/その他7)=オレンジ #e8800c
   対象: 一覧カードのサムネ上ラベル .c-postThumb__cat[data-cat-id]（背景色＋白文字）。
   記事ページのカテゴリタグ .c-categoryList__link は下部で白文字に統一（2026-06-04 変更） */
/* お知らせ（カードのサムネ上ラベル） */
.c-postThumb__cat[data-cat-id="2"] {
	background-color: #1c3d5a !important;
	color: #fff !important;
}
/* 施工事例系（カードのサムネ上ラベル） */
.c-postThumb__cat[data-cat-id="3"],
.c-postThumb__cat[data-cat-id="4"],
.c-postThumb__cat[data-cat-id="5"],
.c-postThumb__cat[data-cat-id="6"],
.c-postThumb__cat[data-cat-id="7"] {
	background-color: #e8800c !important;
	color: #fff !important;
}
/* [2026-06-04] 記事ページのカテゴリタグ(.c-categoryList__link.hov-flash-up)の
   テキストを白で統一（ユーザー指示）。SWELL単一記事ではアイキャッチ写真の上に
   表示されるため、前回の紺/オレンジ文字色（data-cat-id別）は白に置き換える。
   ※カードのサムネ上ラベル .c-postThumb__cat は従来どおり 背景色＋白文字を維持 */
.c-categoryList__link.hov-flash-up {
	color: #fff !important;
}

/* ▼ [2026-06-04] サイドバー「カテゴリー」ブロックの階層表示化に伴う対応
   wp:categories を showHierarchy+showEmpty にすると、空の親「施工事例(works)」を
   表示できる一方、同じく空の「未分類(uncategorized=term1)」も出てしまうため、
   未分類のリスト項目だけを非表示にする（記事のカテゴリ割り当ては変更しない）。
   対象: ブロック版カテゴリー一覧 .wp-block-categories 内の li.cat-item-1 */
.wp-block-categories li.cat-item-1 {
	display: none !important;
}

/* ▼ [2026-06-04] パンくずリストの項目間に矢印(→)を追加
   SWELLパンくずは <ol class="p-breadcrumb__list"> > <li class="p-breadcrumb__item">。
   区切りが無いので、最後以外の項目の直後に矢印を挿入する。
   （→ は文字化け回避のため Unicode escape \2192 で記述） */
#breadcrumb.p-breadcrumb .p-breadcrumb__item:not(:last-child)::after {
	content: "\2192";
	display: inline-block;
	margin: 0 0.5em;
	color: #999;
	font-style: normal;
	font-weight: normal;
}

/* ▼ [2026-06-04] サイドバー カテゴリーの子「その他の事例(others/term7)」を一番下に
   ブロックは orderby=name 固定で並べ替え不可のため、子リスト(ul.children)を
   flex 縦並びにし、その他の事例(cat-item-7)だけ order を後ろにして最下部へ。
   ※マーカーは .c-listMenu a:before(absolute) 実装なので flex 化しても消えない */
.wp-block-categories ul.children {
	display: flex;
	flex-direction: column;
}
.wp-block-categories ul.children li.cat-item-7 {
	order: 10;
}

/* ▼ [2026-06-05] 投稿画像のレイアウト刷新（ユーザー指示）
   方針変更：従来は「本文先頭画像を隠しアイキャッチを残す」だったが、
   今回から「大きなアイキャッチ(.p-articleThumb)を非表示にし、本文画像を
   ギャラリー(.nc-figs)として一本化」する。
   nc-gallery.js が本文先頭の連続 figure.wp-block-image を .nc-figs でラップし
   data-count を付与する。レイアウトは下記で枚数別に制御。 */

/* 個別投稿の大きなアイキャッチ(ヒーロー)を非表示 → 本文ギャラリーに一本化 */
.single .p-articleThumb {
	display: none !important;
}

/* ギャラリー共通 */
.post_content .nc-figs {
	margin: 1.6em auto;
}
.post_content .nc-figs figure.wp-block-image {
	margin: 0;
}
.post_content .nc-figs img {
	display: block;
	width: 100%;
	height: auto;
}

/* 1枚：少し小さく中央寄せ（PC） */
.post_content .nc-figs[data-count="1"] {
	max-width: 520px;
}

/* 2〜3枚：PC 横並び（均等列・縦横比を揃えてカード化） */
.post_content .nc-figs[data-count="2"],
.post_content .nc-figs[data-count="3"] {
	display: grid;
	gap: 12px;
}
.post_content .nc-figs[data-count="2"] {
	grid-template-columns: repeat(2, 1fr);
}
.post_content .nc-figs[data-count="3"] {
	grid-template-columns: repeat(3, 1fr);
}

/* 4枚以上：PC 3列グリッドで折り返し */
.post_content .nc-figs:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]) {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(3, 1fr);
}

/* 複数枚（横並び/グリッド）：列は上揃え。画像は本来の比率のまま（トリミングしない）。
   縦長写真も上下を切らず全体を表示する。 */
.post_content .nc-figs[data-count="2"],
.post_content .nc-figs[data-count="3"],
.post_content .nc-figs:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]) {
	align-items: start;
}
.post_content .nc-figs:not([data-count="1"]) figure.wp-block-image {
	border-radius: 6px;
	overflow: hidden;
}
.post_content .nc-figs:not([data-count="1"]) img {
	width: 100%;
	height: auto;
	object-fit: contain;
}

/* スマホ（768px以下）：複数枚は横スワイプのスライダー（CSS scroll-snap・ライブラリ不要） */
@media only screen and (max-width: 768px) {
	.post_content .nc-figs[data-count="1"] {
		max-width: 100%;
	}
	.post_content .nc-figs:not([data-count="1"]) {
		display: flex;
		grid-template-columns: none;
		gap: 8px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
	}
	.post_content .nc-figs:not([data-count="1"]) figure.wp-block-image {
		flex: 0 0 90%;
		scroll-snap-align: center;
	}
	/* スライダー内の画像はトリミングせず本来比率（縦長も上下を切らない） */
	.post_content .nc-figs:not([data-count="1"]) img {
		height: auto;
		object-fit: contain;
	}
	/* スクロールバーは細く控えめに */
	.post_content .nc-figs::-webkit-scrollbar {
		height: 5px;
	}
	.post_content .nc-figs::-webkit-scrollbar-thumb {
		background: rgba(0, 0, 0, 0.25);
		border-radius: 3px;
	}
}

/* ▼ [2026-06-05] 本文内CTAリンクのボタン化（ユーザー指示）
   「お電話でのお問い合わせ」= tel: リンク → オレンジボタン（電話アイコン）
   「お問い合わせフォームはこちら」= /contact/ リンク → 紺ボタン（封筒アイコン）
   投稿本文(.post_content)内の該当リンクを自動でボタン表示。他のテキストリンクには影響しない。 */
.post_content a[href^="tel:"],
.post_content a[href*="//nancre.com/contact"],
.post_content a[href^="/contact"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	margin: 0.4em 0.5em 0.4em 0;
	padding: 0.9em 1.8em;
	min-width: 260px;
	max-width: 100%;
	border-radius: 999px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.post_content a[href^="tel:"]:hover,
.post_content a[href*="//nancre.com/contact"]:hover,
.post_content a[href^="/contact"]:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}
/* 電話：オレンジ */
.post_content a[href^="tel:"] {
	background: #e8800c;
	color: #fff !important;
}
/* お問い合わせフォーム：紺 */
.post_content a[href*="//nancre.com/contact"],
.post_content a[href^="/contact"] {
	background: #1c3d5a;
	color: #fff !important;
}
/* アイコン（Font Awesome 6 Free・サイト共通で読込済） */
.post_content a[href^="tel:"]::before {
	content: "\f095"; /* phone */
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
}
.post_content a[href*="//nancre.com/contact"]::before,
.post_content a[href^="/contact"]::before {
	content: "\f0e0"; /* envelope */
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
}
/* スマホは全幅でタップしやすく */
@media only screen and (max-width: 768px) {
	.post_content a[href^="tel:"],
	.post_content a[href*="//nancre.com/contact"],
	.post_content a[href^="/contact"] {
		display: flex;
		width: 100%;
		min-width: 0;
		margin: 0.5em 0;
	}
}

/* ▼ [2026-06-05] スマホ ハンバーガーメニュー（mmenu非依存の自前ドロワー）
   静的ヘッダーの #menu は mmenu(jQuery1.x) 前提だが WP では未読込で開かないため、
   nc-header.js のクラス付与（#menu.nc-open / body.nc-menu-open）で開閉する。 */

/* PC（1001px以上）ではSP用ドロワー #menu は非表示（PCは #header のナビを使用） */
@media only screen and (min-width: 1001px) {
	#menu {
		display: none !important;
	}
}

/* SP（1000px以下）：右からスライドインするドロワー */
@media only screen and (max-width: 1000px) {
	#menu {
		display: block !important;
		position: fixed !important;
		top: 0;
		right: 0;
		width: 84%;
		max-width: 320px;
		height: 100%;
		background: #4d7d48;
		z-index: 100001;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		transform: translateX(100%);
		transition: transform 0.3s ease;
		padding: 24px 20px 64px;
		box-shadow: -3px 0 12px rgba(0, 0, 0, 0.2);
	}
	#menu.nc-open {
		transform: translateX(0);
	}
	/* ドロワー内の見た目 */
	#menu .side_menu {
		max-width: 160px;
		height: auto;
		margin-bottom: 8px;
	}
	#menu a {
		color: #fff;
	}
	#menu ul {
		list-style: none;
		margin: 8px 0 0;
		padding: 0;
	}
	#menu li {
		border-bottom: 1px solid rgba(255, 255, 255, 0.25);
	}
	#menu li a {
		display: block;
		padding: 13px 4px;
		text-decoration: none;
	}
	#menu a.btnClose {
		display: inline-block;
		margin-bottom: 10px;
		padding: 4px 10px;
		border: 1px solid rgba(255, 255, 255, 0.6);
		border-radius: 4px;
		font-size: 0.85em;
		cursor: pointer;
	}
}
