/* ==========================================
 * Top Page Section Styles (.s_*)
 * Strictly matching Figma Frame 11:935
 * ========================================== */

/* ==========================================
 * 1. Hero Section (.s_hero) - Figma 47:226
 * ========================================== */
.s_hero {
	padding-top: 20px;
	padding-bottom: 60px;
}

.s_hero_container {
	width: 100%;
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 24px;
}

.s_hero_banner {
	position: relative;
	width: 100%;
	height: 664px;
	border-radius: 30px;
	overflow: hidden;
}

.s_hero_banner_slides {
	position: relative;
	width: 100%;
	height: 100%;
}

.s_hero_banner_img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	will-change: opacity, transform;
}

/* Banner Cross-fade every 5 seconds (15s total cycle for 3 images) */
/* Synchronized with hero mascot wave (fades every 5s starting at 4.5s, 9.5s, 14.5s) */
.s_hero_banner_img_1 {
	animation: heroBannerFade1 14s ease-in-out infinite;
}

.s_hero_banner_img_2 {
	animation: heroBannerFade2 14s ease-in-out infinite;
}

/* 2枚の場合 */
@keyframes heroBannerFade1 {
	0%,
	46.67% {
		opacity: 1;
		transform: scale(1);
		z-index: 1;
	}
	50% {
		opacity: 1;
		transform: scale(1.02);
		z-index: 1;
	}
	50.01%,
	96.66% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 0;
	}
	96.67% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 2;
	}
	100% {
		opacity: 1;
		transform: scale(1);
		z-index: 2;
	}
}
@keyframes heroBannerFade2 {
	0%,
	46.66% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 0;
	}
	46.67% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 2;
	}
	50% {
		opacity: 1;
		transform: scale(1);
		z-index: 2;
	}
	50.01%,
	96.67% {
		opacity: 1;
		transform: scale(1);
		z-index: 1;
	}
	100% {
		opacity: 1;
		transform: scale(1.02);
		z-index: 1;
	}
}
/*3枚の場合
.s_hero_banner_img_3 {
	animation: heroBannerFade3 14s ease-in-out infinite;
}

@keyframes heroBannerFade1 {

	0%,
	30% {
		opacity: 1;
		transform: scale(1);
		z-index: 1;
	}

	33.33% {
		opacity: 1;
		transform: scale(1.02);
		z-index: 1;
	}

	33.34%,
	96.66% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 0;
	}

	96.67% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 2;
	}

	100% {
		opacity: 1;
		transform: scale(1);
		z-index: 2;
	}
}

@keyframes heroBannerFade2 {

	0%,
	29.99% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 0;
	}

	30% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 2;
	}

	33.33% {
		opacity: 1;
		transform: scale(1);
		z-index: 2;
	}

	33.34%,
	63.33% {
		opacity: 1;
		transform: scale(1);
		z-index: 1;
	}

	66.67% {
		opacity: 1;
		transform: scale(1.02);
		z-index: 1;
	}

	66.68%,
	100% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 0;
	}
}

@keyframes heroBannerFade3 {

	0%,
	63.32% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 0;
	}

	63.33% {
		opacity: 0;
		transform: scale(1.02);
		z-index: 2;
	}

	66.67% {
		opacity: 1;
		transform: scale(1);
		z-index: 2;
	}

	66.68%,
	96.67% {
		opacity: 1;
		transform: scale(1);
		z-index: 1;
	}

	100% {
		opacity: 1;
		transform: scale(1.02);
		z-index: 1;
	}
}
*/

.s_hero_copy {
	position: absolute;
	top: 50px;
	left: 60px;
	font-family: var(--font_maru_gothic);
	font-size: 2.5em;
	/* 40px */
	font-weight: 700;
	color: var(--color_brown);
	letter-spacing: 0.15em;
	line-height: 1.5;
	z-index: 3;
}

.s_hero_subgrid {
	display: grid;
	grid-template-columns: 410px 385px 1fr;
	gap: 32px;
	align-items: start;
	margin-top: 32px;
}

/* Hero Topics Box */
.s_hero_topics {
	width: 100%;
	max-width: 385px;
}

.s_hero_topics_header {
	display: flex;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid var(--color_black);
}

.s_hero_topics_title_text {
	font-family: var(--font_hiragino_maru, var(--font_maru_gothic));
	font-size: 1.25em;
	/* 20px - W6 in Figma */
	font-weight: 700;
	color: var(--color_black);
	letter-spacing: 0.05em;
	line-height: 1.8;
}

.s_hero_topics_body {
	padding: 37px 0;
	border-bottom: 1px solid var(--color_black);
}

.s_hero_topics_link {
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
	color: var(--color_black);
	transition: var(--transition_base);
}

.s_hero_topics_link:hover {
	opacity: 0.75;
}

.s_hero_topics_date {
	font-family: var(--font_date, 'Quicksand', sans-serif);
	font-size: 1.125em;
	/* 18px */
	font-weight: 500;
	color: var(--color_black);
	flex-shrink: 0;
}

.s_hero_topics_text {
	font-family: var(--font_hiragino_maru, var(--font_maru_gothic));
	font-size: 1.125em;
	/* 18px - W5 in Figma */
	font-weight: 500;
	color: var(--color_black);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-grow: 1;
}

/* Hero 3-Faces Mascot: Stepping / Bouncing Wave Animation (5s cycle) */
.s_hero_character_wrap {
	display: flex;
	justify-content: flex-end;
	position: relative;
	z-index: 5;
	margin-top: -120px;
}

.s_hero_character_svg {
	width: 500px;
	max-width: 100%;
	height: 250px;
	display: block;
}

.s_hero_head_anim_1,
.s_hero_head_anim_2,
.s_hero_head_anim_3 {
	transform-box: fill-box;
	transform-origin: 50% 50%;
	will-change: transform;
	animation-name: heroHeadWave;
	animation-duration: 4.5s;
	animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
	animation-iteration-count: infinite;
}

/* Synchronized with hero banner cross-fade (fades every 5s starting at 4.5s) */
/* Overlapping smooth wave: 1st starts as banner fades (4.5s), 2nd starts when 1st is almost down (4.82s), 3rd starts when 2nd is almost down (5.14s) */
.s_hero_head_anim_1 {
	animation-delay: 4.4s;
}

.s_hero_head_anim_2 {
	animation-delay: 4.72s;
}

.s_hero_head_anim_3 {
	animation-delay: 5.04s;
}

@keyframes heroHeadWave {
	0% {
		transform: translateY(0);
	}

	3% {
		transform: translateY(-6px);
	}

	6.5% {
		transform: translateY(-24px);
	}

	10% {
		transform: translateY(-8px);
	}

	13.5% {
		transform: translateY(0);
	}

	15% {
		transform: translateY(1.2px);
	}

	16.5% {
		transform: translateY(0);
	}

	100% {
		transform: translateY(0);
	}
}

/* Index Section Title Mascot Icon Popup */
.c_ttl_top .c_ttl_icon {
	opacity: 0;
	transform: scale(0.6) translateY(16px);
	will-change: transform, opacity;
}

.c_anim_fade_up.is_visible .c_ttl_icon,
.c_ttl_top.is_visible .c_ttl_icon,
.c_ttl_icon.is_visible {
	opacity: 1;
	animation:
		mascotPopOut 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
		mascotFloatFlow 4s ease-in-out 0.75s infinite;
}

/* ==========================================
 * 2. 当院について Section (.s_top_about) - Figma 11:1148
 * ========================================== */
.s_top_about {
	padding: 130px 0 80px;
	text-align: center;
	position: relative;
}

.s_top_about_inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Floating Mascot Faces (Figma 107:6129, 107:6107, 107:6100) */
.s_top_about_mascot {
	position: absolute;
	pointer-events: none;
	z-index: 2;
	opacity: 0;
	transform: scale(0.3) translateY(30px);
	will-change: transform, opacity;
}

.s_top_about_mascot_1 {
	top: 10px;
	left: 40px;
	transform: rotate(-15deg) scale(0.3) translateY(30px);
}

.s_top_about_mascot_2 {
	top: 50%;
	right: 40px;
	transform: translateY(-50%) rotate(18deg) scale(0.3) translateY(30px);
}

.s_top_about_mascot_3 {
	bottom: -10px;
	left: 100px;
	transform: rotate(-12deg) scale(0.3) translateY(30px);
}

.s_top_about_mascot_img {
	width: 150px;
	height: auto;
	display: block;
}

/* About Mascots: Pop Up on Scroll, then Floating on Default */
.s_top_about_mascot_1.is_visible {
	opacity: 1;
	animation:
		aboutMascotPopIn1 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
		aboutMascotFloat1 4.2s ease-in-out 0.8s infinite;
}

.s_top_about_mascot_2.is_visible {
	opacity: 1;
	animation:
		aboutMascotPopIn2 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards,
		aboutMascotFloat2 3.8s ease-in-out 0.95s infinite;
}

.s_top_about_mascot_3.is_visible {
	opacity: 1;
	animation:
		aboutMascotPopIn3 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards,
		aboutMascotFloat3 4.6s ease-in-out 1.1s infinite;
}

@keyframes aboutMascotPopIn1 {
	0% {
		opacity: 0;
		transform: rotate(-15deg) scale(0.3) translateY(40px);
	}

	70% {
		opacity: 1;
		transform: rotate(-15deg) scale(1.08) translateY(-8px);
	}

	100% {
		opacity: 1;
		transform: rotate(-15deg) scale(1) translateY(0);
	}
}

@keyframes aboutMascotPopIn2 {
	0% {
		opacity: 0;
		transform: translateY(-50%) rotate(18deg) scale(0.3) translateY(40px);
	}

	70% {
		opacity: 1;
		transform: translateY(-50%) rotate(18deg) scale(1.08) translateY(-8px);
	}

	100% {
		opacity: 1;
		transform: translateY(-50%) rotate(18deg) scale(1) translateY(0);
	}
}

@keyframes aboutMascotPopIn3 {
	0% {
		opacity: 0;
		transform: rotate(-12deg) scale(0.3) translateY(40px);
	}

	70% {
		opacity: 1;
		transform: rotate(-12deg) scale(1.08) translateY(-8px);
	}

	100% {
		opacity: 1;
		transform: rotate(-12deg) scale(1) translateY(0);
	}
}

@keyframes aboutMascotFloat1 {

	0%,
	100% {
		transform: rotate(-15deg) translateY(0);
	}

	50% {
		transform: rotate(-18deg) translateY(-16px);
	}
}

@keyframes aboutMascotFloat2 {

	0%,
	100% {
		transform: translateY(-50%) rotate(18deg) translateY(0);
	}

	50% {
		transform: translateY(-50%) rotate(21deg) translateY(-18px);
	}
}

@keyframes aboutMascotFloat3 {

	0%,
	100% {
		transform: rotate(-12deg) translateY(0);
	}

	50% {
		transform: rotate(-15deg) translateY(-14px);
	}
}

.s_top_about_header {
	margin-bottom: 40px;
}

.s_top_about_content {
	max-width: 646px;
	margin: 0 auto 48px;
	text-align: center;
	position: relative;
	z-index: 3;
}

.s_top_about_lead {
	font-family: var(--font_hiragino_maru, var(--font_maru_gothic));
	font-size: 1.5625em;
	/* 25px - Figma 11:1114 W5 */
	font-weight: 700;
	color: var(--color_black);
	letter-spacing: 0.1em;
	line-height: 1.5;
	margin: 0 0 24px 0;
	white-space: nowrap;
}

.s_top_about_text {
	font-family: var(--font_hiragino_maru, var(--font_maru_gothic));
	font-size: 1.125em;
	/* 18px - Figma W4 */
	font-weight: 400;
	line-height: 2.2;
	color: var(--color_black);
	letter-spacing: 0.06em;
	margin: 0;
}

.s_top_about_cta {
	text-align: center;
	position: relative;
	z-index: 3;
}


/* ==========================================
 * 3. クリニック紹介 Section (.s_top_clinic) - Figma 100:669
 * ========================================== */
.s_top_clinic {
	position: relative;
	padding: 150px 0;
	overflow: hidden;
}

/* Centered White Oval Background Shape (Figma 100:669: 912px x 730px) */
.s_top_clinic_oval_bg {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 912px;
	height: 730px;
	background-color: var(--color_white);
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}

.s_top_clinic_header {
	display: flex;
	justify-content: center;
	margin-bottom: 48px;
	position: relative;
	z-index: 1;
}

/* Full-Width Seamless 5-Photo Sliding Carousel (Figma 107:5734 - 5s sliding animation) */
.s_top_clinic_gallery_wrap {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	overflow: hidden;
	margin-bottom: 48px;
	position: relative;
	z-index: 1;
}

.s_top_clinic_gallery_track {
	display: flex;
	width: max-content;
	animation: topClinicSlide 45s linear infinite;
	will-change: transform;
}

.s_top_clinic_gallery_group {
	display: flex;
	flex-shrink: 0;
}

.s_top_clinic_gallery_item {
	width: 400px;
	height: 256px;
	flex-shrink: 0;
	overflow: hidden;
}

.s_top_clinic_gallery_img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

@keyframes topClinicSlide {
	0% {
		transform: translate3d(0, 0, 0);
	}

	100% {
		transform: translate3d(-50%, 0, 0);
	}
}

.s_top_clinic_cta {
	display: flex;
	justify-content: center;
	position: relative;
	z-index: 1;
}


/* ==========================================
 * 4. お知らせ Section (.s_news) - Figma 24:611
 * ========================================== */
.s_news {
	background-color: var(--color_bg);
	padding: 90px 0;
	margin: 20px 0;
}

.s_news .c_ttl_icon {
	width: 48px;
	height: 45px;
	object-fit: contain;
}

.s_news_inner {
	display: grid;
	grid-template-columns: 280px 1fr;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"header list"
		"cta    list";
	gap: 0 60px;
	align-items: stretch;
}

.s_news_left {
	grid-area: header;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
}

.s_news_right {
	grid-area: list;
}

.s_news_cta {
	grid-area: cta;
	align-self: end;
	display: flex;
	justify-content: flex-start;
	width: 100%;
}

/* ==========================================
 * 5. アクセス Section (.s_access) - Figma 24:609
 * ========================================== */
.s_access {
	padding: 80px 0;
	background-color: var(--color_white);
	scroll-margin-top: 80px;
}

#access {
	scroll-margin-top: 80px;
}

.s_access_grid {
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: 48px;
	align-items: start;
}

.s_access_info {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.s_access_address {
	font-family: var(--font_hiragino_maru, var(--font_maru_gothic));
	font-size: 1.125em;
	/* 18px */
	line-height: 1.8;
	color: var(--color_black);
	letter-spacing: 0.1em;
	margin-top: -8px;
}

.s_access_address br {
	display: none;
}

.s_access_transit_list {
	display: flex;
	flex-direction: column;
	gap: 34px;
	margin-top: 15px;
}

.s_access_transit_item {
	display: flex;
	align-items: center;
	gap: 16px;
}

.s_access_transit_icon {
	width: 40px;
	height: 40px;
	object-fit: contain;
	flex-shrink: 0;
}

.s_access_transit_content {
	display: flex;
	flex-direction: column;
	gap: 0px;
}

.s_access_transit_name {
	font-family: var(--font_hiragino_maru, var(--font_maru_gothic));
	font-size: 1.125em;
	/* 18px - W6 in Figma */
	font-weight: 600;
	color: var(--color_black);
	letter-spacing: 0.05em;
	line-height: 1;
}

.s_access_transit_detail {
	font-family: var(--font_hiragino_maru, var(--font_maru_gothic));
	font-size: 1.125em;
	/* 18px - W4 in Figma */
	color: var(--color_black);
	letter-spacing: 0.05em;
	line-height: 1.5;
}

.s_access_map_wrap {
	width: 100%;
	height: 340px;
	border-radius: 20px;
	overflow: hidden;
}

.s_access_map_iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* ==========================================
 * 6. Responsive Adjustments
 * ========================================== */
@media screen and (max-width: 1440px) {
	.s_hero_banner {
		height: 520px;
	}

	.s_hero_copy {
		font-size: 2.125em;
	}

	.s_hero_subgrid {
		grid-template-columns: 380px 340px 1fr;
		gap: 20px;
	}

	.s_hero_character_wrap {
		margin-top: -100px;
	}
}

@media screen and (max-width: 1200px) {
	.s_hero_banner {
		height: 420px;
	}

	.s_hero_character_svg {
		max-width: 400px;
	}

	.s_hero_subgrid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 24px;
		margin-top: 0;
	}

	.s_hero_character_wrap {
		grid-column: 1 / -1;
		order: 1;
	}

	.s_hero_schedule {
		order: 2;
		width: 100%;
	}

	.s_hero_topics {
		order: 3;
		max-width: 100%;
	}
}

@media screen and (max-width: 1024px) {
	.s_news_inner {
		display: flex;
		flex-direction: column;
		gap: 32px;
	}

	.s_news_left {
		align-items: center;
		text-align: center;
	}

	.s_news_cta {
		justify-content: center;
		margin-top: 0;
	}

	.s_access_grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.s_access_map_wrap {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 10;
		min-height: 380px;
	}
}

@media screen and (max-width: 768px) {
	.s_hero {
		padding-top: 50px;
		padding-bottom: 40px;
	}

	.s_hero_banner {
		height: 320px;
		border-radius: 16px;
	}

	.s_hero_copy {
		font-size: 1.5em;
		top: 24px;
		left: 24px;
		letter-spacing: 0.1em;
	}

	.s_hero_subgrid {
		display: flex;
		flex-direction: column;
		gap: 16px;
		margin-top: 16px;
	}

	.s_hero_character_wrap {
		order: 1;
		width: 100%;
		justify-content: end;
	}

	.s_hero_topics {
		order: 2;
		max-width: 100%;
		margin-top: -50px;
	}

	.s_hero_topics_body {
		padding: 10px 0;
	}

	.s_hero_schedule {
		order: 3;
		display: flex;
		justify-content: center;
		width: 100%;
		max-width: 100%;
		padding-top: 30px;
		margin-bottom: 24px;
	}

	.s_top_about {
		padding: 90px 0 50px;
	}

	.s_top_clinic,
	.s_news,
	.s_access {
		padding: 50px 0;
	}

	.s_news_left {
		align-items: center;
		text-align: left;
		justify-content: center;
	}

	.s_news_cta {
		justify-content: center;
		margin-top: 0;
	}

	.s_access,
	#access {
		scroll-margin-top: 64px;
	}

	.s_top_about_lead {
		font-size: 1.375em;
		font-weight: 700;
		text-wrap: wrap;
	}

	.s_top_about_text {
		font-size: 1em;
		line-height: 1.9;
	}

	.s_top_clinic_oval_bg {
		width: 680px;
		height: 520px;
	}

	.s_top_clinic_header {
		margin-bottom: 32px;
	}

	.s_top_clinic_gallery_wrap {
		margin-bottom: 32px;
	}

	.s_top_clinic_gallery_item {
		width: 250px;
		height: 160px;
	}

	.s_hero_character_svg {
		width: 300px;
		height: 150px;
	}

	.s_top_about_mascot_img {
		width: 90px;
	}

	.s_top_about_mascot_1 {
		top: -10px;
		left: 10px;
	}

	.s_top_about_mascot_2 {
		right: 10px;
		top: 45%;
	}

	.s_top_about_mascot_3 {
		bottom: 10px;
		left: 20px;
	}

	.s_access_map_wrap {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 10;
		min-height: 260px;
	}
}

@media screen and (max-width: 500px) {
	.s_hero {
		padding: 30px 0 0;
	}

	.s_hero_container {
		padding: 0 16px;
	}

	.s_hero_banner {
		height: 300px;
	}

	.s_hero_copy {
		font-size: 1.1875em;
		top: 16px;
		left: 16px;
	}

	.s_hero_topics_link {
		align-items: flex-start;
	}

	.s_hero_topics_date {
		font-size: 0.875em;
		line-height: 1.8;
	}

	.s_hero_topics_text {
		font-size: 0.875em;
		line-height: 1.8;
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
		word-break: break-word;
	}

	.s_hero_schedule {
		width: 100%;
		max-width: 100%;
	}

	.s_hero_character_wrap {
		margin-top: -50px;
	}

	.s_hero_character_svg {
		width: 200px;
		height: 100px;
	}

	.s_hero_topics_title_text,
	.c_schedule_table th.c_schedule_title {
		font-size: 1em;
	}

	.s_top_about {
		padding: 80px 0;
	}

	.s_top_about_header {
		margin-bottom: 24px;
	}

	.s_top_about_content {
		max-width: calc(100%);
		margin: 0 0 30px;
		padding: 0 4px;
	}

	.s_top_about_lead {
		font-size: 1.125em;
		font-weight: 700;
		line-height: 1.5;
		margin-bottom: 14px;
		word-break: break-word;
	}

	.s_top_about_text {
		font-size: 0.875em;
		line-height: 1.8;
		word-break: break-word;
	}

	.s_top_about_mascot_img {
		width: 44px;
	}

	.s_top_about_mascot_1 {
		top: -12px;
		left: 4px;
	}

	.s_top_about_mascot_2 {
		right: 4px;
		top: 32%;
	}

	.s_top_about_mascot_3 {
		left: 4px;
		bottom: 24px;
	}

	.s_top_clinic_oval_bg {
		width: 440px;
		height: 360px;
	}

	.s_top_clinic_gallery_item {
		width: 180px;
		height: 120px;
	}

	.s_about_card_badge_title,
	.s_access_transit_detail,
	.s_access_address {
		font-size: 1em;
	}
}

@media (max-width: 360px) {
	.s_access_address br {
		display: flex;
	}
}

/* ==========================================
 * End of Top Page Styles
 * ========================================== */