/* ===== GLOBAL STYLES ===== */

/* Google Fonts Import (alternative to <link> in HTML) */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@600;700&display=swap');

:root {
	--header-height: 4.5rem;

	/* Colors */
	--primary-color: #4a90e2; /* Bright Blue */
	--title-color: #1a1a2e; /* Dark Blue */
	--text-color: #333333;
	--text-color-light: #888;
	--body-color: #ffffff;
	--container-color: #f4f7fc; /* Light Gray */
	--footer-bg-color: #1a1a2e;

	/* Fonts */
	--body-font: 'Lato', sans-serif;
	--title-font: 'Montserrat', sans-serif;

	--h1-font-size: 2.25rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;
}

/* Base */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 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);
	line-height: 1.6;
}

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

ul {
	list-style: none;
}

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

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

/* Layout */
.container {
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* ===== HEADER ===== */
.header {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100;
	background-color: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid #eaeaea;
	transition: box-shadow 0.3s ease;
}

.header.scrolled {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.header__logo {
	display: flex;
	align-items: center;
	font-weight: 700;
	color: var(--title-color);
}

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

.header__nav-link {
	color: var(--text-color);
	font-weight: 600;
	font-family: var(--title-font);
	font-size: var(--small-font-size);
	transition: color 0.3s ease, transform 0.3s ease;
	position: relative;
	padding-bottom: 4px;
}

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

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

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

.header__nav-link--button {
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.6rem 1.2rem;
	border-radius: 5px;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.header__nav-link--button:hover {
	background-color: #3a7bc8;
	color: #fff;
	transform: translateY(-2px);
}
.header__nav-link--button:hover::after {
	width: 0;
}

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

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

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

.footer__logo {
	display: inline-block;
	margin-bottom: 1rem;
}

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

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

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

.footer__link {
	color: #eaeaea;
	font-size: var(--small-font-size);
	transition: color 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

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

.footer__icon {
	width: 18px;
	height: 18px;
}

.footer__list--contacts .footer__link {
	align-items: flex-start;
}

.footer__list--contacts span.footer__link {
	cursor: default;
}

.footer__list--contacts span.footer__link:hover {
	color: #eaeaea;
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 768px) {
	:root {
		--h1-font-size: 1.75rem;
		--h2-font-size: 1.25rem;
		--h3-font-size: 1.125rem;
	}

	.header__nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 60%;
		height: 100vh;
		background-color: rgba(255, 255, 255, 0.95);
		backdrop-filter: blur(15px);
		padding: 2rem;
		transition: right 0.4s ease-in-out;
		box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
	}

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

	.header__nav-list {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.5rem;
	}

	.header__burger-btn {
		display: block;
	}

	.footer__container {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.footer__column {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

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

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

.button:hover {
	background-color: #fff;
	color: var(--primary-color);
	border-color: var(--primary-color);
	transform: translateY(-3px);
	box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

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

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

/* ===== HERO SECTION ===== */
.hero {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	background-color: var(--container-color);
	overflow: hidden; /* Для коректної роботи анімації */
}

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

@media screen and (min-width: 768px) {
	.hero__container {
		grid-template-columns: 1fr 1fr;
	}
	.hero {
		padding-top: calc(var(--header-height) + 5rem);
		padding-bottom: 5rem;
	}
}

.hero__content {
	text-align: center;
}

@media screen and (min-width: 768px) {
	.hero__content {
		text-align: left;
	}
}

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

@media screen and (min-width: 992px) {
	.hero__title {
		font-size: 2.5rem;
	}
}

.hero__description {
	font-size: var(--h3-font-size);
	color: var(--text-color-light);
	margin-bottom: 2.5rem;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

@media screen and (min-width: 768px) {
	.hero__description {
		margin-left: 0;
		margin-right: 0;
	}
}

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

.hero__image {
	width: 100%;
	border-radius: 10px;
	object-fit: cover;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

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

@media screen and (min-width: 768px) {
	.section-header__title {
		font-size: 2.5rem;
	}
}

.section-header__subtitle {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
	max-width: 600px;
	margin: 0 auto;
}

@media screen and (min-width: 768px) {
	.section-header__subtitle {
		font-size: var(--h3-font-size);
	}
}

/* ===== SERVICES SECTION ===== */
.services {
	padding-top: 5rem;
	padding-bottom: 5rem;
	background-color: var(--body-color);
}

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

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

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

.services__card {
	background-color: #fff;
	padding: 2.5rem 2rem;
	border-radius: 10px;
	border: 1px solid #eaeaea;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.services__card-icon {
	display: inline-flex;
	padding: 1rem;
	background-color: var(--container-color);
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.services__card-icon i {
	color: var(--primary-color);
	width: 32px;
	height: 32px;
}

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

.services__card-description {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
	line-height: 1.7;
}

/* ===== CASES SECTION ===== */
.cases {
	padding-top: 5rem;
	padding-bottom: 5rem;
	background-color: var(--container-color);
}

.cases__container {
	display: flex;
	flex-direction: column;
	gap: 4rem;
}

.case-item {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

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

.case-item--reverse .case-item__image-wrapper {
	order: 2;
}

@media screen and (min-width: 992px) {
	.case-item--reverse .case-item__image-wrapper {
		order: initial;
	}

	.case-item--reverse {
		direction: rtl; /* Changes the direction of content */
	}

	.case-item--reverse > * {
		direction: ltr; /* Resets direction for children */
	}
}

.case-item__image {
	width: 100%;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	object-fit: cover;
}

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

.case-item__description {
	color: var(--text-color-light);
	margin-bottom: 2rem;
	line-height: 1.7;
}

.case-item__stats {
	display: flex;
	gap: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #eaeaea;
}

.case-item__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.case-item__stat-number {
	font-family: var(--title-font);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--primary-color);
	line-height: 1.2;
}

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

/* ===== BLOG SECTION ===== */
.blog {
	padding-top: 5rem;
	padding-bottom: 5rem;
	background-color: var(--body-color);
}

.blog__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-bottom: 3rem;
}

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

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

.blog-card {
	background-color: #fff;
	border-radius: 10px;
	border: 1px solid #eaeaea;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.blog-card__image-wrapper {
	overflow: hidden;
	aspect-ratio: 16 / 10;
}

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

.blog-card:hover .blog-card__image {
	transform: scale(1.05);
}

.blog-card__content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

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

.blog-card__category {
	color: var(--primary-color);
	font-weight: 700;
}

.blog-card__date {
	color: var(--text-color-light);
}

.blog-card__title {
	font-size: 1.125rem;
	line-height: 1.4;
	margin-bottom: 0.75rem;
}

.blog-card__title a {
	color: var(--title-color);
	transition: color 0.3s ease;
}

.blog-card__title a:hover {
	color: var(--primary-color);
}

.blog-card__excerpt {
	color: var(--text-color-light);
	flex-grow: 1;
}

.blog__view-all {
	text-align: center;
}

/* ===== ABOUT SECTION ===== --> */
.about {
	padding-top: 5rem;
	padding-bottom: 5rem;
	background-color: var(--container-color);
}

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

@media screen and (min-width: 992px) {
	.about__container {
		grid-template-columns: 1fr 1.5fr;
		gap: 5rem;
	}
}

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

.about__image {
	width: 280px;
	height: 280px;
	border-radius: 50%;
	object-fit: cover;
	border: 5px solid #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about__name {
	font-size: var(--h3-font-size);
	font-family: var(--title-font);
	margin-bottom: 1rem;
	font-weight: 600;
}

.about__description {
	color: var(--text-color-light);
	margin-bottom: 1rem;
	line-height: 1.7;
}

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

.about__list-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 700;
}

.about__list-icon {
	color: var(--primary-color);
	width: 20px;
	height: 20px;
}

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

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

@media screen and (min-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr 1fr;
		gap: 5rem;
		align-items: center;
	}
}

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

.contact__info-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: var(--normal-font-size);
}
.contact__info-item a:hover {
	color: var(--primary-color);
}

.contact__info-icon {
	color: var(--primary-color);
	width: 24px;
	height: 24px;
}

.contact__form-group {
	position: relative;
	margin-bottom: 2rem;
}

.contact__form-input {
	width: 100%;
	padding: 1rem;
	border: 1px solid #ccc;
	border-radius: 5px;
	background-color: #fff;
	color: var(--text-color);
	font-size: var(--normal-font-size);
	transition: border-color 0.3s;
}

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

.contact__form-label {
	position: absolute;
	top: 1rem;
	left: 1rem;
	color: var(--text-color-light);
	background-color: #fff;
	padding: 0 0.25rem;
	transition: all 0.3s;
	pointer-events: none;
}

/* Float label effect */
.contact__form-input:focus + .contact__form-label,
.contact__form-input:not(:placeholder-shown) + .contact__form-label {
	top: -0.75rem;
	left: 0.75rem;
	font-size: var(--small-font-size);
	color: var(--primary-color);
}

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

.contact__form-checkbox {
	margin-top: 0.2rem;
	width: 1.25em;
	height: 1.25em;
}

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

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

.contact__form-button {
	width: 100%;
}

.contact__form-message {
	display: none; /* Hidden by default */
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	margin-top: 1.5rem;
	border-radius: 5px;
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

/* ===== COOKIE POPUP ===== */
.cookie-popup {
	position: fixed;
	bottom: 1.5rem;
	left: 1.5rem;
	right: 1.5rem;
	max-width: 500px;
	background-color: var(--title-color);
	color: #fff;
	padding: 1.5rem;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
	z-index: 200;
	opacity: 0;
	transform: translateY(20px);
	visibility: hidden;
	transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

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

@media screen and (min-width: 576px) {
	.cookie-popup {
		flex-direction: row;
		align-items: center;
		max-width: 100%;
	}
}

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

.cookie-popup__text a {
	color: #fff;
	text-decoration: underline;
	font-weight: 700;
}

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

.cookie-popup__button {
	padding: 0.6rem 1.2rem;
	background-color: var(--primary-color);
	color: #fff;
	white-space: nowrap; /* Prevent button text from wrapping */
}

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

/* ===== GENERIC PAGES (Privacy, Terms, etc.) ===== */
.pages {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 5rem;
}

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

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

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

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

.pages ul,
.pages ol {
	padding-left: 1.5rem;
	margin-bottom: 1.5rem;
}

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

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

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

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