/* ============================================
   COMPONENT: Tuition Table
   For displaying tuition fees
   Breakpoints: Desktop (default), Tablet (max-width: 1199px), Mobile (max-width: 575px)
   ============================================ */

/* Desktop-first base styles */
.tuition-section {
	padding: var(--sp-7) 0;
	background-color: #fff4f7;
	position: relative;
}

.tuition-section .container {
	position: relative;
}

.tuition-section__title {
	font-family: var(--font-family-heading);
	font-size: var(--section-title);
	font-weight: var(--fw-bold);
	line-height: var(--lh-heading-tight);
	color: var(--brand-primary);
	text-align: center;
	text-transform: capitalize;
	margin-bottom: var(--sp-3);
}

.tuition-section__description {
	font-family: var(--font-family-heading);
	font-size: var(--section-description);
	font-weight: var(--fw-regular);
	line-height: 1.2;
	color: var(--gray-900);
	text-align: center;
	margin-bottom: var(--sp-6);
}

.tuition-table-wrapper {
	position: relative;
	max-width: 99.6rem; /* 996px */
	margin: 0 auto;
}

.tuition-table-wrapper::before {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 16rem; /* 160px */
	height: 26.2rem; /* 262px */
	background-image: url("/assets/images/tuition_decorator1.png");
	background-size: contain;
	background-position: bottom left;
	background-repeat: no-repeat;
	pointer-events: none;
	z-index: 0;
	transform: translateX(-100%);
}

.tuition-table {
	width: 100%;
	background-color: var(--color-light);
	border-collapse: collapse;
	overflow: hidden;
}

.tuition-table thead {
	background-color: var(--brand-primary);
}

.tuition-table thead th {
	font-family: var(--font-family-heading);
	font-size: var(--fs-body);
	font-weight: var(--fw-bold);
	line-height: 1.125;
	color: var(--color-light);
	text-transform: capitalize;
	padding: var(--sp-3) var(--sp-5);
	text-align: center;
	white-space: nowrap;
}

.tuition-table thead th:first-child {
	text-align: left;
	padding-left: 16rem; /* 160px */
}

.tuition-table thead th:nth-child(2) {
	text-align: center;
}

.tuition-table thead th:last-child {
	text-align: left;
}

.tuition-table tbody tr {
	background-color: var(--color-light);
	border: 0.1rem solid #e3e3e3; /* 1px */
}

.tuition-table tbody tr.tuition-table__row--alt {
	background-color: #f4f4f4;
}

.tuition-table tbody td {
	font-family: var(--font-family-heading);
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-regular);
	line-height: 1.57;
	color: var(--gray-900);
	padding: 1.5rem var(--sp-5); /* 15px */
	border-left: 0.1rem solid #e3e3e3; /* 1px */
	vertical-align: middle;
}

.tuition-table tbody td:first-child {
	font-size: var(--fs-body);
	font-weight: var(--fw-regular);
	line-height: 1.2;
	text-align: left;
	padding-left: 16rem; /* 160px */
	border-left: none;
}

.tuition-table tbody td:nth-child(2) {
	text-align: center;
}

.tuition-table tbody td.tuition-table__price {
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-semibold);
	line-height: 1.64;
	color: var(--brand-primary);
}

.tuition-table__note {
	font-family: var(--font-family-heading);
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-medium);
	line-height: 1.71;
	color: var(--brand-primary);
	text-align: center;
	margin-top: var(--sp-4);
}

/* ================================================
   TABLET (max-width: 1199px)
   ================================================ */
@media (max-width: 1199px) {
	.tuition-section {
		padding: var(--sp-6) 0;
	}

	.tuition-section__title {
		font-size: var(--section-title-tablet);
	}

	.tuition-section__description {
		font-size: var(--section-description-tablet);
	}

	/* Hide decoration on tablet */
	.tuition-table-wrapper::before {
		display: none;
	}

	.tuition-table thead th:first-child {
		padding-left: var(--sp-4);
	}

	.tuition-table tbody td:first-child {
		padding-left: var(--sp-4);
	}
}

/* ================================================
   MOBILE (max-width: 575px)
   ================================================ */
@media (max-width: 575px) {
	.tuition-section {
		padding: var(--sp-5) 0;
	}

	.tuition-section__title {
		text-align: left;
		font-size: var(--section-title-mobile);
	}

	.tuition-section__description {
		font-size: var(--section-description-mobile);
		text-align: left;
		margin-bottom: var(--sp-4);
	}

	/* Table responsive */
	.tuition-table-wrapper {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.tuition-table {
		min-width: 100%;
		table-layout: fixed;
	}

	.tuition-table thead th {
		font-size: var(--fs-100);
		padding: 1rem var(--sp-2); /* 10px */
		white-space: normal;
	}

	.tuition-table thead th:first-child {
		width: 5rem; /* 50px */
		padding-left: var(--sp-2);
		text-align: center;
	}

	.tuition-table thead th:nth-child(2) {
		width: auto;
	}

	.tuition-table thead th:last-child {
		width: 11.5rem; /* 115px */
		text-align: right;
	}

	.tuition-table tbody td {
		font-size: var(--fs-100);
		padding: 1rem var(--sp-2); /* 10px */
		line-height: 1.4;
	}

	.tuition-table tbody td:first-child {
		font-size: var(--fs-body-sm);
		padding-left: var(--sp-2);
		text-align: center;
		width: 5rem; /* 50px */
	}

	.tuition-table tbody td:last-child {
		text-align: right;
		width: 11.5rem; /* 115px */
	}

	.tuition-table tbody td.tuition-table__price {
		font-size: var(--fs-100);
		white-space: nowrap;
	}

	.tuition-table__note {
		font-size: var(--fs-100);
		text-align: left;
		line-height: 1.5;
	}
}
