/**
 * Чистый CSS для секции problems-section
 * Полное переопределение всех стилей без конфликтов
 * Дата: 2025-07-01
 * 
 * ВАЖНО: Все стили применяются ТОЛЬКО к .problems-section
 * Не влияют на другие секции сайта
 */

/* Сброс влияния на другие секции */
.how-it-works-section .btn-primary-custom,
.about-section .btn-primary-custom,
.contact-section .btn-primary-custom,
.hero-section .btn-primary-custom,
.stats-section .btn-primary-custom {
    position: static !important;
    display: inline-block !important;
    margin: initial !important;
    transform: none !important;
    left: auto !important;
    bottom: auto !important;
    text-align: center !important;
    max-width: initial !important;
    width: auto !important;
}

/* Дополнительная защита для stats-section */
.stats-section .motivation-cta .btn-primary-custom {
    position: static !important;
    display: inline-block !important;
    margin: initial !important;
    transform: none !important;
    left: auto !important;
    bottom: auto !important;
    text-align: center !important;
    max-width: initial !important;
    width: auto !important;
}

/* Сброс всех предыдущих стилей и центрирование секции */
.problems-section {
    /* Принудительное центрирование секции */
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 60px 0 !important;
    box-sizing: border-box !important;
    
    /* Фон и прозрачность */
    background: transparent !important;
    position: relative !important;
    z-index: 1 !important;
    
    /* Убираем все возможные сдвиги */
    left: auto !important;
    right: auto !important;
    transform: none !important;
    overflow-x: hidden !important;
}

/* Контейнер - центрируем с ограничением ширины */
.problems-section .container {
    display: block !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    
    /* Убираем все возможные сдвиги */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

/* Контент контейнер */
.problems-section .content-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    
    /* Стеклянный эффект */
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 25px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    
    /* Убираем все возможные сдвиги */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

/* Заголовки секции */
.problems-section h2.display-4 {
    color: #ffffff !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
}

.problems-section p.lead {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.1rem !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
}

/* Сетка с карточками */
.problems-section .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -10px !important;
    justify-content: center !important;
    align-items: stretch !important;
}

.problems-section .col-lg-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 10px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    justify-content: center !important;
}

/* Карточки проблем */
.problems-section .problem-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 60px 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    
    /* Стили карточки */
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 25px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    overflow: hidden !important;
    height: auto !important;
    min-height: 400px !important;
}

/* Заголовок карточки */
.problems-section .problem-header {
    background: linear-gradient(135deg, var(--primary-color, #9C1B1B), #c92a2a) !important;
    color: white !important;
    padding: 20px !important;
    margin: 0 !important;
    text-align: center !important;
    border-radius: 23px 23px 0 0 !important;
}

/* Заголовок карточки перевозчиков - синий цвет */
.problems-section .carriers-card .problem-header {
    background: linear-gradient(45deg, #596287, #6b73a1) !important;
    color: white !important;
}

.problems-section .problem-icon {
    font-size: 2rem !important;
    margin-bottom: 10px !important;
}

.problems-section .problem-title {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* Контент карточки */
.problems-section .problem-content {
    padding: 20px !important;
    color: #333 !important;
    text-align: left !important;
}

.problems-section .problem-item {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
}

.problems-section .problem-item-icon {
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(156, 27, 27, 0.1) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 15px !important;
    color: var(--primary-color, #9C1B1B) !important;
}

/* Иконки для карточки перевозчиков - синие */
.problems-section .carriers-card .problem-item-icon {
    background: rgba(89, 98, 135, 0.15) !important;
    color: #596287 !important;
}

.problems-section .problem-text {
    flex: 1 !important;
}

.problems-section .problem-text strong {
    display: block !important;
    margin-bottom: 5px !important;
    font-weight: 600 !important;
    color: #222 !important;
}

.problems-section .problem-text p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}

/* Кнопки "Есть решение" внутри карточек проблем */
.problems-section .solution-badge {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
}

.problems-section .solution-badge .badge-text {
    display: inline-block !important;
    background: linear-gradient(45deg, var(--primary-color, #9C1B1B), #c92a2a) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 25px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 15px rgba(156, 27, 27, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    text-align: center !important;
}

.problems-section .solution-badge .badge-text:hover {
    background: linear-gradient(45deg, #7a1515, #a01e1e) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(156, 27, 27, 0.4) !important;
    color: white !important;
    text-decoration: none !important;
}

/* Кнопка "Есть решение" для карточки перевозчиков - синяя */
.problems-section .carriers-card .solution-badge .badge-text {
    background: linear-gradient(45deg, #596287, #6b73a1) !important;
    box-shadow: 0 4px 15px rgba(89, 98, 135, 0.3) !important;
}

.problems-section .carriers-card .solution-badge .badge-text:hover {
    background: linear-gradient(45deg, #4a5270, #596287) !important;
    box-shadow: 0 6px 20px rgba(89, 98, 135, 0.4) !important;
}

/* Кнопка "Зарегистрироваться бесплатно" - обычное центрирование */
.problems-section .problem-explanation .btn,
.problems-section .solution-intro .btn {
    position: static !important;
    display: block !important;
    margin: 20px auto 0 auto !important;
    transform: none !important;
    left: auto !important;
    bottom: auto !important;
    text-align: center !important;
}

/* Кнопка "Как это работает" ТОЛЬКО в problems-section - убираем ограничения ширины и центрируем */
.problems-section .btn-primary-custom {
    position: static !important;
    display: block !important;
    margin: 20px auto 0 auto !important;
    transform: none !important;
    left: auto !important;
    bottom: auto !important;
    text-align: center !important;
    max-width: none !important;
    width: auto !important;
    min-width: 280px !important;
    padding: 18px 45px !important;
    font-size: 1.1rem !important;
    white-space: nowrap !important;
}

.problems-section .btn-primary-custom i {
    margin-right: 15px !important;
    font-size: 1rem !important;
}

/* Центрирование контейнеров с кнопками */
.problems-section .problem-explanation,
.problems-section .solution-intro {
    text-align: center !important;
}

/* Объяснение проблемы */
.problems-section .problem-explanation {
    margin: 40px auto 0 auto !important;
    padding: 30px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    text-align: center !important;
    max-width: 100% !important;
}

.problems-section .explanation-title {
    color: #ffffff !important;
    font-size: 1.8rem !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
}

.problems-section .explanation-text {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}

.problems-section .solution-intro {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 20px !important;
    border-radius: 15px !important;
    margin-top: 20px !important;
}

.problems-section .solution-title {
    color: var(--primary-color, #9C1B1B) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}

.problems-section .solution-subtitle {
    color: #333 !important;
    font-size: 1rem !important;
    margin: 0 !important;
}

/* Мобильные адаптации */
@media (max-width: 991px) {
    .problems-section .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }
}

@media (max-width: 768px) {
    .problems-section {
        padding: 40px 0 !important;
    }
    
    .problems-section .container {
        padding: 0 10px !important;
    }
    
    .problems-section .content-container {
        padding: 30px 15px !important;
        border-radius: 15px !important;
    }
    
    .problems-section h2.display-4 {
        font-size: 1.8rem !important;
    }
    
    .problems-section p.lead {
        font-size: 1rem !important;
    }
    
    .problems-section .problem-card {
        min-height: 350px !important;
    }
    
    .problems-section .problem-header {
        padding: 15px !important;
    }
    
    .problems-section .problem-title {
        font-size: 1.1rem !important;
    }
    
    .problems-section .explanation-title {
        font-size: 1.5rem !important;
    }
    
    .problems-section .solution-title {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 480px) {
    .problems-section .container {
        padding: 0 5px !important;
    }
    
    .problems-section .content-container {
        padding: 20px 10px !important;
    }
    
    .problems-section .row {
        margin: 0 -5px !important;
    }
    
    .problems-section .col-lg-6 {
        padding: 0 5px !important;
    }
    
    .problems-section .problem-card {
        min-height: 320px !important;
    }
    
    .problems-section h2.display-4 {
        font-size: 1.5rem !important;
    }
    
    .problems-section p.lead {
        font-size: 0.9rem !important;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ МОБИЛЬНЫЕ ФИКСЫ ===== */

/* ФИКС КНОПОК РЕГИСТРАЦИЯ/ВХОД - ОДИНАКОВЫЕ РАЗМЕРЫ */
@media (max-width: 768px) {
    .hero-section .btn-group-hero {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-top: 20px !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .hero-section .btn-primary-custom {
        width: 100% !important;
        max-width: 280px !important;
        padding: 15px 25px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        border-radius: 30px !important;
        margin: 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* УВЕЛИЧЕННАЯ СТРЕЛКА - СОХРАНЯЕМ КРАСИВЫЙ ДИЗАЙН */
    .scroll-indicator {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 80px !important;
        height: 80px !important;
        bottom: 30px !important;
        cursor: pointer !important;
        z-index: 1000 !important;
    }
    
    .scroll-indicator lottie-player {
        width: 80px !important;
        height: 80px !important;
    }
}

/* СПЕЦИАЛЬНО ДЛЯ iOS - УВЕЛИЧИВАЕМ КРАСНУЮ СТРЕЛКУ */
@supports (-webkit-touch-callout: none) {
    /* Применяется только на iOS */
    .scroll-indicator {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 120px !important;
        height: 120px !important;
        bottom: 40px !important;
        cursor: pointer !important;
        z-index: 1000 !important;
    }
    
    .scroll-indicator lottie-player {
        width: 120px !important;
        height: 120px !important;
    }
    
    /* Увеличиваем touch target для iOS */
    .scroll-indicator::after {
        content: '';
        position: absolute;
        top: -20px;
        left: -20px;
        right: -20px;
        bottom: -20px;
        z-index: -1;
    }
}

/* ФИКС ОТГРУЗКИ ЭЛЕМЕНТОВ ПРИ СКРОЛЛЕ */
@media (max-width: 768px) {
    /* Исправляем логотип - убираем агрессивные transform */
    .logo-header {
        will-change: opacity !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }
    
    .logo-header.hidden {
        transform: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    /* Исправляем все fixed элементы */
    .help-button {
        will-change: transform !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }
    
    /* Общий фикс для всех элементов с position fixed */
    [style*="position: fixed"] {
        will-change: transform !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }
    
    /* Отключаем аппаратное ускорение для проблемных элементов */
    body::before {
        will-change: auto !important;
        transform: translateZ(0) !important;
    }
}

/* ФИКС КНОПКИ "НУЖНА ПОМОЩЬ" - КОРОТКИЙ ТЕКСТ НА МОБИЛЬНЫХ */
@media (max-width: 768px) {
    .help-button {
        /* Сохраняем позиционирование */
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 1000 !important;
        
        /* Переопределяем размеры кнопки для текста - НЕ КРУГ! */
        width: auto !important;
        height: auto !important;
        min-width: 120px !important;
        border-radius: 25px !important;
        padding: 12px 18px !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        
        /* Показываем текст нормально */
        text-indent: 0 !important;
        overflow: visible !important;
        
        /* Убеждаемся что фон покрывает всю кнопку */
        background: linear-gradient(45deg, var(--primary-color, #9C1B1B), #c92a2a) !important;
        box-shadow: 0 4px 15px rgba(156, 27, 27, 0.3) !important;
        border: none !important;
        color: white !important;
        
        /* Показываем иконку и текст */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    
    /* Показываем FontAwesome иконку */
    .help-button i {
        display: inline-block !important;
        font-size: 1rem !important;
    }
    
    /* Заменяем текст через JavaScript альтернативу или простое переопределение */
    .help-button {
        font-size: 0 !important;
    }
    
    .help-button::after {
        content: "Помощь" !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        color: white !important;
        margin-left: 4px !important;
    }
}