/* Стили главной страницы (вынесено для кеширования) */

.home-layout { display: flex; gap: 20px; align-items: flex-start; }
.home-left-column { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-left-column .stats-cards-row { order: -1; }
.home-right-column { width: 400px; flex-shrink: 0; }

@media (max-width: 992px) {
    .home-layout { flex-direction: column; }
    .home-right-column { width: 100%; }
}

.stats-cards-row {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: stretch;
    width: 100%; gap: 15px;
}
.stats-card-item {
    display: flex; flex-direction: column;
    flex: 1 1 calc(25% - 12px); min-width: 220px; max-width: calc(25% - 12px);
}
@media (max-width: 1200px) {
    .stats-card-item { flex: 1 1 calc(33.333% - 10px); max-width: calc(33.333% - 10px); }
}
@media (max-width: 992px) {
    .stats-card-item { flex: 1 1 calc(50% - 8px); max-width: calc(50% - 8px); }
}
@media (max-width: 576px) {
    .stats-card-item { flex: 1 1 100%; max-width: 100%; min-width: 100%; }
}

.stats-cards-row .card-stats { display: flex; flex-direction: column; height: 100%; flex: 1; }
.stats-cards-row .card-stats .card-body { flex: 1; display: flex; align-items: center; padding: 12px 15px !important; }
.stats-cards-row .card-stats .row { width: 100%; margin: 0; align-items: center; }
.stats-cards-row .card-stats .icon-big {
    display: flex; align-items: center; justify-content: center; height: 100%;
    font-size: clamp(1rem, 2.5vw, 1.8rem) !important; min-height: 45px;
}
.stats-cards-row .card-stats .icon-big i { font-size: clamp(1rem, 2.5vw, 1.8rem) !important; }
.stats-cards-row .card-stats .col-stats { display: flex; align-items: center; }
.stats-cards-row .card-stats .numbers { width: 100%; }
.stats-cards-row .card-stats .card-title {
    font-size: clamp(1rem, 2vw, 1.4rem) !important; margin-bottom: 0 !important;
    line-height: 1.2; word-break: keep-all; white-space: normal;
}
.stats-cards-row .card-stats .card-category {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem) !important; margin-top: 0 !important; margin-bottom: 2px !important;
    line-height: 1.2; word-break: keep-all; white-space: normal;
}

.company-card {
    position: relative; border: 1px solid #FBFBFB;
    box-shadow: 0px 5px 22px rgba(0, 0, 0, 0.04); border-radius: 16px;
}
.pro-badge { position: absolute; top: -8px; left: -8px; z-index: 10; }
.pro-badge .badge { font-size: 0.8rem; padding: 0.4rem 0.6rem; border-radius: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.company-logo { max-height: 80px; max-width: 100%; width: auto; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.position-badge .badge-lg {
    font-size: 1.1rem; padding: 0.5rem 0.75rem; border-radius: 50%;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}
.rating-section .stars { font-size: 0.9rem; }
.rating-section .rating-number { font-size: 0.9rem; }
.company-badges .badge { margin-right: 0.25rem; margin-bottom: 0.25rem; }
.reviews-count { display: flex; flex-direction: column; align-items: center; }
.reviews-count i { font-size: 1.2rem; margin-bottom: 0.25rem; }
.card:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.1); transition: box-shadow 0.3s ease; }

@media (max-width: 991.98px) { .company-logo { max-height: 60px; max-width: 100%; } }
@media (max-width: 768px) {
    .position-badge .badge-lg { width: 30px; height: 30px; font-size: 0.9rem; }
    .company-logo { max-height: 50px; max-width: 100%; }
    .rating-section .stars { font-size: 0.8rem; }
    .stats-cards-row .card-stats .icon-big { font-size: clamp(0.9rem, 3vw, 1.5rem) !important; min-height: 35px; }
    .stats-cards-row .card-stats .icon-big i { font-size: clamp(0.9rem, 3vw, 1.5rem) !important; }
    .stats-cards-row .card-stats .card-title { font-size: clamp(0.9rem, 2.5vw, 1.2rem) !important; }
    .stats-cards-row .card-stats .card-category { font-size: clamp(0.65rem, 1.8vw, 0.8rem) !important; }
}
@media (max-width: 576px) {
    .stats-cards-row .card-stats .icon-big { font-size: clamp(0.8rem, 4vw, 1.3rem) !important; min-height: 30px; }
    .stats-cards-row .card-stats .icon-big i { font-size: clamp(0.8rem, 4vw, 1.3rem) !important; }
    .stats-cards-row .card-stats .card-title { font-size: clamp(0.85rem, 3vw, 1.1rem) !important; }
    .stats-cards-row .card-stats .card-category { font-size: clamp(0.6rem, 2vw, 0.75rem) !important; }
    .company-logo { max-height: 40px; max-width: 100%; }
}

#searchForm .form-control { width: 100%; min-width: 0; box-sizing: border-box; }
#searchForm select.form-control {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px 12px; padding-right: 2.5rem;
}
#searchForm .form-group { margin-bottom: 0; }
#searchForm label { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) {
    #searchForm .form-control { font-size: 16px; min-height: 44px; }
    #searchForm label { font-size: 0.8rem; }
}
@media (min-width: 576px) and (max-width: 767.98px) { #searchForm .form-control { font-size: 14px; min-height: 38px; } }
@media (min-width: 768px) and (max-width: 991.98px) { #searchForm .form-control { font-size: 14px; min-height: 38px; } }
@media (min-width: 992px) { #searchForm .form-control { font-size: 14px; min-height: 38px; } }

#location { background-image: none; padding-left: 30px; }
#location::before {
    content: ''; position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 15px; background-size: contain; background-repeat: no-repeat; background-position: center; pointer-events: none;
}
#location option[data-flag="world"]::before { content: '🌍'; margin-right: 5px; }
#location option[data-flag="ru"]::before {
    content: ''; background-image: url('/kaiadmin/assets/img/flags/ru.png');
    background-size: 16px 12px; background-repeat: no-repeat; width: 16px; height: 12px; display: inline-block; margin-right: 5px;
}
