/* --- Змінні та налаштування --- */
:root {
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Палітра */
    --color-bg: #F8FAFC;
    --color-text: #0F172A;
    --color-text-light: #64748B;
    
    --color-primary: #4338CA; /* Глибокий Індиго */
    --color-primary-hover: #3730A3;
    
    --color-accent: #06B6D4; /* Яскравий Ціан */
    
    --color-white: #FFFFFF;
    --color-dark: #1E293B;

    --container-width: 1200px;
    --header-height: 80px;
    
    --transition: all 0.3s ease;
    --radius-sm: 8px;
    --radius-md: 16px;
}

/* --- Скидання (Reset) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* --- Утиліти --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

.btn--primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 56, 202, 0.4);
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

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

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--color-dark);
}

.logo__icon {
    color: var(--color-primary);
}

/* Навігація */
.nav__list {
    display: flex;
    gap: 32px;
}

.nav__link {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
}

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

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__close {
    display: none;
}

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

/* --- FOOTER --- */
.footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 60px 0 20px;
    margin-top: auto; /* Щоб футер завжди був внизу */
}

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

.logo--footer .logo__icon {
    color: var(--color-accent);
}

.logo--footer .logo__text {
    color: var(--color-white);
}

.footer__desc {
    margin-top: 16px;
    color: #94A3B8;
    font-size: 14px;
    max-width: 300px;
}

.footer__title {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--color-white);
}

.footer__links li {
    margin-bottom: 12px;
}

.footer__links a {
    color: #CBD5E1;
    font-size: 14px;
}

.footer__links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer__contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: #CBD5E1;
    font-size: 14px;
}

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

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: #64748B;
    font-size: 13px;
}

/* --- Адаптивність (Mobile) --- */
@media (max-width: 992px) {
    .header__burger {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-white);
        padding: 80px 20px 40px;
        transition: var(--transition);
        display: flex;
        flex-direction: column;
        z-index: 999;
    }

    .nav.active {
        right: 0;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 24px;
        font-size: 20px;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 24px;
        right: 20px;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding-top: var(--header-height); /* Відступ під фіксований хедер */
    min-height: 100vh; /* На весь екран */
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* На задній план */
    background: radial-gradient(circle at top right, #EEF2FF, #F8FAFC);
}

.hero__container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

/* Бейдж (New Technology) */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: rgba(67, 56, 202, 0.1);
    color: var(--color-primary);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(67, 56, 202, 0.2);
}

.hero__badge-icon {
    width: 16px;
    height: 16px;
}

/* Заголовок */
.hero__title {
    font-family: var(--font-heading);
    font-size: 56px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Опис */
.hero__desc {
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: 40px;
    max-width: 540px;
}

.hero__desc strong {
    color: var(--color-primary);
}

/* Кнопки */
.hero__actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

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

.btn--outline {
    background-color: transparent;
    border: 2px solid #E2E8F0;
    color: var(--color-text);
}

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

/* Інфо рядок */
.hero__info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #94A3B8;
}

.hero__info-icon {
    width: 18px;
    height: 18px;
    color: var(--color-accent);
}

/* Візуал (Скляна картка) */
.hero__visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    
    /* Анімація плавання */
    animation: float 6s ease-in-out infinite;
}

.glass-card__icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.glass-card__text {
    display: flex;
    flex-direction: column;
}

.glass-card__text strong {
    font-size: 18px;
    color: var(--color-dark);
}

.glass-card__text span {
    font-size: 14px;
    color: var(--color-text-light);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Адаптивність Hero */
@media (max-width: 992px) {
    .hero__title {
        font-size: 42px;
    }
    
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

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

    .hero__desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero__title {
        font-size: 32px;
    }
    
    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .btn--lg {
        width: 100%;
    }
}
/* --- ЗАГАЛЬНІ СТИЛІ СЕКЦІЙ --- */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

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

.bg-light {
    background-color: #F1F5F9; /* Трохи темніший за основний фон для контрасту */
}

.section-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-desc {
    font-size: 18px;
    color: var(--color-text-light);
    max-width: 600px;
}

/* --- ABOUT SECTION --- */
.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about__image-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about__img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about__image-wrapper:hover .about__img {
    transform: scale(1.03);
}

.about__stat {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--color-white);
    padding: 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.about__stat-num {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-accent);
}

.about__stat-text {
    font-size: 12px;
    color: var(--color-text-light);
    text-transform: uppercase;
    font-weight: 600;
}

.about__text {
    margin-bottom: 20px;
    color: var(--color-text-light);
}

.about__text strong {
    color: var(--color-dark);
}

.about__list {
    margin: 30px 0;
}

.about__item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 500;
    color: var(--color-dark);
}

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

/* --- TECHNOLOGY SECTION --- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.tech-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tech-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(6, 182, 212, 0.3);
}

.tech-card__icon-box {
    width: 50px;
    height: 50px;
    background: rgba(67, 56, 202, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 20px;
    transition: var(--transition);
}

.tech-card:hover .tech-card__icon-box {
    background: var(--color-primary);
    color: var(--color-white);
}

.tech-card__title {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--color-dark);
}

.tech-card__desc {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.tech-footer {
    text-align: center;
    margin-top: 40px;
}

/* --- ADAPTIVE (ABOUT & TECH) --- */
@media (max-width: 992px) {
    .about__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about__image-wrapper {
        order: -1; /* Картинка зверху на мобільному */
        max-height: 400px;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 28px;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .about__stat {
        right: 10px;
        bottom: 10px;
        padding: 15px;
        min-width: 100px;
    }
}

/* --- PROGRAM (TIMELINE) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Вертикальна лінія по центру */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #E2E8F0;
    transform: translateX(-50%);
}

.timeline__item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

/* Розміщення елементів ліворуч і праворуч */
.timeline__item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline__item:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* Маркер (Кружечок з цифрою) */
.timeline__marker {
    position: absolute;
    top: 20px;
    width: 40px;
    height: 40px;
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-primary);
    z-index: 2;
    box-shadow: 0 0 0 4px var(--color-bg); /* Відступ від лінії */
}

.timeline__item:nth-child(odd) .timeline__marker {
    right: -20px;
}

.timeline__item:nth-child(even) .timeline__marker {
    left: -20px;
}

/* Активний маркер при наведенні */
.timeline__item:hover .timeline__marker {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
    transition: var(--transition);
}

.timeline__title {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.timeline__text {
    font-size: 15px;
    color: var(--color-text-light);
}

/* --- BENEFITS (DARK SECTION) --- */
.bg-dark {
    background-color: #0F172A;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.bg-dark__pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(67, 56, 202, 0.15) 0%, transparent 70%);
    z-index: 0;
}

.row-flex {
    display: flex;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.benefits__intro {
    flex: 1;
}

.benefits__grid {
    flex: 1.5;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 колонки */
    gap: 24px;
}

/* Модифікатори для темної теми */
.label--light {
    color: var(--color-accent);
}

.title--light {
    color: var(--color-white);
}

.desc--light {
    color: #94A3B8;
}

/* CTA в бенефітах */
.benefits__cta {
    margin-top: 40px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.benefits__note {
    font-size: 14px;
    color: #94A3B8;
    margin-bottom: 8px;
}

.benefits__link-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-accent);
    font-weight: 600;
}

/* Картки бенефітів */
.benefit-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.benefit-card:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

/* Розтягуємо останню картку, якщо їх непарна кількість, або просто стилізуємо */
.benefit-card:last-child {
    grid-column: span 2; /* Розтягнути на всю ширину в сітці */
}

.benefit-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.benefit-card__icon {
    color: var(--color-primary);
    width: 28px;
    height: 28px;
}

.benefit-card__num {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
}

.benefit-card__title {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--color-white);
}

.benefit-card__text {
    font-size: 14px;
    color: #94A3B8;
}


/* --- ADAPTIVE (PROGRAM & BENEFITS) --- */
@media (max-width: 992px) {
    .row-flex {
        flex-direction: column;
    }
    
    .benefits__grid {
        grid-template-columns: 1fr;
    }
    
    .benefit-card:last-child {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    /* Перебудова таймлайну в простий список на мобільному */
    .timeline::before {
        left: 20px;
    }

    .timeline__item {
        width: 100%;
        padding-left: 60px;
        padding-right: 0;
        text-align: left !important; /* Force left align */
    }

    .timeline__item:nth-child(even) {
        left: 0;
    }

    .timeline__item:nth-child(odd) .timeline__marker,
    .timeline__item:nth-child(even) .timeline__marker {
        left: 0;
        right: auto;
    }
}

/* --- CONTACT SECTION --- */
.contact-section {
    background: linear-gradient(135deg, #EEF2FF 0%, #F8FAFC 100%);
}

.contact__container {
    display: flex;
    justify-content: center;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--color-white);
    padding: 60px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 1000px;
}

.contact__details {
    margin-top: 40px;
}

.contact__item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    color: var(--color-dark);
    font-weight: 500;
}

.contact__item i {
    color: var(--color-primary);
}

/* Form Styles */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form__title {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 10px;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.form__input {
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 16px;
    transition: var(--transition);
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.captcha-group {
    background: #F1F5F9;
    padding: 15px;
    border-radius: var(--radius-sm);
}

.form__checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form__checkbox {
    margin-top: 4px;
    cursor: pointer;
}

.form__checkbox-label {
    font-size: 12px;
    color: var(--color-text-light);
    line-height: 1.4;
}

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

.form__btn {
    width: 100%;
    margin-top: 10px;
}

.form__message {
    font-size: 14px;
    text-align: center;
    min-height: 20px;
    font-weight: 500;
}

.form__message.success {
    color: #10B981;
}

.form__message.error {
    color: #EF4444;
}

/* --- COOKIE POPUP --- */
.cookie-popup {
    position: fixed;
    bottom: -100px; /* Приховано */
    left: 0;
    width: 100%;
    background: var(--color-white);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 2000;
    transition: bottom 0.5s ease;
}

.cookie-popup.active {
    bottom: 0;
}

.cookie-popup__content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
}

.cookie-popup p {
    font-size: 14px;
    color: var(--color-text);
}

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

.btn--sm {
    padding: 8px 20px;
    font-size: 14px;
}

/* --- POLICY PAGES STYLES --- */
/* Стилі для сторінок privacy.html, terms.html і т.д. */
.pages {
    padding: 120px 0 80px; /* Більший відступ зверху, бо хедер фіксований */
    min-height: 80vh;
}

.pages h1 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-dark);
    margin-bottom: 30px;
}

.pages h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--color-dark);
    margin-top: 30px;
    margin-bottom: 15px;
}

.pages p {
    margin-bottom: 16px;
    color: var(--color-text);
}

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

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

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

/* --- ADAPTIVE CONTACTS --- */
@media (max-width: 768px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }
}