* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
	scroll-behavior: smooth;
}

.subject-btn {
    width: 200px;
    height: 200px; /* Adjust these values according to your layout */
    border: none;
	background-size: cover;
    background-repeat: no-repeat;
	box-shadow: inset 0 0 0 50vw rgba(0,0,0,0.4);
	color: white;
	font-size: 25px;
	font-family: "Roboto Condensed", serif;
	font-weight: 800;
	font-style: normal;
	cursor: pointer;
}

/* Define backgrounds for specific subjects using data-subject */
.subject-btn[data-subject="araling-panlipunan"] 
{
    background-image: url('images/ap-bg.png');
}

.subject-btn[data-subject="filipino"] {
    background-image: url('images/fil-bg.png');
}

.subject-btn[data-subject="language"] {
    background-image: url('images/lang-bg.jpg');
}

.subject-btn[data-subject="math"] {
    background-image: url('images/math-bg.jpg');
}

.subject-btn[data-subject="reading"] {
    background-image: url('images/read-bg.jpg');
}

.subject-btn[data-subject="science"] {
    background-image: url('images/science-bg.png');
}


.subject-btn:hover
{ 
	transform: scale(1.03);
}

ul 
{ 
	list-style-type: none; 
	padding: 0; 
}

li 
{ 
	margin: 5px 0; 
}

.back-btn 
{ 
	background-color: #f44336; 
}

#content
{
	width: 95%;
	margin: auto;
}

#subjects
{
	max-width: 700px;
	margin: 20px auto 0px auto;
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	justify-content: center;
}

.subject-btn
{
	flex: 0 0 30%;
}


/* Grade Levels */

#grades button
{
	display: block;
	width: 100%;
	max-width: 700px;
	margin: 10px auto;
	height: 50px;
	background-color: #fcc254;
	border: none;
	border-radius: 5px;
	font-family: "Roboto", sans-serif;
	font-size: 20px;
	cursor: pointer;
}

#grades button:hover
{
	background-color: #F282A6;
}

/* Lessons */
#lessons
{
	margin-bottom: 20px;
}

.lesson-flexitem
{
	width: 100%;
}

.unit h2
{
	margin: 30px 0 0 0;
	line-height: 1;
}

.lesson-btn
{
	background-color: #fcc254;
	color: black;
	cursor: pointer;
	padding: 18px;
	width: 100%;
	border: none;
	text-align: left;
	outline: none;
	font-size: 15px;
	font-family: "Roboto", sans-serif;
	margin: 5px 0 0 0;
	scrollbar-gutter: stable;
}

.lesson-btn.active
{
	background-color: #F282A6;
	color: #fff;
	width: 100%;
}


.lesson-btn:hover 
{
	background-color: #F282A6;
}

.lesson-content
{
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.2s ease-out;
	background-color: #f1f1f1;
	display: none;
	width: 100%;
	margin-bottom: 15px;
	font-family: "Roboto", sans-serif;
	text-align: center;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
	border-collapse: collapse;
}

.science-lesson-content
{
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.2s ease-out;
	background-color: #f1f1f1;
	display: none;
	width: 100%;
	margin-bottom: 15px;
	font-family: "Roboto", sans-serif;
	text-align: center;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
	border-collapse: collapse;
}

.lesson-content th
{
	background-color: #287ccc;
    color: #ffffff;
    word-wrap: break-word;
    text-align: center;
	padding: 12px 15px;
	width: 33%;
}

.lesson-content td
{
	padding: 12px 15px;
	width: 33%;
	word-wrap: break-word;
    text-align: center;
}

.science-lesson-content th
{
	background-color: #287ccc;
    color: #ffffff;
    word-wrap: break-word;
    text-align: center;
	padding: 12px 15px;
	width: 25%;
}

.science-lesson-content td
{
	padding: 12px 15px;
	width: 25%;
	word-wrap: break-word;
    text-align: center;
}

.lesson-content tr {
    border-bottom: 1px solid #dddddd;
}

.lesson-content tr:nth-of-type(even) {
    background-color: #bcdeff;
}

.lesson-content tr:last-of-type {
    border-bottom: 2px solid #287ccc;
}

.lesson-content a
{
	text-decoration: none;
}

.lesson-content a:hover
{
	text-decoration: underline;
}


.science-lesson-content tr {
    border-bottom: 1px solid #dddddd;
}

.science-lesson-content tr:nth-of-type(even) {
    background-color: #bcdeff;
}

.science-lesson-content tr:last-of-type {
    border-bottom: 2px solid #287ccc;
}

.science-lesson-content a
{
	text-decoration: none;
}

.science-lesson-content a:hover
{
	text-decoration: underline;
}



/* Others */
.back-btn
{
	border: none;
	border-radius: 5px;
	background-color: #F282A6;
	margin: 15px 0;
	padding: 10px;
	color: #fff;
	cursor: pointer;
}

.back-btn:hover
{
	background-color: #fcc254;
	color: #000;
}

.nav-menu
{
	width: 200px;
	height: min-content;
	background-color: #F282A6;
	align-self: flex-start;
	position: sticky;
	top: 0;
	border-radius: 5px;
}

.nav-menu ul
{
	padding: 0;
	margin: 0;
}

.nav-menu li
{
	text-align: center;
	margin: 0 !important;
}

.nav-menu li:hover
{
	background-color: #fcc254;
	cursor: pointer;
}

.nav-menu a
{
	padding: 7px 0;
	text-decoration: none;
	color: white;
	font-family: "Roboto", sans-serif;
	display: block;
}

.nav-menu a:hover
{
	color: black;
}

.lesson-flex
{
	display: flex;
	gap: 50px;
	margin-top: 20px;
}

.top-btn
{
	width: 50px;
	height: 50px;
	transform: rotate(270deg);
	font-size: 30px;
	color: #fff;
	border: #fff;
	border-radius: 100%;
	background-color: #F282A6;
	position: fixed;
	right: 20px;
	bottom: 20px;
}

.top-btn:hover
{
	background-color: #fcc254;
	color: #000;
	cursor: pointer;
}

@media only screen and (max-width:650px)
{
	
	.lesson-flex
	{
		flex-direction: column;
		justify-content: center;
	}
	
	#subjects
	{
		margin: auto;
		flex-direction: column;
		justify-content: center;
		margin: 20px auto 0px auto;
	}
	
	.subject-btn
	{
		flex: 1 1 auto;
		margin: auto;
	}
	
	.nav-menu
	{
		margin: auto;
		position: static;
	}
}