/* Блок тарифов */
.tariffs-container {
    width: 1300px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.tariffs-container h1 {
     text-align: left;
    margin-bottom: 30px;
    font-size: 34px; 
    text-transform: uppercase; 
    font-weight: 600; 
    line-height: 1.3; 
    font-family: Arial, sans-serif; 
}

.tariffs-container.content-container {
    padding-left: 20px; /* Такой же отступ как в других блоках */
}

.tariffs-title-red {
    color: var(--red-accent);
}

.tariffs-title-black {
    color: var(--text-color);
}

.tariffs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--table-shadow);
}

.tariffs-table th, .tariffs-table td {
    padding: 15px;
    text-align: center;
    border-right: 1px solid var(--table-border);
}

.tariffs-table th:last-child, .tariffs-table td:last-child {
    border-right: none;
}

.tariffs-table thead th {
    background-color: var(--table-bg-even);
    font-weight: bold;
    padding-top: 20px;
}

.tariffs-table tbody tr:nth-child(even) {
    background-color: var(--table-bg-even);
}

.tariffs-table tbody tr:nth-child(odd) {
    background-color: var(--table-bg-odd);
}

.tariff-column {
    position: relative;
    padding-top: 10px;
}

.tariff-icon {
    width: 69px;
    height: 69px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tariff-icon img {
    max-width: 100%;
    max-height: 100%;
}

.tariff-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
}

.feature-included {
    display: inline-block;
    width: 41px;
    height: 41px;
    background-image: url('../icons/yes.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.feature-request {
    display: inline-block;
    width: 41px;
    height: 41px;
    background-image: url('../icons/request.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.feature-unlimited {
    display: inline-block;
    width: 41px;
    height: 41px;
    background-image: url('../icons/unlimited.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.feature-dash {
    color: var(--gray);
    font-size: 36px;
}

.select-button {
    background-color: var(--red-accent);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition);
    margin-top: 10px;
    text-transform: uppercase;
    width: 100%;
    max-width: 150px;
}

.select-button:hover {
    background-color: #e62e2e;
}

.price-button {
    background-color: var(--red-accent);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition);
    margin-top: 10px;
    text-transform: uppercase;
    width: 100%;
    max-width: 300px;
}

.price-button:hover {
    background-color: #e62e2e;
}

.service-name {
    text-align: left;
    font-weight: normal;
}

.tariff-price {
    font-weight: bold;
    font-size: 20px;
    margin: 15px 0;
}

/* Фиксированная ширина столбцов тарифов */
.tariffs-table th:nth-child(2),
.tariffs-table td:nth-child(2),
.tariffs-table th:nth-child(3),
.tariffs-table td:nth-child(3),
.tariffs-table th:nth-child(4),
.tariffs-table td:nth-child(4),
.tariffs-table th:nth-child(5),
.tariffs-table td:nth-child(5) {
    width: 230px;
}

/* УБИРАЕМ ВСЕ АНИМАЦИОННЫЕ СТИЛИ ДЛЯ РАМОК */
.tariffs-section .tariff-frame.animate-on-scroll,
.tariffs-section .frame-1.animate-on-scroll,
.tariffs-section .frame-2.animate-on-scroll,
.tariffs-section .frame-3.animate-on-scroll,
.tariffs-section .frame-4.animate-on-scroll {
    opacity: inherit !important; /* Наследуем фиксированные значения */
}

/* Стили для модального окна тарифов */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--red-accent);
    padding-bottom: 10px;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--red-accent);
}

.legend-list {
    list-style: none;
    padding: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    background-color: var(--table-bg-even);
}

.legend-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.legend-text {
    font-size: 14px;
    line-height: 1.4;
}

/* Мобильная версия */
.mobile-tariffs {
    display: none;
}

.mobile-tariff-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--table-shadow);
    border: 2px solid var(--red-accent);
}

.mobile-tariff-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--table-border);
    padding-bottom: 15px;
}

.mobile-tariff-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
}

.mobile-tariff-icon img {
    max-width: 100%;
    max-height: 100%;
}

.mobile-tariff-name {
    font-weight: bold;
    font-size: 20px;
    color: var(--red-accent);
    margin-bottom: 10px;
}

.mobile-tariff-price {
    font-weight: bold;
    font-size: 24px;
    color: var(--text-color);
}

.mobile-feature {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-feature:last-child {
    border-bottom: none;
}

.mobile-feature-name {
    flex: 1;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
}

.mobile-feature-value {
    margin-left: 10px;
    flex-shrink: 0;
}

.mobile-select-button {
    background-color: var(--red-accent);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition);
    text-transform: uppercase;
    width: 100%;
    margin-top: 20px;
    font-size: 16px;
	position: relative;
    overflow: hidden;
}

.mobile-select-button:hover {
    background-color: #e62e2e;
	
}

.mobile-price-button {
    background-color: var(--red-accent);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition);
    text-transform: uppercase;
    width: 100%;
    margin: 20px 0;
    font-size: 16px;
}

.mobile-price-button:hover {
    background-color: #e62e2e;
   position: relative;
    overflow: hidden;
}


/* Адаптивные медиа-запросы для блока тарифов 1100px */

 @media (max-width: 1240px) {
    .tariffs-container {
        width: 100%;
        padding: 0 15px;
        overflow-x: auto;
    }
    
    .tariffs-table {
        min-width: auto; 
        font-size: 13px;
    }
    
    .tariff-frame {
        display: none;
    }
    
    .tariff-icon {
        width: 35px;
        height: 35px;
    }
    
    .tariff-name {
        font-size: 12px;
    }
    
    .select-button {
        padding: 8px 16px;
        font-size: 12px;
        max-width: 120px;
    }
}

    /* Адаптируем позиционирование рамок для средних экранов */
    .frame-1 {
        right: 703px;
    }
    
    .frame-2 {
        right: 473px;
    }
    
    .frame-3 {
        right: 243px;
    }
    
    .frame-4 {
        right: 13px;
    }
}

@media (max-width: 768px) {
    .tariffs-table {
        display: none;
    }
    
    .tariff-frame {
        display: none;
    }
    
    .mobile-tariffs {
        display: block;
    }
    
    .tariffs-container h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 15px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .legend-item {
        flex-direction: column;
        text-align: center;
    }
    
    .legend-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .tariffs-container h1 {
        font-size: 24px;
    }
    
    .mobile-tariff-card {
        padding: 15px;
    }
    
    .mobile-tariff-name {
        font-size: 18px;
    }
    
    .mobile-tariff-price {
        font-size: 20px;
    }
    
    .mobile-feature-name {
        font-size: 13px;
    }
    
    .select-button, .price-button {
        padding: 10px 15px;
        font-size: 14px;
	position: relative;
    	overflow: hidden;
    }   

.select-button::before,
.mobile-select-button::before,
.price-button::before,
.mobile-price-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.7s ease;
}

.select-button:hover::before,
.mobile-select-button:hover::before,
.price-button:hover::before,
.mobile-price-button:hover::before {
    left: 100%;
}

.select-button:active,
.mobile-select-button:active,
.price-button:active,
.mobile-price-button:active {
    transform: translateY(2px) scale(0.98);
    transition: transform 0.1s ease;
}

}

@media (min-width: 769px) {
    .tariff-frame {
        display: block;
    }
    
    .mobile-tariffs {
        display: none;
    }
}

/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Анимации для красных рамок тарифов */
.tariff-frame {
    position: absolute;
    border: 14px solid var(--red-accent);
    border-radius: 40px;
    pointer-events: none;
    display: block;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Убираем фиксированные opacity и устанавливаем начальные значения */
.tariffs-section .frame-1 {
    top: 58px;
    right: 703px;
    width: 244px;
    height: calc(100% - 45px);
    z-index: 1;
    opacity: 0 !important;
    transform: translateY(50px);
}

.tariffs-section .frame-2 {
    top: 58px;
    right: 473px;
    width: 244px;
    height: calc(100% - 45px);
    z-index: 2;
    opacity: 0 !important;
    transform: translateY(50px);
}

.tariffs-section .frame-3 {
    top: 58px;
    right: 243px;
    width: 244px;
    height: calc(100% - 45px);
    z-index: 3;
    opacity: 0 !important;
    transform: translateY(50px);
}

.tariffs-section .frame-4 {
    top: 58px;
    right: 13px;
    width: 244px;
    height: calc(100% - 45px);
    z-index: 4;
    opacity: 0 !important;
    transform: translateY(50px);
}

/* Класс для анимированных рамок с правильными opacity */
.tariff-frame.tariff-frame-animated {
    opacity: 1 !important;
    transform: translateY(0);
}

.tariff-frame.tariff-frame-animated.frame-1 {
    opacity: 0.5 !important;
}

.tariff-frame.tariff-frame-animated.frame-2 {
    opacity: 0.67 !important;
}

.tariff-frame.tariff-frame-animated.frame-3 {
    opacity: 0.80 !important;
}

.tariff-frame.tariff-frame-animated.frame-4 {
    opacity: 1.0 !important;
}



/* Увеличение шрифта цифр в тарифах на 50% для определенных ячеек */

/* Для десктопной версии таблицы */
/* Строка 2: Количество подборов автомобилей по заданным критериям */
.tariffs-table tbody tr:nth-child(2) td:not(.service-name) {
    font-size: 1.5em;
    font-weight: bold;
}

/* Строка 3: Количество участий в торгах на аукционных площадках */
.tariffs-table tbody tr:nth-child(3) td:not(.service-name) {
    font-size: 1.5em;
    font-weight: bold;
}

/* Строка 8: Кол-во включенных в тариф отчетов Carfax/Autocheck */
.tariffs-table tbody tr:nth-child(8) td:not(.service-name) {
    font-size: 1.5em;
    font-weight: bold;
}

/* Строка 9: Предварительный расчет стоимости восстановительных работ по фотографиям */
.tariffs-table tbody tr:nth-child(9) td:not(.service-name) {
    font-size: 1.5em;
    font-weight: bold;
}

/* Для мобильной версии */
/* Количество подборов автомобилей */
.mobile-tariff-card .mobile-feature:nth-child(2) .mobile-feature-value {
    font-size: 1.5em;
    font-weight: bold;
}

/* Количество участий в торгах */
.mobile-tariff-card .mobile-feature:nth-child(3) .mobile-feature-value {
    font-size: 1.5em;
    font-weight: bold;
}

/* Кол-во включенных в тариф отчетов Carfax/Autocheck */
.mobile-tariff-card .mobile-feature:nth-child(8) .mobile-feature-value {
    font-size: 1.5em;
    font-weight: bold;
}

/* Предварительный расчет стоимости восстановительных работ */
.mobile-tariff-card .mobile-feature:nth-child(9) .mobile-feature-value {
    font-size: 1.5em;
    font-weight: bold;
}

/* Адаптивность для увеличенных цифр */
@media (max-width: 768px) {
    .tariffs-table tbody tr:nth-child(2) td:not(.service-name),
    .tariffs-table tbody tr:nth-child(3) td:not(.service-name),
    .tariffs-table tbody tr:nth-child(8) td:not(.service-name),
    .tariffs-table tbody tr:nth-child(9) td:not(.service-name) {
        font-size: 1.3em; /* Немного меньше на мобильных */
    }
    
    .mobile-tariff-card .mobile-feature:nth-child(2) .mobile-feature-value,
    .mobile-tariff-card .mobile-feature:nth-child(3) .mobile-feature-value,
    .mobile-tariff-card .mobile-feature:nth-child(8) .mobile-feature-value,
    .mobile-tariff-card .mobile-feature:nth-child(9) .mobile-feature-value {
        font-size: 1.3em; /* Немного меньше на мобильных */
    }
}

/* Исправления для мобильной версии тарифов */
@media (max-width: 768px) {
    .tariffs-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .tariffs-container {
        width: 100%;
        padding: 0 15px;
    }
    
    .mobile-tariffs {
        display: block !important;
    }
    
    .tariffs-table {
        display: none !important;
    }
    
    .tariff-frame {
        display: none !important;
    }
    
    /* Убедимся, что контент виден */
    .mobile-tariff-card {
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Упрощаем анимации для мобильных */
    .tariffs-section .scroll-animation-element {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Дополнительные исправления для очень маленьких экранов */
@media (max-width: 480px) {
    .tariffs-container h1 {
        font-size: 24px;
        padding: 0 10px;
    }
    
    .mobile-tariff-card {
        margin: 0 5px 20px 5px;
        padding: 15px;
    }
    
    .mobile-feature-name {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .mobile-select-button,
    .mobile-price-button {
        font-size: 14px;
        padding: 12px;
    }
}

/* Убираем конфликтующие анимации */
.tariffs-section .scroll-animation-element {
    animation: none;
}

/* Принудительно показываем мобильную версию на маленьких экранах */
@media (max-width: 768px) {
    .tariffs-section {
        overflow: hidden;
    }
    
    .mobile-tariffs {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }
}