/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

/* Global Styles */
* {
	font-family: 'Mulish', sans-serif;
}

html, body {
	max-width: 100%;
	overflow-x: hidden;
}
h1 {
	font-weight: 600;
}
body {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	background-color: #fdfbf6;
	position: relative;
	opacity: 0;
	animation: fadeInAnimation 1.5s ease forwards;
}
canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	/* Allow interactions with elements behind the canvas */
}

/* Header Styles */
.logo {
	position: relative;
	height: 5rem;
	width: auto;
	top: 2.5vh;
	left: 7vw;
}

.logo-link::after {
	height: 0;
	width: 0;
}

header {
	background-color: transparent;
	padding: 10px 20px;
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100vw;
}

/* Arrow Bounce Animation */
.fa-arrow-right {
	color: #4F6F52;
	margin-left: 10px;
	display: inline-block;
	animation: bounce 2s infinite;
}

/* Navigation Styles */
nav {
	width: 100%;
}

nav ul {
	list-style: none;
	display: flex;
	margin-top: 5vh;
	color: #739072;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.nav-links {
	margin: 0 4vw;
	font-weight: bold;
	font-size: 1.25em;
	letter-spacing: 1px;
}

.nav-links {
    padding: 2vh 1.75vw; 
    border-radius: 15px; 
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; 
}

.nav-links:hover {
    background-color: #739072; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-links:hover a {
	color: #FFFFFF;
}

.nav-links:hover a::after {
	height: 0px;
	transition: none;
}

.pir-link {
	color: #181818;
	font-weight: bold;
}

/* Link Styling */
a {
	position: relative;
	text-decoration: none;
	transition: color 0.3s ease;
	color: #739072;
	font-size: inherit;
	cursor: pointer;
}

a::after {
	content: "";
	position: absolute;
	bottom: -3px;
	left: 50%;
	width: 0;
	height: 2px;
	background-color: #3A4D39;
	transition: width 0.3s ease, left 0.3s ease;
}
a:hover {
	color: #3A4D39;
	transition: 0.3s;
}
a:hover::after {
	width: 100%;
	left: 0;
}
#menu-toggle {
	display: none;
}
/* Bounce Animation */
@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateX(0);
	}
	40% {
		transform: translateX(20px);
	}
	60% {
		transform: translateX(10px);
	}
}
@keyframes fadeInAnimation {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* NAV MEDIA QUERIES */
@media (max-width: 697px) {
	.container {
		width: 100%;
		justify-content: center;
		margin-left: 0;
	}

	/* Hide checkbox */
	#menu-toggle {
		display: none;
	}

	/* Hamburger Menu Label Styling */
	.hamburger-menu {
		display: block;
		cursor: pointer;
		width: 30px;
		height: 20px;
		position: absolute;
		top: 45px;
		right: 10vw;
		z-index: 7;
	}

	/* Line styles for hamburger and X */
	.line {
		display: block;
		position: absolute;
		height: 3px;
		border-radius: 50px;
		width: 100%;
		background-color: #000;
		transition: transform 0.3s ease, opacity 0.3s ease;
	}

	/* Line positioning for hamburger icon */
	.line:nth-child(1) {
		top: 0;
	}
	.line:nth-child(2) {
		top: 50%;
		transform: translateY(-50%);
	}
	.line:nth-child(3) {
		bottom: 0;
	}

	/* Rotate and change lines to form X when checkbox is checked */
	#menu-toggle:checked + .hamburger-menu .line:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}
	#menu-toggle:checked + .hamburger-menu .line:nth-child(2) {
		opacity: 0;
	}
	#menu-toggle:checked + .hamburger-menu .line:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	/* Hide the regular navigation by default */
	nav {
		display: none;
		z-index: 6;
		position: fixed;
		top: 0;
		left: 0;
		height: 100vh;
		width: 100vw;
		background: rgba(255, 255, 255, 0.95);
		transform: translateY(-100%);
		opacity: 0;
	}

	/* Show navigation when checkbox is checked */
	#menu-toggle:checked ~ nav {
		display: flex;
		animation: slideInMenu 0.5s ease forwards;
	}

	/* Overlay styles */
	.overlay {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background-color: rgba(0, 0, 0, 0.3);
		opacity: 0;
		display: none;
		z-index: 5;
	}

	/* Show overlay */
	#menu-toggle:checked ~ .overlay {
		display: block;
		animation: fadeInOverlay 0.3s ease forwards;
	}

	/* Smooth animation for closing */
	#menu-toggle:not(:checked) ~ nav {
		display: flex; /* Ensure it's visible for the animation */
		animation: slideOutMenu 0.5s ease-out forwards;
	}

	#menu-toggle:not(:checked) ~ .overlay {
		display: none; /* Ensure it's visible for the fade-out animation */
		animation: fadeOutOverlay 0.3s ease forwards;
		animation-fill-mode: forwards;
	}

	/* Navigation links styling */
	nav ul {
		display: flex;
		flex-direction: column;
		justify-content: center;
		height: 100vh;
		padding: 0;
		margin: 0;
		gap: 10vh;
		align-items: center;
		text-align: center;
	}

	.nav-links a {
		font-size: 3.5rem;
		padding: 1rem 0;
		transition: color 0.3s ease;
	}
	.nav-links:hover a {
		color: #ffffff;
	}

	.container {
		display: block !important;
	}

	/* Keyframes for animations */
	@keyframes slideInMenu {
		from {
			transform: translateY(-100%);
			opacity: 0;
		}
		to {
			transform: translateY(0);
			opacity: 1;
		}
	}

	@keyframes slideOutMenu {
		from {
			transform: translateY(0);
			opacity: 1;
		}
		to {
			transform: translateY(-100%);
			opacity: 0;
		}
	}

	@keyframes fadeInOverlay {
		from {
			opacity: 0;
		}
		to {
			opacity: 1;
		}
	}

	@keyframes fadeOutOverlay {
		from {
			opacity: 1;
		}
		to {
			opacity: 0;
		}
	}
}
