/* --- VARIABLES --- */
:root {
	/* Palette */
	--color-bg: #f8fafc; /* Light Background */
	--color-text: #334155; /* Slate 700 */
	--color-heading: #0f172a; /* Slate 900 (Dark Blue) */

	--color-primary: #6366f1; /* Indigo 500 */
	--color-primary-dark: #4f46e5; /* Indigo 600 */

	--color-accent: #10b981; /* Emerald 500 (Green) */

	--color-white: #ffffff;
	--color-footer-bg: #0f172a;
	--color-border: #e2e8f0;

	/* Fonts */
	--font-main: 'Inter', sans-serif;
	--font-heading: 'Space Grotesk', sans-serif;

	/* Layout */
	--container-width: 1200px;
	--header-height: 80px;
	--radius-md: 8px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-main);
	background-color: var(--color-bg);
	color: var(--color-text);
	line-height: 1.6;
	font-size: 16px;
	overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
	text-decoration: none;
	color: inherit;
	transition: color 0.3s ease;
}

ul {
	list-style: none;
}

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

.container {
	width: 100%;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 20px;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	color: var(--color-heading);
	line-height: 1.2;
	margin-bottom: 1rem;
}

/* Utility: Text Gradient */
.text-gradient {
	background: linear-gradient(
		90deg,
		var(--color-primary) 0%,
		var(--color-accent) 100%
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* --- BUTTONS --- */
.btn {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	padding: 12px 24px;
	border-radius: var(--radius-md);
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
	font-size: 1rem;
	white-space: nowrap;
}

.btn--primary {
	background-color: var(--color-primary);
	color: var(--color-white);
}

.btn--primary:hover {
	background-color: var(--color-primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn--outline {
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.2);
	color: var(--color-white);
}

.btn--outline:hover {
	border-color: var(--color-white);
	background-color: rgba(255, 255, 255, 0.05);
}

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

.btn--lg {
	padding: 16px 32px;
	font-size: 1.1rem;
}

/* --- HEADER --- */
.header {
	position: sticky;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-height);
	background-color: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--color-border);
	z-index: 1000;
	display: flex;
	align-items: center;
}

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

.header__logo-link {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--color-primary);
}

.header__logo-text {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.5rem;
	color: var(--color-heading);
}

.header__nav {
	display: none;
}

.header__menu {
	display: flex;
	gap: 30px;
}

.header__link {
	font-weight: 500;
	font-size: 0.95rem;
}

.header__link:hover,
.header__link--active {
	color: var(--color-primary);
}

.header__actions {
	display: flex;
	align-items: center;
	gap: 15px;
}

.header__burger {
	display: flex;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px;
	z-index: 1002;
}

.header__burger-line {
	width: 24px;
	height: 2px;
	background-color: var(--color-heading);
	transition: all 0.3s ease;
}

/* Burger State when Open */
body.menu-open .header__burger-line:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}
body.menu-open .header__burger-line:nth-child(2) {
	opacity: 0;
}
body.menu-open .header__burger-line:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* --- MOBILE MENU --- */
.mobile-menu {
	position: fixed;
	top: -1000px;
	right: 0;
	width: 100%;
	height: 100vh;
	background-color: var(--color-white);
	z-index: 1001;
	transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
	padding-top: var(--header-height);
	display: flex;
	flex-direction: column;
}

.mobile-menu.active {
	top: 0;
}

.mobile-menu__container {
	padding: 40px 20px;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.mobile-menu__list {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 40px;
}

.mobile-menu__link {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--color-heading);
}

/* Desktop Query */
@media (min-width: 992px) {
	.header__nav {
		display: block;
	}
	.header__burger {
		display: none;
	}
	.mobile-menu {
		display: none;
	}
}

@media (max-width: 991px) {
	.header__actions .btn {
		display: none;
	} /* Hide header CTA on mobile */
}

/* --- HERO SECTION --- */
.hero {
	background-color: var(--color-heading);
	color: var(--color-white);
	position: relative;
	overflow: hidden; /* Critical for animation */
	padding: 80px 0;
	min-height: calc(100vh - var(--header-height));
	display: flex;
	align-items: center;
}

.hero__container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 50px;
	align-items: center;
	position: relative;
	z-index: 2; /* Above animation */
}

.hero__content {
	max-width: 600px;
}

/* Hero Badge */
.hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: rgba(99, 102, 241, 0.1);
	border: 1px solid rgba(99, 102, 241, 0.3);
	padding: 6px 16px;
	border-radius: 100px;
	font-size: 0.85rem;
	color: #818cf8;
	font-weight: 500;
	margin-bottom: 24px;
}

.hero__badge-dot {
	width: 8px;
	height: 8px;
	background-color: var(--color-accent);
	border-radius: 50%;
	box-shadow: 0 0 8px var(--color-accent);
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
	100% {
		opacity: 1;
	}
}

.hero__title {
	font-size: 2.5rem;
	line-height: 1.1;
	margin-bottom: 24px;
	color: var(--color-white);
}

.hero__desc {
	font-size: 1.1rem;
	color: #cbd5e1;
	margin-bottom: 40px;
	line-height: 1.6;
}

/* Hero Actions */
.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

/* Hero Stats */
.hero__stats {
	display: flex;
	align-items: center;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__stat-item {
	display: flex;
	flex-direction: column;
}

.hero__stat-num {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.8rem;
	color: var(--color-white);
}

.hero__stat-label {
	font-size: 0.85rem;
	color: #94a3b8;
}

.hero__stat-divider {
	width: 1px;
	height: 40px;
	background-color: rgba(255, 255, 255, 0.1);
	margin: 0 30px;
}

/* Hero Animation Container */
.hero__visual {
	height: 400px;
	position: relative;
	width: 100%;
}

@media (max-width: 768px) {
	.hero__visual {
		display: none;
	}
}

/* Hero Animation Particles (Neural Flow) */
.tech-particle {
	position: absolute;
	border-radius: 50%;
	background: linear-gradient(
		135deg,
		var(--color-primary) 0%,
		var(--color-accent) 100%
	);
	opacity: 0.7;
	mix-blend-mode: screen;
	filter: blur(1px);
	box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

@media (min-width: 992px) {
	.hero__container {
		grid-template-columns: 1fr 1fr;
	}
	.hero__title {
		font-size: 3rem;
	}
}

@media (max-width: 768px) {
	.hero__actions {
		flex-direction: column;
		width: 100%;
	}
	.hero__visual {
		height: 250px;
	}
}

/* --- FOOTER --- */
.footer {
	background-color: var(--color-footer-bg);
	color: #94a3b8;
	padding: 60px 0 30px;
}

.footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
	margin-bottom: 60px;
}

.footer__col {
	display: flex;
	flex-direction: column;
}

.footer__logo-link {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--color-primary);
	margin-bottom: 20px;
}

.footer__logo-text {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.5rem;
	color: var(--color-white);
}

.footer__desc {
	font-size: 0.9rem;
	max-width: 300px;
}

.footer__title {
	color: var(--color-white);
	font-size: 1.1rem;
	margin-bottom: 20px;
}

.footer__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer__link:hover {
	color: var(--color-white);
	text-decoration: underline;
}

.footer__contacts {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.95rem;
}

.footer__icon {
	width: 20px;
	height: 20px;
	color: var(--color-primary);
	flex-shrink: 0;
}

.footer__bottom {
	padding-top: 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
	font-size: 0.85rem;
}

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

@media (min-width: 1024px) {
	.footer__grid {
		grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
	}
}


/* --- SECTIONS GLOBAL --- */
.section {
    padding: 100px 0;
}

.section--bg-white {
    background-color: var(--color-white);
}

.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section__title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section__subtitle {
    color: #64748b;
    font-size: 1.1rem;
}

.text-highlight {
    color: var(--color-primary);
    font-weight: 600;
}

/* --- PROGRAMS SECTION --- */
.programs__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.program-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 40px 30px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.program-card__icon-box {
    width: 60px;
    height: 60px;
    background-color: #e0e7ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--color-primary);
}

.program-card__icon {
    width: 32px;
    height: 32px;
}

.program-card__title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.program-card__desc {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.program-card__features {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.program-card__features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-heading);
    font-weight: 500;
}

.program-card__features i {
    width: 18px;
    height: 18px;
    color: var(--color-accent);
}

.program-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.program-card__badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.05em;
}

.btn-link {
    color: var(--color-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.program-card:hover .btn-link {
    color: var(--color-primary);
}

.programs__cta {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.btn--dark {
    color: var(--color-heading);
    border-color: var(--color-heading);
}

.btn--dark:hover {
    background-color: var(--color-heading);
    color: var(--color-white);
}

/* --- METHODOLOGY SECTION --- */
.methodology__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.methodology__lead {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #64748b;
}

.methodology__steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step {
    display: flex;
    gap: 20px;
}

.step__num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(99, 102, 241, 0.2); /* Transparent Primary */
    min-width: 40px;
}

.step__title {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.step__desc {
    font-size: 0.95rem;
    color: #64748b;
}

.methodology__image {
    position: relative;
}

.methodology__img-item {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    object-fit: cover;
    min-height: 400px; /* Placeholder height */
    background-color: #e2e8f0; /* Fallback color */
}

.methodology__card-float {
    position: absolute;
    bottom: 30px;
    left: -30px;
    background: var(--color-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 280px;
}

.methodology__card-float i {
    color: var(--color-accent);
    width: 24px;
    height: 24px;
}

.methodology__card-float span {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive */
@media (min-width: 768px) {
    .programs__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .methodology__wrapper {
        grid-template-columns: 1fr;
    }
    .methodology__image {
        order: -1; /* Image on top on mobile */
        margin-bottom: 30px;
    }
    .methodology__card-float {
        left: 20px;
        right: 20px;
        bottom: -20px;
        max-width: none;
    }
}

/* --- CAREER SECTION --- */
.section--dark {
    background-color: var(--color-heading);
    color: var(--color-white);
}

.text-white {
    color: var(--color-white);
}

.text-gray {
    color: #94a3b8;
}

.career__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

.career__desc {
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #cbd5e1;
}

.career__stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-box__num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
}

.stat-box__label {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Career Visual (Code Card) */
.career__card {
    background-color: #1e293b;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.career__card:hover {
    transform: rotate(0deg);
}

.career__card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.career__card-body {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.code-kw { color: #c084fc; } /* purple */
.code-fn { color: #60a5fa; } /* blue */
.code-str { color: #4ade80; } /* green */
.code-var { color: #f472b6; } /* pink */


/* --- FAQ SECTION (Accordion) --- */
.faq__container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-white);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-header {
    width: 100%;
    padding: 20px 25px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
}

.accordion-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-heading);
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.accordion-body {
    padding: 0 25px 25px;
    color: var(--color-text);
    line-height: 1.6;
}

/* Active State */
.accordion-item.active {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.accordion-item.active .accordion-content {
    max-height: 200px; /* Arbitrary large height for transition */
}

@media (min-width: 992px) {
    .career__wrapper {
        grid-template-columns: 1fr 1fr;
    }
    .career__card {
        margin-left: 50px;
    }
}

/* --- CONTACT SECTION --- */
.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: start;
}

.contact__benefits {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.benefit-item {
    display: flex;
    gap: 15px;
    align-items: center;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-item h4 {
    margin-bottom: 2px;
    font-size: 1.1rem;
}

.benefit-item p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Contact Form */
.contact__form-box {
    background-color: var(--color-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-heading);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.form-input {
    width: 100%;
    padding: 12px 16px 12px 45px; /* 45px padding left for icon */
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.85rem;
    color: #64748b;
}

.form-checkbox input {
    margin-top: 3px;
    cursor: pointer;
}

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

/* Form Success State */
.form-success {
    display: none; /* Hidden by default */
    text-align: center;
    padding-top: 20px;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    color: var(--color-accent);
    margin-bottom: 10px;
    display: inline-flex;
}
.success-icon svg {
    width: 48px;
    height: 48px;
}

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

/* Button Loader */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.btn--loading .btn-text {
    display: none;
}

.btn--loading .loader {
    display: block;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- COOKIE POPUP --- */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--color-heading);
    color: var(--color-white);
    padding: 20px;
    border-radius: 12px;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none; /* Hidden by JS default check */
    animation: slideUp 0.5s ease forwards;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    max-width: var(--container-width);
    margin: 0 auto;
}

.cookie-content p {
    font-size: 0.9rem;
    line-height: 1.5;
}

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

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

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .cookie-popup {
        width: auto;
        max-width: 500px;
    }
}

@media (min-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- POLICY PAGES STYLES (Етап 5) --- */
.pages {
    padding: 60px 0 100px;
}

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

.pages h2 {
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--color-heading);
}

.pages p {
    margin-bottom: 15px;
    color: var(--color-text);
    font-size: 1rem;
}

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

.pages li {
    margin-bottom: 10px;
    color: var(--color-text);
}

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