/* === MOBILE-FIXES-COMPLETE.CSS ===
 * 🔧 Комплексные исправления для мобильных устройств
 * 📱 АДАПТАЦИЯ: Все элементы под мобильные экраны
 * ✨ АНИМАЦИИ: Приятное мигание статусов
 * 📅 СОЗДАНО: 2025-09-29
 */

/* =================================
   📊 СИСТЕМА АКТИВНА 24/7 - АДАПТАЦИЯ
   ================================= */
.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .nav-status {
        position: absolute;
        top: 60px;
        left: 1rem;
        font-size: 0.75rem;
        opacity: 0.9;
    }
    
    .nav-status span:not(.status-dot) {
        display: none;
    }
    
    .nav-status::after {
        content: '24/7';
        font-weight: 600;
        color: var(--ai-green);
    }
}

@media (max-width: 400px) {
    .nav-status {
        top: 55px;
        left: 0.75rem;
        font-size: 0.7rem;
    }
}

/* =================================
   🎯 FOOTER MARGIN FIX
   ================================= */
.footer {
    margin-top: 0 !important;
    padding-top: 3rem;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(10, 10, 10, 0.5) 50%,
        rgba(10, 10, 10, 0.9) 100%);
}

/* =================================
   📱 HERO CTA MARGIN - МОБИЛЬНЫЕ
   ================================= */
@media (max-width: 768px) {
    .hero-cta {
        margin-bottom: 0 !important;
        padding-bottom: 1.5rem;
    }
}

/* =================================
   📊 REALTIME GRID - МОБИЛЬНАЯ АДАПТАЦИЯ
   ================================= */
.realtime-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 1024px) {
    .realtime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .realtime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    .realtime-card {
        padding: 1rem !important;
        min-height: auto;
    }
    
    .realtime-number {
        font-size: 1.75rem !important;
        margin-bottom: 0.25rem;
    }
    
    .realtime-label {
        font-size: 0.75rem !important;
        opacity: 0.8;
    }
    
    .realtime-icon {
        font-size: 1.25rem !important;
        opacity: 0.3;
    }
}

@media (max-width: 400px) {
    .realtime-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .realtime-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.875rem !important;
    }
    
    .realtime-content {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .realtime-number {
        font-size: 1.5rem !important;
        margin-bottom: 0;
    }
    
    .realtime-label {
        font-size: 0.85rem !important;
    }
}

/* =================================
   ✅ REALTIME STATUS - АНИМАЦИЯ И АДАПТАЦИЯ
   ================================= */
.realtime-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    margin-top: 2rem;
    flex-wrap: wrap;
    text-align: center;
}

/* Зеленая точка с приятным миганием */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    animation: statusPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Пульсация точки */
@keyframes statusPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    }
}

/* Дополнительный эффект свечения */
.status-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, 
        rgba(16, 185, 129, 0.4) 0%, 
        transparent 70%);
    border-radius: 50%;
    animation: statusGlow 2s ease-in-out infinite;
}

@keyframes statusGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Текст статуса */
.realtime-status span:not(.status-dot) {
    font-size: 0.9rem;
    color: var(--text-primary);
    opacity: 0.85;
}

.realtime-status #updateTime {
    color: var(--ai-green);
    font-weight: 600;
}

/* Мобильная адаптация статуса */
@media (max-width: 768px) {
    .realtime-status {
        font-size: 0.85rem;
        padding: 0.875rem;
        margin-top: 1.5rem;
    }
    
    .status-dot {
        width: 8px;
        height: 8px;
    }
    
    .realtime-status span:not(.status-dot) {
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .realtime-status {
        font-size: 0.75rem;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    /* Разбиваем текст на строки */
    .realtime-status span:not(.status-dot):not(#updateTime)::after {
        content: '\A';
        white-space: pre;
    }
}

/* =================================
   🔗 TELEGRAM ССЫЛКА
   ================================= */
.footer-link[href*="telegram"],
.footer-link[href*="t.me"] {
    color: var(--ai-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link[href*="telegram"]:hover,
.footer-link[href*="t.me"]:hover {
    color: var(--ai-purple);
    transform: translateX(3px);
}

/* =================================
   🎯 ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ
   ================================= */

/* Улучшенная читаемость на мобильных */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Предотвращаем zoom на iOS */
    }
    
    input, select, textarea {
        font-size: 16px; /* Предотвращаем zoom при фокусе */
    }
}

/* Фикс горизонтального скролла */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

/* Улучшенные отступы для мобильных */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
    
    .container,
    [class*="-container"] {
        padding: 0 1rem;
    }
}

@media (max-width: 400px) {
    section {
        padding: 2rem 0;
    }
    
    .container,
    [class*="-container"] {
        padding: 0 0.75rem;
    }
}
