:root {
	--primary-color: #007bff; /* Blue */
	--secondary-color: #6c757d; /* Gray */
	--background-color: #f8f9fa; /* Light Gray */
	--text-color: #343a40; /* Dark Gray */
	--light-text-color: #ffffff;
	--card-background: #ffffff;
	--border-color: #dee2e6;
	--hover-color: #0056b3; /* Darker Blue */
	--font-family: 'Arial', sans-serif;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-family);
	line-height: 1.6;
	color: var(--text-color);
	background-color: var(--background-color);
	overflow-x: hidden; /* Prevent horizontal scroll caused by animations */
	padding-top: 70px; /* Added to prevent content from being hidden by fixed navbar */
}

a {
	color: var(--primary-color);
	text-decoration: none;
}

a:hover {
	color: var(--hover-color);
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Header & Navigation */
.navbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #fff;
	padding: 1rem 2rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	position: fixed; /* Changed from sticky to fixed */
	top: 0;
	left: 0; /* Ensure it starts from the left edge */
	right: 0; /* Ensure it spans to the right edge */
	width: 100%; /* Ensure full width */
	z-index: 1000;
}

.nav-logo {
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	font-size: 1.8rem;
	font-weight: bold;
	color: var(--primary-color);
}

.nav-logo img {
	height: 40px;
	width: auto;
}

.nav-logo:hover {
	text-decoration: none;
}

.nav-menu {
	display: flex;
	list-style: none;
}

.nav-item {
	margin-left: 20px;
}

.nav-link {
	color: var(--text-color);
	font-size: 1rem;
	padding: 0.5rem;
}

.nav-link:hover {
	color: var(--primary-color);
	text-decoration: none;
}

.hamburger {
	display: none;
	cursor: pointer;
}

.bar {
	display: block;
	width: 25px;
	height: 3px;
	margin: 5px auto;
	-webkit-transition: all 0.3s ease-in-out;
	transition: all 0.3s ease-in-out;
	background-color: var(--text-color);
}

/* Main Content Sections */
.content-section {
	padding: 60px 20px;
	margin: 20px auto;
	max-width: 1200px;
	background-color: var(--card-background);
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.content-section .section-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.content-section h2 {
	color: var(--primary-color);
	margin-bottom: 20px;
	font-size: 2rem;
}

.content-section p {
	margin-bottom: 15px;
	font-size: 1.1rem;
	color: #555;
}

.content-section strong {
	color: var(--text-color);
}

.text-content {
	flex: 1;
}

.image-content {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
}

.image-content img {
	border-radius: 8px;
	max-height: 400px;
	object-fit: cover;
}

/* Specific section layouts */
#home-s1 .section-content,
#home-s2 .section-content,
#home-s3 .section-content,
#skills-s1 .section-content,
#skills-s3 .section-content,
#advanced-s1 .section-content,
#advanced-s2 .section-content,
#advanced-s3 .section-content {
	/* Sections with image and text side-by-side on larger screens */
	flex-direction: row;
	align-items: center;
}
#home-s1 .text-content,
#home-s2 .text-content,
#home-s3 .text-content,
#skills-s1 .text-content,
#skills-s3 .text-content,
#advanced-s1 .text-content,
#advanced-s2 .text-content,
#advanced-s3 .text-content {
	padding-right: 20px;
}
#home-s1 .image-content,
#home-s2 .image-content,
#home-s3 .image-content,
#skills-s1 .image-content,
#skills-s3 .image-content,
#advanced-s1 .image-content,
#advanced-s2 .image-content,
#advanced-s3 .image-content {
	padding-left: 20px;
}

/* Card Section */
.card-container {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: center;
}

.card {
	background-color: #f9f9f9;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 20px;
	width: calc(33.333% - 20px); /* Adjust for gap */
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	text-align: center;
}

.card img {
	max-width: 150px; /* Or adjust as needed */
	margin: 0 auto 15px auto;
	border-radius: 4px;
}

.card h3 {
	margin-bottom: 10px;
	color: var(--primary-color);
	font-size: 1.3rem;
}

/* FAQ Section */
.faq-item {
	margin-bottom: 15px;
	border: 1px solid var(--border-color);
	border-radius: 5px;
}

.faq-question {
	background-color: #e9ecef;
	padding: 10px 15px;
	cursor: pointer;
	font-weight: bold;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.faq-question:hover {
	background-color: #dde2e6;
}

.faq-answer {
	padding: 15px;
	display: none; /* Hidden by default */
	background-color: var(--card-background);
	border-top: 1px solid var(--border-color);
}
.faq-answer p {
	margin-bottom: 0;
}

/* Contact Form */
#contactForm {
	display: flex;
	flex-direction: column;
	gap: 15px;
	max-width: 600px;
	margin: 20px auto; /* Center form */
}

#contactForm label {
	font-weight: bold;
	margin-bottom: 5px;
}

#contactForm input[type='text'],
#contactForm input[type='email'],
#contactForm textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	font-size: 1rem;
}

#contactForm textarea {
	resize: vertical;
	min-height: 100px;
}

#contactForm .form-consent {
	display: flex;
	align-items: center;
	gap: 10px; /* Spacing between checkbox and label */
	margin-bottom: 10px; /* Optional: add some space below the consent line */
}

#contactForm .form-consent input[type='checkbox'] {
	width: auto; /* Override default width for input fields */
	margin: 0; /* Reset any default margins */
}

#contactForm .form-consent label {
	font-weight: normal; /* Make consent label less bold than main labels */
	margin-bottom: 0; /* Reset margin from general label style */
	font-size: 0.9rem;
}

#contactForm button {
	background-color: var(--primary-color);
	color: var(--light-text-color);
	padding: 12px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1rem;
	transition: background-color 0.3s ease;
}

#contactForm button:hover {
	background-color: var(--hover-color);
}

#formSubmissionMessage {
	margin-top: 15px;
	padding: 10px;
	border-radius: 4px;
	text-align: center;
}
#formSubmissionMessage.success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}
#formSubmissionMessage.error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Section Contact Button */
.section-contact-button {
	display: inline-block;
	margin-top: 20px;
	padding: 10px 20px;
	background-color: var(--secondary-color);
	color: var(--light-text-color);
	border-radius: 4px;
	text-align: center;
	font-size: 1rem;
	transition: background-color 0.3s ease;
	border: none;
}

.section-contact-button:hover {
	background-color: #545b62;
	color: var(--light-text-color);
	text-decoration: none;
}

/* Footer */
footer {
	background-color: var(--text-color);
	color: var(--light-text-color);
	padding: 40px 20px 20px;
	margin-top: 40px;
}

.footer-content {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 20px;
	max-width: 1200px;
	margin: 0 auto 20px auto;
}

.footer-contact,
.footer-links,
.footer-legal {
	flex: 1;
	min-width: 250px;
}

footer h3 {
	color: var(--primary-color);
	margin-bottom: 15px;
	font-size: 1.4rem;
}

footer ul {
	list-style: none;
}

footer ul li {
	margin-bottom: 8px;
}

footer ul li a {
	color: #adb5bd;
}

footer ul li a:hover {
	color: var(--light-text-color);
	text-decoration: underline;
}

footer p {
	font-size: 0.9rem;
	line-height: 1.5;
}
footer p a {
	color: #adb5bd;
}
footer p a:hover {
	color: var(--light-text-color);
}

.footer-bottom {
	text-align: center;
	padding-top: 20px;
	border-top: 1px solid #495057;
	font-size: 0.9rem;
}

/* Cookie Consent Modal */
.modal {
	display: none;
	position: fixed;
	z-index: 2000;
	left: auto;
	bottom: 20px;
	right: 20px;
	width: auto;
	background-color: transparent;
	box-sizing: border-box;
}

.modal-content {
	background-color: var(--card-background);
	margin: 0;
	padding: 20px;
	border-radius: 8px;
	max-width: 350px;
	text-align: left;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-content p {
	margin-bottom: 15px;
	font-size: 0.9rem;
}

.modal-buttons {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

.modal-buttons button {
	background-color: var(--primary-color);
	color: white;
	padding: 8px 15px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.9rem;
	flex-grow: 1;
}

.modal-buttons button#declineCookies {
	background-color: var(--secondary-color);
}

/* Animation for Sections */
.animated-section {
	opacity: 0;
	transform: scale(0.95) translateY(30px);
	transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animated-section.is-visible {
	opacity: 1;
	transform: scale(1) translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
	#home-s1 .section-content,
	#home-s2 .section-content,
	#home-s3 .section-content,
	#skills-s1 .section-content,
	#skills-s3 .section-content,
	#advanced-s1 .section-content,
	#advanced-s2 .section-content,
	#advanced-s3 .section-content {
		flex-direction: column;
	}
	#home-s1 .text-content,
	#home-s1 .image-content,
	#home-s2 .text-content,
	#home-s2 .image-content,
	#home-s3 .text-content,
	#home-s3 .image-content,
	#skills-s1 .text-content,
	#skills-s1 .image-content,
	#skills-s3 .text-content,
	#skills-s3 .image-content,
	#advanced-s1 .text-content,
	#advanced-s1 .image-content,
	#advanced-s2 .text-content,
	#advanced-s2 .image-content,
	#advanced-s3 .text-content,
	#advanced-s3 .image-content {
		padding-right: 0;
		padding-left: 0;
	}
	.image-content img {
		margin-top: 20px;
	}
	.card {
		width: calc(50% - 20px);
	}
}

@media (max-width: 768px) {
	.nav-menu {
		position: fixed;
		left: -100%;
		top: 70px;
		flex-direction: column;
		background-color: #fff;
		width: 100%;
		text-align: center;
		transition: 0.3s;
		box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
	}

	.nav-menu.active {
		left: 0;
	}

	.nav-item {
		margin: 1.5rem 0;
	}

	.hamburger {
		display: block;
	}

	.hamburger.active .bar:nth-child(2) {
		opacity: 0;
	}

	.hamburger.active .bar:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}

	.hamburger.active .bar:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	.content-section {
		padding: 40px 15px;
	}
	.content-section h2 {
		font-size: 1.8rem;
	}
	.content-section p {
		font-size: 1rem;
	}

	.footer-content {
		flex-direction: column;
		text-align: center;
	}
	.footer-contact,
	.footer-links,
	.footer-legal {
		margin-bottom: 20px;
	}
	.card {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.navbar {
		padding: 1rem;
	}
	.nav-logo {
		font-size: 1.5rem;
	}
	.modal-content {
		padding: 20px;
	}
	.modal-buttons button {
		padding: 8px 15px;
		font-size: 0.8rem;
	}
}
