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

/*=============== CSS VARIABLES ===============*/
:root {
	/* Colors */
	--primary-color: #4a7cff;
	--title-color: #e8e8e8;
	--text-color: #b0b0b0;
	--body-bg-color: #1a1a1a;
	--container-bg-color: #252525;

	/* Typography */
	--body-font: 'Roboto', sans-serif;
	--title-font: 'Montserrat', sans-serif;
	--h1-font-size: 2.5rem;
	--h2-font-size: 1.75rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

	/* Font weight */
	--font-regular: 400;
	--font-medium: 500;
	--font-semibold: 600;
	--font-bold: 700;

	/* z-index */
	--z-tooltip: 10;
	--z-fixed: 100;
}

/*=============== BASE STYLES ===============*/
* {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	background-color: var(--body-bg-color);
	color: var(--text-color);
}

h1,
h2,
h3 {
	font-family: var(--title-font);
	color: var(--title-color);
	font-weight: var(--font-bold);
}

ul {
	list-style: none;
}

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

img,
svg {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
	max-width: 1120px;
	margin-left: 1.5rem;
	margin-right: 1.5rem;
}

.main {
	overflow: hidden; /* For animations */
}

/* Add shadow to header on scroll */
.shadow-header {
	box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.1);
}

/*=============== HEADER ===============*/
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: var(--body-bg-color);
	z-index: var(--z-fixed);
	transition: box-shadow 0.4s;
}

.header__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-block: 1rem;
}

.header__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	font-size: 1.25rem;
	color: var(--title-color);
}

.header__logo-icon {
	width: 40px;
	height: 40px;
}

/*=============== NAVIGATION ===============*/
.nav__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2.5rem;
}

.nav__link {
	color: var(--title-color);
	font-weight: var(--font-medium);
	transition: color 0.3s;
}

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

.nav__close,
.nav__toggle {
	display: flex;
	cursor: pointer;
	color: var(--title-color);
}

.nav__close {
	font-size: 1.5rem;
	position: absolute;
	top: 1rem;
	right: 1.5rem;
}

/* Show menu on mobile */
@media screen and (max-width: 767px) {
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		background-color: var(--body-bg-color);
		width: 80%;
		height: 100%;
		padding: 6rem 2rem 0;
		z-index: var(--z-fixed);
		transition: right 0.4s;
		box-shadow: -2px 0 12px hsla(0, 0%, 0%, 0.1);
	}
}

.show-menu {
	right: 0;
}

/*=============== BUTTONS ===============*/
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background-color: var(--primary-color);
	color: var(--body-bg-color);
	padding: 1rem 1.75rem;
	border-radius: 0.5rem;
	font-weight: var(--font-medium);
	transition: all 0.3s ease;
	border: 2px solid transparent;
}

.button:hover {
	background-color: transparent;
	color: var(--primary-color);
	border-color: var(--primary-color);
}

.button i {
	transition: transform 0.3s;
}

.button:hover i {
	transform: translateX(0.25rem);
}

.button--small {
	padding: 0.75rem 1.25rem;
}

/*=============== HERO SECTION ===============*/
.hero {
	padding-top: 10rem; /* Space for fixed header */
	padding-bottom: 4rem;
}

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

.hero__data {
	text-align: center;
}

.hero__title {
	font-size: var(--h1-font-size);
	margin-bottom: 1rem;
}

.hero__subtitle {
	font-size: var(--h2-font-size);
	font-family: var(--body-font);
	font-weight: var(--font-regular);
	margin-bottom: 1.5rem;
	min-height: 56px; /* Reserve space for 2 lines of text */
}

/* Typing animation cursor */
.hero__subtitle-typed {
	color: var(--primary-color);
	font-weight: var(--font-semibold);
	position: relative;
}

.hero__subtitle-typed::after {
	content: '|';
	position: absolute;
	right: -8px;
	animation: blink 0.7s infinite;
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

.hero__description {
	margin-bottom: 2.5rem;
	padding: 0 1rem; /* Better readability on mobile */
}

.hero__img {
	width: 100%;
	margin: 0 auto;
	display: block;
}

/*=============== REUSABLE SECTION STYLES ===============*/
.section {
	padding: 5rem 0;
}

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

.section__title {
	font-size: var(--h2-font-size);
	margin-bottom: 0.75rem;
}

.section__subtitle {
	max-width: 600px;
	margin: 0 auto;
	color: var(--text-color);
}

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

.courses__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

.courses__card {
	background-color: var(--body-bg-color);
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.courses__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 20px hsla(0, 0%, 0%, 0.1);
}

.courses__card-img {
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.courses__card-content {
	padding: 1.5rem;
}

.courses__card-title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.75rem;
}

.courses__card-description {
	margin-bottom: 1.5rem;
	min-height: 50px; /* Reserve space for description */
}

/*=============== FOOTER ===============*/
.footer {
	background-color: var(--container-bg-color);
	padding: 4rem 0 2rem;
	margin-top: 5rem;
}

.footer__container {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.footer__group {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
}

.footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	font-size: 1.25rem;
	color: var(--title-color);
	margin-bottom: 1rem;
}

.footer__logo-icon {
	width: 40px;
	height: 40px;
}

.footer__description,
.footer__link {
	font-size: var(--normal-font-size);
	color: var(--text-color);
}

.footer__title {
	font-size: var(--h3-font-size);
	margin-bottom: 1.5rem;
}

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

.footer__link {
	transition: color 0.3s;
}

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

.footer__contact-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.footer__contact-item i {
	color: var(--primary-color);
	flex-shrink: 0;
}

.footer__copyright {
	text-align: center;
	font-size: var(--small-font-size);
	color: var(--text-color);
	border-top: 1px solid #3a3a3a;
	padding-top: 2rem;
}

/*=============== BREAKPOINTS ===============*/
/* For medium devices */
@media screen and (min-width: 576px) {
	.features__grid {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 3rem;
	}
	.courses__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 768px) {
	.cookie-consent__container {
		flex-direction: row;
		justify-content: space-between;
	}
	.about__container {
		grid-template-columns: 1fr 1fr;
		align-items: center;
	}
	.nav {
		display: block;
	}
	.nav__list {
		flex-direction: row;
		gap: 2.5rem;
	}
	.nav__toggle,
	.nav__close {
		display: none;
	}

	.hero__container {
		grid-template-columns: 1fr 1fr;
		text-align: left;
	}

	.hero__data {
		text-align: left;
	}

	.hero__description {
		padding: 0;
	}
}

/* For large devices */
@media screen and (min-width: 992px) {
	.features__grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.about__container {
		gap: 5rem;
	}
	.courses__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

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

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

.about__img {
	border-radius: 1rem;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.section__title--left {
	text-align: left; /* Override centered default */
	margin-bottom: 1rem;
}

.about__description {
	margin-bottom: 1.5rem;
}

.about__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 2rem;
}

.about__list-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.about__list-item i {
	color: var(--primary-color);
	margin-top: 4px; /* Align icon with text */
	flex-shrink: 0;
}

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

.reviews__swiper {
	padding: 1rem 0 3rem; /* Add space for pagination */
}

.reviews__card {
	background-color: var(--body-bg-color);
	padding: 2rem;
	border-radius: 1rem;
	box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.05);
	height: auto; /* Allow card to grow */
}

.reviews__text {
	font-style: italic;
	margin-bottom: 1.5rem;
	position: relative;
	padding-left: 1.5rem;
	border-left: 3px solid var(--primary-color);
}

.reviews__student {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.reviews__student-img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
}

.reviews__student-name {
	font-size: var(--normal-font-size);
	font-weight: var(--font-semibold);
	color: var(--title-color);
	margin-bottom: 0.25rem;
}

.reviews__student-course {
	font-size: var(--small-font-size);
}

/* Swiper custom styles */
.swiper-pagination-bullet {
	background-color: var(--text-color);
}

.swiper-pagination-bullet-active {
	background-color: var(--primary-color);
}

/*=============== FEATURES SECTION ===============*/
.features__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
}

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

.features__item i {
	color: var(--primary-color);
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	margin-top: 5px;
}

.features__item-title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.5rem;
}

/*=============== CONTACT SECTION ===============*/
.contact {
	padding-bottom: 5rem;
}

.contact__container {
	display: grid;
	gap: 3rem;
}

.contact__description {
	margin-bottom: 1.5rem;
}

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

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

.contact__form-label {
	font-weight: var(--font-medium);
	color: var(--title-color);
}

.contact__form-input {
	width: 100%;
	padding: 1rem;
	border-radius: 0.5rem;
	border: 2px solid var(--text-color);
	background-color: var(--body-bg-color);
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	color: var(--title-color);
	transition: border-color 0.3s;
}

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

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

.contact__form-checkbox {
	margin-top: 5px;
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.contact__form-checkbox-label {
	font-size: var(--small-font-size);
}

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

.button--full {
	width: 100%;
}

.contact__success-message {
	text-align: center;
	color: var(--primary-color);
	font-weight: var(--font-medium);
	height: 24px; /* Reserve space */
	opacity: 0;
	transition: opacity 0.4s ease-in-out;
}

.contact__success-message--visible {
	opacity: 1;
}

/*=============== COOKIE CONSENT ===============*/
.cookie-consent {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--title-color);
	color: var(--body-bg-color);
	padding: 1.5rem 0;
	z-index: calc(var(--z-fixed) + 10);
	transform: translateY(100%);
	transition: transform 0.5s ease-in-out;
	box-shadow: 0 -4px 12px hsla(0, 0%, 0%, 0.15);
}

.cookie-consent--visible {
	transform: translateY(0);
}

.cookie-consent__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	text-align: center;
}

.cookie-consent__text {
	font-size: var(--small-font-size);
}

.cookie-consent__text a {
	color: var(--body-bg-color);
	text-decoration: underline;
	font-weight: var(--font-medium);
}

.cookie-consent .button {
	background-color: var(--body-bg-color);
	color: var(--title-color);
	border-color: transparent;
}

.cookie-consent .button:hover {
	background-color: transparent;
	color: var(--body-bg-color);
	border-color: var(--body-bg-color);
}

/*=============== POLICY PAGES ===============*/
.pages {
	padding-top: 10rem; /* Space for fixed header */
	padding-bottom: 5rem;
}

.pages h1,
.pages h2 {
	font-family: var(--title-font);
	color: var(--title-color);
	margin-bottom: 1.5rem;
}

.pages h1 {
	font-size: 1.5rem;
	border-bottom: 2px solid #3a3a3a;
	padding-bottom: 1rem;
	margin-bottom: 2rem;
}

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

.pages p {
	line-height: 1.7;
	margin-bottom: 1.5rem;
}

.pages ul {
	list-style: disc;
	padding-left: 2rem;
	margin-bottom: 1.5rem;
}

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

.pages a {
	color: var(--primary-color);
	text-decoration: underline;
	font-weight: var(--font-medium);
}

.pages strong {
	color: var(--title-color);
	font-weight: var(--font-semibold);
}
