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

/*=============== CSS VARIABLES ===============*/
:root {
	/* Colors */
	--header-height: 3.5rem;
	--bg-color: #ffffff;
	--text-color: #0a0a0a;
	--text-color-light: #6b7280;
	--accent-color: #4f46e5;
	--accent-color-hover: #4338ca;
	--container-color: #f3f4f6;

	/* Font and typography */
	--body-font: 'Inter', sans-serif;
	--biggest-font-size: 2rem;
	--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 weight */
	--font-regular: 400;
	--font-medium: 500;
	--font-semibold: 600;
	--font-bold: 700;

	/* Box shadow */
	--shadow: 0 4px 12px hsla(0, 0%, 20%, 0.1);

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

/*=============== 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);
}

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: 1.5rem;
	margin-right: 1.5rem;
}

.main {
	/* Це тимчасово, щоб було видно футер окремо */
	min-height: 100vh;
}

/*=============== HEADER & NAV ===============*/
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: var(--bg-color);
	z-index: var(--z-fixed);
	box-shadow: 0 1px 4px hsla(0, 0%, 4%, 0.1);
}

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

.nav__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: var(--font-semibold);
}

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

/* Navigation for mobile devices */
@media screen and (max-width: 767px) {
	.nav__menu {
		position: fixed;
		top: 0;
		right: -100%;
		background-color: var(--bg-color);
		width: 80%;
		height: 100%;
		padding: 6rem 2rem 0;
		box-shadow: -2px 0 12px hsla(0, 0%, 20%, 0.1);
		transition: right 0.4s;
	}
}

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

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

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

.nav__close {
	position: absolute;
	top: 1.15rem;
	right: 1.5rem;
}

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

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

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

.footer__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: var(--font-semibold);
	margin-bottom: 1rem;
}

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

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

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

.footer__link {
	font-size: var(--normal-font-size);
	transition: color 0.3s ease;
}

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

.footer__list--contacts {
	gap: 1.25rem;
}

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

.footer__contact-icon {
	flex-shrink: 0;
	color: var(--accent-color);
	width: 20px;
	height: 20px;
}

.footer__contact-item span,
.footer__contact-item a {
	font-size: var(--normal-font-size);
}

.footer__copy {
	border-top: 1px solid #e5e7eb;
	padding: 1.5rem 0;
	text-align: center;
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

/*=============== BREAKPOINTS ===============*/
/* For medium devices */
@media screen and (min-width: 767px) {
	.nav__menu {
		width: 50%;
	}
}

/* For large devices */
@media screen and (min-width: 1024px) {
	.nav {
		height: calc(var(--header-height) + 1.5rem);
	}
	.nav__toggle,
	.nav__close {
		display: none;
	}
	.nav__menu {
		all: unset;
	}
	.nav__list {
		flex-direction: row;
		gap: 3rem;
	}
	.container {
		margin-left: auto;
		margin-right: auto;
	}

	.footer__container {
		padding-bottom: 4rem;
	}
}

/*=============== BUTTONS ===============*/
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background-color: var(--accent-color);
	color: var(--bg-color);
	padding: 1.125rem 2rem;
	font-weight: var(--font-semibold);
	border-radius: 0.5rem;
	transition: background-color 0.3s, transform 0.3s;
}

.button:hover {
	background-color: var(--accent-color-hover);
	transform: translateY(-2px);
}

.button__icon {
	width: 20px;
	height: 20px;
	transition: transform 0.3s;
}

.button:hover .button__icon {
	transform: translateX(4px);
}

/*=============== HERO ===============*/
.hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: var(--header-height);
	overflow: hidden; /* Важливо для canvas */
}

.hero__canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.hero__container {
	position: relative;
	z-index: 2;
	text-align: center;
}

.hero__content {
	max-width: 650px;
	margin: 0 auto;
}

.hero__title {
	font-size: 2.5rem; /* Змінимо розмір для великих екранів нижче */
	font-weight: var(--font-bold);
	line-height: 1.2;
	margin-bottom: 1rem;
}

.hero__description {
	font-size: 1.125rem;
	color: var(--text-color-light);
	margin-bottom: 2.5rem;
	line-height: 1.6;
}

/*=============== BREAKPOINTS (доповнення) ===============*/
/* For small devices */
@media screen and (min-width: 375px) {
	:root {
		--biggest-font-size: 2.5rem;
	}
}

/* For large devices (доповнення)*/
@media screen and (min-width: 1024px) {
	.hero__title {
		font-size: 3.5rem;
	}
	.hero__description {
		font-size: 1.25rem;
	}
}

/*=============== SECTION STYLES ===============*/
.section {
	padding: 6rem 0 2rem;
	background-color: var(--bg-color);
}

.section:nth-child(odd) {
	background-color: var(--container-color);
}

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

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

.section__subtitle {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
	line-height: 1.6;
}

/*=============== TOOLS ===============*/
.tools__tabs {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 3rem;
	flex-wrap: wrap;
}

.tools__tab-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border-radius: 0.5rem;
	border: 1px solid #e5e7eb;
	background-color: var(--bg-color);
	color: var(--text-color);
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	font-weight: var(--font-semibold);
	cursor: pointer;
	transition: all 0.3s;
}

.tools__tab-button:hover {
	background-color: var(--container-color);
	border-color: #d1d5db;
}

.tools__tab-button.active {
	background-color: var(--accent-color);
	color: var(--bg-color);
	border-color: var(--accent-color);
}

.tools__grid {
	display: none;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	animation: fadeIn 0.4s;
}

.tools__grid.active {
	display: grid;
}

/* Simple fade-in animation for tabs */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.tool-card {
	background-color: var(--bg-color);
	padding: 1.5rem;
	border-radius: 0.75rem;
	border: 1px solid #e5e7eb;
	box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.05);
	transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow);
}

.tool-card__img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 0.5rem;
	margin-bottom: 1rem;
	background-color: var(--container-color); /* Placeholder bg */
}

.tool-card__title {
	font-size: var(--h3-font-size);
	font-weight: var(--font-semibold);
	margin-bottom: 0.5rem;
}

.tool-card__description {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	line-height: 1.6;
}

/*=============== BREAKPOINTS (доповнення) ===============*/
@media screen and (min-width: 1024px) {
	.section {
		padding: 8rem 0 4rem;
	}
	.section__title {
		font-size: 2.25rem;
	}
	.section__subtitle {
		font-size: 1.125rem;
	}
}

/*=============== CASES (ACCORDION) ===============*/
.cases__container {
	max-width: 750px;
	margin: 0 auto;
}

.case-item {
	background-color: var(--bg-color);
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	margin-bottom: 1rem;
	transition: box-shadow 0.3s;
}

.case-item:hover {
	box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.08);
}

.case-item__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	cursor: pointer;
}

.case-item__title {
	font-size: var(--h3-font-size);
	font-weight: var(--font-semibold);
	padding-right: 1rem;
}

.case-item__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--accent-color);
	flex-shrink: 0;
	transition: transform 0.3s;
}

.case-item__content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease-out;
}

.case-item__content-inner {
	padding: 1.5rem;
	border-top: 1px solid #e5e7eb;
}

.case-item__content-inner p {
	color: var(--text-color-light);
	line-height: 1.7;
	margin-bottom: 1rem;
}

.case-item__content-inner p:last-child {
	margin-bottom: 0;
}

.case-item__content-inner ol {
	padding-left: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	color: var(--text-color-light);
}

/* Accordion open state */
.case-item.open .case-item__icon {
	transform: rotate(45deg);
}

.case-item.open .case-item__header {
	/* Optional: change color when open */
	color: var(--accent-color);
}

/*=============== GUIDES & BLOG (CARD GRID) ===============*/
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 2rem;
}

.content-card {
	background-color: var(--bg-color);
	border-radius: 0.75rem;
	border: 1px solid #e5e7eb;
	box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.05);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s, box-shadow 0.3s;
}

.content-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow);
}

.content-card__image {
	width: 100%;
	height: 200px;
	object-fit: cover;
	background-color: var(--container-color); /* Placeholder bg */
}

.content-card__body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1; /* Makes card bodies equal height in a row */
}

.content-card__tag,
.content-card__meta {
	display: inline-block;
	margin-bottom: 0.75rem;
	font-size: var(--small-font-size);
	font-weight: var(--font-semibold);
}

.content-card__tag {
	background-color: var(--container-color);
	color: var(--text-color-light);
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	align-self: flex-start;
}

.content-card__meta {
	color: var(--text-color-light);
}

.content-card__title {
	font-size: 1.125rem;
	font-weight: var(--font-semibold);
	margin-bottom: 0.5rem;
	line-height: 1.4;
}

.content-card__title a {
	transition: color 0.3s;
}

.content-card__title a:hover {
	color: var(--accent-color);
}

.content-card__description {
	color: var(--text-color-light);
	line-height: 1.6;
	margin-bottom: 1.5rem;
	flex-grow: 1;
}

.content-card__link {
	font-weight: var(--font-semibold);
	color: var(--accent-color);
	transition: color 0.3s;
	align-self: flex-start;
}

.content-card__link:hover {
	color: var(--accent-color-hover);
}

/*=============== CONTACT ===============*/
.contact__container.grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
}

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

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

.contact__info-description {
	color: var(--text-color-light);
	margin-bottom: 2rem;
}

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

.contact__info-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.contact__info-item i {
	color: var(--accent-color);
	width: 24px;
	height: 24px;
	margin-top: 2px;
}

.contact__info-item span,
.contact__info-item a {
	color: var(--text-color-light);
}

.contact__info-item a:hover {
	color: var(--accent-color);
}

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

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

.contact__form-label {
	font-size: var(--small-font-size);
	font-weight: var(--font-semibold);
	margin-bottom: 0.5rem;
}

.contact__form-input {
	width: 100%;
	padding: 1rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	color: var(--text-color);
	transition: border-color 0.3s, box-shadow 0.3s;
}

.contact__form-input::placeholder {
	color: #9ca3af;
}

.contact__form-input:focus {
	outline: none;
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px hsla(244, 76%, 63%, 0.2);
}

.contact__form-group--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

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

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

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

.contact__form-button {
	width: 100%;
}

.contact__success-message {
	display: none; /* Hidden by default */
	text-align: center;
	padding: 2rem;
	border: 1px solid #a7f3d0;
	background-color: #f0fdf4;
	border-radius: 0.5rem;
	color: #065f46;
	animation: fadeIn 0.4s;
}

.contact__success-message i {
	width: 48px;
	height: 48px;
	margin-bottom: 1rem;
	color: #10b981;
}

/*=============== COOKIE POPUP ===============*/
.cookie {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 0;
	right: 0;
	z-index: var(--z-fixed);
	padding: 1rem;
	display: flex;
	justify-content: center;
	transition: bottom 0.5s ease-in-out;
}

.cookie.show {
	bottom: 1rem; /* Slide in */
}

.cookie__container {
	max-width: 1120px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.5rem;
	background-color: var(--text-color);
	color: var(--bg-color);
	border-radius: 0.75rem;
	box-shadow: var(--shadow);
	flex-wrap: wrap;
}

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

.cookie__text a {
	text-decoration: underline;
	font-weight: var(--font-semibold);
	transition: color 0.3s;
}

.cookie__text a:hover {
	color: #9ca3af;
}

.cookie__button {
	background-color: var(--bg-color);
	color: var(--text-color);
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 0.5rem;
	font-family: var(--body-font);
	font-weight: var(--font-semibold);
	cursor: pointer;
	transition: background-color 0.3s, color 0.3s;
	flex-shrink: 0;
}

.cookie__button:hover {
	background-color: #f3f4f6;
}

@media screen and (max-width: 576px) {
	.cookie__container {
		flex-direction: column;
		text-align: center;
	}
}

/*=============== POLICY PAGES ===============*/
.pages {
	padding: 4rem 0;
}

/* For Header on policy pages */
.header-pages {
	position: static; /* Make header not fixed */
	box-shadow: var(--shadow);
}

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

.pages h1,
.pages h2,
.pages p,
.pages ul,
.pages ol {
	margin-bottom: 1.5rem;
	line-height: 1.7;
}

.pages h1:last-child,
.pages h2:last-child,
.pages p:last-child,
.pages ul:last-child,
.pages ol:last-child {
	margin-bottom: 0;
}

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

.pages h2 {
	font-size: 1.5rem;
	font-weight: var(--font-semibold);
	margin-top: 2.5rem;
}

.pages p {
	color: var(--text-color-light);
}

.pages a {
	color: var(--accent-color);
	font-weight: var(--font-medium);
	text-decoration: underline;
	text-underline-offset: 4px;
	transition: color 0.3s;
}

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

.pages ul,
.pages ol {
	padding-left: 1.5rem;
	color: var(--text-color-light);
}

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

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