/* Modern AI-Themed Styling for Fulcrum AI Website */

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #1e293b;
    --accent-color: #00d4aa;
    --accent-secondary: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #00d4aa 0%, #3b82f6 100%);
    --gradient-ai: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --card-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --border-light: #64748b;
    --glow-color: rgba(0, 212, 170, 0.3);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 35px 60px -12px rgba(0, 0, 0, 0.35);
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

.ai-main-content {
    min-height: calc(100vh - 76px - 300px); /* Примерная высота футера */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
}

.ai-code-font {
    font-family: 'JetBrains Mono', monospace;
}

/* Header Styles */
.ai-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    transform: translateY(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.ai-header.scrolled {
    background: rgba(2, 6, 23, 0.98) !important;
    border-bottom: 1px solid var(--accent-color);
}

.ai-logo {
    font-weight: 800;
    font-size: 1.6rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ai-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px var(--glow-color));
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 10px;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-secondary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

.ai-cta-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.ai-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ai-cta-btn:hover::before {
    left: 100%;
}

.ai-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

/* Hero Section */
.ai-hero {
    background: var(--gradient-hero);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.ai-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: 1;
}

.ai-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    animation: rotate 20s linear infinite;
    z-index: 1;
}

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

.ai-hero .container {
    position: relative;
    z-index: 2;
}

.ai-hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

.ai-hero p.lead {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 600px;
}

/* Cards */
.ai-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.4s ease;
    height: auto;
    min-height: fit-content;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.ai-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.ai-card:hover::before {
    opacity: 1;
}

.ai-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
    background: var(--card-hover);
}

/* Новый класс для контейнера статьи - наследует все от ai-card, кроме hover-перемещений */
.article-card {
    background: #1e293b !important;
    border: 3px solid #00d4aa !important; /* Яркая граница для теста */
    border-radius: 20px !important;
    padding: 1.5rem !important;
    transition: all 0.4s ease !important;
    height: auto !important;
    min-height: fit-content !important;
    position: relative !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.article-card:hover::before {
    opacity: 1;
}

/* Убираем только перемещение, оставляем другие hover эффекты */
.article-card:hover {
    /* transform: translateY(-8px) scale(1.02); - УБРАЛИ */
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
    background: var(--card-hover);
}

.article-card > * {
    position: relative;
    z-index: 2;
}

.ai-card > * {
    position: relative;
    z-index: 2;
}

.ai-card-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

.ai-card:hover .ai-card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.6);
}

.ai-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.ai-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Case Study Cards */
.case-study-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.case-study-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.case-study-card .card-body {
    padding: 1.5rem;
}

.case-study-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blog Cards */
.blog-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.blog-card img {
    height: 200px;
    object-fit: cover;
}

.blog-meta {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.blog-meta a {
    color: var(--primary-color);
}

.blog-meta a:hover {
    color: var(--secondary-color);
}

/* Search Input White Placeholder */
input.search-input::placeholder,
input[name="search"]::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 1 !important;
}

input.search-input::-webkit-input-placeholder,
input[name="search"]::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 1 !important;
}

input.search-input::-moz-placeholder,
input[name="search"]::-moz-placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 1 !important;
}

input.search-input:-ms-input-placeholder,
input[name="search"]:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 1 !important;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 30px;
    padding: 14px 35px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-outline-primary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    border-radius: 30px;
    padding: 12px 33px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline-primary:hover::before {
    width: 100%;
}

.btn-outline-primary:hover {
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Sections */
.ai-section {
    padding: 100px 0;
    position: relative;
}

.ai-section.bg-dark {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    position: relative;
}

/* Statistics Section Alignment */
.statistics-section {
    max-width: 500px; /* Ограничиваем ширину до размера текста */
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.statistics-section .text-center {
    flex: 1;
    max-width: 150px;
}

.ai-section.bg-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 20%, rgba(139, 92, 246, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.ai-section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}



.ai-section-title h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.ai-section-title p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Testimonials */
.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Простые стили для отзывов */
.row .col-lg-4:has(.testimonial-card),
.row .col-md-6:has(.testimonial-card) {
    max-width: 280px;
    margin: 0 auto;
}

/* Стили для карусели отзывов */
.testimonial-slide {
    max-width: 280px;
    min-width: 280px;
    flex: 0 0 280px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.testimonial-slide .testimonial-content {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

/* Очень специфичные стили для карусели */
.testimonials-carousel .testimonial-slide .testimonial-content {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 240px !important;
    width: 240px !important;
}

.testimonials-carousel .testimonial-card {
    max-width: 280px !important;
    width: 280px !important;
    box-sizing: border-box !important;
}

.testimonial-stars {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

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

.testimonial-company {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Blog Cards - Equal Height and Button Alignment */
.blog-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card .card-body .mt-auto {
    margin-top: auto !important;
}

/* Case Study Detail Page - Section Spacing */
.ai-section .mb-5 {
    margin-bottom: 4rem !important;
}

/* Additional spacing for case study content sections */
.ai-section .ai-card + .ai-section-title {
    margin-top: 5rem;
}

/* Testimonials Carousel - Continuous Motion */
.testimonials-carousel-container {
    position: relative;
    overflow: hidden;
    height: 300px;
    border-radius: 12px;
    width: 100%;
    background: linear-gradient(90deg, 
        rgba(30, 41, 59, 1.0) 0%, 
        rgba(30, 41, 59, 0.8) 5%, 
        rgba(30, 41, 59, 0.4) 10%, 
        rgba(30, 41, 59, 0.1) 20%, 
        rgba(30, 41, 59, 0.0) 30%, 
        rgba(30, 41, 59, 0.0) 70%, 
        rgba(30, 41, 59, 0.1) 80%, 
        rgba(30, 41, 59, 0.4) 90%, 
        rgba(30, 41, 59, 0.8) 95%, 
        rgba(30, 41, 59, 1.0) 100%);
}

.testimonials-carousel {
    display: flex;
    height: 100%;
    width: max-content;
    animation: infinite-scroll 28s linear infinite;
}

/* Faster animation on mobile devices */
@media (max-width: 768px) {
    .testimonials-carousel {
        animation: infinite-scroll 18s linear infinite;
    }
    
    .testimonial-slide {
        min-width: 280px;
        padding: 0 15px;
    }
}

.testimonial-slide {
    min-width: 350px;
    flex-shrink: 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.testimonial-slide .testimonial-card {
    width: 100%;
    height: auto;
    max-height: 280px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

@keyframes infinite-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-350px * 5)); }
}

@media (max-width: 768px) {
    @keyframes infinite-scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-280px * 5)); }
    }
}

/* Pause on hover */
.testimonials-carousel-container:hover .testimonials-carousel {
    animation-play-state: paused;
}

/* Smooth fade effect - removed discrete opacity steps for smoother appearance */

/* Footer */
.ai-footer {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%) !important;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.ai-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.ai-footer .container {
    position: relative;
    z-index: 2;
}

.ai-footer h5, .ai-footer h6 {
    color: var(--text-primary);
    font-weight: 600;
}

.ai-footer .text-muted {
    color: var(--text-secondary) !important;
    transition: color 0.3s ease;
}

.ai-footer a.text-muted:hover {
    color: var(--accent-color) !important;
}

.ai-cta-section {
    margin-top: 1.5rem;
}

/* Animations */
@keyframes glow {
    0% { box-shadow: 0 0 5px var(--glow-color); }
    50% { box-shadow: 0 0 20px var(--glow-color); }
    100% { box-shadow: 0 0 5px var(--glow-color); }
}

.ai-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Animation Enhancements */
.animate-in {
    animation: slideInUp 0.6s ease-out;
}

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

.ai-hero-graphic i {
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(0, 212, 170, 0.3));
}

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

/* 3D Hero Animation */
.ai-hero-graphic-3d {
    position: relative;
    height: 500px;
    perspective: 1000px;
    overflow: hidden;
}

.ai-3d-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: containerFloat 8s ease-in-out infinite;
}

/* 3D Cubes */
.ai-cube {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    transform-style: preserve-3d;
}

.ai-cube-1 {
    top: 10%;
    left: 20%;
    animation: cubeRotate1 12s linear infinite, float1 6s ease-in-out infinite;
}

.ai-cube-2 {
    top: 60%;
    right: 15%;
    animation: cubeRotate2 10s linear infinite, float2 5s ease-in-out infinite;
    background: var(--gradient-secondary);
    width: 40px;
    height: 40px;
}

.ai-cube-3 {
    bottom: 20%;
    left: 10%;
    animation: cubeRotate3 8s linear infinite, float3 7s ease-in-out infinite;
    background: linear-gradient(135deg, #8b5cf6 0%, #f093fb 100%);
    width: 50px;
    height: 50px;
}

/* 3D Spheres */
.ai-sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #00d4aa, #0891b2);
    box-shadow: 0 0 40px rgba(0, 212, 170, 0.4);
}

.ai-sphere-1 {
    top: 30%;
    right: 25%;
    width: 80px;
    height: 80px;
    animation: sphereFloat1 9s ease-in-out infinite, sphereGlow 3s ease-in-out infinite;
}

.ai-sphere-2 {
    bottom: 40%;
    right: 5%;
    width: 45px;
    height: 45px;
    animation: sphereFloat2 7s ease-in-out infinite, sphereGlow 2.5s ease-in-out infinite;
    background: radial-gradient(circle at 30% 30%, #f093fb, #8b5cf6);
}

/* 3D Pyramid */
.ai-pyramid {
    position: absolute;
    top: 20%;
    right: 40%;
    width: 0;
    height: 0;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 60px solid #3b82f6;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
    animation: pyramidSpin 15s linear infinite, pyramidFloat 6s ease-in-out infinite;
}

/* Neural Network */
.ai-neural-network {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.ai-node {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-color);
    animation: nodePulse 2s ease-in-out infinite;
}

.ai-node-1 { top: 20px; left: 20px; animation-delay: 0s; }
.ai-node-2 { top: 20px; right: 20px; animation-delay: 0.5s; }
.ai-node-3 { bottom: 20px; left: 20px; animation-delay: 1s; }
.ai-node-4 { bottom: 20px; right: 20px; animation-delay: 1.5s; }

.ai-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: connectionFlow 3s ease-in-out infinite;
}

.ai-conn-1 {
    top: 30px;
    left: 40px;
    right: 40px;
    animation-delay: 0s;
}

.ai-conn-2 {
    bottom: 30px;
    left: 40px;
    right: 40px;
    animation-delay: 1s;
}

.ai-conn-3 {
    top: 40px;
    bottom: 40px;
    left: 30px;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, transparent, var(--accent-color), transparent);
    animation-delay: 2s;
}

/* Keyframes */
@keyframes containerFloat {
    0%, 100% { transform: rotateY(0deg) rotateX(5deg); }
    50% { transform: rotateY(10deg) rotateX(-5deg); }
}

@keyframes cubeRotate1 {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes cubeRotate2 {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(-360deg) rotateY(360deg) rotateZ(-360deg); }
}

@keyframes cubeRotate3 {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(-360deg) rotateZ(360deg); }
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(10px) translateX(-5px); }
}

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

@keyframes float3 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-10px) translateX(15px); }
    75% { transform: translateY(15px) translateX(-10px); }
}

@keyframes sphereFloat1 {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-25px) scale(1.1); }
}

@keyframes sphereFloat2 {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(20px) scale(0.9); }
}

@keyframes sphereGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 170, 0.4); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 170, 0.8); }
}

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

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

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

@keyframes connectionFlow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Enhanced Case Study & Blog Cards */
.case-study-card, .blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.case-study-card::before,
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.case-study-card:hover::before,
.blog-card:hover::before {
    opacity: 1;
}

.case-study-card:hover,
.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
}

.case-study-card .card-body,
.blog-card .card-body {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.case-study-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 15px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.case-study-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-hero {
        padding: 80px 0;
        min-height: 80vh;
    }
    
    .ai-hero h1 {
        font-size: 2.8rem;
    }
    
    .ai-hero p.lead {
        font-size: 1.2rem;
    }
    
    .ai-section {
        padding: 60px 0;
    }
    
    .ai-section-title h2 {
        font-size: 2.2rem;
    }
    
    .ai-card {
        margin-bottom: 2rem;
        padding: 2rem;
    }
    
    .ai-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .btn-primary, .btn-outline-primary {
        padding: 12px 25px;
        font-size: 0.85rem;
    }
    
    .ai-cta-btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .ai-hero h1 {
        font-size: 2.2rem;
    }
    
    .ai-section-title h2 {
        font-size: 1.8rem;
    }
    
    .ai-card {
        padding: 1.5rem;
    }
}

/* Loading States */
.ai-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Form Styles */
.form-control {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-control:focus {
    background: var(--card-bg);
    border-color: var(--accent-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(6, 255, 165, 0.25);
}

/* Pagination */
.pagination .page-link {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

/* Отступ вверх для заголовков h1 на страницах Кейсы, Блог, О нас */
/* Для страниц с ai-hero (блог, кейсы) */
.ai-hero h1.display-4 {
    margin-top: 2rem !important;
}

/* Для страницы О нас с ai-section */
.ai-section.bg-dark h1.display-4 {
    margin-top: 2rem !important;
}

/* Общие правила для всех заголовков display-4 */
h1.display-4.fw-bold {
    margin-top: 2rem !important;
}

/* Дополнительные правила для страниц с хлебными крошками */
.breadcrumb ~ h1.display-4,
nav + * h1.display-4 {
    margin-top: 1.5rem !important;
}
