.page-content-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
	margin-bottom: 40px;
}

/* =========================
   YEAR SIDEBAR
   ========================= */
.year-sidebar {
	background-color: var(--surface-color);
	padding: 20px;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	height: fit-content;
	transition:
		background-color 0.35s ease,
		box-shadow 0.35s ease;
}

.year-sidebar h3 {
	font-size: 1.3rem;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--primary-color);
	color: var(--pure-black);
}

.year-list {
	list-style: none;
	display: flex;
	flex-direction: row;
	overflow-x: auto;
	gap: 10px;
	padding-bottom: 10px;
}

.year-list li a {
	display: block;
	padding: 5px 10px;
	text-decoration: none;
	color: var(--text-color);
	border-radius: 8px;
	font-weight: 500;
	transition:
		all 0.3s ease,
		transform 0.3s ease,
		background-color 0.35s ease;
	background-color: var(--light-gray);
	white-space: nowrap;
}

.year-list li a:hover,
.year-list li a.active {
	background-color: var(--primary-color);
	color: #fff;
}

.year-list li a.active {
	font-weight: 700;
	box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

@media (max-width: 768px) {
	.year-sidebar {
		max-height: 200px;
		overflow-y: auto;
	}

	.year-list {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 10px;
	}
}

/* =========================
   MAIN CONTENT
   ========================= */
.main-content-area {
	background-color: var(--surface-color);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	min-height: 400px;
	overflow-x: auto;
	transition:
		background-color 0.35s ease,
		box-shadow 0.35s ease;
}

.exam-paper {
	border: 1px solid var(--border-color);
	padding: 20px;
	border-radius: var(--border-radius);
	transition: border-color 0.35s ease;
}

.exam-header {
	text-align: center;
	margin-bottom: 25px;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 20px;
}

.exam-header .university-name {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--pure-black);
}

.exam-header .institute-name,
.exam-header .year {
	font-size: 1.1rem;
	font-weight: 500;
	margin-top: 5px;
	color: var(--pure-black);
}

.exam-meta {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 20px;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--pure-black);
}

.exam-instructions {
	margin-bottom: 30px;
	padding: 10px 15px;
	border-left: 4px solid var(--secondary-color);
	background-color: var(--off-white);
	font-style: italic;
	color: var(--text-muted);
	transition:
		background-color 0.35s ease,
		border-color 0.35s ease,
		color 0.35s ease;
}

/* =========================
   QUESTION GROUPS
   ========================= */
.question-group {
	margin-top: 10px;
}

.question-group + .question-group {
	margin-top: 35px;
	padding-top: 30px;
	border-top: 2px dashed var(--border-color);
}

.group-header {
	text-align: center;
	margin-bottom: 8px;
}

.group-title {
	font-weight: 700;
	font-size: 1.3rem;
	color: var(--pure-black);
	margin-bottom: 4px;
}

.group-marks {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--text-muted);
	background-color: var(--light-gray);
	padding: 3px 14px;
	border-radius: 999px;
	transition:
		background-color 0.35s ease,
		color 0.35s ease;
}

.group-a .group-title {
	color: var(--primary-color);
}

.group-b .group-title {
	color: var(--secondary-color);
}

.attempt-instruction {
	text-align: center;
	font-weight: 600;
	margin-bottom: 20px;
	font-size: 1rem;
	color: var(--pure-black);
}

.question-list {
	list-style: none;
	padding: 0;
	color: var(--pure-black);
}

.question-list li {
	display: flex;
	flex-direction: column;
	padding: 10px 0;
	border-bottom: 1px solid var(--border-color);
}

.question-content {
	display: flex;
	gap: 15px;
	width: 100%;
}

.question-number {
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--light-gray);
	border: 1px solid var(--border-color);
	border-radius: 50%;
	font-weight: 600;
	color: var(--primary-color);
}

.show-answer-btn {
	padding: 8px 20px;
	border-radius: 20px;
	font-weight: 600;
	cursor: pointer;
	transition:
		all 0.3s ease,
		transform 0.3s ease;
	background-color: var(--primary-color);
	color: #fff;
	font-size: 0.9rem;
	border: none;
	align-self: flex-end;
}

.show-answer-btn:hover {
	background-color: var(--dark-blue);
	transform: translateY(-2px);
}

.answer {
	width: 100%;
	margin-top: 15px;
	padding: 16px;
	background-color: var(--off-white);
	border-left: 5px solid var(--secondary-color);
	border-radius: 0 8px 8px 0;
	animation: dropIn 0.4s ease-out;
}

@keyframes dropIn {
	from {
		opacity: 0;
		transform: translateY(15px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* =========================
   DESKTOP
   ========================= */
@media (min-width: 768px) {
	.page-content-grid {
		grid-template-columns: 240px 1fr;
	}

	.year-sidebar {
		position: sticky;
		top: 95px;
		max-height: calc(100vh - 120px);
		overflow-y: auto;
	}

	.year-list {
		flex-direction: column;
		gap: 8px;
	}

	.exam-paper {
		padding: 30px;
	}

	.exam-meta {
		flex-direction: row;
		justify-content: space-between;
	}

	.show-answer-btn {
		margin-left: auto;
		align-self: center;
	}
}

/* =========================
   QUESTION IMAGES
   ========================= */
.question-image {
	max-width: 40%;
	height: auto;
	display: block;
}

@media (max-width: 768px) {
	.question-image {
		max-width: 100%;
	}
}
