.tariffs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 -20px; /* Выносим обертку чуть шире контента, чтобы компенсировать padding */
}

/*
.tariffs-wrapper.no-scroll .scroll-btn {
    display: none;
}
*/

.tariffs-grid {
    display: flex; /* Переключаем на flex для горизонтальной линии */
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory; /* Магнитный эффект */
    scrollbar-width: none; /* Скрываем скроллбар в Firefox */

    padding: 50px 30px; /* Добавляем вертикальный отступ для теней и горизонтальный для выравнивания */
    margin-top: -10px;  /* Компенсируем лишний отступ сверху, чтобы сетка не уехала */ 

    justify-content: safe center; 
    width: 100%;
}

/* Если браузер совсем старый и не знает safe center (до 2024 года) */
@supports not (justify-content: safe center) {
    .tariffs-grid {
        justify-content: center;
    }
}

.tariffs-grid::-webkit-scrollbar {
    display: none; /* Скрываем скроллбар в Chrome/Safari */
}


/* Стили кнопок */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #1d6fa5;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.scroll-btn.left { left: -20px; }
.scroll-btn.right { right: -20px; }

.tariff-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    min-width: 300px; /* Фиксированная ширина карточки */
    flex: 0 0 auto;
    scroll-snap-align: center; /* Центрируем карточку при остановке */    
}

.tariff-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.tariff-card.popular {
    border: 3px solid #0066ff;
    transform: scale(1);
}

.popular-badge {
    position: absolute;
    top: -15px;
    right: 30px;
    background: linear-gradient(45deg, #0066ff, #00ccff);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.tariff-name {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.tariff-speed {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(45deg, #0066ff, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.tariff-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 2rem;
}

.tariff-price my-lang {
    display: inline-block;
}

.tariff-price span {
    font-size: 1.2rem;
    color: #666;
}

.tariff-features {
    list-style: none;
    margin-bottom: 1rem;
}

.tariff-features li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tariff-features li:before {
    content: '✓';
    color: #0066ff;
    font-weight: bold;
    font-size: 1.2rem;
}

.tariff-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #0066ff, #00ccff);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.tariff-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 102, 255, 0.4);
}

.tariff-card .comment { 
    display: block;   
    font-size: 0.8rem; 
    font-style: italic; 
    color: #999;
    max-width: 250px;
}


@media (max-width: 1024px) {

    .tariffs-grid {
        grid-template-columns: 1fr;
    }

    .tariff-card.popular {
        transform: scale(1);
    }

}

/* Скрываем кнопки на тачскринах, если они мешают (опционально) */
@media (max-width: 768px) {
    /*.scroll-btn { display: none; }*/
    .scroll-btn.left { left: 4px; }
    .scroll-btn.right { right: 4px; }
    .tariff-card { min-width: 85%; } /* На мобилках карточка почти во весь экран */
}