/* =========================================================
   そしがや駅前耳鼻咽喉科クリニック トップページCSS（front-page.php）
   ---------------------------------------------------------
   ・ヘッダー／フッター／ボタン（.btn）／CTA／医院情報は site-common.css
   ・PC：デザインカンプ（幅1280px）準拠、998px以下はSP・タブレット表示
========================================================= */

/* テーマ標準の左右余白を解除して全幅で使う */
.home .l-content__body.l-container {
	max-width: none;
	width: 100%;
	padding: 0;
}

.top {
	overflow: hidden;
	color: var(--color-brown);
	font-family: var(--font-base);
	font-size: 15px;
	line-height: 1.95;
	letter-spacing: .04em;
}
.top *,
.top *::before,
.top *::after {
	box-sizing: border-box;
}
.top :is(h1, h2, h3, p, ul) {
	margin: 0;
	padding: 0;
}
.top ul {
	list-style: none;
}
:where(.top) a { /* :where … ボタン（.btn）の白文字を上書きしないよう、強さを弱めています */
	color: inherit;
	text-decoration: none;
}
.top img {
	display: block;
	max-width: 100%;
	height: auto;
}


/* =========================================================
   共通パーツ
========================================================= */
.top-section {
	position: relative;
	padding: 60px 0 100px;
}

/* 波形の区切り（.has-wave を付けたセクション）
   セクションを波の高さぶん上に持ち上げ、上端に「1つ上のセクションの色（--wave-color）」で波を描く。
   セクションの背景・三角形装飾は波の線のすぐ下から始まり、波の線で上下がきれいに分かれる */
.top {
	--wave-h: 70px; /* 波の高さ */
}
.has-wave {
	margin-top: calc(var(--wave-h) * -1);
	border-top: var(--wave-h) solid transparent;
	background-origin: border-box;
}
.has-wave::before {
	content: "";
	position: absolute;
	z-index: 1;
	top: calc(var(--wave-h) * -1);
	left: 0;
	right: 0;
	height: var(--wave-h);
	background: var(--wave-color, #fff);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0%20L1440,0%20L1440,44%20C1200,60%201000,58%20720,30%20C420,0%20240,0%200,40%20Z'/%3E%3C/svg%3E") center top / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0%20L1440,0%20L1440,44%20C1200,60%201000,58%20720,30%20C420,0%20240,0%200,40%20Z'/%3E%3C/svg%3E") center top / 100% 100% no-repeat;
	pointer-events: none;
}

/* 英字＋見出し */
.top-eyebrow {
	color: var(--color-mint);
	font-family: var(--font-en);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	text-align: center;
}
.top-heading {
	margin-top: 12px !important;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
}

/* 中央寄せのボタン */
.top-button-wrap {
	margin-top: 60px;
	text-align: center;
}
.top .top-button {
	width: min(410px, 100%);
}

/* 丸いバッジ（ファーストビュー・当院の強み） */
.badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 170px;
	height: 170px;
	border-radius: 50%;
	box-shadow: 0 4px 12px rgb(0 0 0 / .12);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.75;
	text-align: center;
	text-shadow: 0 1px 3px rgb(0 0 0 / .15);
}
.badge strong {
	margin-top: 6px;
	color: #fcff2c;
	font-size: 26px;
	line-height: 1.2;
}
.badge strong small {
	color: #fff;
	font-size: 20px;
}
.badge span {
	font-size: 15px;
	line-height: 1.5;
}
.badge-mint   { background: linear-gradient(135deg, #7ccdbf, #5ebeb0); }
.badge-yellow { background: linear-gradient(135deg, #f7c548, #f0aa1e); }
.badge-yellow strong { color: #fcff2c; }
.badge-teal   { background: linear-gradient(135deg, #3cc0c9, #20a9b3); }

/* 「▶ ○○を見る」リンク */
.top-more-link {
	display: table;
	margin: 36px 0 0 auto;
	color: var(--color-teal) !important;
	font-size: 14px;
	font-weight: 700;
}
.top-more-link::before {
	content: "▶";
	margin-right: 4px;
}
.top-more-link:hover {
	text-decoration: underline !important;
	text-underline-offset: 3px;
}


/* =========================================================
   ファーストビュー
========================================================= */
.top-fv {
	position: relative;
	margin-top: 96px; /* 固定ヘッダー（スクロール前）の高さ */
}
.top-fv-images {
	display: grid;
	grid-template-columns: 56.5% 1fr;
	grid-template-rows: 40vh 40vh;
}
.top-fv-main {
	grid-row: 1 / 3;
}
.top-fv-slot {
	position: relative;
	overflow: hidden;
}
.top-fv-slot img {
	--fade: 2s; /* 切り替えのフェードの秒数 */
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	opacity: 0;
	transform: scale(1.08);
	/* 消える時：フェードが終わるまで今の大きさのまま → 消えてから 1.08倍に戻す */
	transition: opacity var(--fade) ease, transform 0s var(--fade);
}
.top-fv-slot img.is-active {
	opacity: 1;
	transform: scale(1);
	/* 表示中：8秒かけて 1.08倍 → 等倍に少しずつ縮小 */
	transition: opacity var(--fade) ease, transform 8s ease-out;
}
/* ページを開いた直後は 1.08倍から始める（site.js が is-ready を付けると縮小開始） */
.top-fv:not(.is-ready) .top-fv-slot img {
	transform: scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
	.top-fv .top-fv-slot img {
		transform: none;
	}
}
/* 左上の白い斜め（ロゴの背景） */
.top-fv-main::after {
	content: "";
	position: absolute;
	z-index: 1;
	inset: 0;
	background: #fff;
	clip-path: polygon(0 0, 55% 0, 0 20%);
}

/* キャッチコピー（縦書き） */
.top-fv-title {
	position: absolute;
	z-index: 2;
	top: 40px;
	left: calc(55.5% - 100px);
	font-weight: 700;
}
.top-fv-catch {
	display: flex;
	flex-direction: row-reverse;
	align-items: flex-start;
	gap: 18px;
}
.top-fv-catch span {
	display: block;
	padding: 18px 12px;
	background: #fff;
	font-size: 34px;
	line-height: 1.2;
	letter-spacing: .12em;
	writing-mode: vertical-rl;
}

/* バッジ */
.top-fv-badges {
	position: absolute;
	z-index: 2;
	left: 42px;
	bottom: -8px;
	display: flex;
	gap: 20px;
}



/* =========================================================
   お知らせ・医院情報
========================================================= */
.top-info {
	position: relative;
	padding: 50px 20px 130px;
	background: var(--color-cream);
}
.top-news,
.top-clinic {
	max-width: 1056px;
	margin: 0 auto;
}
.top-news {
	max-width: 1020px;
	padding: 40px 40px 50px;
	border-radius: 8px;
	background: #fff;
}
.top-news-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.5;
}
.top-news-list {
	margin-top: 30px !important;
	border-top: 1px solid #8a7a72;
}
.top-news-item {
	display: flex;
	gap: 22px;
	align-items: baseline;
	padding: 14px 0;
	border-bottom: 1px solid #8a7a72;
	font-size: 14px;
	transition: color .2s;
}
.top-news-item time {
	flex-shrink: 0;
	font-size: 13px;
}
.top-news-item:hover {
	color: var(--color-teal);
}
.top-news-empty {
	margin-top: 30px !important;
}
.top-clinic {
	margin-top: 45px;
}
.top-chara-rabbit {
	position: absolute;
	top: 260px;
	left: 0;
	width: 75px;
}
.top-chara-koala {
	position: absolute;
	top: 540px;
	right: 0;
	width: 75px;
}


/* =========================================================
   受診される方へ
========================================================= */
.top-visit {
	--wave-color: var(--color-cream); /* 1つ上（お知らせ）の背景色 */
	background: linear-gradient(to bottom right, var(--color-pale) 50%, transparent 50%) left -65px / 360px 190px no-repeat, #fff;
}
.top-visit::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 420px;
	height: 190px;
	background: var(--color-pale);
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
	pointer-events: none;
}
.top-visit-body {
	display: grid;
	grid-template-columns: minmax(0, 530px) minmax(0, 1fr);
	gap: 44px;
	align-items: start;
	margin-top: 44px;
	padding-left: max(20px, calc(50% - 533px));
}
.top-visit-lead {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.6;
}
.top-visit-text p {
	margin-top: 18px !important;
}
.top .top-visit-note {
	margin-top: 50px !important;
	padding: 20px 18px;
	border: 1px solid #d9536b;
	border-radius: 4px;
	font-size: 13.5px;
	line-height: 1.85;
}
.top-visit-image img {
	width: 100%;
	aspect-ratio: 600 / 434;
	object-fit: cover;
}
.top-visit .top-button-wrap {
	position: relative;
	z-index: 1;
}


/* =========================================================
   当院の強み・特徴
========================================================= */
.top-features {
	background: var(--color-gray);
}
.top-features::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 420px;
	height: 200px;
	background: var(--color-pale);
	clip-path: polygon(0 0, 100% 0, 0 100%);
	pointer-events: none;
}
.top-features .top-eyebrow,
.top-features .top-heading {
	position: relative;
}

.top-feature {
	position: relative;
	display: grid;
	grid-template-columns: 58.6% minmax(0, 1fr);
	align-items: start;
	margin-top: 44px;
}
.top-feature + .top-feature {
	margin-top: 60px;
}
.top-feature-image {
	position: relative;
}
.top-feature-image img {
	width: 100%;
	aspect-ratio: 750 / 400;
	object-fit: cover;
}
.top-feature-image .badge {
	position: absolute;
	left: 30px;
	bottom: -40px;
}
.top-feature-card {
	position: relative;
	z-index: 1;
	margin: 60px 9.2% 0 -58px;
	padding: 40px 30px;
	background: #fff;
}
.top-feature-card h3 {
	font-size: 19px;
	font-weight: 700;
	line-height: 1.85;
}
.top-feature-card p {
	margin-top: 20px !important;
	font-size: 14px;
	line-height: 1.95;
}
.top-feature-card .btn {
	width: 100%;
	margin-top: 26px;
}

/* 画像右・テキスト左 */
.top-feature.is-reverse {
	grid-template-columns: minmax(0, 1fr) 58.6%;
}
.top-feature.is-reverse .top-feature-image {
	grid-column: 2;
	grid-row: 1;
}
.top-feature.is-reverse .top-feature-card {
	grid-column: 1;
	grid-row: 1;
	margin: 40px -60px 0 9.5%;
}
.top-feature.is-reverse .badge {
	left: auto;
	right: 30px;
}

/* 写真右下の丸い図（花粉症の項目） */
.top-feature-figs {
	position: absolute;
	right: 24px;
	bottom: -50px;
	display: flex;
	gap: 14px;
}
.top .fig {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 190px;
	aspect-ratio: 1;
	margin: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 6px 20px rgba(76, 41, 27, .12);
	line-height: 1.4;
	text-align: center;
}
.fig-tag {
	padding: 3px 10px;
	border-radius: 99px;
	font-size: 12px;
	font-weight: 700;
}
.fig-tag.is-green  { background: #dcefc8; }
.fig-tag.is-yellow { background: #fde8b0; }
.fig-x {
	color: var(--color-mint);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.1;
}
.fig-doctor strong {
	margin-top: 4px;
	color: var(--color-teal);
	font-size: 26px;
	letter-spacing: .08em;
	line-height: 1.2;
}

/* 治療法の3つの円（ベン図） */
.fig-ring {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44%;
	aspect-ratio: 1;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	mix-blend-mode: multiply;
}
.fig-ring.is-green  { top: 13%; left: 28%; background: rgba(168, 212, 120, .55); }
.fig-ring.is-yellow { top: 43%; left: 11%; background: rgba(247, 197, 72, .55); }
.fig-ring.is-blue   { top: 43%; left: 45%; background: rgba(140, 196, 230, .6); }


/* =========================================================
   診療案内（丸いアイコン）
========================================================= */
.top-medical {
	--wave-color: var(--color-gray); /* 1つ上（当院の強み）の背景色 */
	padding-bottom: 130px;
	background: var(--color-cream);
}
.top-medical-lead {
	margin-top: 60px !important;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.6;
	text-align: center;
}
.top-medical-text {
	margin-top: 10px !important;
	padding-inline: 20px;
	text-align: center;
}
.top-medical-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 50px 20px;
	max-width: 1000px;
	margin: 60px auto 0 !important;
	padding-inline: 20px !important;
}
.top-medical-list > li {
	width: calc((100% - 60px) / 4);
	text-align: center;
}
.top-medical-circle {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	width: 186px;
	height: 186px;
	margin: 0 auto;
	padding: 34px 20px 30px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 3px 12px rgb(0 0 0 / .08);
	transition: box-shadow .2s, translate .2s;
}
.top-medical-circle:hover {
	box-shadow: 0 6px 18px rgb(0 0 0 / .14);
	translate: 0 -3px;
}
.top-medical-name {
	display: flex;
	align-items: center;
	min-height: 2.6em;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
}
.top-medical-circle img {
	width: 80px;
}
.top-medical-list p {
	margin: 24px -15px 0 !important; /* 説明文は丸より少し広く使う */
	font-size: 14px;
	line-height: 2;
}


/* =========================================================
   ご挨拶
========================================================= */
.top-greeting {
	--wave-color: var(--color-cream); /* 1つ上（診療案内）の背景色 */
	background: linear-gradient(to bottom right, var(--color-pale) 50%, transparent 50%) left -60px / 360px 190px no-repeat, var(--color-gray);
}
.top-greeting::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 420px;
	height: 190px;
	background: var(--color-pale);
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
	pointer-events: none;
}
.top-greeting-body {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 50.5% minmax(0, 1fr);
	gap: 50px;
	align-items: start;
	margin-top: 44px;
	padding-right: max(20px, calc(50% - 545px));
}
.top-greeting-image {
	position: relative;
	padding-bottom: 40px;
}
.top-greeting-image img {
	width: 100%;
	aspect-ratio: 647 / 470;
	object-fit: cover;
}
.top-greeting-name {
	position: absolute;
	right: -18px;
	bottom: 0;
	padding: 24px 30px !important;
	border-radius: 8px;
	background: rgb(255 255 255 / .92);
	font-size: 15px;
	line-height: 1.6;
}
.top-greeting-name strong {
	display: block;
	margin-top: 6px;
	font-size: 22px;
	letter-spacing: .08em;
}
.top-greeting-name strong span {
	font-size: 17px;
	letter-spacing: .04em;
}
.top-greeting-text h3 {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.8;
}
.top-greeting-text p {
	margin-top: 14px !important;
	font-size: 14px;
	line-height: 1.95;
}
.top-greeting .top-button-wrap {
	position: relative;
	z-index: 1;
	margin-top: 40px;
}


/* =========================================================
   よくあるご質問
========================================================= */
.top-faq {
	padding: 40px 20px;
	background: var(--color-cream);
}
.top-faq-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 920px;
	margin: 0 auto;
	padding: 46px 20px 50px;
	border-radius: 999px;
	background: #fff;
}
.top-faq-head {
	display: flex;
	align-items: center;
	gap: 50px;
	margin-bottom: 24px;
}
.top-faq-title {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.5;
}
.top-faq-head img {
	width: 116px;
}


/* =========================================================
   タブレット
========================================================= */
@media (min-width: 999px) and (max-width: 1199px) {
	.top-fv-images {
		grid-template-rows: 320px 320px;
	}
	.top-fv-catch span {
		font-size: 28px;
	}
	.top-fv-badges .badge {
		width: 140px;
		height: 140px;
		font-size: 16px;
	}
	.top-fv-badges .badge strong {
		font-size: 21px;
	}
	.top-feature-card {
		padding: 30px 24px;
	}
}


/* =========================================================
   SP・タブレット（998px以下）
========================================================= */
@media (max-width: 998px) {
	.top {
		font-size: 14px;
	}
	.top-section {
		padding: 40px 0 70px;
	}
	.top {
		--wave-h: 40px;
	}
	.top-visit,
	.top-greeting {
		background-size: 180px 95px, auto;
	}
	.top-heading {
		font-size: 22px;
	}
	.top-button-wrap {
		margin-top: 40px;
		padding-inline: 20px;
	}
	.badge {
		width: 104px;
		height: 104px;
		font-size: 10.5px;
		line-height: 1.6;
	}
	.badge strong {
		margin-top: 2px;
		font-size: 16px;
	}
	.badge strong small {
		font-size: 12px;
	}
	.badge span {
		font-size: 10px;
	}
	/* ファーストビューのバッジは文字を大きく（通常14.5px・強調22px） */
	.top-fv-badges .badge {
		width: min(124px, calc((100vw - 24px) / 3));
		height: auto;
		aspect-ratio: 1;
		font-size: 14.5px;
		line-height: 1.4;
		letter-spacing: 0;
	}
	.top-fv-badges .badge strong {
		font-size: 22px;
	}
	.top-fv-badges .badge strong small {
		font-size: 14.5px;
	}
	.top-fv-badges .badge span {
		font-size: 13px;
		line-height: 1.3;
	}

	/* ファーストビュー */
	.top-fv {
		margin-top: 0;
	}
	.top-fv-images {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		height: 80vh;
	}
	.top-fv-main {
		grid-column: 1 / 3;
		grid-row: 1;
		aspect-ratio: 1 / 1;
	}
	.top-fv-sub1,
	.top-fv-sub2 {
		aspect-ratio: 4 / 3.5;
	}
	.top-fv-main::after {
		content: none;
	}
	.top-fv-title {
		top: 14%;
		left: 50%;
		right: 42%;
	}
	.top-fv-catch {
		gap: 8px;
	}
	.top-fv-catch span {
		padding: 10px 6px;
		font-size: clamp(23px,4.5vw,35px);
	}
	.top-fv-badges {
		position: relative;
		left: auto;
		bottom: auto;
		justify-content: center;
		gap: 6px;
		margin-top: -35px !important;
		padding-bottom: 30px;
		background: linear-gradient(transparent 35px, var(--color-cream) 0); /* 写真に重なる部分は透明、下はクリーム色 */
	}

	/* お知らせ・医院情報 */
	.top-info {
		margin-top: 0;
		padding: 10px 20px 90px;
	}
	.top-news {
		padding: 28px 20px 32px;
	}
	.top-news-item {
		flex-direction: column;
		gap: 2px;
	}
	.top-chara-rabbit,
	.top-chara-koala {
		display: none;
	}

	/* 受診される方へ */
	.top-visit-body {
		grid-template-columns: 1fr;
		gap: 30px;
		margin-top: 30px;
		padding-inline: 20px;
	}
	.top-visit-lead {
		font-size: 17px;
	}
	.top .top-visit-note {
		margin-top: 24px !important;
	}
	.top-visit-image {
		margin-right: -20px;
	}
	.top-visit::after,
	.top-features::before,
	.top-greeting::after {
		width: 180px;
		height: 90px;
	}

	/* 当院の強み・特徴 */
	.top-feature,
	.top-feature.is-reverse {
		grid-template-columns: 1fr;
		margin-top: 30px;
	}
	.top-feature + .top-feature {
		margin-top: 50px;
	}
	.top-feature.is-reverse .top-feature-image,
	.top-feature.is-reverse .top-feature-card {
		grid-column: 1;
		grid-row: auto;
	}
	.top-feature-card,
	.top-feature.is-reverse .top-feature-card {
		margin: -30px 20px 0;
		padding: 28px 20px;
	}
	.top-feature-image .badge,
	.top-feature.is-reverse .badge {
		top: -15px;
		bottom: auto;
		left: auto;
		right: 12px;
	}
	.top-feature-card h3 {
		font-size: 16px;
	}
	/* 丸い図は写真の下に横並び */
	.top-feature-figs {
		position: relative;
		right: auto;
		bottom: auto;
		justify-content: center;
		gap: 10px;
		margin-top: -40px;
	}
	.top .fig {
		width: min(150px, calc((100vw - 50px) / 2));
	}
	.fig-tag {
		padding: 2px 6px;
		font-size: 9.5px;
	}
	.fig-x {
		font-size: 13px;
	}
	.fig-doctor strong {
		font-size: 20px;
	}
	.fig-ring {
		font-size: 10px;
	}
	.top-feature.has-figs .top-feature-card {
		margin-top: 20px;
	}

	/* 診療案内 */
	.top-medical {
		padding-bottom: 80px;
	}
	.top-medical-lead {
		margin-top: 30px !important;
		font-size: 16px;
	}
	.top-medical-list {
		gap: 30px 15px;
		margin-top: 40px !important;
	}
	.top-medical-list > li {
		width: calc((100% - 15px) / 2);
	}
	.top-medical-circle {
		width: 140px;
		height: 140px;
		padding: 22px 14px 20px;
	}
	.top-medical-name {
		font-size: 13px;
	}
	.top-medical-circle img {
		width: 54px;
	}
	.top-medical-list p {
		margin: 12px 0 0 !important;
		font-size: 12px;
		line-height: 1.8;
	}
	.top-medical-list p br {
		display: none;
	}

	/* ご挨拶 */
	.top-greeting-body {
		grid-template-columns: 1fr;
		gap: 30px;
		margin-top: 30px;
		padding: 0 20px;
	}
	.top-greeting-image {
		margin-inline: -20px;
	}
	.top-greeting-name {
		right: 0;
		padding: 14px 18px !important;
		font-size: 12px;
	}
	.top-greeting-name strong {
		font-size: 18px;
	}
	.top-greeting-text h3 {
		font-size: 17px;
	}
	.top-greeting-text h3 br {
		display: none;
	}

	/* よくあるご質問 */
	.top-faq-box {
		padding: 30px 24px 34px;
		border-radius: 40px;
	}
	.top-faq-head {
		gap: 16px;
	}
	.top-faq-title {
		font-size: 20px;
	}
	.top-faq-head img {
		width: 80px;
	}
}
