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

html {
	scroll-behavior: smooth;
}

:root {
	--primary-bg: #1a1a2e; /* Dark blue/purple */
	--secondary-bg: #16213e; /* Slightly lighter dark blue */
	--accent-color: #0f3460; /* Accent blue */
	--text-color: #e9ecef; /* Light grey/off-white */
	--highlight-color: #e94560; /* Contrasting highlight (e.g., pink/red) */
	--card-bg: #1f2940;
	--border-color: #4a4a6a;
	--link-color: #537895;
	--link-hover-color: #e94560;
	--highlight-color-rgb: 233, 69, 96; /* Corresponds to #e94560 */
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background-color: var(--primary-bg);
	color: var(--text-color);
	line-height: 1.6;
	overflow-x: hidden; /* Prevent horizontal scroll caused by animations */
}

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

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

img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
}

/* Header & Navigation */
header {
	background-color: var(--secondary-bg);
	padding: 1rem 5%;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	position: sticky;
	top: 0;
	z-index: 1000;
}

header nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	position: relative; /* Added for mobile menu positioning */
}

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

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

header nav ul {
	list-style: none;
	display: flex;
}

header nav ul li {
	margin-left: 20px;
}

header nav ul li a {
	color: var(--text-color);
	font-size: 1rem;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	transition: background-color 0.3s, color 0.3s;
}

header nav ul li a:hover,
header nav ul li a.active {
	background-color: var(--highlight-color);
	color: var(--primary-bg);
	text-decoration: none;
}

/* Burger Menu Button */
.burger-menu-button {
	display: none; /* Hidden on desktop */
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
	z-index: 1010; /* Ensure it's above other header elements if necessary */
}

.burger-menu-button span {
	display: block;
	width: 25px;
	height: 3px;
	background-color: var(--text-color);
	margin: 5px 0;
	transition: all 0.3s ease-in-out;
	border-radius: 1px;
}

/* Burger animation to 'X' when .open class is added */
.burger-menu-button.open span:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}
.burger-menu-button.open span:nth-child(2) {
	opacity: 0;
}
.burger-menu-button.open span:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* Main Content & Sections */
main {
	padding-top: 20px; /* Give space from sticky header */
}

section {
	padding: 60px 5%;
	margin-bottom: 20px;
	background-color: var(--primary-bg); /* Default section background */
	opacity: 0; /* For animation */
	transform: scale(0.95); /* For animation */
	transition: opacity 0.7s ease-out, transform 0.7s ease-out;
	border-radius: 8px; /* Soften edges */
}

section:nth-child(even) {
	background-color: var(--secondary-bg); /* Alternate section background */
}

section.visible {
	opacity: 1;
	transform: scale(1);
}

.content-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
	align-items: center;
}

/* Two-column layout for sections with image and text */
section:not(#bpo-intro):not(#faq):not(.page-title-section):not(#service-cards)
	.content-wrapper {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

section#hero .text-content,
section#analytics-power .text-content,
section#benefits .text-content,
section#why-choose-us .text-content,
section#contact-form-section .text-content,
section#data-insights .text-content {
	padding-right: 20px;
}

section#hero .image-content,
section#analytics-power .image-content,
section#benefits .image-content,
section#why-choose-us .image-content,
section#contact-form-section .image-content,
section#data-insights .image-content {
	padding-left: 20px;
}

/* Center align if image is on the left */
section#benefits .content-wrapper {
	grid-template-areas: 'text image';
}
section#benefits .text-content {
	grid-area: text;
}
section#benefits .image-content {
	grid-area: image;
}

h1,
h2,
h3 {
	color: var(--highlight-color);
	margin-bottom: 1rem;
}

h1 {
	font-size: 2.8rem;
}
h2 {
	font-size: 2.2rem;
}
h3 {
	font-size: 1.6rem;
}

p {
	margin-bottom: 1rem;
	color: var(--text-color);
}

.cta-button {
	display: inline-block;
	background-color: var(--highlight-color);
	color: var(--primary-bg);
	padding: 12px 25px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: bold;
	transition: background-color 0.3s, transform 0.3s;
	border: none;
	cursor: pointer;
}

.cta-button:hover {
	background-color: #ff6b81; /* Lighter shade of highlight */
	transform: translateY(-2px);
	color: var(--primary-bg);
}

.text-center {
	text-align: center;
}
.text-center .content-wrapper {
	display: block; /* Override grid for simple text sections */
}

/* Card Section */
.cards-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}

.card {
	background-color: var(--card-bg);
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 6px 20px rgba(var(--highlight-color-rgb), 0.3); /* Use RGB for alpha */
}

.card img {
	width: 100%;
	height: 200px; /* Fixed height for card images */
	object-fit: cover;
	border-bottom: 3px solid var(--highlight-color);
	margin-bottom: 15px;
}

.card h3 {
	margin-top: 0.5rem;
	color: var(--highlight-color);
}

/* FAQ Section */
.faq-item {
	background-color: var(--secondary-bg);
	padding: 15px;
	margin-bottom: 10px;
	border-radius: 5px;
	border-left: 4px solid var(--highlight-color);
}
.faq-item h3 {
	color: var(--text-color); /* Less emphasis than section titles */
	font-size: 1.3rem;
	margin-bottom: 0.5rem;
}

/* Contact Form */
#contact-form {
	background-color: var(--secondary-bg);
	padding: 30px;
	border-radius: 8px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	color: var(--text-color);
}

.form-group input[type='text'],
.form-group input[type='email'],
.form-group textarea {
	width: 100%;
	padding: 10px;
	border-radius: 5px;
	border: 1px solid var(--border-color);
	background-color: var(--primary-bg);
	color: var(--text-color);
	font-size: 1rem;
}

.form-group input[type='text']:focus,
.form-group input[type='email']:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--highlight-color);
	box-shadow: 0 0 5px rgba(var(--highlight-color-rgb), 0.5);
}

.form-group-checkbox {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
}

.form-group-checkbox input[type='checkbox'] {
	width: auto; /* Override full width for checkbox */
	margin-right: 10px;
	accent-color: var(--highlight-color); /* Style the check mark color */
}

.form-group-checkbox label {
	margin-bottom: 0; /* Remove default bottom margin for label in this group */
	font-size: 0.9rem;
}

#form-status {
	margin-top: 15px;
	font-weight: bold;
}

/* Footer */
footer {
	background-color: var(--secondary-bg);
	color: var(--text-color);
	padding: 40px 5%;
	text-align: center;
	margin-top: 30px;
	border-top: 3px solid var(--accent-color);
}

.footer-content {
	display: flex;
	justify-content: space-around;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 30px;
	max-width: 1200px;
	margin: 0 auto 20px auto;
	text-align: left;
}

.footer-column {
	flex: 1;
	min-width: 230px;
}

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

.contact-info p {
	margin-bottom: 8px;
}

.footer-column ul {
	list-style: none;
	padding-left: 0;
}

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

.footer-column ul li a {
	color: var(--text-color);
	transition: color 0.3s;
}
.footer-column ul li a:hover {
	color: var(--highlight-color);
	text-decoration: none;
}

.copyright {
	font-size: 0.9rem;
	margin-top: 20px;
	border-top: 1px solid var(--border-color);
	padding-top: 20px;
}

/* Cookie Consent Modal */
.cookie-modal {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: rgba(10, 10, 20, 0.95);
	color: var(--text-color);
	padding: 20px;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
	z-index: 2000;
	display: none; /* Hidden by default */
	align-items: center;
	justify-content: center;
	text-align: center;
}

.cookie-modal-content {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.cookie-modal p {
	margin-bottom: 15px;
}
.cookie-modal a {
	color: var(--highlight-color);
	text-decoration: underline;
}

.cookie-buttons button {
	background-color: var(--highlight-color);
	color: var(--primary-bg);
	border: none;
	padding: 10px 20px;
	margin: 0 10px;
	border-radius: 5px;
	cursor: pointer;
	font-weight: bold;
	transition: background-color 0.3s;
}

.cookie-buttons button#decline-cookies {
	background-color: var(--accent-color);
	color: var(--text-color);
}

.cookie-buttons button:hover {
	opacity: 0.8;
}

/* Legal Pages Specific Styling */
.legal-page main {
	padding: 40px 5%;
	max-width: 900px;
	margin: 20px auto;
	background-color: var(--secondary-bg);
	border-radius: 8px;
	padding-top: 20px;
}
.legal-page h1 {
	font-size: 1.5rem;
	text-align: center;
	margin-bottom: 30px;
}
.legal-page h2 {
	font-size: 1.5rem;
	margin-top: 30px;
	margin-bottom: 15px;
	border-bottom: 1px solid var(--accent-color);
	padding-bottom: 5px;
}

/* Form Submission Modal */
.form-submission-modal {
	display: none; /* Hidden by default */
	position: fixed;
	z-index: 2000; /* Above cookie modal if both were somehow visible */
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.7); /* Dim background */
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

.form-submission-modal.visible {
	display: flex;
	opacity: 1;
}

.form-submission-modal-content {
	background-color: var(--secondary-bg);
	color: var(--text-color);
	margin: auto;
	padding: 30px;
	border: 1px solid var(--border-color);
	width: 90%;
	max-width: 450px;
	text-align: center;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#form-submission-modal-message {
	font-size: 1.1rem; /* Adjusted size */
	margin: 0;
	line-height: 1.5;
}

/* Spinner styles */
.spinner {
	border: 4px solid rgba(233, 236, 239, 0.2); /* Light track for spinner */
	border-radius: 50%;
	border-top: 4px solid var(--highlight-color);
	width: 30px; /* Adjusted size */
	height: 30px; /* Adjusted size */
	animation: spin 0.8s linear infinite;
	margin: 0 auto 15px auto; /* Center spinner and add space below message */
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Responsiveness */
@media (max-width: 768px) {
	h1 {
		font-size: 2.2rem;
	}
	h2 {
		font-size: 1.8rem;
	}
	h3 {
		font-size: 1.4rem;
	}

	.burger-menu-button {
		display: block; /* Show burger button on mobile */
	}

	header nav ul#main-nav-links {
		/* Styles for the mobile navigation menu */
		display: none; /* Hidden by default */
		flex-direction: column;
		align-items: center;
		width: 100%; /* Full viewport width */
		position: absolute;
		top: 100%; /* Position below the header nav bar */
		left: 0;
		background-color: var(--secondary-bg);
		box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
		z-index: 1000; /* Below burger, but above page content */
		padding: 10px 0; /* Vertical padding for the menu container */
	}

	header nav ul#main-nav-links.nav-open {
		display: flex; /* Show the menu when .nav-open class is added */
	}

	header nav ul#main-nav-links li {
		margin: 8px 0; /* Spacing for list items */
		width: 90%; /* Content within menu doesn't touch edges */
		text-align: center;
	}

	header nav ul#main-nav-links li a {
		display: block; /* Make the whole area clickable */
		padding: 12px 15px; /* Decent touch target */
		width: 100%;
	}

	section .content-wrapper,
	section:not(#bpo-intro):not(#faq):not(.page-title-section):not(#service-cards)
		.content-wrapper {
		grid-template-columns: 1fr; /* Stack columns */
	}

	section#hero .text-content,
	section#analytics-power .text-content,
	section#benefits .text-content,
	section#why-choose-us .text-content,
	section#contact-form-section .text-content,
	section#data-insights .text-content,
	section#hero .image-content,
	section#analytics-power .image-content,
	section#benefits .image-content,
	section#why-choose-us .image-content,
	section#contact-form-section .image-content,
	section#data-insights .image-content {
		padding-right: 0;
		padding-left: 0;
	}

	section#hero .content-wrapper,
	section#analytics-power .content-wrapper,
	section#why-choose-us .content-wrapper,
	section#contact-form-section .content-wrapper,
	section#data-insights .content-wrapper {
		display: flex;
		flex-direction: column;
	}
	section#hero .text-content,
	section#analytics-power .text-content,
	section#why-choose-us .text-content,
	section#contact-form-section .text-content,
	section#data-insights .text-content {
		order: 1; /* Text first */
	}
	section#hero .image-content,
	section#analytics-power .image-content,
	section#why-choose-us .image-content,
	section#contact-form-section .image-content,
	section#data-insights .image-content {
		order: 2; /* Image second */
		margin-top: 20px;
	}

	section#benefits .content-wrapper {
		display: flex;
		flex-direction: column;
	}
	section#benefits .text-content {
		order: 1;
	}
	section#benefits .image-content {
		order: 2;
		margin-top: 20px;
	}

	.footer-content {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	.contact-info,
	.footer-links {
		text-align: center;
		width: 100%;
	}
	.footer-links ul {
		padding-left: 0;
	}

	.cookie-modal-content {
		flex-direction: column;
	}
	.cookie-buttons {
		margin-top: 15px;
	}
	.cookie-buttons button {
		margin: 5px;
	}
}
