/* ============================================================================================================= */
/* サイト全体の調整（functions.php で全ページに読み込み。親テーマの responsive.css より後） */
/* ============================================================================================================= */
:root {
	--th-gutter: 16px;
}

/* 背景: 親テーマの #F8F8F8（灰色）をやめて白に */
.site-container {
	background: #fff;
}

/* ブログ一覧（home.php）の記事カードは白地の上でも区切りが分かるように */
.blog-item {
	border: 1px solid #eee;
	border-radius: 4px;
}

/* ------------------------------------------------------------------------------------------------------------- */
/* スマホの左右余白: 親テーマの固定幅（462px / 300px）をやめて画面幅に合わせ、余白を 16px にそろえる */
/* ------------------------------------------------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
	body .site-container .vc_row,
	body .site-container .vc_row.full-width .wpb_column .vc_row,
	body .site-container .vc_row.full-width .vc_col-sm-12.wpb_column .vc_row,
	body .footer,
	body .copyright-area {
		width: auto;
		max-width: none;
	}
	/* 入れ子でない行（ページ見出し・本文の各セクション）にだけ余白を付ける */
	body .site-container .vc_row:not(.vc_row .vc_row),
	body .footer,
	body .copyright-area {
		padding-left: var(--th-gutter);
		padding-right: var(--th-gutter);
		box-sizing: border-box;
	}

	/* Gutenberg（ブロックエディタ）の本文 */
	body .clearfix.has-gutenberg-blocks > * {
		width: auto;
		margin-left: var(--th-gutter);
		margin-right: var(--th-gutter);
	}
	body .clearfix.has-gutenberg-blocks > .alignfull {
		margin-left: 0;
		margin-right: 0;
	}
	body .has-gutenberg-blocks .alignleft {
		margin-left: var(--th-gutter);
	}
	body .has-gutenberg-blocks .alignright {
		margin-right: var(--th-gutter);
	}

	/* 追加CSSの「.vc_col-sm-4 { margin: 10px !important }」で幅いっぱいの列が右へはみ出すのを防ぐ */
	body .site-container .wpb_column.vc_column_container.vc_col-sm-4 {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

/* ------------------------------------------------------------------------------------------------------------- */
/* ヘッダー: ロゴ ＋ 加入ステーション数・会員マイページ・ステーション検索 */
/* （中身はウィジェット。追加CSSの .STcount / .login-button / .header-top-right-sidebar の指定を上書き） */
/* ------------------------------------------------------------------------------------------------------------- */
.header.layout-2 .header-left {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
}
.header.layout-2 .header-left > a:first-child {
	flex: 0 1 auto;
	min-width: 0;
}
.header.layout-2 .header-left .logo-content {
	display: block;
	height: auto;
	margin: 0 !important;
}
.header.layout-2 .header-top-right-sidebar-container {
	float: none;
	margin-left: auto;
}
.header .header-top-right-sidebar {
	display: flex;
	align-items: center;
	gap: 12px;
	width: auto !important;
	margin: 0 !important;
	padding-top: 0 !important;
}
.header .header-top-right-sidebar .STcount {
	float: none;
	width: auto;
	padding: 0 !important;
	color: #555;
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
}
.header .header-top-right-sidebar .STcount span.big {
	color: #333;
	font-size: 20px;
}
.header .header-top-right-sidebar .login-button {
	flex: 0 0 auto;
}
/* 親テーマの「.header .header-left a:first-child { width: 270px }」（479px 以下）が当たらないように width: auto */
.header .header-top-right-sidebar .login-button a {
	display: block;
	width: auto;
	transition: opacity .2s;
}
.header .header-top-right-sidebar .login-button a:hover {
	opacity: .8;
}
.header .header-top-right-sidebar .login-button img {
	float: none;
	display: block;
	width: 170px !important;
	max-width: none;
	height: auto;
	margin: 0 !important;
}

/* 1010〜1249px: ロゴを縮めて 1 行に収める */
@media screen and (max-width: 1249px) {
	.header.layout-2 .header-left .logo-content {
		width: 430px !important;
	}
	.header .header-top-right-sidebar .login-button img {
		width: 150px !important;
	}
}

/* タブレット・スマホ: 加入数は「ラベル 数」＋ 日付の 2 行にまとめる */
@media screen and (max-width: 1009px) {
	.header .header-top-right-sidebar {
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px 8px;
	}
	.header .header-top-right-sidebar .STcount {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: baseline;
		gap: 0 6px;
		flex-basis: 100%;
		font-size: 12px;
		line-height: 1.5;
	}
	.header .header-top-right-sidebar .STcount br {
		display: none;
	}
	.header .header-top-right-sidebar .STcount span.big {
		order: 1;
		font-size: 17px;
	}
	.header .header-top-right-sidebar .STcount > span:not(.black02):not(.big) {
		order: 2;
		flex-basis: 100%;
		color: #888;
		font-size: 11px;
	}
	.header.layout-2 .header-left .logo-content {
		width: 340px !important;
	}
	.header.layout-2 .header-top-right-sidebar-container {
		flex: 0 0 300px;
	}
	.header .header-top-right-sidebar .login-button img {
		width: 140px !important;
	}
}

/* スマホ: 1 行目 ロゴ＋メニュー、2 行目 加入数、3 行目 ボタン 2 つ横並び */
@media screen and (max-width: 767px) {
	body .header.layout-2 {
		width: auto;
		/* 下はボタンとスライダー・ページ見出しの間の余白 */
		padding: 12px var(--th-gutter) 20px;
		box-sizing: border-box;
	}
	.header.layout-2 .header-left {
		gap: 10px 12px;
	}
	.header.layout-2 .header-left > a:first-child {
		flex: 1 1 0;
		width: auto;
	}
	.header.layout-2 .header-left .logo-content {
		width: 100% !important;
		max-width: 260px;
	}
	.header.layout-2 .header-left .mobile-menu-switch {
		flex: 0 0 auto;
	}
	.header.layout-2 .header-top-right-sidebar-container {
		flex: 0 0 100%;
		margin: 0;
	}
	.header .header-top-right-sidebar .login-button {
		flex: 1 1 0;
		min-width: 0;
		max-width: 165px;
	}
	.header .header-top-right-sidebar .login-button img {
		width: 100% !important;
		max-width: 100%;
	}
}

/* ------------------------------------------------------------------------------------------------------------- */
/* 本文の文字色: 親テーマの body / p { color: #666 } は薄いので濃くする */
/* （p は親要素の色を引き継ぐようにして、白文字のボックスなど個別の色指定は保つ） */
/* ------------------------------------------------------------------------------------------------------------- */
.theme-page {
	color: #333;
}
.theme-page p {
	color: inherit;
}

/* ------------------------------------------------------------------------------------------------------------- */
/* 投稿ページ（お知らせ・ブログ記事）: 日付の上下の余白 */
/* ------------------------------------------------------------------------------------------------------------- */
.single-post .blog.page-margin-top-section {
	margin-top: 28px;
}
.single-post ul.blog > li.single .comment-box {
	float: none;
	width: auto;
	margin: 0 0 20px;
}
.single-post ul.blog > li.single .comment-box li {
	float: none;
	width: auto;
}
.single-post ul.blog > li.single .comment-box .date .value {
	float: none;
	display: inline-block;
	width: auto;
	padding: 5px 12px;
	border-radius: 3px;
	font-size: 13px !important;
	line-height: 1.5;
	white-space: nowrap;
}
.single-post ul.blog > li.single .comment-box .date .arrow-date {
	display: none;
}
.single-post ul.blog > li.single .post-content {
	float: none;
	width: auto;
}
@media screen and (max-width: 767px) {
	.single-post .blog.page-margin-top-section {
		margin-top: 20px;
	}
	.single-post ul.blog > li.single .comment-box {
		margin-bottom: 16px;
	}
}
