/* GENERAL*/

html,
body {
	margin: 0;
	padding: 0;
	padding-bottom: 2rem;
}

a {
	text-decoration: none;
	color: white;
}


/* NAVBAR */

nav {
	display: flex;
	justify-content: space-between;
	/* logo left, links right */
	align-items: center;
	/* vertically centered */
	background-color: rgb(133, 88, 208);
	color: white;
	width: 100vw;
	/* ensures full width */
	padding: 1rem 0;
	position: relative;
}

#codify-edu-logo {
	font-family: 'Roboto', sans-serif;
	font-weight: 700;
	font-size: 18px;
	color: rgb(255, 255, 255);
	padding-left: 2rem;
}

#navbar-links {
	list-style: none;
	/* removes bullets */
	margin: 0;
	/* reset default */
	padding: 0;
	/* reset default */
	display: flex;
	/* makes links horizontal */
	flex-wrap: wrap;
}

nav ul li a {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	padding-right: 2rem;
	display: block;
	padding: 0.5rem 1rem;
}

/* HAMBURGER MENU */
.hamburger-toggle {
	display: none;
}

.hamburger-menu {
	display: none;
	flex-direction: column;
	cursor: pointer;
	padding: 0.5rem;
	margin-right: 2rem;
}

.hamburger-menu span {
	width: 25px;
	height: 3px;
	background-color: white;
	margin: 3px 0;
	transition: 0.3s;
	border-radius: 2px;
}

.hamburger-toggle:checked + .hamburger-menu span:nth-child(1) {
	transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-toggle:checked + .hamburger-menu span:nth-child(2) {
	opacity: 0;
}

.hamburger-toggle:checked + .hamburger-menu span:nth-child(3) {
	transform: rotate(45deg) translate(-5px, -6px);
}

/* COURSE TITLE CONTAINER*/

#course-title-container {
	padding-left: 2rem;
	padding-right: 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

#course-title {
	font-family: 'Roboto', sans-serif;
	font-weight: 100;
	font-size: 36px;
	color: rgb(133, 88, 208);
}

hr {
	border-color: rgb(241, 241, 241);
	width: 100%;
	max-width: 90rem;
	margin: 1rem 0;
}

#semester-info {
	font-family: 'Work Sans', sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 21px;
}

/* BUTTONS */

.bttn {
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgb(133, 88, 208), rgb(155, 118, 228));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(133, 88, 208, 0.2);
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.bttn:hover {
    background: linear-gradient(135deg, rgb(155, 118, 228), rgb(133, 88, 208));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(133, 88, 208, 0.3);
}

.bttn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(133, 88, 208, 0.2);
}


/* ANNOUNCEMENTS */

#announcements {
	padding-top: 3rem;
	padding-left: 2rem;
	padding-right: 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

#announcements-text {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 24px;
	line-height: 24px;

}

#announcements-list {
	font-family: 'Work Sans', sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 21px;
}

/* CALENDAR */
#calendar {
	padding-top: 3rem;
	padding-left: 2rem;
	padding-right: 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

#assignment-bttn-container {
    display: flex; 
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.assignment-bttn {
    border: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
	padding: 12px 24px;
	background: linear-gradient(135deg, rgb(133, 88, 208), rgb(155, 118, 228));
	color: white;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(133, 88, 208, 0.3);
	font-family: 'Roboto', sans-serif;
	text-decoration: none;
	display: inline-block;
}

.assignment-bttn:hover {
	background: linear-gradient(135deg, rgb(155, 118, 228), rgb(133, 88, 208));
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(133, 88, 208, 0.4);
	color: white;
}

.assignment-bttn:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(133, 88, 208, 0.3);
}

#calendar-table {
	padding-top: 1rem;
}

#current-assignments-text {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 24px;
	line-height: 26px;

}

table {
	width: 100%;
	border-collapse: collapse;
	font-family: 'Work Sans', sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 21px;
	margin-top: 1rem;
}

#calendar-text {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 24px;
	line-height: 26px;
	padding-top: 1.5rem;
}

.table-data {
	font-family: 'Work Sans', sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 21px;
}

#table-container {
	width: 100%;
	overflow-x: auto;
	margin-top: 1rem;
}

.txtbk-link {
	color: rgb(133, 88, 208);
}

table td {
	background: rgb(233, 234, 250);
	padding: 0.5rem;
	text-align: center;
	border: 1px solid #ddd;
}

table th {
	font-family: 'Work Sans', sans-serif;
	font-weight: 700;
	font-size: 15px;
	line-height: 21px;
	background: none;
	color: rgb(133, 88, 208);
	padding: 0.5rem;
	text-align: center;
	border: 1px solid #ddd;
}

/* MEDIA QUERIES FOR RESPONSIVE DESIGN */

/* Tablet styles */
@media screen and (max-width: 768px) {
	.hamburger-menu {
		display: flex;
	}
	
	nav {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
	
	#navbar-links-container {
		display: none;
		position: absolute;
		top: 100%;
		right: 0;
		width: 200px;
		background-color: rgb(133, 88, 208);
		z-index: 1000;
		box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
		border-radius: 0 0 8px 8px;
	}
	
	.hamburger-toggle:checked ~ #navbar-links-container {
		display: block;
	}
	
	#navbar-links {
		flex-direction: column;
		width: 100%;
		text-align: center;
		padding: 0;
	}
	
	nav ul li a {
		padding: 1rem;
		border-bottom: 1px solid rgba(255,255,255,0.1);
		width: 100%;
		display: block;
	}
	
	#codify-edu-logo {
		padding-left: 1rem;
		font-size: 16px;
	}
	
	#course-title-container,
	#announcements,
	#calendar {
		padding-left: 1rem;
		padding-right: 1rem;
	}
	
	#course-title {
		font-size: 28px;
	}
	
	table {
		font-size: 13px;
	}
	
	table th,
	table td {
		padding: 0.3rem;
	}
}

/* Mobile styles */
@media screen and (max-width: 480px) {
	.hamburger-menu {
		display: flex;
		margin-right: 1rem;
	}
	
	nav {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 1rem 0;
	}
	
	#navbar-links-container {
		display: none;
		position: absolute;
		top: 100%;
		right: 0;
		width: 200px;
		background-color: rgb(133, 88, 208);
		z-index: 1000;
		box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
		border-radius: 0 0 8px 8px;
	}
	
	.hamburger-toggle:checked ~ #navbar-links-container {
		display: block;
	}
	
	#navbar-links {
		flex-direction: column;
		width: 100%;
		text-align: center;
		padding: 0;
	}
	
	nav ul li a {
		padding: 1rem;
		border-bottom: 1px solid rgba(255,255,255,0.1);
		width: 100%;
		display: block;
	}
	
	#codify-edu-logo {
		padding-left: 1rem;
		font-size: 16px;
	}
	
	#course-title {
		font-size: 24px;
		text-align: center;
	}
	
	#semester-info {
		text-align: center;
	}
	
	#announcements-text,
	#current-assignments-text,
	#calendar-text {
		font-size: 20px;
		text-align: center;
	}
	
	table {
		font-size: 12px;
	}
	
	table th,
	table td {
		padding: 0.2rem;
		font-size: 11px;
	}
	
	/* Stack table cells vertically on very small screens */
	@media screen and (max-width: 320px) {
		table, thead, tbody, th, td, tr {
			display: block;
		}
		
		thead tr {
			position: absolute;
			top: -9999px;
			left: -9999px;
		}
		
		tr {
			border: 1px solid #ccc;
			margin-bottom: 10px;
		}
		
		td {
			border: none;
			position: relative;
			padding-left: 50%;
			text-align: left;
		}
		
		td:before {
			content: attr(data-label) ": ";
			position: absolute;
			left: 6px;
			width: 45%;
			padding-right: 10px;
			white-space: nowrap;
			font-weight: bold;
		}
	}
}
