/* HERO СЕКЦИЯ С СЕТКОЙ/МАТРИЦЕЙ И ПРАВИЛЬНЫМИ ПЛАШКАМИ */

/* 1. ОСНОВНОЙ СТИЛЬ HERO С МАТРИЧНОЙ СЕТКОЙ */
.hero {
    position: relative !important;
    min-height: 100vh !important;
    background: linear-gradient(135deg, #2573D1 0%, #1e5ba8 100%) !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    padding: 80px 0 !important;
}

/* Матричная сетка вместо паттерна */
.hero::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-image: 
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px) !important;
    background-size: 50px 50px !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Анимированные точки в узлах сетки */
.hero::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px) !important;
    background-size: 50px 50px !important;
    background-position: 0 0 !important;
    pointer-events: none !important;
    z-index: 1 !important;
    animation: grid-pulse 4s ease-in-out infinite !important;
}

@keyframes grid-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* 2. КОНТЕЙНЕР ДЛЯ КОНТЕНТА */
.hero-content {
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* 3. ПРАВИЛЬНОЕ РАСПОЛОЖЕНИЕ ПЛАШЕК */
.floating-cards {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 5 !important;
}

/* Компактные плашки с правильным расположением */
.float-card {
    position: absolute !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 32px !important;
    padding: 0 14px !important;
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    border-radius: 16px !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
}

/* Позиционирование каждой плашки - все 3 видимые */
.float-card:nth-child(1) {
    top: 25% !important;
    left: 5% !important;
    animation: float-1 6s ease-in-out infinite !important;
}

.float-card:nth-child(2) {
    top: 45% !important;
    right: 8% !important;
    left: auto !important;
    animation: float-2 7s ease-in-out infinite !important;
}

.float-card:nth-child(3) {
    bottom: 30% !important;
    top: auto !important;
    left: 10% !important;
    animation: float-3 8s ease-in-out infinite !important;
}

/* Плавная анимация плашек */
@keyframes float-1 {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(-2deg);
    }
    50% { 
        transform: translateY(-15px) translateX(10px) rotate(2deg);
    }
}

@keyframes float-2 {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(2deg);
    }
    50% { 
        transform: translateY(-20px) translateX(-10px) rotate(-2deg);
    }
}

@keyframes float-3 {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(-1deg);
    }
    50% { 
        transform: translateY(-10px) translateX(5px) rotate(3deg);
    }
}

/* 4. СКРЫТИЕ РОБОТА В МОБИЛЬНОЙ ВЕРСИИ */
@media (max-width: 768px) {
    /* Убираем робота полностью */
    .robot-container,
    .hero-visual,
    .robot-head,
    .robot-wrapper,
    .hero-robot,
    [class*="robot"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Убираем плашки на мобильных */
    .float-card,
    .floating-cards {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Центрируем контент */
    .hero-content {
        text-align: center !important;
        padding: 40px 20px !important;
    }
    
    .hero-text {
        max-width: 100% !important;
        text-align: center !important;
    }
    
    /* Адаптируем высоту hero */
    .hero {
        min-height: auto !important;
        padding: 60px 0 40px !important;
    }
    
    /* Упрощаем сетку для производительности */
    .hero::before {
        background-size: 30px 30px !important;
    }
    
    .hero::after {
        background-size: 30px 30px !important;
    }
}

/* 5. ПЛАНШЕТНАЯ ВЕРСИЯ */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Скрываем робота на планшетах тоже */
    .robot-container,
    .hero-visual {
        display: none !important;
    }
    
    /* Центрируем контент */
    .hero-content {
        text-align: center !important;
    }
    
    /* Адаптируем плашки */
    .float-card:nth-child(1) {
        left: 2% !important;
    }
    
    .float-card:nth-child(2) {
        right: 2% !important;
    }
    
    .float-card:nth-child(3) {
        left: 5% !important;
    }
}

/* 6. ДЕСКТОПНАЯ ВЕРСИЯ */
@media (min-width: 1025px) {
    .hero-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 60px !important;
    }
    
    .hero-text {
        flex: 1 !important;
        max-width: 600px !important;
    }
    
    .hero-visual {
        flex: 0 0 400px !important;
        position: relative !important;
        height: 500px !important;
    }
    
    /* Показываем плашки вокруг робота */
    .floating-cards {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 500px !important;
        height: 500px !important;
    }
}

/* 7. УБЕЖДАЕМСЯ ЧТО РОБОТ СКРЫТ НА МОБИЛЬНЫХ */
@media (max-width: 768px) {
    /* Принудительное скрытие всех элементов робота */
    .hero .robot-container,
    .hero .hero-visual,
    .hero .robot-head,
    .hero .robot-wrapper,
    .hero-visual .robot-container,
    #hero .robot-container,
    body .hero .robot-container {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
    }
}

/* 8. HOVER ЭФФЕКТЫ ДЛЯ ПЛАШЕК НА ДЕСКТОПЕ */
@media (hover: hover) and (min-width: 769px) {
    .float-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease !important;
        cursor: default !important;
    }
    
    .float-card:hover {
        transform: scale(1.1) !important;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
        animation-play-state: paused !important;
        z-index: 10 !important;
    }
}