/*
Theme Name: Sorairo Clinic
Theme URI: https://example.com/sorairo-clinic
Author: Yohei Sawada
Author URI: https://example.com
Description: 内科・小児科クリニック向けのブロックテーマ（フルサイト編集対応）。デザインは theme.json のデザイントークンで一元管理し、ページはブロックパターンを組み合わせて構築します。カスタム投稿タイプ「医師紹介」「診療科目」に対応。
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.0
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sorairo-clinic
Tags: full-site-editing, block-patterns, one-column, custom-colors, custom-menu, translation-ready
*/

/*
 * ブロックテーマのため、見た目の指定はほぼすべて theme.json 側で行っています。
 * このファイルには、theme.json では表現できないもの（トランジション・装飾擬似要素など）
 * だけを最小限記述します。ブロック固有のCSSは assets/css/ に分割し、
 * functions.php の wp_enqueue_block_style() で「そのブロックが使われたページでのみ」
 * 読み込まれるようにしています。
 */

/* リンク・ボタンのホバー挙動（theme.json の :hover では transition を指定できないため） */
a,
.wp-block-button__link,
.wp-block-navigation-item__content {
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

/* キーボード操作時のフォーカスリング（アクセシビリティ） */
:where(a, button, input, select, textarea, .wp-block-button__link):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* 画像のはみ出し防止 */
img {
	max-width: 100%;
	height: auto;
}

/* オリジナルSVGイラスト
   塗りに theme.json のカラー変数を使っているため、
   「外観 > スタイル」で配色を変えるとイラストの色も追従します。 */
.sorairo-illust {
	display: block;
	width: 100%;
	height: auto;
}

.sorairo-illust--icon {
	width: 84px;
	margin-inline: auto;
}

/* イラストの代わりに写真を置いた場合（assets/img/illust/*.jpg）
   イラストと同じ場所に収まるよう、比率を保ったまま枠いっぱいに表示する。 */
.sorairo-photo {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--wp--custom--radius--medium, 16px);
}

/* ヒーローと特長は面積が大きいので、角丸もひとまわり大きく */
.sorairo-photo--hero,
.sorairo-photo--access {
	border-radius: var(--wp--custom--radius--large, 28px);
}

/* 受診の流れ：STEP番号を中央寄せのピル型にする */
.sorairo-step__num {
	display: block;
	width: fit-content;
	min-width: 6.5em;
	margin-inline: auto;
}

/* ヘッダー：画面が狭いときは電話番号を隠し、WEB予約ボタンだけ残す
   （電話はフッターとCTAセクションにも掲載しているため） */
@media (max-width: 900px) {
	.sorairo-header__contact > .wp-block-group:first-child {
		display: none;
	}
}

/* 印刷時は診療時間表とアクセス情報が読めれば十分なので、装飾を落とす */
@media print {
	.sorairo-header,
	.sorairo-footer,
	.wp-block-buttons {
		display: none;
	}
}
