/* ==================== GLOBAL STYLES ==================== */
/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&display=swap');

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

	/* Colors */
	--clr-dark: #111827;
	--clr-light: #f9fafb;
	--clr-accent: #4f46e5;
	--clr-gray: #6b7280;
	--clr-light-gray: #e5e7eb;

	/* Fonts */
	--ff-body: 'Manrope', sans-serif;
	--fs-base: 1rem;
	--fs-lg: 1.125rem;
	--fs-xl: 1.25rem;
	--fs-2xl: 1.5rem;
	--fs-3xl: 2rem;
	--fw-normal: 400;
	--fw-medium: 500;
	--fw-bold: 700;
	--fw-extrabold: 800;

	/* Spacing */
	--mb-0-5: 0.5rem;
	--mb-1: 1rem;
	--mb-1-5: 1.5rem;
	--mb-2: 2rem;
	--mb-3: 3rem;

	/* Z-index */
	--z-fixed: 100;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--ff-body);
	font-size: var(--fs-base);
	background-color: var(--clr-light);
	color: var(--clr-dark);
	line-height: 1.6;
}

h1,
h2,
h3,
h4 {
	font-weight: var(--fw-bold);
	line-height: 1.2;
}

ul {
	list-style: none;
}

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

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

/* Reusable CSS Classes */
.container {
	max-width: 1120px;
	margin-left: var(--mb-1-5);
	margin-right: var(--mb-1-5);
}

/* ==================== HEADER ==================== */
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: var(--clr-light);
	border-bottom: 1px solid var(--clr-light-gray);
	z-index: var(--z-fixed);
	transition: background-color 0.3s ease;
}

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

.header__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: var(--fw-bold);
	color: var(--clr-dark);
}

.header__logo span {
	font-size: var(--fs-lg);
}

.nav__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--mb-2);
}

.nav__link {
	color: var(--clr-dark);
	font-weight: var(--fw-medium);
	transition: color 0.3s ease;
}

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

.nav__link--button {
	display: none; /* Hide on mobile by default */
}

.nav__close,
.nav__toggle {
	border: none;
	background-color: transparent;
	display: inline-flex;
	cursor: pointer;
	font-size: 1.25rem;
	color: var(--clr-dark);
}

/* Mobile Menu Styles */
@media screen and (max-width: 767px) {
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 80%;
		height: 100%;
		background-color: var(--clr-light);
		padding: 4rem 2rem 0;
		box-shadow: -2px 0 10px hsla(0, 0%, 15%, 0.1);
		transition: right 0.4s ease;
	}
}

.nav.show-menu {
	right: 0;
}

.nav__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
}

/* ==================== FOOTER ==================== */
.footer {
	background-color: var(--clr-dark);
	color: var(--clr-light);
	padding: 4rem 0 2rem;
}

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

.footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--fs-lg);
	font-weight: var(--fw-bold);
	margin-bottom: var(--mb-1);
	color: var(--clr-light);
}

.footer__description {
	color: var(--clr-light-gray);
	max-width: 300px;
}

.footer__title {
	font-size: var(--fs-lg);
	margin-bottom: var(--mb-1);
}

.footer__link {
	color: var(--clr-light-gray);
	transition: color 0.3s ease;
	display: inline-block;
	padding: 0.25rem 0;
}

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

.footer__list--contact li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: var(--mb-0-5);
	color: var(--clr-light-gray);
}

.footer__icon {
	width: 20px;
	height: 20px;
	color: var(--clr-accent);
}

.footer__bottom {
	margin-top: var(--mb-3);
	padding-top: var(--mb-2);
	border-top: 1px solid var(--clr-gray);
	text-align: center;
}

.footer__copy {
	font-size: 0.9rem;
	color: var(--clr-gray);
}

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

/* For large devices */
@media screen and (min-width: 768px) {
	.nav {
		display: flex;
		align-items: center;
		gap: 2.5rem;
	}
	.nav__list {
		flex-direction: row;
		gap: 2.5rem;
	}
	.nav__toggle,
	.nav__close {
		display: none;
	}
	.nav__link--button {
		display: inline-block;
		background-color: var(--clr-accent);
		color: var(--clr-light);
		padding: 0.75rem 1.5rem;
		border-radius: 6px;
		transition: background-color 0.3s ease;
	}
	.nav__link--button:hover {
		background-color: #4338ca;
		color: var(--clr-light);
	}

	.footer__container {
		grid-template-columns: repeat(4, 1fr);
	}
	.footer__column:first-child {
		grid-column: 1 / 2;
	}
}

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

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

.button:hover {
	background-color: #4338ca;
	transform: translateY(-2px);
	box-shadow: 0 4px 15px hsla(243, 75%, 58%, 0.2);
}

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

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

.hero__content {
	text-align: center;
}

.hero__title {
	font-size: var(--fs-3xl);
	font-weight: var(--fw-extrabold);
	margin-bottom: var(--mb-1-5);
	min-height: 100px; /* Для стабільності під час анімації */
}

/* Стиль для курсора анімації */
.hero__title::after {
	content: '|';
	display: inline-block;
	animation: blink 0.7s infinite;
	font-weight: var(--fw-normal);
}
.hero__title.typing-finished::after {
	display: none;
}

@keyframes blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}

.hero__subtitle {
	font-size: var(--fs-lg);
	color: var(--clr-gray);
	max-width: 600px;
	margin: 0 auto var(--mb-2);
}

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

.hero__image {
	border-radius: 12px;
	width: 100%;
	max-width: 500px;
	height: auto;
	object-fit: cover;
}

/* ==================== MEDIA QUERIES (Hero Section) ==================== */

/* For large devices */
@media screen and (min-width: 768px) {
	.hero__title {
		min-height: 100px;
	}
}

@media screen and (min-width: 992px) {
	.hero {
		padding-top: calc(var(--header-height) + 6rem);
		padding-bottom: 6rem;
	}

	.hero__container {
		grid-template-columns: 1.2fr 1fr;
		gap: 2rem;
		text-align: left;
	}

	.hero__content {
		text-align: left;
	}

	.hero__subtitle {
		margin-left: 0;
		margin-right: 0;
	}
}

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

.section__title,
.section__subtitle {
	text-align: center;
}

.section__title {
	font-size: var(--fs-2xl);
	font-weight: var(--fw-extrabold);
	margin-bottom: var(--mb-1);
}

.section__subtitle {
	font-size: var(--fs-lg);
	color: var(--clr-gray);
	max-width: 600px;
	margin: 0 auto var(--mb-3);
}

/* ==================== SERVICES SECTION ==================== */
.services__container {
	display: grid;
	gap: 2rem;
	padding-top: 2rem;
}

.service-card {
	background-color: #fff;
	border: 1px solid var(--clr-light-gray);
	padding: 2.5rem 2rem;
	border-radius: 12px;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 25px hsla(210, 8%, 15%, 0.1);
}

.service-card__icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: #eef2ff; /* Light accent color */
	margin-bottom: var(--mb-1-5);
}

.service-card__icon i {
	width: 32px;
	height: 32px;
	color: var(--clr-accent);
}

.service-card__title {
	font-size: var(--fs-xl);
	margin-bottom: var(--mb-0-5);
}

.service-card__description {
	color: var(--clr-gray);
	line-height: 1.7;
}

/* ==================== MEDIA QUERIES (Services Section) ==================== */
@media screen and (min-width: 576px) {
	.services__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 992px) {
	.section {
		padding: 6rem 0 3rem;
	}
	.section__title {
		font-size: var(--fs-3xl);
	}
	.services__container {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ==================== APPROACH SECTION ==================== */
.approach {
	background-color: #fff;
}

.approach__container {
	display: grid;
	gap: 2.5rem;
	padding-top: 2rem;
}

.approach-step {
	position: relative;
	padding-left: 2.5rem;
}

/* Vertical line for mobile */
.approach-step::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 20px;
	bottom: -2.5rem; /* Extends to the next element's gap */
	width: 2px;
	background-color: var(--clr-light-gray);
}

.approach-step:last-child::before {
	display: none; /* No line after the last step */
}

.approach-step__number {
	position: absolute;
	left: -1rem;
	top: -0.25rem;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
	background-color: var(--clr-light);
	border: 2px solid var(--clr-light-gray);
	border-radius: 50%;
	font-weight: var(--fw-bold);
	color: var(--clr-accent);
	z-index: 1;
}

.approach-step__title {
	font-size: var(--fs-xl);
	margin-bottom: var(--mb-0-5);
}

.approach-step__description {
	color: var(--clr-gray);
}

/* ==================== MEDIA QUERIES (Approach Section) ==================== */

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

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

	.approach-step {
		padding-left: 0;
		padding-top: 2.5rem; /* Space for the number */
		text-align: center;
	}

	.approach-step__number {
		top: -1rem;
		left: 50%;
		transform: translateX(-50%);
	}

	/* Horizontal dashed line for desktop */
	.approach-step::before {
		top: 6px; /* Vertically centered with the number */
		left: 50%;
		right: -1rem; /* Half of the gap */
		bottom: auto;
		width: auto;
		height: 2px;
		background-image: linear-gradient(
			to right,
			var(--clr-light-gray) 50%,
			transparent 50%
		);
		background-size: 10px 2px;
		background-repeat: repeat-x;
	}

	.approach-step:last-child::before {
		display: none;
	}
}

/* ==================== CASES SECTION ==================== */
.cases {
	background-color: var(--clr-light); /* Or keep it white if approach is gray */
}

.cases__container {
	display: grid;
	gap: 4rem;
	padding-top: 2rem;
}

.case-study {
	display: grid;
	gap: 2rem;
	align-items: center;
}

.case-study__image-wrapper {
	overflow: hidden;
	border-radius: 12px;
}

.case-study__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.case-study:hover .case-study__image {
	transform: scale(1.05);
}

.case-study__tag {
	display: inline-block;
	background-color: #eef2ff;
	color: var(--clr-accent);
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: var(--fw-medium);
	margin-bottom: var(--mb-1);
}

.case-study__title {
	font-size: var(--fs-2xl);
	margin-bottom: var(--mb-1);
}

.case-study__description {
	color: var(--clr-gray);
	margin-bottom: var(--mb-1-5);
}

.case-study__result {
	border-left: 3px solid var(--clr-accent);
	padding-left: 1.5rem;
}

.case-study__result-value {
	display: block;
	font-size: var(--fs-3xl);
	font-weight: var(--fw-extrabold);
	color: var(--clr-dark);
}

.case-study__result-label {
	color: var(--clr-gray);
}

/* ==================== MEDIA QUERIES (Cases Section) ==================== */
@media screen and (min-width: 768px) {
	.case-study {
		grid-template-columns: 1fr 1fr;
	}

	/* Modifier for the reversed layout */
	.case-study--reversed .case-study__image-wrapper {
		order: 2;
	}
	.case-study--reversed .case-study__content {
		order: 1;
	}
}

/* ==================== BLOG SECTION ==================== */
.blog {
	background-color: #fff;
}

.blog__container {
	display: grid;
	gap: 2rem;
	padding-top: 2rem;
}

.blog-card {
	background-color: var(--clr-light);
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--clr-light-gray);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 25px hsla(210, 8%, 15%, 0.1);
}

.blog-card__image-wrapper {
	aspect-ratio: 16 / 9;
}

.blog-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blog-card__content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	height: calc(
		100% - (100% * 9 / 16)
	); /* Adjust height based on aspect ratio */
}

.blog-card__meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: 0.875rem;
	margin-bottom: var(--mb-1);
}

.blog-card__tag {
	color: var(--clr-accent);
	font-weight: var(--fw-bold);
}

.blog-card__date {
	color: var(--clr-gray);
}

.blog-card__title {
	font-size: var(--fs-lg);
	font-weight: var(--fw-bold);
	margin-bottom: var(--mb-1-5);
	flex-grow: 1; /* Pushes the link to the bottom */
}

.blog-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--clr-accent);
	font-weight: var(--fw-medium);
	transition: gap 0.3s ease;
}

.blog-card__link:hover {
	gap: 0.75rem;
}

/* ==================== MEDIA QUERIES (Blog Section) ==================== */
@media screen and (min-width: 576px) {
	.blog__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

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

/* ==================== CONTACT SECTION ==================== */
.contact {
	background-color: var(--clr-light-gray);
	padding-bottom: 5rem;
}

.contact__form-wrapper {
	max-width: 600px;
	margin: 0 auto;
	background-color: #fff;
	padding: 2rem;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
}

.form__group {
	margin-bottom: var(--mb-1-5);
}

.form__label {
	display: block;
	font-weight: var(--fw-medium);
	margin-bottom: var(--mb-0-5);
	color: var(--clr-dark);
}

.form__input {
	width: 100%;
	padding: 0.8rem 1rem;
	border: 1px solid var(--clr-light-gray);
	border-radius: 6px;
	font-size: var(--fs-base);
	color: var(--clr-dark);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
	outline: none;
	border-color: var(--clr-accent);
	box-shadow: 0 0 0 3px hsla(243, 75%, 58%, 0.2);
}

.form__checkbox-group {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: var(--mb-2);
}

.form__checkbox-group input {
	margin-top: 5px;
}

.form__checkbox-group label {
	font-size: 0.875rem;
	color: var(--clr-gray);
}

.form__checkbox-group label a {
	color: var(--clr-accent);
	text-decoration: underline;
}

.form__button {
	width: 100%;
}

.contact__success-message {
	text-align: center;
	padding: 2rem;
	border-radius: 12px;
	background-color: #f0fdf4;
	color: #15803d;
	border: 1px solid #dcfce7;
	transition: opacity 0.5s ease;
	opacity: 1;
}

.contact__success-message--hidden {
	display: none;
	opacity: 0;
}

.success-message__icon {
	width: 48px;
	height: 48px;
	color: #22c55e;
	margin-bottom: var(--mb-1);
}

.success-message__title {
	font-size: var(--fs-2xl);
	font-weight: var(--fw-extrabold);
	margin-bottom: var(--mb-0-5);
	color: #166534;
}

.success-message__text {
	color: #166534;
	line-height: 1.5;
}

/* ==================== MEDIA QUERIES (Contact Section) ==================== */
@media screen and (min-width: 992px) {
	.contact__container {
		display: grid;
		grid-template-columns: 1fr 1.2fr;
		gap: 4rem;
		align-items: center;
	}
	.contact__content {
		text-align: left;
	}
	.section__subtitle {
		margin-left: 0;
		margin-right: 0;
	}
}

/* ==================== COOKIE POP-UP ==================== */
.cookie-popup {
	position: fixed;
	bottom: 1.5rem;
	left: 1.5rem;
	right: 1.5rem;
	z-index: 200;
	background-color: var(--clr-dark);
	color: var(--clr-light);
	padding: 1rem 1.5rem;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
	display: none; /* Hidden by default */
	animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.cookie-popup.show-popup {
	display: block;
}

.cookie-popup__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
}

.cookie-popup__text {
	font-size: 0.875rem;
	line-height: 1.4;
}

.cookie-popup__text a {
	color: var(--clr-accent);
	text-decoration: underline;
	font-weight: var(--fw-medium);
}

.cookie-popup__button {
	font-size: 0.875rem;
	padding: 0.5rem 1rem;
}

/* For larger screens */
@media screen and (min-width: 768px) {
	.cookie-popup {
		bottom: 2rem;
		left: 50%;
		transform: translateX(-50%);
		width: 100%;
		max-width: 600px;
	}
	.cookie-popup__content {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

/* ==================== STYLES FOR POLICY PAGES ==================== */
.pages {
	padding: 6rem 1.5rem;
}

.pages .container {
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

.pages h1,
.pages h2,
.pages h3 {
	color: var(--clr-dark);
	font-weight: var(--fw-extrabold);
	margin-bottom: var(--mb-1);
	line-height: 1.2;
}

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

.pages h2 {
	font-size: 1.5rem;
	margin-top: var(--mb-2);
}

.pages p {
	color: var(--clr-dark);
	line-height: 1.7;
	margin-bottom: var(--mb-1-5);
}

.pages ul {
	list-style: none;
	padding: 0;
	margin-bottom: var(--mb-1-5);
}

.pages li {
	position: relative;
	padding-left: 1.5rem;
	margin-bottom: var(--mb-0-5);
	color: var(--clr-dark);
	line-height: 1.7;
}

.pages li strong {
	font-weight: var(--fw-bold);
	color: var(--clr-dark);
}

.pages li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.75rem;
	width: 6px;
	height: 6px;
	background-color: var(--clr-accent);
	border-radius: 50%;
}

.pages a {
	color: var(--clr-accent);
	text-decoration: underline;
}
