.border-card {
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.border-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.border-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.flag-icon {
    font-size: 1.5rem;
    margin-right: 8px;
}

.load-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.load-low {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.load-medium {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.load-high {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.car-count-container {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.car-count {
    font-weight: bold;
    color: #0d6efd;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    white-space: nowrap;
}

.car-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.border-name {
    cursor: pointer;
    transition: color 0.2s;
    margin-bottom: 1rem;
}

.border-name:hover {
    color: #0d6efd;
}

.border-name i {
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.8em;
    margin-left: 5px;
}

.border-name:hover i {
    opacity: 1;
}

.compact-time {
    font-size: 0.85rem;
    margin-top: auto;
}

.insurance-cta {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #28a745;
}

.insurance-cta .card-body {
    justify-content: space-between;
}

/* Fix large gap in menu */
@media (min-width: 992px) {
    #header .header-nav-main nav>ul>li.dropdown .dropdown-menu {
        margin-top: -20px !important;
    }

    #header .header-nav-main nav>ul>li.dropdown .dropdown-menu li.dropdown-submenu>.dropdown-menu {
        margin-top: -5px !important;
    }
}

.insurance-cta .btn {
    white-space: nowrap;
    margin-top: 1rem;
}

.insurance-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.insurance-content {
    flex: 1;
}

.btn-telegram {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .25rem;
    /* квадратные углы, можно заменить на 0 для полностью прямых */
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Fix for Country Cards Grid - Force layout if Bootstrap/Isotope fails */
@media (min-width: 992px) {

    #cards-container .col-lg-4,
    .sort-destination .isotope-item {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        width: 33.333333%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {

    #cards-container .col-lg-4,
    .sort-destination .isotope-item {
        flex: 0 0 50%;
        max-width: 50%;
        width: 50%;
    }
}