/* ============================================================
   ADVANTAGES.CSS - БЛОК "ПОЧЕМУ МЫ"
   Горизонтальная лента с drag-скроллом
   ============================================================ */

.advantages-marquee {
    padding: 20px 0 40px;
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.advantages-marquee .section-title {
    margin-bottom: 15px;
}

/* ============================================================
   ОБЕРТКА И ТРЕК
   ============================================================ */

.advantages-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    cursor: grab;
}

.advantages-marquee-wrapper.dragging {
    cursor: grabbing;
}

/* ============================================================
   ТРЕК С ПЛИТКАМИ
   ============================================================ */

.advantages-marquee-track {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    transition: none;
    will-change: transform;
    width: max-content;
    margin: 0 auto;
    align-items: stretch;
}

/* ============================================================
   ПЛИТКА ПРЕИМУЩЕСТВА
   ============================================================ */

.advantages-marquee-item {
    flex: 0 0 300px;
    max-width: 300px;
    min-width: 300px;
    min-height: 220px;
    background: #2a2a2a;
    border-radius: 16px;
    padding: 20px 20px 20px;
    border: 1px solid #3a3a3a;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.advantages-marquee-item:hover {
    border-color: #5a5a5a;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ===== СТРОКА 1: ИКОНКА + ЗАГОЛОВОК ===== */
.advantages-marquee-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row;
}

.advantages-marquee-item__icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    background: #3a3a3a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #8a8a8a;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.advantages-marquee-item:hover .advantages-marquee-item__icon {
    background: #4a4a4a;
    color: #c0c0c0;
}

.advantages-marquee-item__title {
    font-size: 18px;
    font-weight: 600;
    color: #f0f0f0;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

/* ===== СТРОКА 2: ОПИСАНИЕ ===== */
.advantages-marquee-item__body {
    padding-left: 0;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.advantages-marquee-item__description {
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.5;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ===== КНОПКА "ПОДРОБНЕЙ" ПО ЦЕНТРУ ВНИЗУ ===== */
.advantages-marquee-item__read-more {
    display: inline-block;
    margin: 8px auto 0 auto;  /* auto по центру */
    padding: 6px 20px;  /* Компактные отступы */
    font-size: 13px;
    font-weight: 500;
    color: #8a8a8a;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;  /* Скругленная кнопка */
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
    width: auto;
    min-width: 100px;
    letter-spacing: 0.3px;
}

.advantages-marquee-item:hover .advantages-marquee-item__read-more {
    color: #4a90d9;
    background: rgba(74, 144, 217, 0.08);
    border-color: rgba(74, 144, 217, 0.15);
    transform: translateY(-1px);
}

/* ============================================================
   СТРЕЛКИ-ПОДСКАЗКИ (БЕЗ ТЕКСТА)
   ============================================================ */

.advantages-drag-hint {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.15);
    font-size: 18px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.advantages-marquee:hover .advantages-drag-hint {
    color: rgba(255, 255, 255, 0.30);
}

.advantages-drag-hint i {
    font-size: 18px;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 1024px) {
    .advantages-marquee-item {
        flex: 0 0 300px;
        max-width: 300px;
        min-width: 300px;
        padding: 18px 20px 20px;
    }
    
    .advantages-marquee-item__icon {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .advantages-marquee-item__title {
        font-size: 16px;
    }
    
    .advantages-marquee-item__description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .advantages-marquee-item__read-more {
        font-size: 12px;
        padding: 5px 16px;
        min-width: 80px;
    }
    
    .advantages-marquee-track {
        gap: 20px;
        padding: 0 16px;
    }
    
    .advantages-drag-hint {
        gap: 24px;
        font-size: 16px;
    }
    
    .advantages-drag-hint i {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .advantages-marquee {
        padding: 30px 0 30px;
    }
    
    .advantages-marquee-item {
        flex: 0 0 280px;
        max-width: 280px;
        min-width: 280px;
        padding: 16px 18px 18px;
        border-radius: 14px;
    }
    
    .advantages-marquee-item__header {
        gap: 8px;
    }
    
    .advantages-marquee-item__icon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .advantages-marquee-item__title {
        font-size: 17px;
    }
    
    .advantages-marquee-item__description {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }
    
    .advantages-marquee-item__read-more {
        font-size: 12px;
        padding: 4px 14px;
        min-width: 70px;
    }
    
    .advantages-marquee-track {
        gap: 18px;
        padding: 0 12px;
    }
    
    .advantages-drag-hint {
        gap: 20px;
        font-size: 14px;
        margin-top: 12px;
    }
    
    .advantages-drag-hint i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .advantages-marquee {
        padding: 20px 0 20px;
    }
    
    .advantages-marquee-item {
        flex: 0 0 240px;
        max-width: 240px;
        min-width: 240px;
        padding: 14px 16px 16px;
        border-radius: 12px;
    }
    
    .advantages-marquee-item__header {
        gap: 8px;
    }
    
    .advantages-marquee-item__icon {
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
        font-size: 10px;
        border-radius: 5px;
    }
    
    .advantages-marquee-item__title {
        font-size: 15px;
    }
    
    .advantages-marquee-item__description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .advantages-marquee-item__read-more {
        font-size: 11px;
        padding: 4px 12px;
        min-width: 60px;
    }
    
    .advantages-marquee-track {
        gap: 14px;
        padding: 0 10px;
    }
    
    .advantages-drag-hint {
        gap: 16px;
        font-size: 12px;
        margin-top: 10px;
    }
    
    .advantages-drag-hint i {
        font-size: 12px;
    }
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО
   ============================================================ */

.advantage-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.advantage-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.advantage-modal__content {
    position: relative;
    background: #2a2a2a;
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    padding: 40px 36px;
    border: 1px solid #3a3a3a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
}

.advantage-modal__content.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.advantage-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #8a8a8a;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.advantage-modal__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: rotate(90deg);
}

.advantage-modal__body {
    text-align: center;
}

.advantage-modal__icon {
    width: 80px;
    height: 80px;
    background: #3a3a3a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #8a8a8a;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.advantage-modal__icon i {
    font-size: 36px;
}

.advantage-modal__body h2 {
    font-size: 24px;
    font-weight: 700;
    color: #f0f0f0;
    margin-bottom: 12px;
}

.advantage-modal__divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4a4a4a, #8a8a8a);
    border-radius: 3px;
    margin: 0 auto 20px;
}

.advantage-modal__body p {
    font-size: 16px;
    line-height: 1.8;
    color: #c0c0c0;
    text-align: left;
    padding: 0 4px;
}

.advantage-modal__content::-webkit-scrollbar {
    width: 4px;
}

.advantage-modal__content::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.advantage-modal__content::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

.advantage-modal__content::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

@media (max-width: 768px) {
    .advantage-modal__content {
        padding: 30px 24px;
        max-width: 480px;
        margin: 10px;
    }
    
    .advantage-modal__icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }
    
    .advantage-modal__icon i {
        font-size: 28px;
    }
    
    .advantage-modal__body h2 {
        font-size: 20px;
    }
    
    .advantage-modal__body p {
        font-size: 14px;
    }
    
    .advantage-modal__close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .advantage-modal__content {
        padding: 24px 18px;
        border-radius: 16px;
    }
    
    .advantage-modal__icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
    
    .advantage-modal__icon i {
        font-size: 22px;
    }
    
    .advantage-modal__body h2 {
        font-size: 18px;
    }
    
    .advantage-modal__body p {
        font-size: 13px;
        line-height: 1.6;
    }
}