/* ============================================================
   КАСТОМНІ СТИЛІ САЙТУ
   Тематика: Автоматизація бізнес-процесів і AI-агенти
   ============================================================ */

/* ─── CSS-змінні ─────────────────────────────────────────── */
:root {
    --color-primary:   var(--global-color-8, #3ddc97);
    --color-secondary: #2ab87a;
    --color-dark:      #0f172a;
    --color-light:     #f8fafc;
    --color-text:      #1e293b;
    --color-muted:     #64748b;
    --color-border:    #e2e8f0;

    --font-sans: 'Inter', system-ui, sans-serif;

    --radius:  8px;
    --radius-lg: 16px;
    --shadow:  0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ─── База ───────────────────────────────────────────────── */
body {
    font-family: var(--font-sans);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

/* ─── Header Navigation ──────────────────────────────────── */
.main-navigation .main-nav ul li a {
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ─── GeneratePress: повна ширина для home-template ─────── */

/* Головний фікс: GeneratePress ставить display:flex на .site-content
   що розбиває лейаут — перемикаємо на block */
body.home-template .site-content {
    display: block !important;
}

/* Фон записей/сторінок співпадає з body */
.inside-article {
    background-color: var(--base-2) !important;
}

/* Прибираємо відступи і обмеження ширини контентної зони */
body.home-template .inside-article,
body.home-template .entry-content {
    max-width: none !important;
    padding: 0 !important;
}

/* Прибираємо сайдбар на всяк випадок */
body.home-template #sidebar,
body.home-template .widget-area {
    display: none !important;
}

/* ─── Спільні компоненти ─────────────────────────────────── */
.home-page-wrapper { overflow-x: hidden; }

/* Наш .container — тільки всередині home-page-wrapper,
   щоб не конфліктувати з #page.container від GeneratePress */
.home-page-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.home-page-wrapper .container-sm { max-width: 760px; }

.section-head {
    text-align: center;
    margin-bottom: 56px;
}
.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}
.section-head p {
    font-size: 18px;
    color: var(--color-muted);
    max-width: 560px;
    margin: 0 auto;
}

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

/* ─── Кнопки ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}
.btn-primary {
    background: var(--color-primary);
    color: var(--color-dark);
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}
.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    text-decoration: none;
}
.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}


/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
.section-hero {
    background: var(--color-dark);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.section-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 70% at 75% 50%, rgba(61,220,151,0.07) 0%, transparent 65%);
    pointer-events: none;
}
.hero-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas:
        "text   visual"
        "btns   visual";
    column-gap: 40px;
    row-gap: 24px;
    padding: 30px 0 80px;
    width: 100%;
}
.hero-text   { grid-area: text;   align-self: end; }
.hero-btns   { grid-area: btns;   align-self: start; }
.hero-visual { grid-area: visual; display: flex; justify-content: center; align-items: center; overflow-x: clip; }
.hero-text h1 {
    font-size: clamp(36px, 5vw, 48px);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero-sub {
    font-size: 18px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 36px;
    max-width: 520px;
}
.hero-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* AI Diagram */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ─── n8n-style Flow Diagram ─────────────────────────────── */
.flow-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 444px;
}

/* ─── Нода ───────────────────────────────────────────────── */
.fd-node {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
}
.fd-node:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.2);
}
.fd-icon {
    display: flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}

/* Іконка-заглушка (замінна через assets/img/) */
.fd-node-icon {
    width: 29px;
    height: 29px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    border: none;
    background: transparent;
}
.fd-node-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 3px;
}
.fd-node-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.fd-sublabel {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.3);
    margin-top: 1px;
}

/* ─── Рядки ──────────────────────────────────────────────── */
.fd-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ─── Sources: 3 прямокутники з групами логотипів ───────── */
.fd-sources {
    display: flex;
    gap: 8px;
    width: 100%;
}

/* Прямокутний вузол-джерело */
.fd-src-rect {
    flex: 1;
    height: 42px;
    padding: 0 10px;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

/* Окремий слот під один логотип */
.fd-slot-item {
    width: 31px;
    height: 31px;
    flex-shrink: 0;
    border-radius: 5px;
    border: none;
    background: transparent;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Зображення в слоті */
.fd-slot-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 3px;
}

/* ─── Спеціальні ноди ────────────────────────────────────── */
.fd-agent {
    border-color: rgba(61,220,151,0.45);
    background: rgba(61,220,151,0.08);
    padding: 10px 18px;
}
.fd-crm {
    border-color: rgba(99,179,237,0.4);
    background: rgba(99,179,237,0.06);
    flex: 1;
    justify-content: center;
}
.fd-manager {
    border-color: rgba(61,220,151,0.35);
    background: rgba(61,220,151,0.06);
    flex: 1;
    justify-content: center;
}
.fd-handled {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    width: 100%;
    box-sizing: border-box;
}
.fd-qualified {
    border-color: rgba(61,220,151,0.5);
    background: rgba(61,220,151,0.1);
    width: 100%;
    box-sizing: border-box;
}
.fd-check-icon {
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    width: 18px;
    height: 18px;
    justify-content: center;
    background: rgba(61,220,151,0.15);
    border-radius: 50%;
}

/* ─── Connector: злиття 3→1 ──────────────────────────────── */
/* 3 рівних вузли (flex:1), gap 8px у 370px
   Центри: ~16% | ~50% | ~84%                                 */
.fd-merge {
    position: relative;
    width: 100%;
    height: 36px;
}
.fd-merge-line {
    position: absolute;
    top: 0;
    width: 1px;
    height: 58%;
    background: rgba(255,255,255,0.15);
    transform: translateX(-50%);
}
.fd-ml-1 { left: 16%; }
.fd-ml-2 { left: 50%; }
.fd-ml-3 { left: 84%; }
/* Горизонтальна перемичка */
.fd-merge::before {
    content: '';
    position: absolute;
    top: 58%;
    left: 16%;
    right: 16%;
    height: 1px;
    background: rgba(255,255,255,0.15);
    transform: translateY(-50%);
}
/* Стовбур до AI агента */
.fd-merge-stem {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 44%;
    background: rgba(255,255,255,0.15);
}

/* ─── Connector: розгалуження від AI (1→2) ───────────────── */
.fd-ai-fork {
    position: relative;
    width: 100%;
    height: 40px;
}
/* Вертикаль від AI центру вниз до горизонтальної перемички */
.fd-ai-fork::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 1px; height: 50%;
    background: rgba(255,255,255,0.15);
}
/* Горизонтальна перемичка: від центру лівої гілки до центру правої
   Ліва гілка (44% ширини): центр ≈ 22%
   Права гілка (решта після gap 10px): центр ≈ 73% */
.fd-ai-fork::after {
    content: '';
    position: absolute;
    top: 50%; left: 22%; right: 27%;
    height: 1px;
    background: rgba(255,255,255,0.15);
}
/* Вертикальні краплі вниз від перемички до кожної гілки */
.fd-fork-drop-l,
.fd-fork-drop-r {
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 50%;
    background: rgba(255,255,255,0.15);
}
.fd-fork-drop-l { left: 22%;  transform: translateX(-50%); }
.fd-fork-drop-r { right: 27%; transform: translateX(50%); }

/* ─── Гілки ──────────────────────────────────────────────── */
.fd-branches {
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: flex-start;
}
.fd-branch-l {
    flex: 0 0 44%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.fd-branch-r {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ─── Стрілка вниз у правій гілці ───────────────────────── */
.fd-arrow-vert {
    position: relative;
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.fd-arrow-vert::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255,255,255,0.2);
}

/* ─── Розгалуження CRM + Менеджер ────────────────────────── */
.fd-output-fork {
    position: relative;
    width: 100%;
    height: 28px;
    flex-shrink: 0;
}
/* Вертикаль від центру вниз */
.fd-output-fork::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 1px; height: 45%;
    background: rgba(255,255,255,0.15);
}
/* Горизонтальна перемичка між CRM і Manager */
.fd-output-fork::after {
    content: '';
    position: absolute;
    top: 45%; left: 22%; right: 22%;
    height: 1px;
    background: rgba(255,255,255,0.15);
}
/* Вертикальні краплі до CRM і Manager */
.fd-ofork-l,
.fd-ofork-r {
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 55%;
    background: rgba(255,255,255,0.15);
}
.fd-ofork-l { left: 22%;  transform: translateX(-50%); }
.fd-ofork-r { right: 22%; transform: translateX(50%); }

/* ─── Виходи CRM + Менеджер ──────────────────────────────── */
.fd-outputs {
    display: flex;
    gap: 8px;
    width: 100%;
}

/* ─── Анімовані крапки ───────────────────────────────────── */
.fd-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 7px var(--color-primary);
}

/* Крапка злиття: рухається вниз по merge */
.fd-dot-merge {
    left: 50%; transform: translateX(-50%);
    top: 0;
    animation: fd-anim-merge 2s ease-in-out infinite;
}
@keyframes fd-anim-merge {
    0%   { opacity: 0; top: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; top: 100%; }
}

/* Крапка правої гілки (від AI вниз до qualified) */
.fd-dot-fork-r {
    right: 27%; transform: translateX(50%);
    top: 50%;
    animation: fd-anim-fork 2.2s ease-in-out infinite 0.6s;
}
@keyframes fd-anim-fork {
    0%   { opacity: 0; top: 50%; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; top: 100%; }
}

/* Крапка у правій гілці: qualified → output-fork */
.fd-dot-qual {
    left: 50%; transform: translateX(-50%);
    top: 0;
    animation: fd-anim-vert 1.8s ease-in-out infinite 1.2s;
}
@keyframes fd-anim-vert {
    0%   { opacity: 0; top: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; top: 28px; }
}

/* Крапки output-fork → CRM і Manager */
.fd-dot-out-l {
    left: 22%; transform: translateX(-50%);
    top: 45%;
    animation: fd-anim-out 1.8s ease-in-out infinite 1.7s;
}
.fd-dot-out-r {
    right: 22%; transform: translateX(50%);
    top: 45%;
    animation: fd-anim-out 1.8s ease-in-out infinite 2.0s;
}
@keyframes fd-anim-out {
    0%   { opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; }
}


/* ══════════════════════════════════════════════════════════
   STATS
══════════════════════════════════════════════════════════ */
.section-stats {
    background: #fff;
    padding: 0;
    border-bottom: 1px solid var(--color-border);
}
.stats-row {
    display: flex;
    align-items: stretch;
}
.stat {
    flex: 1;
    text-align: center;
    padding: 40px 24px;
}
.stat-val {
    font-size: clamp(38px, 5vw, 54px);
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-lbl {
    font-size: 14px;
    color: var(--color-muted);
    font-weight: 500;
}
.stat-divider {
    width: 1px;
    background: var(--color-border);
    flex-shrink: 0;
    margin: 20px 0;
}


/* ══════════════════════════════════════════════════════════
   ДЛЯ КОГО
══════════════════════════════════════════════════════════ */
.section-forwho {
    background: var(--color-light);
    padding: 96px 0;
}
.forwho-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.forwho-tabs {
    background: var(--color-dark);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ftab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.18s;
    line-height: 1.4;
}
.ftab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
}
.ftab.active {
    background: rgba(61, 220, 151, 0.12);
    color: var(--color-primary);
}
.forwho-panels {
    padding: 48px 52px;
}
.fpanel { display: none; }
.fpanel.active { display: block; }
.fpanel h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}
.fpanel > p {
    font-size: 15px;
    color: var(--color-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}
.fpanel ul {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.fpanel ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: var(--color-text);
    line-height: 1.55;
}
.fpanel ul li::before {
    content: '';
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(61, 220, 151, 0.12)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%233ddc97' d='M16.7 5.3a1 1 0 0 0-1.4 0L8 12.6 4.7 9.3a1 1 0 1 0-1.4 1.4l4 4a1 1 0 0 0 1.4 0l8-8a1 1 0 0 0 0-1.4z'/%3E%3C/svg%3E")
        no-repeat center / 11px;
}


/* ══════════════════════════════════════════════════════════
   ПОСЛУГИ
══════════════════════════════════════════════════════════ */
.section-services {
    padding: 96px 0;
    background: #fff;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.service-card {
    padding: 36px 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s;
}
.service-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}
.service-card:hover::after {
    transform: scaleX(1);
}
.svc-icon {
    font-size: 38px;
    margin-bottom: 20px;
    display: block;
}
.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
}
.service-card p {
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}
.svc-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s;
}
.svc-link:hover {
    color: var(--color-secondary);
    text-decoration: none;
}


/* ══════════════════════════════════════════════════════════
   ЯК МИ ПРАЦЮЄМО
══════════════════════════════════════════════════════════ */
.section-process {
    padding: 96px 0;
    background: var(--color-dark);
}
.section-process .section-head h2 { color: #fff; }
.section-process .section-head p  { color: rgba(255,255,255,0.45); }

.process-flow {
    display: flex;
    align-items: flex-start;
    gap: 0;
}
.process-step {
    flex: 1;
    text-align: center;
    padding: 0 20px;
}
.step-num {
    font-size: 52px;
    font-weight: 800;
    color: var(--color-primary);
    opacity: 0.55;
    line-height: 1;
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}
.process-step h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.process-step p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
}
.process-arrow {
    font-size: 22px;
    color: rgba(61, 220, 151, 0.3);
    padding-top: 22px;
    flex-shrink: 0;
    user-select: none;
}


/* ══════════════════════════════════════════════════════════
   КЕЙСИ
══════════════════════════════════════════════════════════ */
.section-cases {
    padding: 96px 0;
    background: var(--color-light);
}
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.case-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}
.case-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.case-tag {
    display: inline-block;
    background: rgba(61, 220, 151, 0.1);
    color: var(--color-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 16px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.case-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
    line-height: 1.35;
}
.case-card p {
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}
.case-nums {
    display: flex;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}
.case-num strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 4px;
}
.case-num span {
    font-size: 12px;
    color: var(--color-muted);
}


/* ══════════════════════════════════════════════════════════
   FAQ
══════════════════════════════════════════════════════════ */
.section-faq {
    padding: 96px 0;
    background: #fff;
}
.faq-list {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.faq-item {
    border-bottom: 1px solid var(--color-border);
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 28px;
    background: #fff;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--color-dark);
    cursor: pointer;
    transition: background 0.15s;
}
.faq-q:hover { background: var(--color-primary); }

.faq-q span {
    width: 28px;
    height: 28px;
    background: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    flex-shrink: 0;
    color: var(--color-primary);
    transition: all 0.2s;
    line-height: 1;
}
.faq-item.open .faq-q span {
    transform: rotate(45deg);
    background: var(--color-primary);
    color: var(--color-dark);
}
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-a p {
    padding: 0 28px 24px;
    font-size: 15px;
    color: var(--color-muted);
    line-height: 1.75;
    margin: 0;
}


/* ══════════════════════════════════════════════════════════
   CTA
══════════════════════════════════════════════════════════ */
.section-cta {
    padding: 96px 0;
    background: var(--color-dark);
    position: relative;
    overflow: hidden;
}
.section-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(61,220,151,0.08) 0%, transparent 65%);
    pointer-events: none;
}
.cta-box {
    text-align: center;
    position: relative;
    z-index: 1;
}
.cta-box h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}
.cta-box > p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 40px;
}
.cta-form .form-row {
    display: flex;
    gap: 12px;
    max-width: 680px;
    margin: 0 auto;
}
.cta-form input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius);
    color: #fff;
    font-size: 16px;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}
.cta-form input::placeholder { color: rgba(255,255,255,0.3); }
.cta-form input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.form-note {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 16px;
}


/* ══════════════════════════════════════════════════════════
   HEADER CTA BUTTON
══════════════════════════════════════════════════════════ */

/* GP використовує float-based nav з line-height: 60px на посиланнях.
   Щоб вирівняти блок по вертикалі — float:right + та сама висота 60px */
.header-extras {
    float: right;
    display: flex;
    align-items: center;
    margin-left: 15px;
    height: 60px;
    gap: 16px;
}

/* Іконки соцмереж */
.header-socials {
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 0; /* прибираємо зайвий inline-відступ */
}
.header-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    border-radius: 50%;
    transition: background 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.header-social-link img {
    width: 18px;
    height: 18px;
    display: block; /* прибираємо baseline-зсув */
    filter: brightness(0) invert(0.55);
    transition: filter 0.2s;
}
.header-social-link:hover img {
    filter: brightness(0) invert(1);
}

/* ── Мобільне меню ── */
@media (max-width: 768px) {
    /* GP динамічно генерує CSS:
       .has-inline-mobile-toggle #site-navigation .inside-navigation > *:not(.main-nav) { display:none }
       Це ховає .header-extras. Перебиваємо через !important + ID-селектор */
    .header-extras {
        display: none !important;
    }

    /* Показуємо коли меню відкрите — .toggled додається GP JS на #site-navigation */
    #site-navigation.toggled .inside-navigation > .header-extras {
        display: flex !important;
        float: none;
        height: auto;
        justify-content: center;
        padding: 16px 0 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
        box-sizing: border-box;
    }

    /* CTA кнопка в мобільному меню — ховаємо */
    #site-navigation.toggled .header-extras .header-cta-btn {
        display: none !important;
    }
}


/* ══════════════════════════════════════════════════════════
   CTA MODAL
══════════════════════════════════════════════════════════ */

/* Overlay */
.cta-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.cta-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Card */
.cta-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 48px 40px 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
    transform: translateY(16px);
    transition: transform 0.25s ease;
}
.cta-modal-overlay.is-open .cta-modal {
    transform: translateY(0);
}

/* Close button */
.cta-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-light);
    border: none;
    border-radius: 50%;
    font-size: 13px;
    color: var(--color-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
}
.cta-modal-close:hover {
    background: var(--color-border);
    color: var(--color-dark);
}

/* Texts */
.cta-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 8px;
    line-height: 1.25;
}
.cta-modal-sub {
    font-size: 15px;
    color: var(--color-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

/* Form */
.cta-modal-form .modal-form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.cta-modal-form input {
    width: 100%;
    padding: 13px 18px;
    background: var(--color-light);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-dark);
    font-size: 16px;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.cta-modal-form input::placeholder { color: var(--color-muted); }
.cta-modal-form input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.modal-submit-btn {
    width: 100%;
    margin-bottom: 12px;
}
.modal-form-note {
    text-align: center;
    font-size: 12px;
    color: var(--color-muted);
    margin: 0;
}

@media (max-width: 480px) {
    .cta-modal { padding: 36px 20px 28px; }
    .cta-modal-title { font-size: 20px; }
}


/* ══════════════════════════════════════════════════════════
   АДАПТИВНІСТЬ
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .forwho-wrap { grid-template-columns: 1fr; }
    .forwho-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        gap: 6px;
    }
    .ftab {
        flex: 1;
        min-width: 130px;
        justify-content: center;
        font-size: 13px;
        padding: 10px 12px;
    }
    .forwho-panels { padding: 32px 28px; }

    .process-flow { flex-direction: column; gap: 16px; align-items: stretch; }
    .process-arrow { transform: rotate(90deg); text-align: center; padding: 0; }
    .process-step { padding: 0; }

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

/* ─── Проміжні розміри: 2-колонка, але діаграма масштабується ─── */
/* 900–975px: колонка ~406–443px, діаграма 444px → scale 0.91 (404px) */
@media (max-width: 975px) and (min-width: 900px) {
    .flow-diagram {
        transform: scale(0.91);
        transform-origin: top center;
    }
}

/* 769–899px: колонка ~340–405px, діаграма 444px → scale 0.76 (337px) */
@media (max-width: 899px) and (min-width: 769px) {
    .flow-diagram {
        transform: scale(0.76);
        transform-origin: top center;
    }
}

@media (max-width: 768px) {
    /* ─── Hero ─── */
    .hero-body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas:
            "text"
            "visual"
            "btns";
        column-gap: 0;
        row-gap: 32px;
        padding: 32px 0 46px;
    }

    .hero-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
    .hero-text {
        min-width: 0;
    }
    .hero-text h1 {
        font-size: clamp(26px, 7.5vw, 36px);
        word-break: break-word;
    }
    .hero-sub {
        font-size: 16px;
        margin-bottom: 0; /* відступ знизу знімаємо — він тепер через row-gap */
    }
    .hero-visual {
        display: flex;
        justify-content: center;
        width: 100%;
        min-width: 0;
        overflow-x: clip;
    }
    .flow-diagram {
        flex-shrink: 0;
        width: 444px;
        transform: scale(0.72);
        transform-origin: top center;
        margin-bottom: -60px;
    }

    .stats-row { flex-wrap: wrap; }
    .stat { flex: 0 0 50%; }
    .stat-divider { display: none; }

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

    .cta-form .form-row { flex-direction: column; }
    .cta-form .btn { width: 100%; }
}
