/* ==========================================================================
   PAGE AI-RAG
   Styles for: ШІ База знань (RAG-системи)
   ========================================================================== */

/* --- HERO RAG --- */

.hero--rag {
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* --- KB INTERFACE (hero mockup) --- */

.kb-interface {
    padding: 20px;
    background: rgba(17, 17, 17, 0.8);
    height: 100%;
    border-radius: 0 0 8px 8px;
}

.kb-header { margin-bottom: 20px; }

.kb-search-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.ai-response-bubble {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.ai-response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 800;
    font-size: 11px;
}

.ai-response-text {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.kb-sources { display: flex; gap: 8px; }

.source-chip {
    font-size: 9px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-muted);
}

/* --- LIQUID GLASS --- */

.liquid-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.liquid-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(252, 96, 17, 0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.liquid-glass:hover::before { opacity: 1; }

.liquid-glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

.liquid-glass:hover {
    transform: translateY(-5px);
    border-color: rgba(252, 96, 17, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 20px rgba(252, 96, 17, 0.1);
}

.liquid-glass > * { position: relative; z-index: 1; }

/* --- TRANSFORMATION CARDS --- */

.transformation-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 50px;
}

.transformation-card {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.transformation-card:hover { border-color: var(--primary); }

.pain-side, .solution-side {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.pain-side { border-right: 1px solid rgba(255, 255, 255, 0.08); }

.t-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    margin-bottom: 4px;
}

.pain-label { color: #888; }

.solution-label { color: var(--primary); }

.t-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
    line-height: 1.4;
}

.t-arrow-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin: 0 -30px;
}

.t-arrow {
    width: 44px;
    height: 44px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    transition: all 0.3s ease;
}

.transformation-card:hover .t-arrow {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* --- SECTION INTRO TEXT --- */

.section-intro-text {
    margin-top: 20px;
    color: var(--text-muted);
    max-width: 600px;
    font-size: 16px;
    line-height: 1.7;
}

/* --- STICKY BUSINESS VALUE --- */

.rag-sticky-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: flex-start;
}

.rag-sticky-sidebar {
    position: sticky;
    top: 120px;
}

.promo-quote {
    margin-top: 40px;
    padding: 30px;
    border-left: 3px solid var(--primary);
    background: rgba(252, 96, 17, 0.03);
    border-radius: 0 12px 12px 0;
}

.promo-quote p {
    font-style: italic;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.investment-item { margin-bottom: 60px; }

.ii-header {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 16px;
}

.ii-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.3;
    font-family: var(--font-heading);
}

.ii-title { font-size: 24px; color: white; font-weight: 700; }

.ii-text {
    margin-left: 55px;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 16px;
}

/* --- RAG TECH SECTION --- */

.rag-tech-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 100px;
    align-items: center;
}

.rag-title {
    font-size: 44px;
    margin-bottom: 32px;
}

.rag-lead {
    font-size: 18px;
    line-height: 1.6;
    color: white;
    margin-bottom: 32px;
    font-weight: 500;
}

.rag-lead-sub {
    display: block;
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 12px;
    font-weight: 400;
}

.mini-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-stat-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.mini-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.mini-stat-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* --- RAG FLOW --- */

.rag-flow-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.rag-flow-step {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.rag-flow-step:hover {
    border-color: rgba(252, 96, 17, 0.4);
    background: rgba(252, 96, 17, 0.05);
    transform: translateX(8px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.rag-flow-step--primary {
    background: rgba(252, 96, 17, 0.03);
    border-color: rgba(252, 96, 17, 0.2);
}

.rag-flow-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.rag-flow-icon--primary {
    background: var(--primary);
    color: white;
}

.rag-flow-connector {
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    margin-left: 22px;
}

.rag-flow-info h4 {
    font-size: 15px;
    color: white;
    margin-bottom: 4px;
}

.rag-flow-info p { font-size: 13px; color: var(--text-muted); }

/* --- CAPABILITIES GRID --- */

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.card-minimal {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.card-minimal:hover {
    border-color: rgba(252, 96, 17, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.icon-minimal {
    width: 40px;
    height: 40px;
    background: rgba(252, 96, 17, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
}

.icon-minimal--accent { background: rgba(252, 96, 17, 0.15); }

.cap-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary);
}

.cap-title {
    margin: 16px 0 12px;
    font-size: 22px;
    color: white;
}

.cap-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* --- ARCHITECTURE GRID --- */

.arch-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.arch-layer-title {
    font-size: 22px;
    color: white;
    margin-bottom: 16px;
}

.arch-layer-desc {
    color: var(--text-muted);
    font-size: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    line-height: 1.6;
}

.arch-tags {
    margin-top: 20px;
    display: flex;
    gap: 8px;
}

.arch-tag {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

/* Shared case-card-h classes from style.css are used */

/* --- TECH TABS (shared pattern reused) ---
.tech-tabs-section, .tech-tabs-container, .tab-btn, .tab-panel, .tech-card-v4
are shared classes — defined in page-ai-planning.css as a pattern.
Here we override only what's different (nothing – same pattern). */

/* --- SECTION TITLE LG --- */

.section-title--lg { font-size: 48px; line-height: 1.1; }

/* --- SECTION INTRO / DESC --- */

.section-intro {
    font-size: 18px;
    margin-top: 24px;
    opacity: 0.8;
    color: var(--text-muted);
    line-height: 1.6;
}

.section-desc {
    font-size: 18px;
    margin-top: 20px;
    opacity: 0.8;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- TAG PILLS (hero) --- */

.tag-pills-row {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tech-icon-wrap { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }

.tech-icon-wrap img { max-width: 48px; max-height: 40px; object-fit: contain; }

.tech-name-label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 1200px) {
    .rag-tech-layout { grid-template-columns: 1fr; gap: 60px; }
    .arch-grid-3 { grid-template-columns: 1fr 1fr; }
    .tech-tabs-container { grid-template-columns: 280px 1fr; }
}

.transformation-container {
            display: flex;
            flex-direction: column;
            gap: 24px;
            margin-top: 50px;
        }

.transformation-card {
            display: grid;
            grid-template-columns: 1fr 60px 1fr;
            align-items: stretch;
            background: var(--bg-accent);
            border: 1px solid var(--border-subtle);
            border-radius: var(--card-radius);
            overflow: hidden;
            transition: all 0.4s ease;
            position: relative;
        }

.transformation-card:hover {
            border-color: var(--primary);
            background: rgba(255, 255, 255, 0.04);
        }

.pain-side,
        .solution-side {
            padding: 40px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            position: relative;
        }

.pain-side {
            border-right: 1px solid var(--border-subtle);
        }

.t-label {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            opacity: 0.6;
            margin-bottom: 4px;
        }

.pain-label {
            color: #888;
        }

.solution-label {
            color: var(--primary);
        }

.t-text {
            font-size: 18px;
            font-weight: 600;
            color: white;
            line-height: 1.4;
        }

.t-arrow-wrap {
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
            margin: 0 -30px;
        }

.t-arrow {
            width: 44px;
            height: 44px;
            background: #1a1a1a;
            border: 1px solid var(--border-subtle);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            font-size: 18px;
            transition: all 0.3s ease;
        }

.transformation-card:hover .t-arrow {
            border-color: var(--primary);
            box-shadow: 0 0 15px var(--primary-glow);
        }

.sticky-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 80px;
            align-items: flex-start;
        }

.sticky-sidebar {
            position: sticky;
            top: 120px;
        }

.investment-item {
            margin-bottom: 60px;
        }

.ii-header {
            display: flex;
            align-items: baseline;
            gap: 20px;
            margin-bottom: 16px;
        }

.ii-num {
            font-size: 32px;
            font-weight: 800;
            color: var(--primary);
            opacity: 0.3;
            font-family: 'Manrope', sans-serif;
        }

.ii-title {
            font-size: 24px;
            color: white;
            font-weight: 700;
        }

.ii-text {
            margin-left: 55px;
            color: var(--text-muted);
            line-height: 1.7;
            font-size: 16px;
        }

.promo-quote {
            margin-top: 40px;
            padding: 30px;
            border-left: 3px solid var(--primary);
            background: rgba(255, 255, 255, 0.02);
            border-radius: 0 12px 12px 0;
            font-style: italic;
            color: var(--text-muted);
            font-size: 15px;
            line-height: 1.6;
        }

/* RAG FLOW STYLES */

.rag-flow-container {
            display: flex;
            flex-direction: column;
            gap: 16px;
            position: relative;
        }

/* LIQUID GLASS SYSTEM - PREMIUM VERSION */

.liquid-glass {
            background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(40px) saturate(200%);
            -webkit-backdrop-filter: blur(40px) saturate(200%);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            position: relative;
            overflow: hidden;
            transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                        border-color 0.4s ease,
                        box-shadow 0.4s ease;
        }

.liquid-glass::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(
                800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(252, 96, 17, 0.08), 
                transparent 40%
            );
            opacity: 0;
            transition: opacity 0.5s ease;
            pointer-events: none;
            z-index: 0;
        }

.liquid-glass:hover::before {
            opacity: 1;
        }

.liquid-glass::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            padding: 1px;
            background: linear-gradient(
                135deg, 
                rgba(255, 255, 255, 0.2), 
                rgba(255, 255, 255, 0.05) 50%, 
                rgba(255, 255, 255, 0.1)
            );
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
            z-index: 2;
        }

.liquid-glass:hover {
            transform: translateY(-5px);
            border-color: rgba(252, 96, 17, 0.3);
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 20px rgba(252, 96, 17, 0.1);
        }

.liquid-glass > * {
            position: relative;
            z-index: 1;
        }

.rag-flow-step {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 20px;
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        }

.rag-flow-step:hover {
            border-color: rgba(252, 96, 17, 0.4);
            background: rgba(252, 96, 17, 0.05);
            transform: translateX(8px);
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
        }

.card-minimal {
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: var(--card-radius);
            padding: 32px;
            transition: all 0.4s ease;
            position: relative;
            z-index: 1;
        }

.card-minimal:hover {
            border-color: rgba(252, 96, 17, 0.3);
            background: rgba(255, 255, 255, 0.04);
            transform: translateY(-5px);
            box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
        }

.icon-minimal {
            width: 40px;
            height: 40px;
            background: rgba(252, 96, 17, 0.1);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            color: var(--primary);
        }

.case-item-premium {
            display: grid;
            grid-template-columns: 80px 1fr 1.8fr;
            gap: 40px;
            padding: 40px;
            align-items: center;
            border-radius: 24px;
            transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
        }

.case-item-premium:hover {
            transform: scale(1.01);
            border-color: rgba(252, 96, 17, 0.4);
        }
