/* Nav */
.navbar {
	--clr-white: 216 61% 18%;
	--clr-primary-blue: 0 0% 98%;
	--clr-sub-blue: 0 0% 95%;
}
.navMenu ul li a {
	font-weight: 400;
}

/* Main tag Start */
body {
	background-color: hsl(var(--clr-white));
	overflow-x: hidden;
}

.have-side-container {
	--side-nav-width: clamp(8rem, 20%, 14rem);

	width: min(92%, 100rem);
	margin: 0 auto;
}
/* Side navigation */
#side-navigation {
	width: var(--side-nav-width);
	padding-left: 1.24vw;
	position: sticky;
	height: max-content;
	top: var(--nav-height);
	transition: top 0.4s;
}
.nav-up #side-navigation {
	top: 0;
}
#side-navigation ul {
	width: 100%;
	padding-top: 0.8rem;
	position: fixed;
}
#side-navigation a {
	width: max-content;
	display: block;
	color: hsl(var(--clr-primary-blue));
	margin-bottom: 1.3em;
	font-weight: 500;
	transition: 0.4s;
	position: relative;
}
#side-navigation a::after {
	position: absolute;
	content: "";
	width: 100%;
	height: 2.4px;
	background-color: hsl(var(--clr-primary-blue));
	bottom: -3px;
	left: 0;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s ease-in-out;
}
#side-navigation a.active,
#side-navigation a:hover {
	font-weight: 700;
}
#side-navigation a.active::after,
#side-navigation a:hover::after {
	transform: scaleX(100%);
	transform-origin: left;
}
.main-side-container {
	--margin-right: -3vw;
	width: calc(100% - var(--logo-width) - var(--margin-right));
	margin-right: var(--margin-right);
}

/* Banner */
#banner {
	width: 100%;
}
#banner picture {
	width: 100%;
	aspect-ratio: 16 / 8;
}
#banner picture img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.banner-content {
	font-size: clamp(10px, 0.5rem + 0.4vw, 1rem + 0.1vw);
	padding: 5.5rem 0;
	letter-spacing: 0.24em;
	line-height: 2.5em;
	width: 60%;
	margin: 0 auto;
}

/* Clinic Service */
#clinic-service {
	width: 100%;
	background-color: hsl(var(--clr-primary-blue));
	color: hsl(var(--clr-white));
	padding-bottom: 2rem;
}
.title {
	padding-top: 2.4em;
	font-size: clamp(1.1rem, 0.8rem + 0.5vw, 1.5rem);
}
.title h2 {
	position: relative;
	width: max-content;
	border-bottom: solid 0.24rem hsl(var(--clr-primary-yellow));
	margin: 0 auto;
	margin-bottom: 2.4em;
}
#clinic-service .content {
	width: 70%;
	margin: 0 auto;
	flex-wrap: wrap;
}
#clinic-service .card {
	flex-basis: calc(100% / 3);
	display: flex;
	justify-content: center;
	flex-direction: column;
	text-align: center;
	margin-bottom: 5rem;
}
#clinic-service .card img {
	max-width: 120px;
	margin: 0 auto;
	margin-bottom: 1.35rem;
}

/* Clinic Position */
#clinic-position {
	width: 100%;
}
#clinic-position .title h2 {
	margin-bottom: 1.1em;
}
.position-navigation {
	padding-bottom: 5em;
}
.position-navigation a {
	display: block;
	color: hsl(var(--clr-primary-blue));
	width: max-content;
	margin: 0 1vw;
	font-size: clamp(1.1rem, 0.8rem + 0.5vw, 1.4rem);
	letter-spacing: 0.125em;
	cursor: pointer;
	transition: 0.3s;
	position: relative;
}
.position-navigation a::after {
	position: absolute;
	content: "";
	width: 100%;
	height: 2.4px;
	left: 0;
	bottom: -2.4px;
	background-color: hsl(var(--clr-primary-blue));
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s ease-in-out;
}
.position-navigation a[aria-selected="true"],
.position-navigation a:hover {
	font-weight: 600;
}
.position-navigation a[aria-selected="true"]::after,
.position-navigation a:hover::after {
	transform-origin: left;
	transform: scaleX(100%);
}

#clinic-position .content {
	width: inherit;
	padding: 0 2rem 0 4rem;
	margin-bottom: 5rem;
}
.scroll-container {
	width: inherit;
	padding-right: 2rem;
	height: 45rem;
	overflow: auto;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-snap-type: y proximity;
	/* scrollbar-gutter: stable both-edges; */
	scrollbar-gutter: stable;
}
/* Scrollbar Design Start */
.scroll-container::-webkit-scrollbar {
	width: 0.7rem;
}
.scroll-container::-webkit-scrollbar-track {
	background-color: hsl(var(--clr-lightgrey));
	border-radius: 100vw;
}
.scroll-container::-webkit-scrollbar-thumb {
	background-color: hsl(var(--clr-primary-blue));
	border-radius: 100vw;
	border: 0.15rem solid hsl(var(--clr-lightgrey));
}
.scroll-container::-webkit-scrollbar-thumb:hover {
	background-color: hsla(216, 61%, 18%, 0.81);
}
@supports (scrollbar-color: red blue) {
	.scroll-container {
		scrollbar-color: hsl(var(--clr-primary-blue)) hsl(var(--clr-lightgrey));
		scrollbar-width: thin; /* Firefox */
		-ms-overflow-style: none; /* IE and Edge */
		&::-webkit-scrollbar {
			width: 0.7rem; /* Chrome, Safari and Opera */
		}
	}
}
/* Scrollbar Design End */
.scroll-container .clinic {
	scroll-snap-align: start;
	width: 100%;
	display: flex;
	padding: 0.81rem;
	border: solid 2.2px hsl(var(--clr-primary-yellow));
	margin-bottom: 0.81rem;
	flex-wrap: nowrap;
}
.scroll-container .clinic .img-container {
	min-width: 300px;
	aspect-ratio: 2 / 1;
	margin-right: 1rem;
}
.scroll-container .clinic .img-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}
.scroll-container .clinic .information {
	padding-right: 8%;
}
.scroll-container .clinic h3 {
	margin-bottom: 0.4rem;
}
.scroll-container .clinic a {
	color: hsl(var(--clr-primary-blue));
	font-weight: 400;
	font-size: 0.95rem;
	display: inline-block;
	margin-bottom: 0.4rem;
	text-decoration: underline 1.24px transparent;
	transition: text-decoration 0.4s ease, font-weight 0.4s ease,
		padding 0.6s ease, margin 0.6s ease, max-height 1.6s ease, opacity 1.6s ease;
}
.scroll-container .clinic a:hover {
	font-weight: 600;
	text-decoration: underline 1.24px hsl(var(--clr-primary-blue));
}
.scroll-container .clinic .map {
	margin-bottom: 0.4rem;
}
.scroll-container .clinic .detail {
	font-weight: 300;
	font-size: 0.95rem;
}
/* Links Animation */
.scroll-container .clinic {
	max-height: 300px;
	transition: max-height 0.6s ease, margin 0.6s ease, padding 0.6s ease,
		border-color 0.6s ease, border-width 0.6s, opacity 0.6s ease;
}
.scroll-container .clinic.disappear {
	max-height: 0;
	margin: 0;
	opacity: 0;
	padding: 0;
	border-color: transparent;
	border-width: 0;
}
.scroll-container .clinic :is(h3, .number, .map, .detail) {
	max-height: 300px;
	transition: padding 0.6s ease, margin 0.6s ease, max-height 1.6s ease,
		opacity 1.6s ease;
}
.scroll-container .clinic.disappear :is(h3, .number, .map, a, .detail) {
	padding: 0;
	margin: 0;
	max-height: 0;
	opacity: 0;
}
.scroll-container .clinic img {
	transition: 0.6s ease;
	transform-origin: top;
}
.scroll-container .clinic.disappear img {
	transform: scaleY(0);
}

/* Tablet (768px - 1023px) */
@media screen and (max-width: 1023px) {
	/* Side Navigation */
	.have-side-container {
		flex-direction: column;
		width: 100%;
	}

	#side-navigation {
		width: 100%;
		background-color: hsl(var(--clr-light-blue));
		z-index: 1;
		box-shadow: 0 5px 10px hsl(var(--clr-grey) / 0.24);
		padding-left: 0;
	}

	#side-navigation ul {
		display: flex;
		justify-content: center;
		padding-top: 0;
		gap: 2rem;
		padding: 1rem 0 1.4rem;
		background-color: hsl(var(--clr-light-blue));
	}

	#side-navigation a {
		margin: 0;
		padding: 0.5rem 0 0.24rem;
	}

	.main-side-container {
		width: min(92%, 100rem);
		margin: 75px auto 0;
	}

	/* Banner */
	.banner-content {
		width: 80%;
		padding: 3rem 0 8rem;
		font-size: 1.5vw;
	}

	/* Clinic Service */
	#clinic-service .content {
		width: 81%;
	}

	/* Clinic Position */
	#clinic-position .content {
		padding: 0 0.24rem 0 1rem;
	}
	.scroll-container {
		padding-right: 2.4vw;
		height: 60vh;
	}
}

/* Mobile (767px and below) */
@media screen and (max-width: 767px) {
	/* Side Navigation */
	#side-navigation ul {
		gap: 3rem;
	}

	/* Banner */
	.banner-content {
		padding: 2rem 0 5rem;
		font-size: 14px;
	}

	/* Clinic Service */
	#clinic-service .card {
		margin-bottom: 3rem;
	}
	#clinic-service .card img {
		max-width: 80px;
	}

	/* Clinic Position */
	.position-navigation {
		padding-bottom: 2.4rem;
	}
	.position-navigation ul {
		margin: 0 auto;
		justify-content: space-between;
		width: calc(100% - 2rem - 8vw);
	}
	.position-navigation a {
		font-size: 1rem;
	}

	.scroll-container .clinic {
		display: grid;
		max-height: initial;
		height: auto;
	}
	.scroll-container .clinic .img-container {
		--margin-bottom: 1.8rem;

		max-width: fit-content;
		min-width: 94%;
		margin: 0.24rem auto var(--margin-bottom);
		position: relative;
		width: 100%;
	}
	.scroll-container .clinic .img-container::after {
		position: absolute;
		content: "";
		width: 81%;
		height: 2px;
		left: 50%;
		bottom: calc(-1 * var(--margin-bottom));
		transform: translateX(-50%);
		background-color: hsl(var(--clr-primary-blue));
	}
	.scroll-container .clinic .information {
		padding: 0.8rem 1rem 0.24rem;
		width: 94%;
		text-align: center;
	}
	.scroll-container .clinic h3 {
		font-size: 1.1rem;
	}
}

@media screen and (max-width: 425px) {
	/* Clinic Service */
	#clinic-service .content {
		width: 100%;
	}
	#clinic-service .card {
		flex-basis: 50%;
	}

	/* Clinic Position */
	.position-navigation {
		padding-bottom: 2.4rem;
	}
	.position-navigation ul {
		width: calc(100% - 8vw);
	}
}
