/* ==========================================================================
   MGUTU Hero Section — кастомный фон-стиль для YOOtheme Section
   Применяется классом .tm-section-hero-particles на Section.
   Весь контент секции (заголовки, кнопки, модули) собирается обычными
   builder-элементами поверх этого фона.
   ========================================================================== */

.tm-section-hero-particles {
    position: relative;
    background: #0a0e27;
    overflow: hidden;
    isolation: isolate;
}

/* Контент секции должен быть над декорациями */
.tm-section-hero-particles > .uk-container,
.tm-section-hero-particles > [class*="uk-position"],
.tm-section-hero-particles .uk-grid,
.tm-section-hero-particles .tm-hero-content {
    position: relative;
    z-index: 10;
}

/* Canvas с частицами */
.tm-section-hero-particles .tm-hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    pointer-events: none;
}

/* Floating blur-пятна */
.tm-section-hero-particles .tm-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(20px);
    z-index: 2;
    pointer-events: none;
}
.tm-section-hero-particles .tm-hero-blob--purple {
    top: -120px; left: -120px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(124,58,237,0.55) 0%, rgba(124,58,237,0) 70%);
    animation: tm-hero-float-a 14s ease-in-out infinite;
}
.tm-section-hero-particles .tm-hero-blob--cyan {
    bottom: -140px; right: -100px;
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(6,182,212,0.5) 0%, rgba(6,182,212,0) 70%);
    animation: tm-hero-float-b 18s ease-in-out infinite;
}
.tm-section-hero-particles .tm-hero-blob--pink {
    top: 30%; left: 45%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(236,72,153,0.35) 0%, rgba(236,72,153,0) 70%);
    animation: tm-hero-float-c 16s ease-in-out infinite;
}

/* Сетка-оверлей */
.tm-section-hero-particles .tm-hero-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    z-index: 3;
    pointer-events: none;
}

/* Нижняя линия */
.tm-section-hero-particles .tm-hero-edge {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #a78bfa 25%, #06b6d4 50%, #ec4899 75%, transparent 100%);
    opacity: 0.6;
    z-index: 10;
    pointer-events: none;
}

/* Светлая типографика внутри секции — баннер тёмный */
.tm-section-hero-particles .uk-heading-primary,
.tm-section-hero-particles .uk-heading-hero,
.tm-section-hero-particles .uk-heading-large,
.tm-section-hero-particles .uk-heading-medium,
.tm-section-hero-particles h1,
.tm-section-hero-particles h2,
.tm-section-hero-particles h3 {
    color: #f8fafc;
}
.tm-section-hero-particles p,
.tm-section-hero-particles .uk-text-lead {
    color: #cbd5e1;
}

/* Модификатор: градиентный текст для заголовка.
   Включается классом .tm-hero-gradient-text на текстовом элементе. */
.tm-section-hero-particles .tm-hero-gradient-text,
.tm-hero-gradient-text {
    background: linear-gradient(90deg, #a78bfa 0%, #06b6d4 50%, #ec4899 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: tm-hero-shine 6s linear infinite;
}

/* Модификатор бейджа: .tm-hero-badge на элементе Text */
.tm-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(124,58,237,0.15);
    border: 1px solid rgba(167,139,250,0.4);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    color: #e0e7ff;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.tm-hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 12px #10b981;
    animation: tm-hero-pulse 2s ease-in-out infinite;
}

/* Анимации */
@keyframes tm-hero-float-a {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(40px, 30px); }
}
@keyframes tm-hero-float-b {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-50px, -25px); }
}
@keyframes tm-hero-float-c {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(30px, -35px) scale(1.1); }
}
@keyframes tm-hero-shine {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
@keyframes tm-hero-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.6; }
}

/* Адаптив */
@media (max-width: 640px) {
    .tm-section-hero-particles .tm-hero-blob--purple { width: 260px; height: 260px; }
    .tm-section-hero-particles .tm-hero-blob--cyan   { width: 320px; height: 320px; }
    .tm-section-hero-particles .tm-hero-blob--pink   { width: 220px; height: 220px; }
}

/* Редуцированная анимация */
@media (prefers-reduced-motion: reduce) {
    .tm-section-hero-particles .tm-hero-blob,
    .tm-section-hero-particles .tm-hero-gradient-text,
    .tm-hero-gradient-text,
    .tm-hero-badge::before {
        animation: none !important;
    }
}
