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

/*=============== CSS VARIABLES ===============*/
:root {
	--header-height: 3.5rem;

	/*========== Colors ==========*/
	--hue: 210;
	--first-color: hsl(var(--hue), 55%, 53%);
	--first-color-alt: hsl(var(--hue), 55%, 48%);
	--title-color: hsl(var(--hue), 24%, 16%);
	--text-color: hsl(var(--hue), 8%, 45%);
	--text-color-light: hsl(var(--hue), 8%, 75%);
	--body-color: hsl(var(--hue), 100%, 99%);
	--container-color: #fff;
	--border-color: hsl(var(--hue), 12%, 90%);

	/*========== Font and typography ==========*/
	--body-font: 'Inter', sans-serif;
	--title-font: 'Manrope', sans-serif;
	--biggest-font-size: 2.5rem;
	--h1-font-size: 1.75rem;
	--h2-font-size: 1.25rem;
	--h3-font-size: 1rem;
	--normal-font-size: 0.938rem;
	--small-font-size: 0.813rem;
	--smaller-font-size: 0.75rem;

	--font-medium: 500;
	--font-semibold: 600;
	--font-bold: 700;
	--font-extrabold: 800;

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

@media screen and (min-width: 1024px) {
	:root {
		--biggest-font-size: 4.5rem;
		--h1-font-size: 2.5rem;
		--h2-font-size: 1.5rem;
		--h3-font-size: 1.25rem;
		--normal-font-size: 1rem;
		--small-font-size: 0.875rem;
		--smaller-font-size: 0.813rem;
	}
}

/*=============== BASE ===============*/
* {
	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-color);
	color: var(--text-color);
}

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

ul {
	list-style: none;
}

a {
	text-decoration: none;
}

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

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

.section {
	padding: 6rem 0 2rem;
}

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

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

.nav {
	height: var(--header-height);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

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

.nav__logo svg {
	fill: var(--first-color);
}

@media screen and (max-width: 1023px) {
	.nav__menu {
		position: fixed;
		top: 0;
		right: -100%;
		width: 80%;
		height: 100%;
		background-color: var(--body-color);
		padding: 6rem 2rem 4rem;
		transition: right 0.3s;
		box-shadow: -2px 0 12px hsla(var(--hue), 24%, 15%, 0.1);
	}
}

.nav__list {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

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

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

.nav__link--button {
	background-color: var(--first-color);
	color: #fff;
	padding: 0.75rem 1.5rem;
	border-radius: 0.5rem;
	transition: background-color 0.3s;
}
.nav__link--button:hover {
	background-color: var(--first-color-alt);
	color: #fff;
}

.nav__close,
.nav__toggle {
	display: flex;
	cursor: pointer;
	font-size: 1.25rem;
	color: var(--title-color);
}
.nav__close {
	position: absolute;
	top: 1.15rem;
	right: 1.5rem;
}

/* Show menu */
.show-menu {
	right: 0;
}

/* Header shadow */
.header-shadow {
	box-shadow: 0 1px 12px hsla(var(--hue), 24%, 15%, 0.1);
}

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

.footer__container {
	padding-bottom: 2rem;
}

.footer__content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2.5rem;
	row-gap: 3rem;
}

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

.footer__logo svg {
	fill: var(--first-color);
}

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

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

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

.footer__link {
	color: var(--text-color);
	transition: color 0.3s;
}

.footer__link:hover {
	color: var(--first-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(--first-color);
	width: 20px;
	flex-shrink: 0;
}

.footer__copy {
	margin-top: 4rem;
	text-align: center;
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

/*=============== MEDIA QUERIES ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
	.container {
		margin-left: 1rem;
		margin-right: 1rem;
	}
}

/* For medium devices */
@media screen and (min-width: 768px) {
	.nav__list {
		flex-direction: row;
		gap: 2rem;
	}
	.nav__link--button {
		margin-left: 1rem;
	}
}

/* For large devices */
@media screen and (min-width: 1024px) {
	.container {
		margin-left: auto;
		margin-right: auto;
	}

	.nav {
		height: calc(var(--header-height) + 1.5rem);
	}
	.nav__toggle,
	.nav__close {
		display: none;
	}
	.nav__list {
		align-items: center;
		gap: 3rem;
	}
	.nav__link {
		font-size: var(--normal-font-size);
	}
}

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

.hero__container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
	align-items: center;
}

.hero__content > * {
	/* For JS animation */
	opacity: 0;
}

.hero__subtitle {
	display: inline-block;
	color: var(--first-color);
	font-weight: var(--font-semibold);
	margin-bottom: 1rem;
}

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

.hero__description {
	font-size: var(--h3-font-size);
	line-height: 1.6;
	margin-bottom: 3rem;
	max-width: 550px;
}

.hero__button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background-color: var(--first-color);
	color: #fff;
	padding: 1.15rem 2.5rem;
	border-radius: 0.5rem;
	font-weight: var(--font-semibold);
	transition: background-color 0.3s, transform 0.3s;
}

.hero__button:hover {
	background-color: var(--first-color-alt);
	transform: translateY(-3px);
}

.hero__button i {
	width: 20px;
	height: 20px;
}

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

.hero__image img {
	width: 300px;
	border-radius: 1rem;
	z-index: 5;
	position: relative;
}

.hero__image::before {
	content: '';
	position: absolute;
	width: 80%;
	height: 100%;
	background-color: hsla(var(--hue), 24%, 90%, 0.5);
	border-radius: 1rem;
	top: -1rem;
	left: -1rem;
	z-index: 1;
	transform: rotate(-8deg);
}

/* For medium devices */
@media screen and (min-width: 768px) {
	.hero__container {
		grid-template-columns: repeat(2, 1fr);
	}
	.hero__image img {
		width: 350px;
	}
}

/* For large devices */
@media screen and (min-width: 1024px) {
	.hero__title {
		font-size: 2.5rem;
	}

	.hero {
		padding-top: calc(var(--header-height) + 4rem);
		padding-bottom: 6rem;
	}
	.hero__content {
		text-align: left;
	}
	.hero__image img {
		width: 450px;
	}
}

/*=============== REUSABLE SECTION HEADER ===============*/
.section__header {
	text-align: center;
	margin-bottom: 3rem;
}

.section__subtitle {
	display: block;
	color: var(--first-color);
	font-weight: var(--font-semibold);
	margin-bottom: 0.5rem;
}

.section__title {
	font-size: var(--h1-font-size);
	line-height: 1.3;
}

/*=============== SERVICES ===============*/
.services {
	background-color: var(--container-color);
}

.services__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.services__card {
	background-color: var(--body-color);
	padding: 2.5rem 2rem;
	border: 1px solid var(--border-color);
	border-radius: 1rem;
	text-align: center;
	transition: transform 0.3s, box-shadow 0.3s;
}

.services__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 24px hsla(var(--hue), 66%, 20%, 0.1);
}

.services__card-icon {
	display: inline-block;
	background-color: var(--first-color);
	color: #fff;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 auto 1.5rem;
}

.services__card-icon i {
	width: 28px;
	height: 28px;
}

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

.services__card-description {
	line-height: 1.6;
}

/* For medium devices */
@media screen and (min-width: 576px) {
	.services__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* For large devices */
@media screen and (min-width: 1024px) {
	.services__grid {
		grid-template-columns: repeat(4, 1fr);
	}
	.section__header {
		margin-bottom: 4rem;
	}
}

/*=============== CASES ===============*/
.cases {
	background-color: var(--body-color);
}

.cases__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.cases__card {
	position: relative;
	border-radius: 1rem;
	overflow: hidden;
	display: block; /* To make the whole card clickable if wrapped in <a> */
}

.cases__card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease-out;
}

.cases__card:hover .cases__card-img {
	transform: scale(1.05);
}

.cases__card-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 3rem 1.5rem 1.5rem;
	color: #fff;
	background: linear-gradient(
		to top,
		hsla(0, 0%, 0%, 0.8),
		hsla(0, 0%, 0%, 0.1)
	);
}

.cases__card-tag {
	display: inline-block;
	background-color: var(--first-color);
	padding: 0.25rem 0.75rem;
	border-radius: 0.25rem;
	font-size: var(--small-font-size);
	font-weight: var(--font-medium);
	margin-bottom: 0.75rem;
}

.cases__card-title {
	font-size: var(--h2-font-size);
	color: #fff;
	margin-bottom: 1rem;
}

.cases__card-link {
	color: #fff;
	font-weight: var(--font-medium);
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	transition: gap 0.3s ease, color 0.3s;
}

.cases__card-link:hover {
	color: var(--first-color);
	gap: 0.5rem;
}

/* For medium devices */
@media screen and (min-width: 768px) {
	.cases__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/*=============== PROCESS ===============*/
.process {
	background-color: var(--container-color);
}

.section__description {
	max-width: 600px;
	margin: 1rem auto 0;
}

.process__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-top: 4rem;
}

.process__step {
	text-align: center;
	padding: 2rem;
	border: 1px solid var(--border-color);
	border-radius: 1rem;
	position: relative;
}

.process__step-number {
	font-size: 2rem;
	font-family: var(--title-font);
	font-weight: var(--font-extrabold);
	color: var(--first-color);
	margin-bottom: 1rem;
	display: inline-block;
	background-color: hsla(var(--hue), 55%, 53%, 0.1);
	width: 60px;
	height: 60px;
	line-height: 60px;
	border-radius: 50%;
}

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

.process__step-description {
	font-size: var(--small-font-size);
}

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

	.process__step {
		padding: 2.5rem;
		text-align: left;
	}

	.process__step-number,
	.process__step-title,
	.process__step-description {
		text-align: left;
	}

	/* Connector lines */
	.process__step:not(:last-child) {
		position: relative;
	}
	.process__step:not(:last-child)::after {
		content: '';
		position: absolute;
		width: 60px;
		height: 2px;
		background-color: var(--first-color);
		opacity: 0.3;
		top: 50%;
		right: -48px;
		transform: translateY(-50%);
	}
}

/*========== BLOG ==========*/
.blog {
	background-color: var(--body-color);
}

.blog__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	padding-top: 1rem;
}

.blog__card {
	background-color: var(--container-color);
	border-radius: 1rem;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid var(--border-color);
}

.blog__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 24px hsla(var(--hue), 66%, 20%, 0.1);
}

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

.blog__card-content {
	padding: 1.5rem;
}

.blog__card-category {
	display: inline-block;
	background-color: hsla(var(--hue), 55%, 53%, 0.1);
	color: var(--first-color);
	padding: 0.25rem 0.75rem;
	border-radius: 1rem;
	font-size: var(--small-font-size);
	font-weight: var(--font-medium);
	margin-bottom: 1rem;
}

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

.blog__card-excerpt {
	color: var(--text-color);
	margin-bottom: 1.5rem;
	font-size: var(--small-font-size);
}

.blog__card-link {
	color: var(--first-color);
	font-weight: var(--font-medium);
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	transition: gap 0.3s ease;
}

.blog__card-link:hover {
	gap: 0.5rem;
}

.blog__card-link i {
	width: 1rem;
	height: 1rem;
}

/* For medium devices */
@media screen and (min-width: 768px) {
	.blog__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* For large devices */
@media screen and (min-width: 1024px) {
	.blog__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.blog__card-content {
		padding: 1.25rem;
	}
}

/*=============== CONTACT ===============*/
.contact {
	background-color: var(--container-color);
}

.contact__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
}

.contact__content {
	text-align: center;
}

.contact__description {
	margin-top: 1rem;
}

.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-size: var(--small-font-size);
	font-weight: var(--font-medium);
	color: var(--title-color);
}

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

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

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

.contact__form-checkbox-input {
	margin-top: 0.2rem;
	width: 1rem;
	height: 1rem;
}

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

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

.contact__form-button {
	background-color: var(--first-color);
	color: #fff;
	padding: 1.15rem 2.5rem;
	border-radius: 0.5rem;
	font-weight: var(--font-semibold);
	border: none;
	cursor: pointer;
	transition: background-color 0.3s, transform 0.3s;
	width: 100%;
}

.contact__form-button:hover {
	background-color: var(--first-color-alt);
	transform: translateY(-3px);
}

.contact__form-message {
	font-size: var(--small-font-size);
	text-align: center;
	margin-top: -0.5rem;
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition: opacity 0.3s, max-height 0.3s;
}

.contact__form-message.show {
	opacity: 1;
	max-height: 50px; /* Adjust if message is taller */
}

/* For large devices */
@media screen and (min-width: 1024px) {
	.contact__grid {
		grid-template-columns: 1fr 1.2fr;
		align-items: center;
		gap: 5rem;
	}
	.contact__content {
		text-align: left;
	}
}

/*=============== COOKIE POPUP ===============*/
.cookie-popup {
	position: fixed;
	bottom: 2rem;
	left: 2rem;
	max-width: 350px;
	background-color: var(--container-color);
	padding: 1.5rem;
	border-radius: 1rem;
	box-shadow: 0 8px 24px hsla(var(--hue), 66%, 20%, 0.15);
	z-index: var(--z-fixed);
	display: flex;
	align-items: center;
	gap: 1rem;
	transform: translateY(200%);
	opacity: 0;
	transition: transform 0.5s, opacity 0.5s;
}

.cookie-popup.show {
	transform: translateY(0);
	opacity: 1;
}

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

.cookie-popup__text a {
	color: var(--first-color);
}

.cookie-popup__button {
	background-color: var(--first-color);
	color: #fff;
	border: none;
	padding: 0.75rem 1.25rem;
	border-radius: 0.5rem;
	cursor: pointer;
	font-size: var(--small-font-size);
	font-weight: var(--font-medium);
	transition: background-color 0.3s;
	flex-shrink: 0;
}

.cookie-popup__button:hover {
	background-color: var(--first-color-alt);
}

@media screen and (max-width: 400px) {
	.cookie-popup {
		left: 50%;
		transform: translateX(-50%);
		flex-direction: column;
		left: 1rem;
		right: 1rem;
		max-width: 100%;
	}
}

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

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

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

.pages h1 {
	font-size: 1.5rem;
	margin-bottom: 2rem;
}

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

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

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

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

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

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