/* =========================================
   FAB SYSTEM CORE (PRODUCTION UI FRAMEWORK)
   BESTFLOW GmbH — Version 2.2 (2026)
   ========================================= */

/* Единый фиксированный контейнер-хаб */
.fab-hub {
    position: fixed;
    z-index: 12000;
    display: flex;
    flex-direction: column;
    gap: 16px; 
    pointer-events: none; 
    transition: all 0.25s ease;
}

/* Точки привязки хаба с защитой safe-area iOS */
.fab-hub.pos-right {
    right: 24px;
    left: auto;
    bottom: calc(90px + env(safe-area-inset-bottom));
}

.fab-hub.pos-left {
    left: 24px;
    right: auto;
    bottom: calc(90px + env(safe-area-inset-bottom));
}

/* Сама кнопка (flex-item) */
.fab-item {
    pointer-events: auto; 
    animation: fabFadeIn 0.5s ease-out forwards;
}

.fab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.fab-link:hover {
    transform: translateY(-4px);
}

/* Базовый контейнер иконки — определяет геометрию и флекс */
.fab-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.fab-link:hover .fab-icon-wrapper {
    transform: scale(1.05);
}

/* Базовый текст под кнопкой */
.fab-label {
    margin-top: 10px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
}

/* =========================================
   ИКОНКА И ЭМОДЗИ CORE (Контроль размеров)
   ========================================= */
/* Жёстко указываем размер контента внутри wrapper, 
   чтобы и текстовые эмодзи, и теги <i> читали размер одинаково */
.fab-icon-wrapper,
.fab-emoji,
.fab-icon-wrapper i {
    font-size: 34px;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* =========================================
   МОДУЛИ ТЕМ (Только цвета, градиенты и ховеры)
   ========================================= */

/* 1. MARINE */
.fab-marine {
    background: linear-gradient(135deg, #00c6d7 0%, #005f73 100%);
}
.fab-marine:hover {
    box-shadow: 0 6px 22px rgba(0, 198, 215, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.fab-label-marine { color: #00d9ff; }
.fab-link:hover .fab-label-marine { color: #ffffff; }

/* 2. MINING */
.fab-mining {
    background: linear-gradient(135deg, #ffcc33 0%, #ff8800 100%);
}
.fab-mining:hover {
    box-shadow: 0 6px 22px rgba(255, 170, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.fab-label-mining { color: #ffb300; }
.fab-link:hover .fab-label-mining { color: #ffffff; }

/* 3. AI-STUDIO */
.fab-ai {
    background: linear-gradient(135deg, #8a2be2 0%, #4a00e0 100%);
}
.fab-ai:hover {
    box-shadow: 0 6px 22px rgba(138, 43, 226, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.fab-label-ai { color: #b873ff; }
.fab-link:hover .fab-label-ai { color: #ffffff; }

/* 4. AI-AEROSPACE (Авиация) */
.fab-aerospace {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4a00e0 100%);
}
.fab-aerospace:hover {
    background: linear-gradient(135deg, #2a5298 0%, #4a00e0 100%);
    box-shadow: 0 8px 26px rgba(67, 100, 247, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Пропорционально увеличиваем саму иконку самолета, чтобы она не казалась мелкой */
.fab-icon-wrapper.fab-aerospace i {
    font-size: 28px;
}
/* Эффект взлета при ховере */
.fab-link:hover .fab-aerospace i {
    transform: scale(1.1) rotate(-15deg);
}
.fab-label-aerospace { color: #8da9ff; }
.fab-link:hover .fab-label-aerospace { color: #ffffff; }

/* 5. CREATIVITY GLOBAL */
.fab-creativity-global {
    background: linear-gradient(135deg, #ec008c 0%, #fc6767 100%);
}
.fab-creativity-global:hover {
    box-shadow: 0 6px 22px rgba(236, 0, 140, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.fab-label-creativity-global { color: #ff6ea7; }
.fab-link:hover .fab-label-creativity-global { color: #ffffff; }

/* 6. BLOG GLOBAL */
.fab-blog-global {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
}
.fab-blog-global:hover {
    box-shadow: 0 6px 22px rgba(0, 180, 219, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.fab-label-blog-global { color: #00d2ff; }
.fab-link:hover .fab-label-blog-global { color: #ffffff; }

/* 7. INDUSTRY (Промышленные кейсы — Добавлено v2.2) */
.fab-industry {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
}
.fab-industry:hover {
    border-color: #00ff66;
    box-shadow: 0 6px 22px rgba(0, 255, 102, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5);
}
/* Оптимизация размера шрифта Font Awesome для иконки индустрии */
.fab-icon-wrapper.fab-industry i {
    font-size: 26px;
    transition: transform 0.25s ease, color 0.25s ease;
}
/* Микро-интерактив при наведении на иконку */
.fab-link:hover .fab-industry i {
    transform: scale(1.08);
    color: #00ff66;
}
.fab-label-industry { color: #00ff66; }
.fab-link:hover .fab-label-industry { color: #ffffff; }

/* =========================================
   АДАПТИВНОСТЬ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА
   ========================================= */
@media (max-width: 768px) {
    .fab-hub.pos-right {
        right: 16px;
        bottom: calc(70px + env(safe-area-inset-bottom));
    }
    .fab-hub.pos-left {
        left: 16px;
        bottom: calc(70px + env(safe-area-inset-bottom));
    }
    .fab-icon-wrapper {
        width: 56px;
        height: 56px;
    }
    .fab-icon-wrapper,
    .fab-emoji, 
    .fab-icon-wrapper i {
        font-size: 30px;
    }
    .fab-icon-wrapper.fab-aerospace i {
        font-size: 24px;
    }
    /* Коррекция размера иконки индустрии на планшетах */
    .fab-icon-wrapper.fab-industry i {
        font-size: 22px;
    }
    .fab-label {
        font-size: 10px;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .fab-hub.pos-right {
        bottom: calc(55px + env(safe-area-inset-bottom));
    }
    .fab-hub.pos-left {
        bottom: calc(55px + env(safe-area-inset-bottom));
    }
    .fab-icon-wrapper {
        width: 52px;
        height: 52px;
    }
    .fab-icon-wrapper,
    .fab-emoji, 
    .fab-icon-wrapper i {
        font-size: 28px;
    }
    .fab-icon-wrapper.fab-aerospace i {
        font-size: 22px;
    }
    /* Коррекция размера иконки индустрии на телефонах */
    .fab-icon-wrapper.fab-industry i {
        font-size: 20px;
    }
}

/* =========================================
   АНИМАЦИЯ ПОЯВЛЕНИЯ В СТЭКЕ
   ========================================= */
@keyframes fabFadeIn {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}