/* =========================================================================
 * 医療法人王心会テーマ — WordPress 用の追加調整
 * （メインの見た目は style.css / style_sp.css。ここは WP 化に伴う補正のみ）
 * ====================================================================== */

/* Gutenberg の Group ブロックが保存時に足す inner-container を
   レイアウト上は透明化し、直下グリッドが崩れないようにする（こじか薬局での知見） */
.wp-block-group__inner-container {
	display: contents;
}

/* 固定ページ本文の基本読みやすさ（.under 下層ページ用） */
.under .entry-content {
	max-width: 980px;
	margin: 0 auto;
	padding: 0 20px 80px;
	line-height: 1.9;
}
/* 元テーマの .under h2/h3（写真バナー用の白抜き大見出し）を、
   本文中の小見出しとして使えるようにここで明示的にリセットする */
.under .entry-content h2 {
	position: static;
	margin: 2em 0 0.8em;
	padding: 0.2em 0 0.2em 0.7em;
	border-left: 5px solid var(--oushinkai-brown, #9C7C52);
	font-size: 1.5em;
	line-height: 1.4;
	text-align: left;
	color: var(--oushinkai-text, #3E3A35);
	text-shadow: none;
	letter-spacing: 0.04em;
	font-weight: 700;
	font-family: var(--f-jp, "Noto Sans JP", sans-serif);
}
.under .entry-content h3 {
	position: static;
	margin: 1.8em 0 0.6em;
	padding: 0;
	background: none;
	font-size: 1.25em;
	line-height: 1.5;
	text-align: left;
	color: var(--oushinkai-brown, #9C7C52);
	text-shadow: none;
	letter-spacing: 0.02em;
	font-weight: 700;
	font-family: var(--f-jp, "Noto Sans JP", sans-serif);
}
.under .entry-content p { margin: 0 0 1.2em; }
.under .entry-content img { height: auto; }
.under .entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.2em 0 2em;
}
.under .entry-content th,
.under .entry-content td {
	border: 1px solid #e2ddd3;
	padding: 12px 14px;
	text-align: left;
	vertical-align: top;
}
.under .entry-content th {
	background: #f6f2ea;
	white-space: nowrap;
}

/* 下層ページの見出し（パンくず的な小見出し） */
.under .page_ttl {
	margin: 0 0 40px;
	padding: 54px 20px;
	background: #f2ede4;
	text-align: center;
}
.under .page_ttl .en {
	display: block;
	font-family: 'Cormorant Garamond', serif;
	font-size: 14px;
	letter-spacing: 0.14em;
	color: var(--oushinkai-brown, #9C7C52);
	text-transform: uppercase;
}
.under .page_ttl .jp {
	display: block;
	margin-top: 6px;
	font-size: 26px;
	font-weight: 700;
	color: var(--oushinkai-text, #3E3A35);
}

/* トップへ戻る */
.totop {
	position: fixed;
	right: 18px;
	bottom: 96px;
	z-index: 40;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--oushinkai-button, #1D4E89);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
}
.totop.show {
	opacity: 1;
	pointer-events: auto;
}
.totop .icon {
	position: absolute;
	top: 52%;
	left: 50%;
	width: 10px;
	height: 10px;
	background: none;
	background-image: none;
	border-radius: 0;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	border-bottom: none;
	border-left: none;
	box-shadow: none;
	transform: translate(-50%, -50%) rotate(-45deg);
}

/* スマホメニュー開閉 */
.menu_toggle {
	display: none;
}
.menu_toggle.open {
	display: block;
}
body.nav-open {
	overflow: hidden;
}
#nav-icon.open span:nth-child(1) { transform: rotate(45deg); top: 9px; }
#nav-icon.open span:nth-child(2) { opacity: 0; }
#nav-icon.open span:nth-child(3) { transform: rotate(-45deg); top: 9px; }

/* お知らせ一覧（アーカイブ / index） */
.oushinkai-archive {
	max-width: 980px;
	margin: 0 auto;
	padding: 50px 20px 80px;
}
.oushinkai-archive .idx2_news {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}
.oushinkai-archive .idx2_news li {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px 20px;
	padding: 20px 4px;
	border-bottom: 1px solid #e6e0d5;
}
.oushinkai-archive .idx2_news li:first-child {
	border-top: 1px solid #e6e0d5;
}
.oushinkai-archive .idx2_news .date {
	flex: 0 0 auto;
	width: 8.5em;
	color: #9C7C52;
	font-family: "Cormorant Garamond", serif;
	font-size: 1.05em;
	letter-spacing: 0.03em;
	text-decoration: none;
}
.oushinkai-archive .idx2_news .cat {
	flex: 0 0 auto;
	padding: 5px 16px;
	border-radius: 999px;
	background: #f2ede4;
	color: #86683f;
	font-size: 0.82em;
	white-space: nowrap;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}
.oushinkai-archive .idx2_news .cat.oshirase { background: #e8eef7; color: #2F5D9F; }
.oushinkai-archive .idx2_news .cat.haginoie-dayori { background: #f1ece0; color: #9C7C52; }
.oushinkai-archive .idx2_news .cat.media { background: #eaf1e8; color: #5c7a58; }
.oushinkai-archive .idx2_news .cat:hover { filter: brightness(0.94); }
.oushinkai-archive .idx2_news .ttl {
	flex: 1 1 260px;
	color: var(--oushinkai-text, #3E3A35);
	text-decoration: none;
	line-height: 1.6;
	transition: color 0.2s;
}
.oushinkai-archive .idx2_news li:hover .ttl {
	color: var(--oushinkai-button, #1D4E89);
}
@media only screen and (max-width: 600px) {
	.oushinkai-archive .idx2_news li {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 18px 4px;
	}
	.oushinkai-archive .idx2_news .date { width: auto; }
}
.oushinkai-archive .pager {
	margin-top: 40px;
	text-align: center;
}
.oushinkai-archive .pager .page-numbers {
	display: inline-block;
	min-width: 38px;
	margin: 0 3px;
	padding: 8px 10px;
	background: #f2ede4;
	color: var(--oushinkai-button, #1D4E89);
	text-align: center;
}
.oushinkai-archive .pager .page-numbers.current {
	background: var(--oushinkai-button, #1D4E89);
	color: #fff;
}
.logo a {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.logo img {
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}
@media only screen and (max-width: 768px) {
	.header_top .logo img {
		max-height: 48px;
	}
}
