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

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

	/* Colors */
	--primary-color: #4a6cfd;
	--primary-color-alt: #3b56c9;
	--title-color: #1e1e1e;
	--text-color: #575757;
	--bg-color: #ffffff;
	--bg-color-alt: #f8f9fa;
	--container-color: #ffffff;
	--border-color: #e5e7eb;
	--footer-bg-color: #1e1e1e;
	--footer-text-color: #a0aec0;

	/* Fonts */
	--body-font: 'Inter', sans-serif;
	--title-font: 'Poppins', sans-serif;
	--biggest-font-size: 2.5rem;
	--h1-font-size: 2.25rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

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

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

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

h1,
h2,
h3,
h4 {
	color: var(--title-color);
	font-family: var(--title-font);
	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: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

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

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

.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);
}

.header__nav {
	display: block;
}

.header__nav-list {
	display: flex;
	gap: 2.5rem;
}

.header__nav-link {
	font-weight: var(--font-medium);
	color: var(--title-color);
	position: relative;
	transition: color 0.3s;
}

.header__nav-link::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--primary-color);
	transition: width 0.3s ease;
}

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

.header__nav-link:hover::after {
	width: 100%;
}

.header__burger {
	display: none;
	cursor: pointer;
	background: none;
	border: none;
	color: var(--title-color);
}

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

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

.footer__column .logo {
	color: #fff;
	font-size: 1.5rem;
}

.footer__copyright {
	margin-top: 1rem;
	font-size: var(--small-font-size);
}

.footer__title {
	font-family: var(--title-font);
	color: #fff;
	font-size: var(--h3-font-size);
	margin-bottom: 1rem;
	font-weight: var(--font-semibold);
}

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

.footer__link {
	transition: color 0.3s;
}

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

.footer__list--contacts li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.footer__list--contacts i {
	flex-shrink: 0;
	margin-top: 2px;
}

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

@media screen and (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 100%;
		height: 100vh;
		background-color: var(--bg-color);
		padding: 2rem;
		transition: right 0.4s ease;
	}

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

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

	.header__nav-link {
		font-size: var(--h3-font-size);
	}

	.header__burger {
		display: block;
	}
}

@media screen and (max-width: 576px) {
	.footer__container {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.footer__column:first-child {
		align-items: center;
	}

	.footer__list--contacts li {
		justify-content: center;
	}
}

/* ============ BUTTONS ============ */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background-color: var(--primary-color);
	color: #fff;
	padding: 1rem 2rem;
	border-radius: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-semibold);
	transition: all 0.3s ease;
}

.button:hover {
	background-color: var(--primary-color-alt);
	transform: translateY(-2px);
	box-shadow: 0 4px 20px rgba(74, 108, 253, 0.4);
}

.button__icon {
	width: 1.25rem;
	height: 1.25rem;
}

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

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

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

.hero__title--animated {
	color: var(--primary-color);
	position: relative;
}

/* Blinking cursor effect */
.hero__title--animated::after {
	content: '|';
	position: absolute;
	right: -10px;
	color: var(--primary-color);
	animation: blink 1s infinite;
}

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

.hero__description {
	font-size: var(--normal-font-size);
	line-height: 1.6;
	margin-bottom: 2.5rem;
	max-width: 500px;
}

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

.hero__img {
	width: 100%;

	border-radius: 1rem;
}

/* ============ MEDIA QUERIES (Hero) ============ */
@media screen and (max-width: 992px) {
	.hero__container {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.hero__content {
		order: 2;
	}
	.hero__visual {
		order: 1;
		margin-bottom: 2rem;
	}
	.hero__description {
		margin-left: auto;
		margin-right: auto;
	}
}

@media screen and (max-width: 576px) {
	:root {
		--biggest-font-size: 2rem;
	}
	.hero {
		padding-top: calc(var(--header-height) + 2rem);
		padding-bottom: 2rem;
	}
}

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

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

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

.section__subtitle {
	font-size: var(--normal-font-size);
	color: var(--text-color);
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.6;
}

/* ============ HOW IT WORKS SECTION ============ */
.how-it-works {
	background-color: var(--bg-color);
}

.how-it-works__steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.how-it-works__step {
	border: 1px solid var(--border-color);
	border-radius: 1rem;
	padding: 2.5rem 2rem;
	text-align: center;
	transition: all 0.3s ease;
}

.how-it-works__step:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.how-it-works__icon-wrapper {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background-color: var(--bg-color-alt);
	margin-bottom: 1.5rem;
}

.how-it-works__icon {
	width: 32px;
	height: 32px;
	color: var(--primary-color);
}

.how-it-works__title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.75rem;
}

.how-it-works__description {
	line-height: 1.6;
}

/* ============ MEDIA QUERIES (How it works) ============ */
@media screen and (max-width: 992px) {
	.how-it-works__steps {
		grid-template-columns: 1fr;
	}
}

@media screen and (max-width: 576px) {
	.section {
		padding: 3rem 0;
	}
	.section__title {
		font-size: var(--h2-font-size);
	}
	.how-it-works__step {
		padding: 2rem 1.5rem;
	}
}

/* ============ FEATURES SECTION ============ */
.features {
	background-color: var(--bg-color-alt);
}

.features__container {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 3rem;
	align-items: flex-start;
}

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

.features__tab-button {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	border-radius: 0.5rem;
	border: 1px solid var(--border-color);
	background-color: var(--container-color);
	cursor: pointer;
	width: 100%;
	text-align: left;
	font-family: var(--title-font);
	font-size: var(--normal-font-size);
	font-weight: var(--font-semibold);
	color: var(--title-color);
	transition: all 0.3s ease;
}

.features__tab-button:hover {
	background-color: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
}

.features__tab-button.is-active {
	background-color: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
	box-shadow: 0 4px 20px rgba(74, 108, 253, 0.3);
}

.features__tab-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.features__content-item {
	display: none;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 2rem;
	animation: fadeIn 0.5s ease-in-out;
}

.features__content-item.is-active {
	display: grid;
}

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

.features__content-title {
	font-size: var(--h2-font-size);
	margin-bottom: 1rem;
}

.features__content-text p {
	line-height: 1.7;
	margin-bottom: 2rem;
}

.features__content-img {
	width: 100%;
	border-radius: 1rem;
}

/* ============ MEDIA QUERIES (Features) ============ */
@media screen and (max-width: 992px) {
	.features__container {
		grid-template-columns: 1fr;
	}
	.features__tabs {
		flex-direction: row;
		overflow-x: auto;
		padding-bottom: 1rem; /* for scrollbar */
	}
	.features__tab-button {
		flex-shrink: 0;
	}
}

@media screen and (max-width: 768px) {
	.features__content-item {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.features__content-visual {
		order: -1; /* Image on top */
		margin-bottom: 2rem;
	}
	.features__content-text {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
}

/* ============ EXAMPLES SECTION ============ */
.examples {
	background-color: var(--bg-color);
}

.examples__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.examples__card {
	background-color: var(--bg-color-alt);
	border: 1px solid var(--border-color);
	border-radius: 1rem;
	padding: 2.5rem 2rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	transition: all 0.3s ease;
}

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

.examples__card-icon-wrapper {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	border-radius: 0.75rem;
	background-color: var(--container-color);
	margin-bottom: 1.5rem;
	border: 1px solid var(--border-color);
}

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

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

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

/* ============ MEDIA QUERIES (Examples) ============ */
@media screen and (max-width: 992px) {
	.examples__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 768px) {
	.examples__grid {
		grid-template-columns: 1fr;
	}
}

/* ============ PRICING SECTION ============ */
.pricing {
	background-color: var(--bg-color-alt);
}

.pricing__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	align-items: center;
}

.pricing__card {
	background-color: var(--container-color);
	border: 1px solid var(--border-color);
	border-radius: 1rem;
	padding: 2.5rem 2rem;
	text-align: center;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.pricing__card-header {
	margin-bottom: 1.5rem;
}

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

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

.pricing__card-price {
	margin-bottom: 2rem;
}

.pricing__card-amount {
	font-size: var(--biggest-font-size);
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	color: var(--title-color);
}

.pricing__card-period {
	font-size: var(--normal-font-size);
	color: var(--text-color);
}

.pricing__card-features {
	text-align: left;
	margin-bottom: 2.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	flex-grow: 1; /* Pushes the button to the bottom */
}

.pricing__card-features li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.pricing__card-check-icon,
.pricing__card-x-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.pricing__card-check-icon {
	color: var(--primary-color);
}

.pricing__card-x-icon {
	color: #a0a0a0;
}

.button--outline {
	background-color: transparent;
	color: var(--primary-color);
	border: 1px solid var(--primary-color);
}

.button--outline:hover {
	background-color: var(--primary-color);
	color: #fff;
}

/* Popular Card Styles */
.pricing__card--popular {
	position: relative;
	border: 2px solid var(--primary-color);
	transform: scale(1.05);
	box-shadow: 0 10px 40px rgba(74, 108, 253, 0.2);
}

.pricing__card-badge {
	position: absolute;
	top: -15px;
	left: 50%;
	transform: translateX(-50%);
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.25rem 1rem;
	border-radius: 1rem;
	font-size: var(--small-font-size);
	font-weight: var(--font-semibold);
	font-family: var(--title-font);
}

/* ============ MEDIA QUERIES (Pricing) ============ */
@media screen and (max-width: 992px) {
	.pricing__grid {
		grid-template-columns: 1fr;
		max-width: 450px;
		margin: 0 auto;
	}
	.pricing__card--popular {
		transform: scale(1); /* Reset scale for stacked layout */
	}
}

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

.contact__container {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 4rem;
	align-items: center;
}

.contact__info .section__title,
.contact__info .section__subtitle {
	text-align: left;
	margin-left: 0;
	margin-right: 0;
}

/* Form Styles */
.form__group {
	position: relative;
	margin-bottom: 1.5rem;
}

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

.form__label {
	position: absolute;
	top: 1rem;
	left: 1rem;
	color: var(--text-color);
	background-color: var(--bg-color-alt);
	padding: 0 0.25rem;
	transition: all 0.3s;
	pointer-events: none;
}

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

.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
	top: -0.75rem;
	left: 0.75rem;
	font-size: var(--small-font-size);
	color: var(--primary-color);
}

.form__group--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.form__checkbox-input {
	margin-top: 3px;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

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

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

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

.form__message {
	font-size: var(--small-font-size);
	margin-top: 1rem;
	text-align: center;
	padding: 1rem;
	border-radius: 0.5rem;
	display: none; /* Hidden by default */
}

.form__message.success {
	background-color: #d1fae5;
	color: #065f46;
	display: block;
}

.form__message.error {
	background-color: #fee2e2;
	color: #991b1b;
	display: block;
}

/* ============ MEDIA QUERIES (Contact) ============ */
@media screen and (max-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
	.contact__info {
		text-align: center;
	}
	.contact__info .section__title,
	.contact__info .section__subtitle {
		text-align: center;
	}
}

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

.cookie-popup.is-active {
	bottom: 2rem;
}

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

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

.cookie-popup__button {
	padding: 0.75rem 1.5rem;
	flex-shrink: 0;
}

/* ============ MEDIA QUERIES (Cookie) ============ */
@media screen and (max-width: 576px) {
	.cookie-popup {
		flex-direction: column;
		text-align: center;
		gap: 1rem;
	}
	.cookie-popup.is-active {
		bottom: 1rem;
	}
}

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

.pages .container {
	max-width: 800px; /* Optimal width for readability */
}

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

.pages h1 {
	font-size: 1.5rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 1rem;
}

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

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

.pages ul {
	list-style: disc;
	padding-left: 20px;
}

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

.pages a:hover {
	color: var(--primary-color-alt);
}

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