/* Блок "С нами Выгодно" */
.advantages-section {
    background-color: #f8f9fa;
    padding: 40px 20px;
    font-family: 'Rubik', sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

.advantages-container {
    max-width: 100%;
    margin: 0 auto;
}

.advantages-title {
    text-align: center;
    font-size: 42px;
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    color: #333;
    margin-bottom: 30px;
}

.advantages-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.advantages-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 10px;
}

.advantage-slide {
    height: 100%;
    flex: 1;
    min-width: 180px;
    cursor: pointer;
    background: white;
    padding: 25px 17px;
    text-align: center;
    box-shadow: 0 2.5px 7.5px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.advantage-slide:hover {
    transform: translateY(-2.5px);
    box-shadow: 0 4px 12.5px rgba(0, 0, 0, 0.15);
}

.advantage-slide:hover .advantage-title {
    color: #F97316;
}

.advantage-tags {
    position: absolute;
    top: 7.5px;
    left: 7.5px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 80%;
}

.advantage-tag {
    font-size: 10px;
    font-weight: 600;
    font-style: italic;
    padding: 2px 5px;
    border-radius: 2px;
    text-transform: uppercase;
}

.advantage-tag.orange {
    color: #F97316;
    background: rgba(249, 115, 22, 0.1);
}

.advantage-tag.yellow {
    color: #EAB308;
    background: rgba(234, 179, 8, 0.1);
}

.advantage-tag.green {
    color: #22C55E;
    background: rgba(34, 197, 94, 0.1);
}

.advantage-icon {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.advantage-icon svg {
    width: 36px;
    height: 36px;
    color: #333;
    stroke: #333;
}

.advantage-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 7.5px;
    line-height: 1.3;
    /* выравниваем высоту заголовка по 2 строкам */
    line-clamp: 2;
    min-height: 52px; /* 20px * 1.3 * 2 ≈ 52px */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.advantage-title span {
    color: #F97316;
}

.advantage-description {
    font-size: 14px;
    font-family: 'Rubik', sans-serif;
    color: #666;
    line-height: 1.5;
    text-align: left;
}

.advantage-button {
    font-size: 20px;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    color: #666;
    line-height: 1.5;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    margin-top: 7.5px;
    align-self: center; /* не растягиваем на всю ширину карточки */
    display: inline-block; /* ширина по содержимому */
}

.advantage-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #F97316;
    bottom: -2px;
    left: 0;
    transform: skewX(-15deg) rotate(-2deg);
    transition: all 0.2s ease-in-out;
    opacity: 0;
}

.advantage-slide:hover .advantage-button::after {
    opacity: 1;
    background: #EA580C;
    height: 3px;
    bottom: -3px;
}

/* Кнопки навигации слайдера */
.advantages-slider-buttons {
    position: absolute;
    top: 50%;
    left: -5px;
    right: -5px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.advantages-slider:hover .advantages-slider-buttons {
    opacity: 1;
}

.advantages-slider-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.2s ease;
    z-index: 10;
}

.advantages-slider-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.advantages-slider-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

.advantages-slider-button svg {
    width: 32px;
    height: 32px;
    fill: #333;
}

/* делаем карточку колонкой, чтобы распределить контент по вертикали */
.advantage-slide {
    display: flex;
    flex-direction: column;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .advantage-slide {
        flex: 0 0 calc(33.333% - 7px);
    }
}

@media (max-width: 768px) {
    .advantages-section {
        padding: 30px 10px;
    }
    
    .advantages-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .advantage-slide {
        flex: 0 0 calc(50% - 5px);
    }
    
    .advantage-title {
        font-size: 16px;
        /* пересчитываем минимальную высоту под 2 строки на меньшем шрифте */
        line-clamp: 2;
        min-height: 42px; /* 16px * 1.3 * 2 ≈ 41.6px */
    }
    
    .advantage-description {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .advantages-slider-buttons {
        display: none;
    }
}

@media (max-width: 480px) {
    .advantages-title {
        font-size: 20px;
    }
    
    .advantage-slide {
        flex: 0 0 calc(100% - 0px);
        margin-bottom: 10px;
    }
    
    .advantages-track {
        gap: 0;
    }
}