/*
 * 本文（ブロック）用スタイル
 * フロントとブロックエディタの両方で読み込む。
 *
 * 独自クラス（ブロックの「追加 CSS クラス」で指定）
 *   kc-icon fa-xxx        … 見出し・段落・ボタンの先頭に Font Awesome アイコン（例: "kc-icon fa-clock"）
 *   kc-icon-after fa-xxx  … 末尾にアイコン
 *   kc-icon--blue         … アイコン色を青に（既定はオレンジ）
 *   kc-center             … 中央揃え
 *   kc-lead               … オレンジの大きなリード文
 *   kc-tel-large          … 電話番号の強調表示
 *   kc-box / kc-box--orange / kc-box--gray … 囲み枠
 *   kc-borderbox          … タイトルタブ付きの赤枠（子に kc-borderbox__title 見出し + kc-borderbox__body グループ）
 *   kc-iconcards / kc-iconcard fa-xxx … トップの丸アイコンカード
 *   kc-post-cards         … クエリーループのカード表示
 *   kc-cta-band           … トップ下部の濃色帯（グループを「全幅」で）
 *   kc-btn-red / kc-btn-blue … ボタン色。ボタン内の斜体 (<em>) は小さな補足文として表示
 *   kc-hours-table        … 診療時間表
 */

:root {
	--kc-key: #d36200;
	--kc-key-dark: #af2e00;
	--kc-accent: #ff6900;
	--kc-text: #212529;
	--kc-fa: "Font Awesome 6 Free";
}

.entry-content,
.editor-styles-wrapper {
	color: var(--kc-text);
	font-family: "Noto Sans JP", sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.entry-content p,
.editor-styles-wrapper p {
	margin: 0 0 1.2em;
	line-height: 1.9;
}

.entry-content a {
	color: #1e73be;
}

/* ---------- 見出し ---------- */
.entry-content :is(h1, h2, h3, h4, h5, h6),
.editor-styles-wrapper :is(h2, h3, h4, h5, h6) {
	font-family: "Noto Sans JP", sans-serif;
	font-weight: 400;
	line-height: 1.2;
	color: var(--kc-text);
}

.entry-content h2,
.editor-styles-wrapper h2 {
	margin: 42px 0 33.6px;
	padding: 22.4px 0 19.6px;
	font-size: 28px;
	border-top: 2px solid var(--kc-key);
	border-bottom: 1px solid #e9e9e9;
}

.entry-content h3,
.editor-styles-wrapper h3 {
	position: relative;
	margin: 42px 0 33.6px;
	padding: 0 0 8px;
	font-size: 28px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.entry-content h3::after,
.editor-styles-wrapper h3::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 30%;
	border-bottom: 1px solid var(--kc-key);
}

.entry-content h4,
.editor-styles-wrapper h4 {
	margin: 32px 0 20px;
	font-size: 22px;
}

.entry-content h5,
.editor-styles-wrapper h5 {
	margin: 28px 0 16px;
	padding-left: 10px;
	font-size: 18px;
	border-left: 3px solid var(--kc-key);
}

.entry-content > :first-child {
	margin-top: 0;
}

/* 見出しの装飾を外したもの（アイコン見出しなど） */
.entry-content :is(h2, h3, h4, h5).is-style-plain,
.editor-styles-wrapper :is(h2, h3, h4, h5).is-style-plain,
.entry-content :is(h2, h3).kc-icon,
.entry-content :is(h2, h3).kc-icon-after,
.editor-styles-wrapper :is(h2, h3).kc-icon,
.editor-styles-wrapper :is(h2, h3).kc-icon-after {
	padding: 0;
	border: 0;
}

.entry-content :is(h2, h3).is-style-plain::after,
.editor-styles-wrapper :is(h2, h3).is-style-plain::after,
.entry-content :is(h2, h3).kc-icon::after,
.editor-styles-wrapper :is(h2, h3).kc-icon::after {
	content: none;
}

/* ---------- リスト・区切り・表・画像 ---------- */
.entry-content ul,
.entry-content ol {
	margin: 10px 0;
	padding-left: 40px;
	line-height: 1.65;
}

.entry-content li {
	margin-bottom: 0.8em;
}

.entry-content hr,
.editor-styles-wrapper hr {
	margin: 16px 0;
	border: 0;
	border-top: 2px solid currentColor;
}

.entry-content .wp-block-separator.has-background:not(.is-style-dots) {
	height: 2px;
	border: 0;
}

.entry-content .wp-block-image figcaption,
.entry-content .wp-element-caption {
	margin: 6px 0 12px;
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
}

.entry-content .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.entry-content .wp-block-table :is(td, th) {
	padding: 7px;
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.entry-content .wp-block-table figcaption {
	margin-top: 6.4px;
}

.has-subtle-pale-pink-background-color {
	background-color: #fcf0ef;
}

/* ---------- 独自クラス: アイコン ---------- */
.kc-icon::before,
.kc-icon-after::after,
.kc-iconcard::before {
	font-family: var(--kc-fa);
	font-weight: 900;
	font-style: normal;
	content: var(--fa);
	color: var(--kc-accent);
	-webkit-font-smoothing: antialiased;
}

.kc-icon::before {
	display: inline-block;
	margin-right: 0.2em;
}

.kc-icon-after::after {
	display: inline-block;
	position: static;
	width: auto;
	margin-left: 0.2em;
	border: 0;
	font-size: 0.8em;
}

.kc-icon--blue::before,
.kc-icon--blue::after {
	color: #3a5199;
}

.kc-center {
	text-align: center;
}

.entry-content p.kc-lead,
.editor-styles-wrapper p.kc-lead {
	color: var(--kc-accent);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.4;
}

.kc-tel-large {
	text-align: center;
	font-size: 24px;
	font-weight: 700;
	color: var(--kc-accent);
}

/* ---------- 独自クラス: 囲み枠 ---------- */
.kc-box {
	margin-bottom: 40px;
	padding: 16px 20px 30px;
	border-radius: 5px;
}

.kc-box--orange {
	background-color: rgba(252, 185, 0, 0.2);
	border: 3px solid var(--kc-accent);
}

.kc-box--gray {
	padding: 40px;
	background-color: rgba(243, 244, 245, 0.5);
	border-radius: 0;
}

.kc-box > h2:first-child,
.kc-box > .wp-block-group__inner-container > h2:first-child {
	margin: 0 0 33.6px;
}

.kc-box > .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

@media (max-width: 767.98px) {
	.kc-box {
		padding: 12px 10px 20px;
	}
}

/* タイトルタブ付きの枠 */
.kc-borderbox {
	margin-bottom: 32px;
}

.entry-content .kc-borderbox__title,
.editor-styles-wrapper .kc-borderbox__title {
	display: inline-block;
	margin: 0;
	padding: 8px 24px 6.4px;
	color: #fff;
	background-color: #dc3545;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	border: 0;
}

.kc-borderbox__body {
	padding: 35px 32px 32px;
	border: 2px solid #dc3545;
}

/* 色違い（--red が既定）と、タイトルを全幅の帯にする --banner */
.kc-borderbox--green {
	--kc-borderbox-color: #28a745;
}

.kc-borderbox--orange {
	--kc-borderbox-color: #ffa536;
}

.kc-borderbox--blue {
	--kc-borderbox-color: #007bff;
}

.entry-content .kc-borderbox :is(.kc-borderbox__title),
.editor-styles-wrapper .kc-borderbox :is(.kc-borderbox__title) {
	background-color: var(--kc-borderbox-color, #dc3545);
}

.kc-borderbox .kc-borderbox__body {
	border-color: var(--kc-borderbox-color, #dc3545);
}

.entry-content .kc-borderbox--banner .kc-borderbox__title,
.editor-styles-wrapper .kc-borderbox--banner .kc-borderbox__title {
	display: block;
}

.kc-borderbox__body > :last-child,
.kc-borderbox__body > .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

@media (max-width: 767.98px) {
	.kc-borderbox__body {
		padding: 20px 16px;
	}
}

/* ---------- 独自クラス: アイコンカード ---------- */
/* クラシックテーマではグループの内側に .wp-block-group__inner-container が入るため、両方を対象にする */
.kc-iconcards:not(:has(> .wp-block-group__inner-container)),
.kc-iconcards > .wp-block-group__inner-container {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 15px 30px;
	margin-bottom: 0;
}

.kc-iconcard {
	position: relative;
	text-align: center;
	color: #333;
}

.kc-iconcard::before {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	margin: 0 auto;
	font-size: 36px;
	border: 1px solid var(--kc-accent);
	border-radius: 50%;
}

.entry-content .kc-iconcard h3,
.editor-styles-wrapper .kc-iconcard h3 {
	margin: 18.9px 0 12.6px;
	padding: 0;
	font-size: 21px;
	line-height: 1.4;
	text-align: center;
	border: 0;
}

.kc-iconcard h3::after {
	content: none;
}

.kc-iconcard h3 a {
	color: #333;
	text-decoration: none;
}

/* カード全体をクリック可能にする */
.entry-content .kc-iconcard h3 a::before {
	content: "";
	position: absolute;
	inset: 0;
}

.entry-content .kc-iconcard p,
.editor-styles-wrapper .kc-iconcard p {
	margin: 0 0 8px;
	font-size: 16px;
	line-height: 1.8;
	text-align: center;
}

.kc-iconcard:hover h3 a {
	color: var(--kc-key);
}

@media (max-width: 991.98px) {
	.kc-iconcards:not(:has(> .wp-block-group__inner-container)),
	.kc-iconcards > .wp-block-group__inner-container {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575.98px) {
	.kc-iconcards:not(:has(> .wp-block-group__inner-container)),
	.kc-iconcards > .wp-block-group__inner-container {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

/* ---------- 独自クラス: 投稿カード（クエリーループ） ---------- */
.kc-post-cards .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kc-post-cards .wp-block-post {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.125);
	border-radius: 4px;
	overflow: hidden;
}

.kc-post-cards .wp-block-post-featured-image {
	margin: 0;
	border-bottom: 1px solid #e5e5e5;
}

.kc-post-cards .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}

.kc-post-cards .wp-block-post-terms {
	position: absolute;
	top: 0;
	right: 0;
	margin: 0;
	padding: 3px 8px;
	font-size: 10px;
	line-height: 1.5;
	color: #fff;
	background-color: #395098;
}

.kc-post-cards .wp-block-post-terms a {
	color: #fff;
	text-decoration: none;
	pointer-events: none;
}

.entry-content .kc-post-cards .wp-block-post-title,
.editor-styles-wrapper .kc-post-cards .wp-block-post-title {
	margin: 18px 20px 0;
	padding: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	border: 0;
}

.kc-post-cards .wp-block-post-title::after {
	content: none;
}

.kc-post-cards .wp-block-post-title a {
	color: var(--kc-text);
	text-decoration: none;
}

.entry-content .kc-post-cards .wp-block-post-title a::before {
	content: "";
	position: absolute;
	inset: 0;
}

.kc-post-cards .wp-block-post-date {
	margin: 5.5px 20px 18px;
	font-size: 11px;
	line-height: 1.5;
	color: #666;
}

@media (max-width: 991.98px) {
	.kc-post-cards .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575.98px) {
	.kc-post-cards .wp-block-post-template {
		grid-template-columns: 1fr;
	}
}

/* ---------- 独自クラス: 濃色帯 + ボタン ---------- */
.kc-cta-band {
	padding: 4rem 15px 2rem;
	background-color: #4d4d4d;
	color: #eee;
}

.kc-cta-band > :not(.wp-block-group__inner-container),
.kc-cta-band > .wp-block-group__inner-container > * {
	max-width: 1110px;
	margin-left: auto;
	margin-right: auto;
}

.entry-content .kc-cta-band h2,
.editor-styles-wrapper .kc-cta-band h2 {
	margin-top: 0;
	margin-bottom: 2.5rem;
	padding: 0;
	color: #eee;
	font-size: 2rem;
	text-align: center;
	border: 0;
}

.kc-cta-band .wp-block-buttons {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
}

@media (max-width: 767.98px) {
	.kc-cta-band {
		padding-top: 3rem;
	}

	.kc-cta-band .wp-block-buttons {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

.wp-block-button:is(.kc-btn-red, .kc-btn-blue) {
	width: 100%;
	margin: 0;
}

.wp-block-button:is(.kc-btn-red, .kc-btn-blue) .wp-block-button__link {
	display: block;
	width: 100%;
	padding: 9.6px 10px;
	color: #fff;
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	border-radius: 4px;
}

.kc-btn-red .wp-block-button__link {
	background-color: #c5001a;
	border: 1px solid #c5001a;
}

.kc-btn-blue .wp-block-button__link {
	background-color: #3a5199;
	border: 1px solid #3a5199;
}

.wp-block-button:is(.kc-btn-red, .kc-btn-blue) .wp-block-button__link:hover {
	filter: brightness(1.1);
}

.wp-block-button.kc-icon::before {
	content: none;
}

.wp-block-button.kc-icon .wp-block-button__link::before {
	font-family: var(--kc-fa);
	font-weight: 400;
	content: var(--fa);
	margin-right: 0.3em;
}

.wp-block-button.kc-icon.kc-icon--solid .wp-block-button__link::before {
	font-weight: 900;
}

.wp-block-button__link em {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	font-style: normal;
}

/* ---------- 独自クラス: 診療時間表 ---------- */
.entry-content .kc-hours-table table {
	table-layout: auto;
}

.kc-hours-table td {
	text-align: center;
}

/* ---------- 全幅・幅広 ---------- */
.entry-content .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* ---------- サイトマップ ---------- */
.kc-sitemap {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
}

.entry-content .kc-sitemap__title {
	margin-top: 0;
	font-size: 20px;
}

@media (max-width: 767.98px) {
	.kc-sitemap {
		grid-template-columns: 1fr;
	}
}

/* ---------- Contact Form 7 ---------- */
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7 textarea,
.wpcf7 select {
	width: 100%;
	padding: 6px 12px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.wpcf7 input[type="submit"] {
	padding: 8px 32px;
	color: #fff;
	background-color: var(--kc-key);
	border: 1px solid var(--kc-key-dark);
	border-radius: 4px;
	cursor: pointer;
}

@media (max-width: 767.98px) {
	.entry-content {
		font-size: 14px;
	}

	.entry-content p {
		font-size: 14px;
	}

	.entry-content :is(h2, h3) {
		font-size: 22px;
	}
}
