/* =========== GOOGLE FONTS =========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Poppins:wght@600;700&display=swap');

/* =========== CSS VARIABLES =========== */
:root {
	/* Colors */
	--bg-color: #ffffff;
	--surface-color: #f3f4f6;
	--primary-color: #4338ca;
	--primary-color-hover: #3730a3;
	--text-color: #111827;
	--text-color-muted: #6b7280;

	/* Typography */
	--font-family-headings: 'Poppins', sans-serif;
	--font-family-body: 'Inter', sans-serif;

	/* Other */
	--container-width: 1140px;
	--header-height: 5rem;
	--border-radius: 0.5rem;
	--transition-duration: 0.3s;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-family-body);
	font-size: 16px;
	line-height: 1.6;
	background-color: var(--bg-color);
	color: var(--text-color);
}

ul {
	list-style: none;
}

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

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

h1,
h2,
h3 {
	font-family: var(--font-family-headings);
	font-weight: 700;
}

/* =========== REUSABLE CSS CLASSES =========== */
.container {
	max-width: var(--container-width);
	margin-left: 1rem;
	margin-right: 1rem;
}

@media screen and (min-width: 1200px) {
	.container {
		margin-left: auto;
		margin-right: auto;
	}
}

/* =========== HEADER =========== */
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	z-index: 100;
	height: var(--header-height);
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--surface-color);
}

.header__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-family-headings);
	font-weight: 600;
	font-size: 1.25rem;
	color: var(--text-color);
}

.logo img {
	width: 32px;
	height: 32px;
}

.header__burger-btn {
	display: block;
	background: none;
	border: none;
	color: var(--text-color);
	cursor: pointer;
	z-index: 101;
}

@media screen and (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: 0;
		left: -100%;
		width: 100%;
		height: 100vh;
		background-color: var(--bg-color);
		display: flex;
		align-items: center;
		justify-content: center;
		transition: left var(--transition-duration) ease-in-out;
	}

	.header__nav.is-active {
		left: 0;
	}

	.header__nav-list {
		flex-direction: column;
		text-align: center;
		gap: 2rem;
	}

	.header__nav-link {
		font-size: 1.5rem;
	}

	.header__nav-link--button {
		padding: 0.75rem 2rem !important; /* Important to override base styles */
	}
}

.header__nav-list {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.header__nav-link {
	color: var(--text-color-muted);
	font-weight: 500;
	transition: color var(--transition-duration);
	padding: 0.5rem;
}

.header__nav-link:hover {
	color: var(--text-color);
}

.header__nav-link--button {
	background-color: var(--primary-color);
	color: var(--text-color);
	padding: 0.5rem 1.5rem;
	border-radius: var(--border-radius);
	transition: background-color var(--transition-duration);
}

.header__nav-link--button:hover {
	background-color: var(--primary-color-hover);
	color: var(--text-color);
}

@media screen and (min-width: 769px) {
	.header__burger-btn {
		display: none;
	}
}

/* =========== FOOTER =========== */
.footer {
	background-color: var(--bg-color);
	padding: 4rem 0 2rem;
	border-top: 1px solid var(--surface-color);
}

.footer__container {
	display: grid;
	gap: 2.5rem;
}

@media screen and (min-width: 576px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 992px) {
	.footer__container {
		grid-template-columns: repeat(4, 1fr);
	}
}

.footer__column:first-child {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.footer__logo {
	margin-bottom: 0.5rem;
}

.footer__copy {
	color: var(--text-color-muted);
	font-size: 0.875rem;
}

.footer__title {
	font-size: 1.125rem;
	margin-bottom: 1rem;
}

.footer__list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.footer__list--contact {
	gap: 1rem;
}

.footer__link {
	color: var(--text-color-muted);
	transition: color var(--transition-duration);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.footer__link:hover {
	color: var(--primary-color);
}

.footer__icon {
	width: 20px;
	height: 20px;
}

.footer__address {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	color: var(--text-color-muted);
}

/* =========== BUTTONS =========== */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 2rem;
	border-radius: var(--border-radius);
	font-family: var(--font-family-headings);
	font-weight: 600;
	font-size: 1rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all var(--transition-duration) ease;
}

.button--primary {
	background-color: var(--primary-color);
	color: var(--text-color);
}

.button--primary:hover {
	background-color: var(--primary-color-hover);
	transform: translateY(-2px);
	box-shadow: 0 4px 20px rgba(67, 56, 202, 0.3);
}

/* =========== HERO SECTION =========== */
.hero {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	overflow: hidden;
}

.hero__container {
	display: grid;
	gap: 3rem;
	align-items: center;
}

@media screen and (min-width: 992px) {
	.hero__container {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		height: calc(100vh - var(--header-height));
		padding-top: 0;
		padding-bottom: 0;
	}
}

.hero__content {
	text-align: center;
}

@media screen and (min-width: 992px) {
	.hero__content {
		text-align: left;
	}
}

.hero__title {
	font-size: 1.5rem;
	line-height: 1.2;
	margin-bottom: 1rem;
}

@media screen and (min-width: 768px) {
	.hero__title {
		font-size: 2rem;
	}
}

.hero__title--animated {
	color: var(--primary-color);
	border-right: 3px solid var(--primary-color);
	animation: blink-caret 0.75s step-end infinite;
}

/* Caret blinking animation */
@keyframes blink-caret {
	from,
	to {
		border-color: transparent;
	}
	50% {
		border-color: var(--primary-color);
	}
}

.hero__description {
	font-size: 1.125rem;
	color: var(--text-color-muted);
	margin-bottom: 2.5rem;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

@media screen and (min-width: 992px) {
	.hero__description {
		margin-left: 0;
		margin-right: 0;
	}
}

.hero__image-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
}

.hero__image {
	width: 80%;
	border-radius: 1.5rem;
	animation: float-animation 6s ease-in-out infinite;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Image floating animation */
@keyframes float-animation {
	0% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-20px);
	}
	100% {
		transform: translateY(0px);
	}
}

/* =========== REUSABLE SECTION STYLES =========== */
.section {
	padding-top: 5rem;
	padding-bottom: 5rem;
}

.section__header {
	text-align: center;
	margin-bottom: 3rem;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

.section__title {
	font-size: 2.25rem;
	margin-bottom: 0.75rem;
}

@media screen and (min-width: 768px) {
	.section__title {
		font-size: 2.5rem;
	}
}

.section__subtitle {
	font-size: 1.125rem;
	color: var(--text-color-muted);
	line-height: 1.7;
}

/* =========== COURSES SECTION =========== */
.courses {
	background-color: var(--surface-color);
}

.courses__grid {
	display: grid;
	gap: 1.5rem;
}

@media screen and (min-width: 576px) {
	.courses__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 992px) {
	.courses__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.courses__card {
	background-color: var(--bg-color);
	padding: 2rem;
	border-radius: var(--border-radius);
	border: 1px solid transparent;
	transition: all var(--transition-duration) ease;
	text-align: center;
}

.courses__card:hover {
	transform: translateY(-8px);
	border-color: var(--primary-color);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.courses__card-icon {
	display: inline-flex;
	padding: 1rem;
	background-color: var(--surface-color);
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.courses__card-icon i {
	width: 32px;
	height: 32px;
	color: var(--primary-color);
}

.courses__card-title {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

.courses__card-description {
	color: var(--text-color-muted);
	font-size: 0.95rem;
}

/* =========== FEATURES SECTION =========== */
.features__container {
	display: grid;
	gap: 3rem;
	align-items: center;
}

@media screen and (min-width: 992px) {
	.features__container {
		grid-template-columns: repeat(2, 1fr);
		gap: 5rem;
	}
}

.features__image-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
}

.features__image {
	border-radius: var(--border-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.features__content .section__header {
	text-align: left;
	margin-left: 0;
	margin-right: 0;
	margin-bottom: 2rem;
}

.features__list {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.features__item {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
}

.features__item-icon {
	display: inline-flex;
	flex-shrink: 0;
	background-color: var(--surface-color);
	padding: 0.75rem;
	border-radius: var(--border-radius);
}

.features__item-icon i {
	width: 28px;
	height: 28px;
	color: var(--primary-color);
}

.features__item-title {
	font-size: 1.125rem;
	margin-bottom: 0.25rem;
}

.features__item-text p {
	color: var(--text-color-muted);
}

/* =========== Add rule for alternating section background =========== */
.section:nth-of-type(odd) {
	background-color: var(--surface-color);
}

/* =========== ABOUT SECTION =========== */
.about__container {
	display: grid;
	gap: 3rem;
	align-items: center;
}

@media screen and (min-width: 992px) {
	.about__container {
		grid-template-columns: repeat(2, 1fr);
		gap: 5rem;
	}
}

.about__content .section__header {
	text-align: left;
	margin-left: 0;
	margin-right: 0;
	margin-bottom: 2.5rem;
}

.about__image-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	order: -1; /* Image appears first on mobile */
}

@media screen and (min-width: 992px) {
	.about__image-wrapper {
		order: 1; /* Image appears second on desktop */
	}
}

.about__image {
	border-radius: var(--border-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.about__stats {
	display: flex;
	gap: 2rem;
	margin-bottom: 2.5rem;
	text-align: center;
}

@media screen and (min-width: 576px) {
	.about__stats {
		text-align: left;
	}
}

.about__stat-item {
	flex: 1;
}

.about__stat-number {
	font-family: var(--font-family-headings);
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--primary-color);
	display: block;
	line-height: 1.2;
}

.about__stat-text {
	color: var(--text-color-muted);
}

/* =========== REVIEWS SECTION =========== */
.reviews {
	background-color: var(--surface-color);
}

.reviews__slider-wrapper {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	overflow: hidden;
}

.reviews__slider {
	display: flex;
	transition: transform var(--transition-duration) ease-in-out;
}

.reviews__card {
	flex: 0 0 100%;
	background-color: var(--bg-color);
	padding: 2.5rem 2rem;
	border-radius: var(--border-radius);
	text-align: center;
	margin: 0 1rem;
	max-width: calc(100% - 2rem);
}

.reviews__avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	margin: 0 auto 1rem;
	border: 3px solid var(--primary-color);
}

.reviews__rating {
	display: flex;
	justify-content: center;
	gap: 0.25rem;
	color: #fbbf24; /* Amber color for stars */
	margin-bottom: 1rem;
}

.reviews__rating i {
	width: 20px;
	height: 20px;
	fill: #fbbf24;
}

.reviews__text {
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--text-color-muted);
	font-style: italic;
	margin-bottom: 1.5rem;
}

.reviews__author {
	font-family: var(--font-family-headings);
	font-size: 1.125rem;
	margin-bottom: 0.25rem;
}

.reviews__author-role {
	font-size: 0.875rem;
	color: var(--text-color-muted);
}

.reviews__nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: var(--surface-color);
	border: 1px solid var(--primary-color);
	color: var(--text-color);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all var(--transition-duration);
	z-index: 10;
}

.reviews__nav-btn:hover {
	background-color: var(--primary-color);
	transform: translateY(-50%) scale(1.1);
}

.reviews__nav-btn--prev {
	left: -10px;
}

.reviews__nav-btn--next {
	right: -10px;
}

@media screen and (min-width: 992px) {
	.reviews__nav-btn--prev {
		left: 0;
	}
	.reviews__nav-btn--next {
		right: 0;
	}
}

/* =========== CONTACT SECTION =========== */
.contact {
	padding-bottom: 6rem; /* Extra padding for the bottom */
	padding-inline: 10px;
}

.contact__container {
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

.contact__content .section__header {
	text-align: center;
	margin-bottom: 3rem;
}

.contact__form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.contact__form-group {
	position: relative;
}

.contact__form-input {
	width: 100%;
	padding: 1rem;
	background-color: var(--surface-color);
	border: 1px solid transparent;
	border-radius: var(--border-radius);
	color: var(--text-color);
	font-size: 1rem;
	outline: none;
	transition: border-color var(--transition-duration);
}

.contact__form-input:focus {
	border-color: var(--primary-color);
}

.contact__form-label {
	position: absolute;
	top: 1rem;
	left: 1rem;
	color: var(--text-color-muted);
	pointer-events: none;
	transition: all var(--transition-duration);
}

.contact__form-input:focus + .contact__form-label,
.contact__form-input:not(:placeholder-shown) + .contact__form-label {
	top: -0.75rem;
	left: 0.75rem;
	font-size: 0.875rem;
	color: var(--primary-color);
	background-color: var(--bg-color);
	padding: 0 0.25rem;
}

.contact__form-checkbox-wrapper {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.contact__form-checkbox {
	appearance: none;
	-webkit-appearance: none;
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid var(--text-color-muted);
	border-radius: 0.25rem;
	cursor: pointer;
	margin-top: 0.2rem;
	flex-shrink: 0;
	position: relative;
	transition: all var(--transition-duration);
}

.contact__form-checkbox:checked {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

.contact__form-checkbox:checked::before {
	content: '✔';
	position: absolute;
	color: var(--text-color);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 0.8rem;
}

.contact__form-checkbox-label {
	font-size: 0.9rem;
	color: var(--text-color-muted);
}

.contact__form-checkbox-label a {
	color: var(--primary-color);
	text-decoration: underline;
}

.contact__form-checkbox-label a:hover {
	text-decoration: none;
}

.contact__form-button {
	width: 100%;
}

@media screen and (min-width: 576px) {
	.contact__form-button {
		width: auto;
		align-self: flex-start;
	}
}

.contact__success-message {
	display: none; /* Hidden by default */
	background-color: var(--surface-color);
	color: #34d399; /* Green color for success */
	padding: 1rem 1.5rem;
	border-radius: var(--border-radius);
	margin-top: 2rem;
	text-align: center;
	border: 1px solid #34d399;
}

/* =========== COOKIE POP-UP =========== */
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 50%;
	transform: translateX(-50%);
	width: calc(100% - 2rem);
	max-width: 600px;
	background-color: var(--surface-color);
	padding: 1.5rem;
	border-radius: var(--border-radius);
	box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	z-index: 200;
	transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-visible {
	bottom: 1rem;
}

@media screen and (min-width: 576px) {
	.cookie-popup {
		flex-direction: row;
		justify-content: space-between;
		max-width: var(--container-width);
	}
}

.cookie-popup__text {
	color: var(--text-color-muted);
	text-align: center;
}

@media screen and (min-width: 576px) {
	.cookie-popup__text {
		text-align: left;
	}
}

.cookie-popup__text a {
	color: var(--primary-color);
	text-decoration: underline;
}

.cookie-popup__btn {
	flex-shrink: 0;
}

/* =========== POLICY & TEXT PAGES =========== */
.pages {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
}

.pages .container {
	max-width: 800px;
}

.pages h1 {
	font-size: 1.5rem;
	margin-bottom: 2rem;
	color: var(--primary-color);
}

.pages h2 {
	font-size: 1.5rem;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

.pages p {
	color: var(--text-color-muted);
	line-height: 1.8;
	margin-bottom: 1rem;
}

.pages a {
	color: var(--primary-color);
	text-decoration: underline;
	transition: color var(--transition-duration);
}

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

.pages ul {
	list-style: disc;
	padding-left: 1.5rem;
	margin-bottom: 1rem;
	color: var(--text-color-muted);
}

.pages li {
	margin-bottom: 0.75rem;
	line-height: 1.8;
}

.pages strong {
	color: var(--text-color);
	font-weight: 600;
}
