/* --- Variables & Global Settings --- */
:root {
    /* Colors */
    --color-bg: #f8fafc;
    --color-text: #334155;
    --color-text-heading: #0f172a;
    --color-primary: #4f46e5; /* Indigo */
    --color-primary-hover: #4338ca;
    --color-accent: #f472b6; /* Pink/Coral */
    --color-white: #ffffff;
    --color-border: #e2e8f0;
    --color-footer-bg: #1e293b; /* Dark Slate */
    --color-footer-text: #94a3b8;

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

    /* Spacing */
    --container-width: 1200px;
    --spacing-unit: 1rem;
    --header-height: 80px;
}

/* --- 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;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn--small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

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

.header__nav {
    display: flex;
}

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

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

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

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

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

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

/* --- Mobile Menu Styles --- */
@media (max-width: 992px) {
    .header__nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-white);
        flex-direction: column;
        padding: 40px 20px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        border-top: 1px solid var(--color-border);
    }

    .header__nav.active {
        transform: translateX(0);
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 25px;
        margin-bottom: 30px;
    }

    .nav__link {
        font-size: 1.2rem;
    }

    .header__burger {
        display: block;
    }

    .header__cta {
        display: none; /* Hide CTA button on mobile header, can be added inside menu via JS if needed */
    }
}

/* --- Main (Spacer) --- */
.main {
    padding-top: var(--header-height);
    flex: 1;
}

/* --- Footer --- */
.footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    display: inline-block;
    margin-bottom: 15px;
}

.footer__desc {
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.footer__list li {
    margin-bottom: 10px;
}

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

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.footer__icon {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer__note {
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-top: 15px;
    font-weight: 500;
}

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

/* Responsive Footer */
@media (max-width: 768px) {
    .footer__container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh; /* На весь екран */
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Позаду контенту */
    opacity: 0.6; /* Легка прозорість, щоб не заважати тексту */
}

.hero__container {
    position: relative;
    z-index: 2; /* Поверх канвасу */
}

.hero__content {
    max-width: 650px;
}

/* Badge */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(79, 70, 229, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* Typography */
.hero__title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-text-heading);
}

.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__description {
    font-size: 1.15rem;
    color: var(--color-text);
    margin-bottom: 32px;
    max-width: 500px;
}

/* Actions */
.hero__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.hero__btn {
    padding: 16px 32px;
    font-size: 1.05rem;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
}

.btn-icon {
    width: 18px;
    height: 18px;
    margin-left: 8px;
}

.hero__subtext {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-small {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
}

/* Scroll Indicator */
.hero__scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--color-text);
    border-radius: 20px;
    display: block;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-text);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 24px; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.5rem;
    }
    .hero__content {
        text-align: center;
        margin: 0 auto;
    }
    .hero__actions {
        align-items: center;
    }
    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Common Section Styles --- */
.section {
    padding: 100px 0;
}

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

.section__tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 16px;
    background-color: rgba(79, 70, 229, 0.08);
    padding: 4px 12px;
    border-radius: 4px;
}

.section__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-text-heading);
    margin-bottom: 20px;
    line-height: 1.2;
}

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

/* --- Bento Grid Layout --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto); /* Автоматична висота */
    gap: 24px;
}

.bento-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    border-color: rgba(79, 70, 229, 0.3);
}

/* Grid Spanning */
.bento-card--large {
    grid-column: span 1;
    grid-row: span 2;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.bento-card--wide {
    grid-column: span 2;
}

/* Card Content */
.bento-card__icon-box {
    width: 50px;
    height: 50px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.bento-card__icon-box.color-accent {
    background-color: rgba(244, 114, 182, 0.1);
    color: var(--color-accent);
}

.bento-card__icon-box.color-green {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.bento-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text-heading);
}

.bento-card__text {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.bento-card__content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

/* Special styling for Large Card */
.bento-card--large .bento-card__image-decor {
    margin-top: auto;
    border-radius: 12px;
    overflow: hidden;
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: -10px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.bento-card--large:hover .bento-card__image-decor {
    opacity: 1;
}

/* Link with Arrow */
.link-arrow {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.link-arrow svg {
    width: 16px;
    height: 16px;
    margin-left: 6px;
    transition: transform 0.2s;
}

.link-arrow:hover svg {
    transform: translate(2px, -2px);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    box-shadow: none;
}

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

/* Animations Classes (for JS) */
.reveal-text, .reveal-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-text.active, .reveal-card.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Bento */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-card--large {
        grid-column: span 2;
        grid-row: auto;
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    .bento-card--large .bento-card__image-decor {
        display: none; /* Спрощуємо для планшетів */
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-card--large, .bento-card--wide {
        grid-column: span 1;
    }
    .bento-card__content-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Work Section --- */
.work-ai {
    background-color: var(--color-bg); /* Такий самий фон */
}

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

/* Badge */
.badge-star {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #fef3c7;
    color: #d97706;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.icon-fill {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Accordion Styles */
.accordion {
    margin: 40px 0;
    border-top: 1px solid var(--color-border);
}

.accordion__item {
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.accordion__header {
    display: flex;
    align-items: center;
    padding: 24px 0;
    cursor: pointer;
    transition: color 0.3s;
}

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

.accordion__icon {
    width: 40px;
    height: 40px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: var(--color-text-heading);
    flex-shrink: 0;
}

.accordion__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text-heading);
    flex: 1;
}

.accordion__toggle {
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.accordion__body {
    height: 0; /* JS буде змінювати це */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding-left: 56px; /* Відступ під іконку */
    padding-right: 20px;
}

.accordion__body p {
    padding-bottom: 24px;
    font-size: 0.95rem;
    color: #64748b;
}

/* Active State */
.accordion__item.active .accordion__toggle {
    transform: rotate(45deg); /* Плюсик стає хрестиком */
}

.accordion__item.active .accordion__body {
    height: auto;
    opacity: 1;
    transform: translateY(0);
}

.accordion__item.active .accordion__icon {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* CTA Area */
.work-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.work-note {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Visual Card (Right Side) */
.visual-card {
    position: relative;
    background: var(--color-white);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
    height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.visual-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e2e8f0;
}

.dots span:nth-child(1) { background-color: #ef4444; }
.dots span:nth-child(2) { background-color: #eab308; }
.dots span:nth-child(3) { background-color: #22c55e; }

.visual-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
}

.visual-card__body {
    flex: 1;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-bg {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80%;
    opacity: 0.1;
    z-index: 1;
}

/* Animated Graph CSS Only */
.graph-placeholder {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 150px;
}

.bar {
    width: 30px;
    background: linear-gradient(to top, var(--color-primary), #a5b4fc);
    border-radius: 6px 6px 0 0;
    animation: grow 2s infinite alternate ease-in-out;
}

.bar-1 { height: 40%; animation-delay: 0s; }
.bar-2 { height: 70%; animation-delay: 0.2s; }
.bar-3 { height: 50%; animation-delay: 0.4s; }
.bar-4 { height: 90%; animation-delay: 0.6s; }

@keyframes grow {
    0% { transform: scaleY(0.8); opacity: 0.8; }
    100% { transform: scaleY(1.1); opacity: 1; }
}

/* Floating Stat */
.floating-stat {
    position: absolute;
    bottom: 40px;
    left: 30px;
    background: var(--color-white);
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--color-border);
    animation: float 4s ease-in-out infinite;
}

.floating-stat svg {
    color: #10b981;
    width: 24px;
    height: 24px;
}

.floating-stat div {
    display: flex;
    flex-direction: column;
}

.floating-stat span {
    font-size: 0.75rem;
    color: #64748b;
}

.floating-stat strong {
    font-size: 1.1rem;
    color: var(--color-text-heading);
}

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

/* Responsive */
@media (max-width: 992px) {
    .work-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .visual-card {
        height: 350px;
    }
}

/* --- Creative Section (Dark Theme) --- */
.creative-ai {
    background-color: #1e1b4b; /* Deep Indigo */
    color: var(--color-white);
    padding-bottom: 0; /* Remove padding bottom for marquee */
    overflow: hidden;
}

.creative-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

/* Text Overrides for Dark Mode */
.tag--dark {
    background-color: rgba(255, 255, 255, 0.1);
    color: #a5b4fc;
}

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

.subtitle--light {
    color: #cbd5e1;
}

.text-gradient-light {
    background: linear-gradient(135deg, #a5b4fc 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Feature List */
.creative-features {
    margin: 30px 0;
}

.creative-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 500;
}

.icon-accent {
    color: #f472b6;
    width: 20px;
    height: 20px;
}

.btn--white {
    background-color: var(--color-white);
    color: #1e1b4b;
}

.btn--white:hover {
    background-color: #e0e7ff;
    color: #1e1b4b;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* --- AI Generator Card --- */
.ai-generator-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    margin: 0 auto;
}

.ai-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.ai-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 6px;
}

.ai-badge {
    font-size: 0.7rem;
    background: rgba(244, 114, 182, 0.2);
    color: #f472b6;
    padding: 2px 8px;
    border-radius: 4px;
}

.ai-preview-area {
    width: 100%;
    aspect-ratio: 4/3; /* Стандартне співвідношення */
    background-color: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.ai-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.ai-image.hidden {
    opacity: 0;
}

/* Loader */
.ai-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #0f172a;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ai-loader.active {
    opacity: 1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #f472b6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Prompt Box */
.ai-prompt-box {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 4px;
    align-items: center;
}

.ai-prompt-text {
    flex: 1;
    padding: 12px;
    font-size: 0.85rem;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: monospace;
}

.ai-btn {
    background: #f472b6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-btn:hover {
    background: #ec4899;
}

/* --- Infinite Marquee --- */
.marquee-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%); /* Full width break out */
    overflow: hidden;
    padding: 40px 0;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.marquee-content {
    display: flex;
    gap: 24px;
    width: max-content; /* Ширина залежить від контенту */
    animation: marquee 20s linear infinite;
}

.marquee-item {
    width: 250px;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.marquee-item:hover img {
    transform: scale(1.1);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Рух на половину (один набір) */
}

/* Responsive */
@media (max-width: 992px) {
    .creative-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .creative-content {
        order: 1;
    }
    .creative-demo {
        order: 2;
    }
}

/* --- Learn Section (Timeline) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Vertical Line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px; /* Центр маркера */
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent), rgba(255,255,255,0));
    z-index: 1;
}

.timeline__item {
    position: relative;
    margin-bottom: 60px;
    padding-left: 80px; /* Відступ від лінії */
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background-color: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-primary);
    z-index: 2;
    box-shadow: 0 0 0 8px var(--color-bg); /* "Відрізаємо" лінію візуально */
    transition: transform 0.3s ease, background-color 0.3s;
}

.timeline__item:hover .timeline__marker {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

.timeline__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text-heading);
}

.timeline__text {
    color: #64748b;
}

/* --- FAQ Section --- */
.faq {
    background-color: #f1f5f9; /* Трохи темніший сірий для контрасту */
}

.container--narrow {
    max-width: 800px; /* Вужчий контейнер для читабельності тексту */
}

/* Modifiers for Accordion in FAQ (Cleaner look) */
.accordion--simple {
    border-top: none;
}

.accordion--simple .accordion__item {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin-bottom: 16px;
    padding: 0 24px;
    transition: box-shadow 0.3s ease;
}

.accordion--simple .accordion__item:hover {
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}

.accordion--simple .accordion__header {
    padding: 20px 0;
}

.accordion--simple .accordion__title {
    font-size: 1.05rem;
}

.accordion--simple .accordion__body {
    padding-left: 0; /* Прибираємо відступ, бо немає іконки зліва */
    padding-right: 0;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 19px;
    }
    .timeline__marker {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .timeline__item {
        padding-left: 60px;
    }
    .timeline__title {
        font-size: 1.25rem;
    }
}

/* --- Contact Section --- */
.contact {
    padding-bottom: 120px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--color-white);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.1);
    border: 1px solid var(--color-border);
}

/* Left Side */
.contact-info {
    padding: 60px;
    background: linear-gradient(135deg, var(--color-primary), #4338ca);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.contact-info .section__title, 
.contact-info .section__subtitle {
    color: var(--color-white);
    position: relative;
    z-index: 2;
}

.contact-benefits {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.benefit-item svg {
    color: #a5b4fc;
}

.contact-decor {
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    z-index: 1;
}

/* Right Side (Form) */
.contact-form-box {
    padding: 60px;
    background-color: var(--color-white);
}

.form {
    position: relative;
    min-height: 400px;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-heading);
}

.input-wrapper {
    position: relative;
}

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

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="number"] {
    width: 100%;
    padding: 14px 16px 14px 48px; /* space for icon */
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--color-primary);
}

/* Math Captcha specific */
.math-problem {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--color-primary);
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 2px;
}

.captcha-group input {
    padding-left: 16px; /* No icon here */
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 30px;
}

.checkbox-group input {
    margin-top: 4px;
    accent-color: var(--color-primary);
    width: 18px;
    height: 18px;
}

.checkbox-group label {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #64748b;
}

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

/* Button & Loader */
.btn--full {
    width: 100%;
    position: relative;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: none; /* hidden by default */
    animation: rotation 1s linear infinite;
    position: absolute;
}

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

.btn.loading .btn-text { visibility: hidden; }
.btn.loading .loader { display: inline-block; }

/* Success Message */
.form-success {
    display: none; /* hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 40px 0;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.success-icon svg { width: 40px; height: 40px; }

.form-content.hidden { display: none; }
.form-success.visible { display: flex; }

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

/* --- Cookie Pop-up --- */
.cookie-popup {
    position: fixed;
    bottom: -200px; /* Hidden */
    left: 20px;
    right: 20px;
    max-width: 400px;
    background: var(--color-white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    z-index: 9999;
    border: 1px solid var(--color-border);
    transition: bottom 0.5s ease;
    display: flex;
    align-items: center;
}

.cookie-popup.show {
    bottom: 20px;
}

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

.cookie-content p {
    font-size: 0.9rem;
    color: var(--color-text);
}

.cookie-content a {
    color: var(--color-primary);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    .contact-info {
        padding: 40px;
    }
    .contact-form-box {
        padding: 40px 20px;
    }
}

/* --- Legal Pages Styles --- */
.page-section {
    padding: 140px 0 80px; /* Більший відступ зверху через фіксований хедер */
    min-height: 60vh;
}

.pages {
    max-width: 800px; /* Вузька колонка для зручного читання */
    margin: 0 auto;
    background: var(--color-white);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--color-border);
}

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

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

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

.pages ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--color-text);
}

.pages li {
    margin-bottom: 8px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .pages {
        padding: 25px;
    }
    .pages h1 {
        font-size: 1.8rem;
    }
}