/* Основные стили для карточек компаний */
.company-ratings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.company-filters {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.filters-form .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.filters-form input[type="text"],
.filters-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 200px;
    flex: 1;
}

.filter-button,
.reset-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.filter-button {
    background: #0073aa;
    color: white;
}

.filter-button:hover {
    background: #005a87;
}

.reset-button {
    background: #f0f0f0;
    color: #333;
}

.reset-button:hover {
    background: #ddd;
}

/* Карточки компаний */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.company-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.company-card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.company-rating {
    margin-right: 15px;
}

.rating-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #28a745;
    color: white;
    border-radius: 8px;
    font-weight: bold;
}

.rating-label {
    font-size: 10px;
    opacity: 0.9;
}

.rating-value {
    font-size: 20px;
    line-height: 1;
}

.company-logo {
    margin-right: 15px;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 5px;
    border: 1px solid #dee2e6;
}

.company-title {
    flex: 1;
    min-width: 0;
}

.company-title h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    line-height: 1.3;
}

.company-title h3 a {
    color: #212529;
    text-decoration: none;
}

.company-title h3 a:hover {
    color: #0073aa;
}

.company-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border-width: 2px;
    border-style: solid;
}

.top-badge {
    padding: 4px 10px;
    background: #ffc107;
    color: #212529;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.company-global-position {
    margin-left: 15px;
}

.position-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #6c757d;
    color: white;
    border-radius: 8px;
    font-weight: bold;
}

.position-label {
    font-size: 10px;
    opacity: 0.9;
}

.position-value {
    font-size: 20px;
    line-height: 1;
}

.company-card-body {
    padding: 20px;
}

.company-description {
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.company-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.detail-label {
    color: #6c757d;
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: #212529;
}

.detail-value.link {
    color: #0073aa;
    text-decoration: none;
}

.detail-value.link:hover {
    text-decoration: underline;
}

.company-categories {
    margin-top: 20px;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.category-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.service-tag {
    background: #e7f1ff;
    color: #0d6efd;
}

.industry-tag {
    background: #d1f7c4;
    color: #198754;
}

.company-card-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

.button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.2s ease;
}

.view-details {
    flex: 1;
    background: #6c757d;
    color: white;
}

.view-details:hover {
    background: #5a6268;
    color: white;
}

.presentation-link {
    background: #0073aa;
    color: white;
}

.presentation-link:hover {
    background: #005a87;
    color: white;
}

/* Пагинация */
.company-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.company-pagination a,
.company-pagination span {
    display: inline-block;
    padding: 8px 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    color: #0073aa;
    text-decoration: none;
}

.company-pagination a:hover {
    background: #f8f9fa;
}

.company-pagination .current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Адаптивность */
@media (max-width: 768px) {
    .companies-grid {
        grid-template-columns: 1fr;
    }

    .company-card-header {
        flex-wrap: wrap;
    }

    .company-rating,
    .company-logo {
        margin-bottom: 10px;
    }

    .company-title {
        order: 3;
        flex-basis: 100%;
        margin-top: 10px;
    }

    .company-global-position {
        margin-left: auto;
    }

    .filters-form .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-form input[type="text"],
    .filters-form select {
        min-width: auto;
        width: 100%;
    }
}