/* Access section styles (extracted from `src/components/Access.astro`)
   Loaded non-blocking from `Layout.astro` to reduce render-blocking CSS. */

.access {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: #F4F9FF;
}

.access-header {
	width: 100%;
	background-color: #F4F9FF;
	padding: 120px 0 50px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.access-header-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	width: 1200px;
	max-width: 100%;
}

.access-title {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 500;
	font-size: 36px;
	line-height: 1.448;
	text-align: center;
	color: #3752C0;
	margin: 0;
	width: 100%;
	height: 43px;
}

.access-divider {
	width: 54px;
	height: 4px;
}

.access-divider img {
	width: 100%;
	height: 100%;
	display: block;
}

.access-description {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.75em;
	text-align: center;
	color: #333333;
	margin: 0;
	width: 814px;
	max-width: 100%;
}

.access-info {
	width: 100%;
	background-color: #F4F9FF;
	padding: 60px 64px 120px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 80px;
}

.access-content {
	width: 1200px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	gap: 32px;
	margin: 0 auto;
}

.access-row {
	display: flex;
	flex-direction: row;
	gap: 32px;
	width: 100%;
	align-items: stretch;
}

.access-card {
	background-color: #F4F9FF;
	border-radius: 8px;
	width: 560px;
	flex-shrink: 0;
}

.access-card-content {
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 33px;
	width: 560px;
	box-sizing: border-box;
}

.access-card-section {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 20px;
	width: 100%;
	height: 507.65px;
	padding: 0;
}

.access-logo {
	width: 458.25px;
	height: 62.09px;
	flex-shrink: 0;
}

.access-logo-block {
	width: 458.25px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0 auto;
}

.access-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* 住所と同等の書式 + ロゴ文字に対して中央寄せ */
.access-org {
	/* logo.svg は左にシンボルがあるため、文字部分の中心に合わせて少し右へ寄せる */
	--logo-text-center-shift: 11%;
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 700;
	font-size: 20px;
	line-height: 1.3em;
	color: #3752C0;
	margin: 0;
	text-align: center;
	width: 100%;
	transform: translateX(var(--logo-text-center-shift));
}

.schedule-table {
	width: 560px;
	border: 0.96px solid #3752C0;
	border-radius: 8px;
	display: grid;
	/* 列幅は「重み(fr)」で管理 - 土/日祝も他の曜日と同じ幅に統一 */
	--schedule-cols: 173.2fr 53.88fr 53.88fr 53.88fr 53.88fr 53.88fr 53.88fr 53.88fr;
	grid-template-columns: var(--schedule-cols);
	/* 1行目を高くして「日・祝」が縦に収まるようにする */
	grid-template-rows: 70px 50.51px 50.51px;
	overflow: hidden;
	box-sizing: border-box;
	flex-shrink: 0;
}

.schedule-cell {
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 500;
	font-size: 20px;
	line-height: 1.847;
	color: #3752C0;
	border-right: 0.96px solid #3752C0;
	padding: 0;
	box-sizing: border-box;
}

/* 各行の最後のセルは右罫線なし */
.schedule-cell:nth-child(8),
.schedule-cell-closed--sun {
	border-right: none;
}

/* ヘッダー行（1行目）は下罫線 */
.schedule-cell-header {
	font-weight: 500;
	border-bottom: 0.96px solid #3752C0;
}

/* 「日・祝」見出しは縦書き */
.schedule-cell-header--sun {
	writing-mode: vertical-rl;
	text-orientation: upright;
	letter-spacing: 0;
	white-space: normal;
	line-height: 1;
	font-size: 16px;
}

/* 2行目（9:00-12:00）は下罫線で行間を区切る */
.schedule-cell-row2 {
	border-bottom: 0.96px solid #3752C0;
}

.schedule-cell-time {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 700;
	font-size: 20px;
	line-height: 1.847;
}

.schedule-cell-dot {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.847;
}

/* 土の結合セル（2-3行目、列7） */
.schedule-cell-closed--sat {
	grid-column: 7;
	grid-row: 2 / span 2;
	writing-mode: vertical-rl;
	text-orientation: upright;
	font-size: 19.24px;
	line-height: 1.92;
}

/* 日祝の結合セル（2-3行目、列8） */
.schedule-cell-closed--sun {
	grid-column: 8;
	grid-row: 2 / span 2;
	writing-mode: vertical-rl;
	text-orientation: upright;
	font-size: 19.24px;
	line-height: 1.92;
}

/* 標榜科目（表と住所の間）※親の gap を打ち消して表に寄せる */
.access-hyobou {
	width: 100%;
	margin-top: -16px; /* .access-card-section の gap:20px のうちほとんどを打ち消し */
	margin-bottom: 12px;
}

.access-hyobou-text {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 1.4em;
	color: #3752C0;
	margin: 0;
	text-align: left;
}

.access-address {
	width: 100%;
}

.access-address p {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.3em;
	color: #333333;
	margin: 0;
	text-align: left;
}

.access-phone {
	position: relative;
	width: 200px;
	height: 81px;
}

.phone-number-primary {
	position: absolute;
	left: 27px;
	top: 0;
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 500;
	font-size: 32px;
	line-height: 1.3em;
	color: #333333;
	width: 173px;
	height: 42px;
	text-decoration: none;
}
.phone-number-primary:hover {
	text-decoration: underline;
}

.phone-number-secondary {
	position: absolute;
	left: 27px;
	top: 47px;
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 500;
	font-size: 26.5px;
	line-height: 1.3em;
	color: #333333;
	width: 185px;
	height: 34px;
	white-space: nowrap;
	text-decoration: none;
}

/* iPhone（iOS Safari）がFAX番号を自動で tel リンク化するのを抑止（この行だけに限定） */
.phone-number-secondary a[x-apple-data-detectors],
.phone-number-secondary a[href^='tel:'] {
	color: inherit !important;
	text-decoration: none !important;
	pointer-events: none;
	cursor: default;
}

.phone-icons {
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	height: 81px;
	justify-content: flex-start;
	align-items: flex-start;
}

.phone-icon {
	width: 21.57px;
	height: 23.37px;
	display: block;
	position: absolute;
	left: 0;
	top: 11.63px;
}

.fax-icon {
	width: 20.24px;
	height: 21.86px;
	display: block;
	position: absolute;
	left: 0;
	top: 56px;
}

.access-card-map {
	background-color: #F4F9FF;
	border: 1px solid rgba(0, 8, 7, 0.15);
	border-radius: 8px;
	flex: 1;
	max-width: 608px;
	/* /about/access と同じ挙動に合わせる */
	height: 453px;
	overflow: hidden;
	display: flex;
	align-items: stretch;
}

.access-map-iframe {
	width: 100%;
	height: 100%;
	display: block;
	border: 0;
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1023px) {
	.access-info {
		background-color: #F4F9FF;
		padding: 100px 64px;
	}

	.access-content {
		width: 100%;
		gap: 48px;
	}

	.access-row {
		flex-direction: column;
		gap: 48px;
	}

	.access-card {
		width: 100%;
	}

	.access-card-content {
		width: 100%;
	}

	.access-card-section {
		align-items: flex-start;
		gap: 0;
	}

	.access-hyobou {
		margin-top: 4px; /* gap:0 のときはごく小さく */
	}

	.access-logo {
		width: auto;
		max-width: 100%;
		display: flex;
		justify-content: center;
		margin: 0 auto;
	}

	.access-logo-block {
		width: auto;
		max-width: 100%;
		margin: 0 auto;
	}

	.access-org {
		font-size: 18px;
	}

	.schedule-table {
		width: 100%;
		max-width: 959px;
		margin-top: 20px; /* ロゴと表の間に余白 */
		margin-bottom: 4px; /* 表の下はごく小さく */
	}

	/* 住所と電話番号の間隔 */
	.access-phone {
		margin-top: 16px;
	}

	.access-card-map {
		width: 100%;
		max-width: 959px;
		flex: 0 0 auto;
		height: 453px;
	}
}

/* モバイル対応 */
@media (max-width: 768px) {
	.access {
		padding: 64px 20px;
		gap: 48px;
	}

	.access-header {
		padding: 0;
		background-color: #F4F9FF;
	}

	.access-header-content {
		width: 100%;
		padding: 0;
		gap: 20px;
	}

	.access-title {
		font-size: 28px;
	}

	.access-description {
		font-size: 20px;
		width: 100%;
	}

	.access-info {
		background-color: #F4F9FF;
		padding: 0;
	}

	.access-content {
		width: 100%;
		gap: 40px;
	}

	.access-row {
		flex-direction: column;
		gap: 48px;
	}

	.access-card {
		width: 100%;
		background-color: #F4F9FF;
	}

	.access-card-content {
		width: 100%;
		padding: 0;
	}

	.access-card-section {
		align-items: flex-start;
		gap: 0;
		height: auto;
	}

	.access-hyobou {
		margin-top: 4px; /* gap:0 のときはごく小さく */
	}

	.access-logo {
		width: 100%;
		height: 45.39px;
		display: flex;
		justify-content: center;
	}

	.access-logo-block {
		width: 100%;
		max-width: 458.25px;
		margin: 0 auto;
	}

	.access-org {
		/* モバイルは現状の位置を維持 */
		--logo-text-center-shift: 9%;
		font-size: 16px;
	}

	.schedule-table {
		width: 100%;
		min-width: 0;
		/* 1行目70px + 2行目50.51px + 3行目50.51px = 約171px */
		height: auto;
		grid-template-rows: 70px 50.51px 50.51px;
		margin-top: 16px; /* ロゴと表の間に余白 */
		margin-bottom: 4px; /* 表の下はごく小さく */
	}

	.schedule-cell {
		min-width: 0;
		/* 320px幅まで崩れないように自動縮小 */
		font-size: clamp(12px, 3.6vw, 16px);
		padding: 0;
	}

	.schedule-cell-time {
		font-size: clamp(13px, 4vw, 18px);
	}

	.schedule-cell-closed--sat,
	.schedule-cell-closed--sun {
		font-size: clamp(12px, 3.6vw, 16px);
	}

	/* モバイル版でも「日・祝」が縦に収まるようにフォントサイズ調整 */
	.schedule-cell-header--sun {
		font-size: clamp(11px, 3vw, 16px);
	}

	.access-address {
		width: 100%;
	}

	.access-phone {
		width: 100%;
		margin-top: 16px;
	}

	.phone-number-primary {
		font-size: 32px;
	}

	.phone-number-secondary {
		font-size: 32px;
		width: 185px;
		white-space: nowrap;
	}

	.access-card-map {
		width: 100%;
		/* /about/access と同じ高さ */
		flex: 0 0 auto;
		height: 265px;
		max-width: none;
	}
}

/* 329px未満：日・祝を縦書きにして列の最小幅を下げる */
@media (max-width: 328px) {
	.schedule-table {
		/* 日・祝の列幅を他の曜日と揃える（代わりに「診療時間」列を少し詰める） */
		--schedule-cols: 152fr 53fr 53fr 53fr 53fr 53fr 53fr 53fr;
	}
}

