/* ===== ГЛАВНАЯ СТРАНИЦА - РЕЙТИНГ ХОСТИНГОВ ===== */
.hosting-rating-section {
    padding: 60px 0;
    background: #f8fafc;
    min-height: 80vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.rating-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #1e293b;
    line-height: 1.2;
}

.rating-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===== ФИЛЬТРЫ И СОРТИРОВКА ===== */
.filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-group label {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.filter-group select {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover {
    border-color: #9ca3af;
}

.filter-group select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sort-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.sort-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
}

.sort-btn:hover {
    background: #007dc7;
    border-color: #2563eb;
    color: #fff!important;
    transform: translateY(-1px);
}

.sort-btn.active {
    background: #1ec000;
    border-color: #1ec000;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.sort-btn.active:hover {
    background: #1ec000;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

/* ===== КОНТЕЙНЕР КАРТОЧЕК ===== */
.rating-cards-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 60px;
}

/* ===== КАРТОЧКА ХОСТИНГА ===== */
.rating-card {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 25px;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
    margin-bottom: 20px;
    position: relative;
}

.rating-card:hover {
    transform: translateY(-2px);
}

/* Рейтинг в левом верхнем углу */
.rating-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: #eff6ff;
    border-radius: 6px;
    border: 1px solid #dbeafe;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    min-width: 50px;
    height: 30px;
    gap: 5px;
}

.rating-badge::before {
    content: "📊";
    font-size: 16px;
    display: inline-block;
}

.rating-number {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
}

.rating-stars {
    display: none;
}

/* Основная информация */
.rating-card-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

/* Логотип */
.rating-card-logo {
    flex-shrink: 0;
}

.rating-card-logo img {
    max-height: 60px;
    width: auto;
    border-radius: 8px;
}

.rating-card-info {
    flex: 1;
}

/* Блок начального тарифа */
.tariff-block {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: white;
}

/* Заголовок тарифа с тестовым периодом */
.tariff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.starter-tariff-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
}

.starter-tariff-label svg {
    color: #6366f1;
}

/* Стили для тестового периода */
.trial-period {
    text-align: center;
    padding: 6px 10px;
    background: #f0fdf4;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
    min-width: 50px;
}

.trial-value {
    font-size: 14px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 2px;
}

.trial-label {
    font-size: 11px;
    color: #65a30d;
}

/* Особенности тарифа - горизонтальное расположение */
.rating-features {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 60px;
}

.feature-value {
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    line-height: 1.2;
}

.feature-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 3px;
    line-height: 1.2;
}

.feature-divider {
    width: 1px;
    height: 30px;
    background: #e5e7eb;
}

/* Цена - зеленый цвет */
.price-feature .feature-value {
    font-size: 18px;
    font-weight: 800;
    color: #059669;
}

/* Стили для ссылки на все тарифы */
.all-tariffs-link {
    margin-top: 15px;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.all-tariffs-link a {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.all-tariffs-link a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Блок с кнопками */
.rating-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.btn-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    color: #2563eb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-detail:hover {
    border-color: #2563eb;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #007dc8;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #078cdb;
    color: white;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .rating-card {
        grid-template-columns: 1fr 180px;
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .rating-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rating-card-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: center;
        border-top: 1px solid #e5e7eb;
        padding-top: 20px;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .hosting-rating-section {
        padding: 40px 0;
    }
    
    .rating-title {
        font-size: 2.2rem;
    }
    
    .rating-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
        padding: 25px;
    }
    
    .sort-buttons {
        justify-content: stretch;
    }
    
    .sort-btn {
        flex: 1;
        text-align: center;
    }
    
    .rating-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 20px;
        gap: 20px;
    }
    
    .rating-badge {
        top: 10px;
        left: 10px;
        padding: 5px 8px;
        height: 25px;
        min-width: 45px;
    }
    
    .rating-badge::before {
        font-size: 14px;
    }
    
    .rating-number {
        font-size: 14px;
    }
    
    .rating-card-main {
        flex-direction: column;
        margin-top: 0;
    }
    
    .rating-card-logo img {
        max-height: 50px;
    }
    
    .tariff-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .trial-period {
        align-self: flex-end;
        padding: 5px 8px;
        min-width: 45px;
    }
    
    .trial-value {
        font-size: 12px;
    }
    
    .trial-label {
        font-size: 10px;
    }
    
    /* Компактный горизонтальный блок тарифа на мобильных */
    .tariff-block {
        padding: 15px;
    }
    
    .tariff-header {
        margin-bottom: 12px;
    }
    
    .rating-features {
        gap: 12px;
        justify-content: space-between;
    }
    
    .feature {
        min-width: 50px;
        flex: 1;
    }
    
    .feature-value {
        font-size: 14px;
    }
    
    .feature-label {
        font-size: 10px;
    }
    
    .feature-divider {
        height: 25px;
    }
    
    .price-feature .feature-value {
        font-size: 16px;
    }
    
    .all-tariffs-link {
        margin-top: 12px;
        padding-top: 10px;
    }
    
    .all-tariffs-link a {
        font-size: 12px;
    }
    
    .rating-card-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-detail,
    .btn-primary {
        width: 100%;
    }
}

@media (max-width: 640px) {
    /* Горизонтальное расположение характеристик в виде сетки */
    .rating-features {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        align-items: stretch;
    }
    
    .feature-divider {
        display: none;
    }
    
    .feature {
        padding: 8px 4px;
        background: #f8fafc;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        min-width: auto;
    }
    
    .price-feature {
        background: #f0fdf4;
        border-color: #bbf7d0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .rating-title {
        font-size: 1.9rem;
    }
    
    .rating-card {
        padding: 15px;
        gap: 12px;
    }
    
    .rating-badge {
        top: 8px;
        left: 8px;
        padding: 4px 6px;
        height: 22px;
        min-width: 40px;
    }
    
    .rating-badge::before {
        font-size: 12px;
    }
    
    .rating-number {
        font-size: 12px;
    }
    
    .rating-card-logo img {
        max-height: 40px;
    }
    
    .trial-period {
        padding: 4px 6px;
        min-width: 40px;
    }
    
    .trial-value {
        font-size: 11px;
    }
    
    /* Еще более компактный вид на маленьких экранах */
    .tariff-block {
        padding: 12px;
    }
    
    .rating-features {
        gap: 8px;
    }
    
    .feature {
        min-width: 45px;
        padding: 6px 3px;
    }
    
    .feature-value {
        font-size: 13px;
    }
    
    .feature-label {
        font-size: 9px;
    }
    
    .feature-divider {
        height: 20px;
    }
    
    .starter-tariff-label {
        font-size: 0.8rem;
    }
    
    .trial-period {
        padding: 4px 6px;
        min-width: 35px;
    }
    
    .trial-value {
        font-size: 10px;
    }
    
    .trial-label {
        font-size: 9px;
    }
    
    .price-feature .feature-value {
        font-size: 14px;
    }
    
    .all-tariffs-link {
        margin-top: 10px;
        padding-top: 8px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .rating-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .feature {
        padding: 6px 3px;
    }
    
    .feature-value {
        font-size: 12px;
    }
    
    .feature-label {
        font-size: 8px;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rating-card {
    animation: fadeInUp 0.6s ease-out;
}

.rating-card:nth-child(2) { animation-delay: 0.1s; }
.rating-card:nth-child(3) { animation-delay: 0.2s; }
.rating-card:nth-child(4) { animation-delay: 0.3s; }

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== ФОКУС-СТИЛИ ===== */
.sort-btn:focus,
.btn-detail:focus,
.btn-primary:focus,
.filter-group select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ===== УТИЛИТЫ ===== */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}