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

/*=============== CSS VARIABLES ===============*/
:root {
	/* Colors */
	--background-color: #0d1117;
	--text-color: #c9d1d9;
	--primary-color: #58a6ff;
	--secondary-color: #161b22;
	--border-color: #30363d;
	--text-color-light: #8b949e;

	/* Fonts */
	--body-font: 'Manrope', sans-serif;
	--heading-font: 'Bebas Neue', sans-serif;

	/* Font sizes */
	--big-font-size: 3rem;
	--h1-font-size: 2.25rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

	/* Margins */
	--mb-0-5: 0.5rem;
	--mb-1: 1rem;
	--mb-1-5: 1.5rem;
	--mb-2: 2rem;
	--mb-2-5: 2.5rem;

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

.body-no-scroll {
	overflow: hidden;
}

h1,
h2,
h3 {
	font-family: var(--heading-font);
	color: var(--text-color);
	font-weight: 400; /* Bebas Neue has only one weight */
}

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 {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: var(--z-fixed);
	background-color: rgba(13, 17, 23, 0.7);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border-color);
	transition: background-color 0.4s; /* <-- ДОДАЙТЕ ЦЕЙ РЯДОК */
}

.header.menu-is-open {
	background-color: var(--secondary-color);
	backdrop-filter: none;
}

.header__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 4.5rem;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--heading-font);
	font-size: 1.5rem;
	color: var(--primary-color);
	transition: color 0.3s;
}

.logo__svg {
	color: var(--primary-color);
	transition: transform 0.4s;
}

.logo:hover .logo__svg {
	transform: rotate(360deg);
}

.header__toggle {
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--primary-color);
	background: none;
	border: none;
	display: inline-flex;
}

@media screen and (max-width: 767px) {
	.header__nav {
		position: fixed;
		background-color: var(--secondary-color);
		top: 0;
		right: -100%;
		width: 100%;
		height: 100%;
		padding: 1.5rem;
		z-index: var(--z-fixed);
		transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
		display: flex;
		flex-direction: column;
	}
}

.nav__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--mb-2-5);
}

.nav__logo {
	font-family: var(--heading-font);
	font-size: var(--h2-font-size);
	color: var(--primary-color);
}

.nav__close {
	background: none;
	border: none;
	color: var(--text-color);
	font-size: 2rem;
	cursor: pointer;
	display: inline-flex;
}

.nav__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2.5rem;
	flex-grow: 1;
	text-align: center;
}

.nav__link {
	color: var(--text-color);
	font-size: var(--h2-font-size);
	font-family: var(--heading-font);
	transition: color 0.3s;
}

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

.nav__link--button {
	background-color: var(--primary-color);
	color: var(--background-color);
	padding: 1rem 2rem;
	border-radius: 5px;
	transition: background-color 0.3s;
}

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

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

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

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

.footer__logo,
.footer__title {
	margin-bottom: var(--mb-1-5);
}

.footer__title {
	font-size: var(--h3-font-size);
	letter-spacing: 1px;
}

.footer__description {
	color: var(--text-color-light);
	line-height: 1.6;
	max-width: 300px;
}

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

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

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

.footer__list--contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: var(--text-color-light);
}

.footer__icon {
	font-size: 1.25rem;
	color: var(--primary-color);
	flex-shrink: 0;
	margin-top: 3px;
}

.footer__bottom {
	margin-top: 4rem;
	padding: 1.5rem 0;
	border-top: 1px solid var(--border-color);
	text-align: center;
}

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

/*=============== 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) {
	body {
		margin: 0;
	}
	.header__toggle,
	.nav__close,
	.nav__header {
		display: none;
	}

	.header__nav {
		width: auto;
	}

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

	.nav__link {
		font-family: var(--body-font);
		font-size: var(--normal-font-size);
		font-weight: 700;
	}

	.nav__link--button {
		padding: 0.75rem 1.5rem;
	}
}

@media screen and (min-width: 992px) {
	.container {
		margin-left: auto;
		margin-right: auto;
	}

	.footer__container {
		grid-template-columns: repeat(4, 1fr);
	}
}

/*=============== HERO ===============*/
.hero {
	position: relative;
	height: 100vh;
	min-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.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: 750px;
	margin: 0 auto;
	/* Animation */
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUP 1s 0.5s forwards;
}

@keyframes fadeInUP {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero__title {
	font-size: var(--big-font-size);
	letter-spacing: 2px;
	margin-bottom: var(--mb-1);
}

.hero__subtitle {
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--text-color-light);
	margin-bottom: var(--mb-2);
}

.hero__button {
	display: inline-block;
	background-color: var(--primary-color);
	color: var(--background-color);
	padding: 1rem 2.5rem;
	border-radius: 5px;
	font-weight: 700;
	font-family: var(--body-font);
	transition: background-color 0.3s, transform 0.3s;
}

.hero__button:hover {
	background-color: #fff;
	transform: translateY(-3px);
}

/*=============== MEDIA QUERIES for HERO ===============*/
@media screen and (min-width: 768px) {
	.hero__title {
		font-size: 4.5rem;
	}

	.hero__subtitle {
		font-size: 1.25rem;
	}
}

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

.section__title {
	font-size: var(--h1-font-size);
	text-align: center;
	margin-bottom: var(--mb-2-5);
	letter-spacing: 1px;
}

/*=============== TECH ===============*/
.tech__grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.tech__card {
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 2rem 1.5rem;
	position: relative;
	overflow: hidden;
	transition: transform 0.3s, border-color 0.3s;
}

.tech__card:hover {
	transform: translateY(-5px);
	border-color: var(--primary-color);
}

.tech__card-icon {
	width: 48px;
	height: 48px;
	color: var(--primary-color);
	margin-bottom: var(--mb-1-5);
}

.tech__card-title {
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-1);
	letter-spacing: 0.5px;
}

.tech__card-description {
	color: var(--text-color-light);
	line-height: 1.6;
	height: 0;
	opacity: 0;
	margin: 0;
	transition: height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.tech__card:hover .tech__card-description {
	height: 170px; /* Adjust height based on content */
	opacity: 1;
	margin-top: var(--mb-1);
}

/*=============== MEDIA QUERIES for TECH ===============*/
@media screen and (min-width: 992px) {
	.section {
		padding: 8rem 0 2rem;
	}
}

/*=============== IDEAS (TABS) ===============*/
.ideas__tabs {
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 1.5rem;
}

.tabs__nav {
	display: flex;
	justify-content: center;
	border-bottom: 1px solid var(--border-color);
	margin-bottom: 2rem;
	flex-wrap: wrap; /* Allow buttons to wrap on small screens */
}

.tabs__button {
	background: none;
	border: none;
	color: var(--text-color-light);
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	font-weight: 700;
	padding: 1rem 1.5rem;
	cursor: pointer;
	position: relative;
	transition: color 0.3s;
	white-space: nowrap;
}

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

.tabs__button--active {
	color: var(--text-color);
}

.tabs__button--active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--primary-color);
}

.tabs__panel {
	display: none; /* Hidden by default */
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
	animation: fadeIn 0.5s;
}

/* Re-use fadeIn animation from Hero */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.tabs__panel--active {
	display: grid; /* Shown when active */
}

.tabs__panel-image img {
	border-radius: 8px;
	max-width: 100%;
	height: auto;
}

.tabs__panel-title {
	font-size: var(--h2-font-size);
	margin-bottom: var(--mb-1);
	letter-spacing: 1px;
}

.tabs__panel-description {
	color: var(--text-color-light);
	line-height: 1.7;
}

/*=============== MEDIA QUERIES for IDEAS ===============*/
@media screen and (min-width: 768px) {
	.ideas__tabs {
		padding: 2.5rem;
	}

	.tabs__panel--active {
		grid-template-columns: 1fr 1.5fr; /* Two columns on larger screens */
	}
}

/*=============== CASES (SLIDER) ===============*/
.cases {
	position: relative;
}

.cases__container {
	padding-bottom: 3rem; /* Space for pagination */
}

.cases__swiper {
	overflow: visible; /* Allows shadows to be visible */
}

.case__card {
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s;
}

.case__card:hover {
	transform: translateY(-5px);
}

.case__card-img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.case__card-data {
	padding: 1.5rem;
}

.case__card-tag {
	display: inline-block;
	background-color: var(--primary-color);
	color: var(--background-color);
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	font-size: var(--small-font-size);
	font-weight: 700;
	margin-bottom: var(--mb-1);
}

.case__card-title {
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-0-5);
}

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

/* Swiper custom styles */
.swiper-pagination-bullet {
	background-color: var(--text-color-light);
}

.swiper-pagination-bullet-active {
	background-color: var(--primary-color);
}

.swiper-button-next::after,
.swiper-button-prev::after {
	font-size: 1.5rem !important;
	color: var(--primary-color);
}

@media screen and (max-width: 767px) {
	.swiper-button-next,
	.swiper-button-prev {
		display: none; /* Hide arrows on mobile, rely on touch swipe */
	}
}

/*=============== ABOUT ===============*/
.about__grid {
	display: grid;
	gap: 2.5rem;
	align-items: center;
}

.about__image img {
	border-radius: 8px;
	width: 100%;
}

.about__subtitle {
	font-size: var(--h2-font-size);
	margin-bottom: var(--mb-1);
	letter-spacing: 1px;
}

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

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

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

.about__list-icon {
	flex-shrink: 0;
	color: var(--primary-color);
	width: 24px;
	height: 24px;
	margin-top: 3px;
}

.about__list-item span {
	line-height: 1.6;
	color: var(--text-color);
}

.about__list-item strong {
	color: var(--text-color);
	font-weight: 700;
}

/*=============== MEDIA QUERIES for ABOUT ===============*/
@media screen and (min-width: 768px) {
	.about__grid {
		grid-template-columns: 1fr 1.2fr; /* Two columns */
	}
}

/*=============== CONTACT ===============*/
.contact__grid {
	display: grid;
	gap: 3rem;
}

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

.contact__info-description {
	color: var(--text-color-light);
	line-height: 1.7;
	margin-bottom: var(--mb-2);
}

/* Re-use footer contact list styles */
.contact__info .footer__list--contact {
	flex-direction: column;
	gap: 1.5rem;
}

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

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

.contact__form-label {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	margin-bottom: var(--mb-0-5);
}

.contact__form-input {
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: 5px;
	padding: 1rem;
	color: var(--text-color);
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	transition: border-color 0.3s;
}

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

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

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

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

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

.contact__form-button {
	background-color: var(--primary-color);
	border: none;
	padding: 1rem;
	border-radius: 5px;
	color: var(--background-color);
	font-weight: 700;
	font-size: var(--normal-font-size);
	cursor: pointer;
	transition: background-color 0.3s;
}

.contact__form-button:hover {
	background-color: #fff;
}

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

.contact__form-message.is-success {
	color: #4caf50; /* Green for success */
}
.contact__form-message.is-error {
	color: #f44336; /* Red for error */
}

/*=============== MEDIA QUERIES for CONTACT ===============*/
@media screen and (min-width: 992px) {
	.contact__grid {
		grid-template-columns: 1fr 1.2fr;
	}
}

/*=============== COOKIE POP-UP ===============*/
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: var(--secondary-color);
	border-top: 1px solid var(--border-color);
	padding: 1.5rem 2rem;
	z-index: var(--z-fixed);

	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;

	transform: translateY(120%);
	transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cookie-popup.is-visible {
	transform: translateY(0);
}

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

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

.cookie-popup__button {
	background-color: var(--primary-color);
	color: var(--background-color);
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 5px;
	font-weight: 700;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.3s;
}

.cookie-popup__button:hover {
	background-color: #fff;
}

/* Media query for smaller screens */
@media screen and (max-width: 576px) {
	.cookie-popup {
		flex-direction: column;
		text-align: center;
	}
}

/*=============== POLICY & TEXT PAGES ===============*/
.pages {
	padding: 6rem 0;
}

.pages .container {
	max-width: 800px; /* Make text content narrower for readability */
}

.pages h1,
.pages h2 {
	font-family: var(--heading-font);
	letter-spacing: 1px;
	margin-bottom: var(--mb-1-5);
}

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

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

.pages p {
	line-height: 1.8;
	color: var(--text-color-light);
	margin-bottom: var(--mb-1-5);
}

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

.pages a:hover {
	color: #fff;
}

.pages ul {
	list-style: disc;
	padding-left: 2rem;
	margin-bottom: var(--mb-1-5);
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.pages li {
	line-height: 1.8;
	color: var(--text-color-light);
}

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