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

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Roboto', sans-serif;
	margin: 0;
	padding: 0;
	background-color: #f4f7f6;
	color: #333;
	line-height: 1.6;
	overflow-x: hidden; /* Prevent horizontal scrollbars that might appear due to animations */
}

.container {
	width: 90%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 0;
}

/* Header & Navigation */
header {
	background-color: #ffffff;
	padding: 1rem 0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	position: sticky;
	top: 0;
	z-index: 1000;
}

nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 90%;
	max-width: 1200px;
	margin: 0 auto;
}

nav .logo {
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	font-size: 1.2em;
	font-weight: bold;
	color: #2c3e50;
	text-decoration: none;
	z-index: 10; /* Ensure logo is above mobile menu background */
}

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

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
	display: none; /* Hidden by default, shown in media query */
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
	z-index: 1001; /* Above nav items */
}

.mobile-menu-toggle .bar {
	display: block;
	width: 25px;
	height: 3px;
	margin: 5px auto;
	background-color: #2c3e50;
	transition: all 0.3s ease-in-out;
}

/* Styles for when mobile menu is open (X icon) */
.mobile-menu-toggle.active .bar:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.active .bar:nth-child(2) {
	opacity: 0;
}
.mobile-menu-toggle.active .bar:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

.nav-links-container {
	display: flex; /* Default for desktop */
}

nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
}

nav ul li {
	margin-left: 25px;
}

nav ul li a {
	text-decoration: none;
	color: #3498db;
	font-weight: 500;
	transition: color 0.3s ease;
}

nav ul li a:hover {
	color: #2980b9;
}

/* Sections */
section {
	padding: 60px 20px; /* Increased padding */
	text-align: center;
	opacity: 0; /* Initial state for animation */
	transform: scale(0.95); /* Initial state for animation */
	transition: opacity 0.8s ease-out, transform 0.8s ease-out;
	margin-bottom: 20px; /* Space between sections */
	background-color: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

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

section h1,
section h2 {
	color: #2c3e50;
	margin-bottom: 20px;
}

section h1 {
	font-size: 2.8em; /* Responsive font size */
}

section h2 {
	font-size: 2.2em; /* Responsive font size */
}

section p {
	font-size: 1.1em;
	color: #555;
	max-width: 800px;
	margin: 0 auto 20px auto; /* Center paragraph text */
}

section .container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 30px;
}

section .text-content {
	flex: 1;
	text-align: left; /* Align text to the left for readability in two-column layouts */
}

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

section .image-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Specific Section Layouts for two columns */
#hero .container,
#entertainment .container,
#smart-living .container,
#future-ai .container,
#faq .container,
#contact .container {
	flex-direction: row; /* Default to row for larger screens */
	text-align: left; /* Reset text-align for the container */
}

#hero .text-content,
#hero .image-content,
#entertainment .text-content,
#entertainment .image-content,
#smart-living .text-content,
#smart-living .image-content,
#future-ai .text-content,
#future-ai .image-content,
#faq .text-content,
#faq .image-content,
#contact .text-content,
#contact .image-content {
	width: 48%; /* Adjust width for two columns */
}

/* Ensure text content in two-column layout is aligned left */
#hero .text-content h1, #hero .text-content p,
#entertainment .text-content h2, #entertainment .text-content p,
#smart-living .text-content h2, #smart-living .text-content p,
#future-ai .text-content h2, #future-ai .text-content p,
#faq .text-content h2, /* FAQ titles still centered if desired before items */
#contact .text-content h2, #contact .text-content p {
	text-align: left;
	margin-left: 0; /* Reset margin for left alignment */
	margin-right: 0; /* Reset margin for left alignment */
}

/* Card Layout */
.card-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	gap: 20px;
	margin-top: 30px;
}

.card {
	background-color: #eaf4f9;
	padding: 25px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	width: calc(33.333% - 40px); /* Adjust for gap */
	min-width: 280px; /* Minimum width for cards */
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.card img {
	width: 100%;
	height: auto;
	margin-bottom: 15px;
}

.card h3 {
	color: #3498db;
	margin-bottom: 10px;
}

/* Emoji sections */
.emoji {
	font-size: 1.5em; /* Make emojis larger */
	margin-left: 10px;
}

#creativity-learning .text-content,
#health-wellness .text-content {
	text-align: center; /* Center text for these specific emoji sections */
}
#creativity-learning .text-content p,
#health-wellness .text-content p {
	margin-left: auto;
	margin-right: auto;
}

/* Text-only section */
.text-only-section .container {
	flex-direction: column; /* Stack content vertically */
	text-align: left; /* Align text to the left */
}
.text-only-section h2 {
	text-align: center; /* Center the main heading of the section */
}
.text-only-section p,
.text-only-section ul {
	max-width: 800px; /* Standard width for readability */
	margin-left: auto;
	margin-right: auto;
}
.text-only-section ul {
	list-style-position: inside;
	padding-left: 0; /* Adjust if needed */
}
.text-only-section ul li {
	margin-bottom: 10px;
}

/* FAQ Section */
#faq .faq-item {
	background-color: #eaf4f9;
	padding: 15px;
	margin-bottom: 15px;
	border-radius: 5px;
	text-align: left;
	border: 1px solid #d1e0e5; /* Add a light border */
}

#faq .faq-item h3 {
	color: #2980b9;
	margin-top: 0;
	margin-bottom: 10px; /* Space between question and answer */
	cursor: pointer; /* Indicate it's clickable */
	display: flex; /* For icon alignment */
	justify-content: space-between; /* Push icon to the right */
	align-items: center; /* Vertically align icon */
}

#faq .faq-item h3::after {
	/* Basic arrow indicator */
	content: '▼'; /* Down arrow for closed */
	font-size: 0.8em;
	margin-left: 10px;
	transition: transform 0.3s ease;
}

#faq .faq-item.active h3::after {
	transform: rotate(180deg); /* Up arrow for open */
}

#faq .faq-item p {
	margin-bottom: 0; /* Remove default paragraph margin */
	max-height: 0; /* Initially hide the answer */
	overflow: hidden;
	transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* Smooth transition */
	padding-top: 0;
	padding-bottom: 0;
}

#faq .faq-item.active p {
	max-height: 500px; /* Adjust as needed, should be larger than any possible answer */
	padding-top: 10px; /* Add some padding when open */
	padding-bottom: 10px; /* Add some padding when open */
}

/* Contact Form */
#contactForm {
	max-width: 600px;
	margin: 20px auto 0 auto; /* Add top margin */
	text-align: left;
	background-color: #eaf4f9;
	padding: 30px;
	border-radius: 8px;
}

#contactForm label {
	display: block;
	margin-bottom: 8px;
	font-weight: bold;
	color: #333;
}

#contactForm input[type='text'],
#contactForm input[type='email'],
#contactForm textarea {
	width: calc(100% - 22px); /* Full width minus padding */
	padding: 10px;
	margin-bottom: 20px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
}

#contactForm textarea {
	resize: vertical;
}

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

#contactForm .form-group-checkbox input[type='checkbox'] {
	width: auto; /* Override default width for inputs */
	margin-right: 10px;
	margin-bottom: 0; /* Remove bottom margin specific to checkbox */
}

#contactForm .form-group-checkbox label {
	margin-bottom: 0; /* Remove bottom margin for checkbox label */
	font-weight: normal; /* Make consent label text normal weight */
	color: #555;
}

#contactForm button[type='submit'] {
	background-color: #3498db;
	color: white;
	padding: 12px 25px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1em;
	transition: background-color 0.3s ease;
}

#contactForm button[type='submit']:hover {
	background-color: #2980b9;
}

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

/* Footer */
footer {
	background-color: #2c3e50;
	color: #ecf0f1;
	padding: 30px 0;
	text-align: center;
}

footer .container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

footer .footer-links a {
	color: #ecf0f1;
	text-decoration: none;
	margin: 0 10px;
	transition: color 0.3s ease;
}

footer .footer-links a:hover {
	color: #3498db;
}

footer .contact-info p {
	margin: 5px 0;
	font-size: 0.9em;
}
footer .contact-info a {
	color: #ecf0f1;
	text-decoration: none;
}
footer .contact-info a:hover {
	text-decoration: underline;
}

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

.modal-content {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

.modal-content p {
	margin: 0;
	flex-grow: 1;
	text-align: left;
}
.modal-content a {
	color: #3498db;
	text-decoration: underline;
}

.modal button {
	padding: 10px 20px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-weight: bold;
}

#acceptCookies {
	background-color: #2ecc71;
	color: white;
}

#declineCookies {
	background-color: #e74c3c;
	color: white;
}

/* Loading Modal for Form Submission */
.loading-modal-container {
	display: none; /* Hidden by default, JS will change to flex */
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.65); /* Semi-transparent overlay */
	z-index: 3000; /* Higher than cookie modal */
	justify-content: center;
	align-items: center;
}

.loading-modal-internal-content {
	background-color: #ffffff;
	padding: 35px 45px;
	border-radius: 10px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.loading-modal-internal-content p {
	margin: 0;
	color: #333333;
	font-size: 1.15em;
	font-weight: 500;
}

.spinner {
	border: 5px solid #f0f0f0; /* Lighter grey for the track */
	border-top: 5px solid #3498db; /* Blue for the active part */
	border-radius: 50%;
	width: 45px;
	height: 45px;
	animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 992px) {
	section h1 {
		font-size: 2.4em;
	}
	section h2 {
		font-size: 2em;
	}

	/* Stack two-column layouts on smaller screens */
	#hero .container,
	#entertainment .container,
	#smart-living .container,
	#future-ai .container,
	#faq .container,
	#contact .container {
		flex-direction: column;
	}

	#hero .text-content,
	#hero .image-content,
	#entertainment .text-content,
	#entertainment .image-content,
	#smart-living .text-content,
	#smart-living .image-content,
	#future-ai .text-content,
	#future-ai .image-content,
	#faq .text-content,
	#faq .image-content,
	#contact .text-content,
	#contact .image-content {
		width: 100%; /* Full width for stacked items */
		text-align: center; /* Center text when stacked */
	}

	#hero .text-content p,
	#entertainment .text-content p,
	#smart-living .text-content p,
	#future-ai .text-content p,
	#contact .text-content p {
		text-align: center; /* Ensure paragraphs are centered */
		margin-left: auto;
		margin-right: auto;
	}
	#faq .text-content {
		text-align: center;
	}
	#faq .faq-item {
		text-align: left; /* Keep FAQ item text left-aligned */
	}

	.card {
		width: calc(50% - 30px); /* Two cards per row */
	}
}

@media (max-width: 768px) {
	nav {
		flex-direction: row; /* Keep logo and toggle on same line */
		justify-content: space-between; /* Align logo left, toggle right */
		position: relative; /* For positioning the mobile menu */
	}

	.mobile-menu-toggle {
		display: block; /* Show hamburger on mobile */
	}

	.nav-links-container {
		display: none; /* Hide nav links by default on mobile */
		position: absolute;
		top: 100%; /* Position below the header */
		left: 0;
		width: 100%;
		background-color: #ffffff;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
		flex-direction: column;
		align-items: center;
		padding: 10px 0;
	}

	.nav-links-container.active {
		display: flex; /* Show when active */
	}

	nav ul {
		flex-direction: column; /* Stack links vertically in mobile menu */
		width: 100%;
		align-items: center;
	}
	nav ul li {
		margin: 10px 0; /* Adjust margin for vertical layout */
		width: 100%;
		text-align: center;
	}
	nav ul li a {
		display: block; /* Make links take full width for easier tapping */
		padding: 10px 0;
	}

	section h1 {
		font-size: 2em;
	}
	section h2 {
		font-size: 1.8em;
	}
	section p {
		font-size: 1em;
	}

	.card {
		width: calc(100% - 40px); /* One card per row */
	}

	.modal-content {
		flex-direction: column;
		gap: 10px;
	}
	.modal-content p {
		text-align: center;
		margin-bottom: 10px;
	}
	.modal-content button {
		width: 100%;
		margin-top: 5px;
	}
}

@media (max-width: 480px) {
	body {
		font-size: 14px; /* Adjust base font size for very small screens */
	}
	header {
		padding: 0.8rem 0;
	}
	nav .logo {
		font-size: 1.5em;
	}
	section {
		padding: 40px 15px;
	}
	section h1 {
		font-size: 1.8em;
	}
	section h2 {
		font-size: 1.6em;
	}

	#contactForm {
		padding: 20px;
	}
}
