/* Стили для интерактивных карточек "Прозрачность сделки" */

.trust-card {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    scroll-margin-top: 90px; /* Учёт sticky-bar при скролле по клику бейджа */
}

.trust-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.2);
    border-left-color: var(--color-primary);
}

.trust-card:active {
    transform: translateY(0);
}

/* Выбранное состояние */
.trust-card--selected {
    border-color: rgba(37, 99, 235, 0.35) !important;
    background: rgba(248, 251, 255, 0.98);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.1);
    position: relative;
}

.trust-card--selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Галочка выбора */
.trust-card-checkmark {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family-heading);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
    animation: checkmarkAppear 0.3s ease-out;
    z-index: 10;
}

@keyframes checkmarkAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes trustCardPulse {
    0% {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    }
    50% {
        box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
    }
    100% {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    }
}

/* Улучшенный hover для выбранных карточек */
.trust-card--selected:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.45);
}

/* Фокус для доступности */
.trust-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.4);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

/* Анимация при наведении на заголовок */
.trust-card:hover .trust-title {
    color: var(--color-primary-dark);
    transition: color 0.2s ease;
}

/* Подсветка текста в выбранной карточке */
.trust-card--selected .trust-title {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.trust-card--selected .trust-text {
    color: rgba(15, 23, 42, 0.8);
}

/* Мобильная оптимизация */
@media (max-width: 768px) {
    .trust-card {
        padding: 18px;
    }
    
    .trust-card-checkmark {
        width: 24px;
        height: 24px;
        font-size: 14px;
        top: 10px;
        right: 10px;
    }
    
    .trust-card:hover {
        transform: none; /* Отключаем на мобильных для лучшей производительности */
    }
    
    .trust-card--selected:hover {
        transform: none;
    }
}

/* Плавное появление галочки */
.trust-card-checkmark {
    will-change: transform, opacity;
}

/* Улучшенная визуальная обратная связь */
.trust-card:active {
    transform: scale(0.98);
}

.trust-card--selected:active {
    transform: scale(0.98);
}
