/* ===== LISTINGS.CSS - ОСНОВНЫЕ СТИЛИ ДЛЯ LISTINGS.HTML ===== */

/* Базовые стили Leaflet */
.leaflet-control-attribution.leaflet-control {
    display: none;
}

/* Структура страницы */
html, body {
    overflow: hidden;
    height: 100%;
}

.container.mt-4 {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

.container.mt-4 > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

.container.mt-4 > .row > .col-md-6 {
    padding-left: 15px;
    padding-right: 15px;
}

/* Карта */
#map { 
    height: calc(100vh - 150px) !important;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky !important;
    top: 20px;
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.col-md-6.col-lg-8 {
    padding-right: 0 !important;
}

.leaflet-container {
    width: 100% !important;
    min-width: 100% !important;
}

/* Заголовок на мобильных */
.col-md-6 h2 {
    display: none;
}

/* Карточка поиска */
.card.border-0 {
    border-radius: 0 !important;
    margin-bottom: 0 !important;
}

.card.border-0 .card-body {
    padding-left: 20px;
    padding-right: 20px;
}

/* Карточки объявлений */
.listing-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
    height: 200px;
    overflow: hidden;
}

.listing-card:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Стили для новостроек */
.new-building-card {
    border-left: 4px solid #28a745 !important;
}

.new-building-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
}

.new-building-price {
    color: #28a745 !important;
}

.new-building-marker {
    z-index: 1001 !important;
}

.new-building-feature {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.new-building-feature i {
    color: #28a745;
    width: 12px;
}

.escrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
}

/* Таблица цен в модальном окне */
.price-table {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.price-table table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.price-table th {
    border-bottom: 2px solid #28a745;
    color: #28a745;
    font-weight: 600;
}

.price-table td {
    padding: 8px 4px;
}

.price-table .price-cell {
    color: #28a745;
    font-weight: 600;
}

/* Застройщик */
.developer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.developer-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* Изображения в карточках */
.listing-image-container {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    position: relative;
    height: 120px;
    overflow: hidden;
}

.listing-image-container .carousel-control-prev,
.listing-image-container .carousel-control-next {
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.listing-image-container:hover .carousel-control-prev,
.listing-image-container:hover .carousel-control-next {
    opacity: 0.7;
}

.listing-image-container .carousel-control-prev:hover,
.listing-image-container .carousel-control-next:hover {
    opacity: 1;
}

.listing-image-container .carousel-control-prev {
    left: 10px;
}

.listing-image-container .carousel-control-next {
    right: 10px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 60%;
}

.carousel-indicators-container {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.carousel-indicators button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 0 2px;
    background-color: rgba(255,255,255,0.5);
    border: none;
    opacity: 0.7;
    cursor: pointer;
}

.carousel-indicators button.active {
    background-color: white;
    opacity: 1;
}

/* Контейнер объявлений */
#listings-container {
    height: calc(100vh - 220px);
    overflow-y: auto;
#    padding-right: 10px;
    padding-bottom: 20px;
}

/* Заголовок результатов */
.results-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.results-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.results-header .results-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Содержимое карточек */
.listing-card .card-body {
    padding: 0.75rem;
}

.listing-card .card-title {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card .card-subtitle {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.listing-card .card-text {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.listing-card .card-footer {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    background: transparent;
    border-top: 1px solid #f8f9fa;
}

.listing-card .text-muted i {
    margin-right: 3px;
    width: 12px;
    text-align: center;
    font-size: 0.8rem;
}

.listing-card .text-muted div {
    margin-bottom: 2px;
    line-height: 1.2;
}

/* Модальные окна */
.modal-xl {
    max-width: 95%;
    margin: 1rem auto;
}

.modal-backdrop {
    z-index: 1040;
}

.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    z-index: 1050;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-body {
#    padding: 1.5rem;
}

.modal-gallery .carousel-item img {
    max-height: 60vh;
    object-fit: contain;
}

/* Характеристики в модалке */
.characteristic-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.9rem;
}

/* Похожие и ближайшие объявления */
.similar-listings-section,
.nearby-listings-section {
    background: #f8f9fa;
    border-radius: 12px;
#    padding: 1.5rem;
#    margin-top: 2rem;
}

.similar-listings-scroll,
.nearby-listings-scroll {
    position: relative;
}

.similar-scroll-container,
.nearby-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    padding-bottom: 10px;
}

.similar-listing-item,
.nearby-listing-item {
    flex: 0 0 auto;
    width: 300px;
}

.similar-card,
.nearby-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
}

.similar-card:hover,
.nearby-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #0d6efd;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Миниатюры */
.thumbnails {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
    margin-top: 1rem;
}

.thumbnail-img {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
}

.thumbnail-img:hover,
.thumbnail-img.active {
    border-color: #0d6efd;
    transform: scale(1.05);
}

/* Кнопки действий */
.action-buttons-modal .btn {
    margin: 0.25rem;
    flex: 1;
    min-width: 120px;
}

/* Контактная секция */
.contact-section {
    background: white;
    color: black;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
        border: solid;
    border-width: 1px;
    border-color:var(--bs-border-color-translucent);
        margin-bottom: 0px;
}

.contact-section h5 {
    color: black;
    margin-bottom: 1rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-info-item i {
    width: 20px;
    text-align: center;
}

/* Описание */
.description-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

/* Карта в модалке */
.modal-map-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}

/* Сохраненные поиски */
.saved-search-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.saved-search-item:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.saved-search-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.saved-search-params {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.saved-search-meta {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    justify-content: space-between;
}

.saved-search-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.saved-search-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.empty-saved-searches {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-saved-searches i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Панель управления на карте */
.map-controls-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
    font-size: 0.8rem;
}

.map-controls-panel.collapsed {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.map-controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.map-controls-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-controls-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
}

.map-controls-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.map-controls-body {
    padding: 12px;
    max-height: 60vh;
    overflow-y: auto;
}

.control-group {
    margin-bottom: 12px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: #333;
    margin-bottom: 6px;
}

.control-label i {
    font-size: 0.7rem;
    margin-right: 5px;
    opacity: 0.8;
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.range-inputs .form-control {
    font-size: 0.7rem !important;
    padding: 4px 6px !important;
    height: 28px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
}

.range-inputs .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
    background: white;
}

.range-slider {
    margin: 6px 0;
}

.noUi-target {
    background: rgba(233, 236, 239, 0.7);
    border: none;
    border-radius: 2px;
    box-shadow: none;
    height: 4px;
}

.noUi-connect {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.noUi-handle {
    border: 2px solid white;
    background: #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    width: 12px !important;
    height: 12px !important;
    right: -6px !important;
    top: -5px !important;
}

.noUi-handle:before, .noUi-handle:after {
    display: none;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.filter-btn {
    flex: 1;
    min-width: 40px;
    padding: 4px 6px;
    background: rgba(248, 249, 250, 0.7);
    border: 1px solid rgba(233, 236, 239, 0.5);
    border-radius: 4px;
    font-size: 0.7rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.filter-btn:hover {
    background: rgba(233, 236, 239, 0.8);
    border-color: rgba(222, 226, 230, 0.7);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.filter-group {
    background: rgba(248, 249, 250, 0.5);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-group-title {
    font-weight: 600;
    font-size: 0.7rem;
    color: #495057;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-input-group {
    position: relative;
}

.search-input-group i {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.7rem;
}

.search-input-group input {
    padding-left: 25px !important;
    font-size: 0.7rem !important;
}

.control-actions {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
    margin-top: 8px;
}

.control-actions .btn {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
}

/* Стили для новостроек - таблица цен */
.new-building-prices-table {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.new-building-room-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.new-building-room-type:hover {
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.new-building-room-info {
    flex: 1;
}

.new-building-room-label {
    font-weight: 600;
    color: #333;
}

.new-building-room-area {
    font-size: 0.85rem;
    color: #6c757d;
}

.new-building-room-price {
    font-weight: 600;
    color: #28a745;
    font-size: 1.1rem;
}

/* Карточки квартир */
.new-building-apartments-list {
    max-height: 600px;
    overflow-y: auto;
}

.new-building-apartment-card {
    display: flex;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.new-building-apartment-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
    transform: translateY(-2px);
}

.new-building-apartment-image {
    width: 100px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-building-apartment-image-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.new-building-apartment-info {
    flex: 1;
    padding: 15px;
}

.new-building-apartment-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.new-building-apartment-type {
    min-width: 100px;
}

.new-building-apartment-floor {
    min-width: 80px;
}

.new-building-apartment-finishing {
    min-width: 40px;
}

.new-building-apartment-building {
    flex: 1;
    min-width: 120px;
}

.new-building-apartment-price {
    min-width: 120px;
    text-align: right;
}

.new-building-apartment-actions {
    min-width: 40px;
}

/* Пагинация */
.pagination {
    margin-bottom: 0;
}

.pagination .page-item.active .page-link {
    background-color: #28a745;
    border-color: #28a745;
}

.pagination .page-link {
    color: #28a745;
}

.pagination .page-link:hover {
    color: #1e7e34;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Аккордеон для квартир */
.apartments-list .accordion-button:not(.collapsed) {
    background-color: #e8f5e8;
    color: #198754;
}

.apartments-list .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(25, 135, 84, 0.2);
}

.apartments-list .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23198754'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.apartments-list .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23198754'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.apartment-item:hover {
    background-color: #f9f9f9;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px !important;
    padding-right: 4px !important;
    border-radius: 3px;
}

/* Popover профиля */
.user-profile-popover .popover {
    max-width: 350px;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.user-profile-popover .popover-header {
    background-color: transparent;
    border-bottom: 1px solid #eaeaea;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.user-profile-popover .popover-body {
    padding: 1rem;
}

.user-profile-popover .avatar-quick {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-profile-popover .stat-item {
    padding: 0.5rem 0;
}

.user-profile-popover .stat-value {
    font-size: 1.1rem;
    line-height: 1.2;
}

.user-profile-popover .stat-label {
    font-size: 0.75rem;
    line-height: 1.2;
}

.user-profile-popover .contact-item {
    padding: 0.25rem 0;
}

.user-profile-popover .quickview-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Ссылка на профиль */
.user-profile-quickview {
    transition: all 0.2s;
    position: relative;
}

.user-profile-quickview:hover {
    color: #0a58ca !important;
    text-decoration: underline !important;
}

.user-profile-quickview .fa-info-circle {
    font-size: 0.8em;
    opacity: 0.7;
}

.user-profile-quickview:hover .fa-info-circle {
    opacity: 1;
}

/* Мобильная навигация */
.navbar-collapse.collapsing {
    transition: height 0.35s ease;
}

/* Мобильная панель поиска */
.mobile-search-panel {
    transition: all 0.3s ease;
}

.mobile-search-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-search-toggle i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.mobile-search-toggle.collapsed i.fa-chevron-down {
    transform: rotate(-90deg);
}

/* Анимации */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

@keyframes bell-ring {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

/* Выделенные маркеры */
.highlighted-marker {
    animation: pulse 1.5s infinite;
}

.highlighted-marker-static {
    filter: drop-shadow(0 0 6px rgba(13, 110, 253, 0.8));
    transform: scale(1.1);
    transition: transform 0.3s ease;
    z-index: 1000 !important;
}

/* Подписки и уведомления */
.bg-purple {
    background-color: #6f42c1 !important;
}

.subscription-btn {
    min-width: 140px;
    transition: all 0.2s;
}

.subscription-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.fa-bell {
    animation: bell-ring 2s infinite;
}

.btn-primary .fa-bell {
    animation: none;
}

/* Убираем границы у карточки поиска */
.mobile-search-panel {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    background-color: transparent !important;
}

.mobile-search-panel .card-body {
    background-color: white;
    border-radius: 12px;
    border: none !important;
}

/* Анимация для стрелки аккордеона */
.transition-all {
    transition: transform 0.3s ease;
}

[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg) !important;
}

/* ===== DASHBOARD.HTML - Личный кабинет ===== */
/* [ВАЖНО] Эти стили можно заменить альтернативными версиями */

/* Боковая панель */
.row .col-md-3 .card:first-child {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.row .col-md-3 .card:first-child .card-body.text-center {
    padding: 1.5rem;
}

.fa-user-circle.fa-3x.text-primary {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.card-body.text-center h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.card-body.text-center .text-muted {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Кнопки редактирования профиля */
.card.mt-3 .card-body {
    padding: 1rem;
}

.card.mt-3 .btn {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
}

/* Статистика в дашборде */
.card.mt-3:last-child .card-body {
    padding: 1rem;
}

.card.mt-3:last-child h6 {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Основной контент дашборда */
.col-md-9 {
    padding-left: 2rem;
}

.col-md-9 h4 {
    font-weight: 700;
    color: #333;
    margin: 0;
}

.d-flex.justify-content-between.align-items-center.mb-4 .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
}

.d-flex.justify-content-between.align-items-center.mb-4 .btn-primary i {
    margin-right: 0.5rem;
}

/* Карточки объявлений в дашборде */
.col-md-6.mb-4 {
    margin-bottom: 1.5rem;
}

.col-md-6.mb-4 .card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.col-md-6.mb-4 .card:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.col-md-6.mb-4 .card .card-body {
    padding: 1.25rem;
}

.col-md-6.mb-4 .card .card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #333;
    line-height: 1.3;
}

.col-md-6.mb-4 .card .text-primary {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #0d6efd !important;
}

.col-md-6.mb-4 .card .card-text small.text-muted {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Статус и дата в дашборде */
.col-md-6.mb-4 .card .d-flex.justify-content-between.align-items-center {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f8f9fa;
}

/* Кнопки управления в дашборде */
.col-md-6.mb-4 .card .card-footer {
    background-color: white;
    border-top: 1px solid #f8f9fa;
    padding: 1rem 1.25rem;
}

.col-md-6.mb-4 .card .btn-group.w-100 {
    display: flex;
    gap: 0.25rem;
}

.col-md-6.mb-4 .card .btn-group.w-100 .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* Пустые объявления в дашборде */
.dashboard-empty-state .text-center.py-5 {
    padding: 3rem 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 2rem;
}

.dashboard-empty-state .fa-home.fa-4x.text-muted {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #adb5bd;
}

.dashboard-empty-state h4 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.dashboard-empty-state p.text-muted {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Адаптивность для квартир */
@media (max-width: 1200px) {
    .new-building-apartment-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .new-building-apartment-type,
    .new-building-apartment-floor,
    .new-building-apartment-building,
    .new-building-apartment-price {
        flex: 1;
        min-width: calc(50% - 10px);
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    /* Основные стили */
    .container.mt-4 > .row > .col-md-6 {
        padding-right: 15px !important;
        padding-bottom: 15px !important;
    }



    .mt-4{

#        margin-top:0px !important;
        padding-right:0px;


    }


    html, body {
        overflow: auto;
    }
    
    .container.mt-4 {
        margin-top: 1rem !important;
    }
    
    #map {
        height: 400px !important;
        position: relative !important;
        top: 0 !important;
        margin-bottom: 1rem;
    }
    
    #listings-container {
        height: auto;
        overflow: visible;
    }
    
    .listing-image-container .carousel-control-prev,
    .listing-image-container .carousel-control-next {
        display: none !important;
    }
    
    .price-table {
        padding: 10px;
    }
    
    .price-table table {
        font-size: 0.8rem;
    }
    
    /* Похожие объявления */
    .similar-listing-item,
    .nearby-listing-item {
        width: 250px;
    }
    
    /* Карточки квартир */
    .new-building-apartment-card {
        flex-direction: column;
    }
    
    .new-building-apartment-image {
        width: 100%;
        height: 80px;
    }
    
    .new-building-apartment-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .new-building-apartment-type,
    .new-building-apartment-floor,
    .new-building-apartment-building,
    .new-building-apartment-price {
        min-width: 100%;
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid #f8f9fa;
        padding-bottom: 5px;
    }
    
    .new-building-apartment-actions {
        text-align: center;
        padding-top: 10px;
    }
    
    /* Мобильная панель поиска */
    .mobile-search-panel .form-control,
    .mobile-search-panel .form-select {
        font-size: 16px !important;
        min-height: 44px;
    }
    
    .mobile-search-panel .btn {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Панель управления картой */
    #map-controls {
        display: none !important;
    }
    
    .map-controls-panel {
        width: 90%;
        left: 5%;
        bottom: 10px;
        max-width: 300px;
    }
    
    .map-controls-panel.collapsed {
        width: 40px;
        height: 40px;
        left: 10px;
        bottom: 10px;
    }
    
    .range-inputs {
        grid-template-columns: 1fr;
    }
    
    /* Дашборд */
    .col-md-3, .col-md-9 {
        width: 100%;
        padding: 0;
    }
    
    .col-md-9 {
        margin-top: 1.5rem;
        padding-left: 0;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 a {
        width: 100%;
        text-align: center;
    }
    
    .btn-group.w-100 {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group.w-100 .btn {
        width: 100%;
        margin: 0;
    }
    
    .col-md-6.mb-4 {
        margin-bottom: 1rem;
    }
    
    .card-img-top {
        height: 180px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .text-primary {
        font-size: 1rem;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 .btn-primary {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .mobile-search-content.show {
        max-height: 80vh;
        overflow-y: auto;
        padding-right: 5px;
    }
    
    /* Кастомный скроллбар */
    .mobile-search-content.show::-webkit-scrollbar {
        width: 4px;
    }
    
    .mobile-search-content.show::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .mobile-search-content.show::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 2px;
    }
    
    .mobile-search-content.show::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

/* На десктопе */
@media (min-width: 769px) {
    .mobile-search-toggle {
        display: none;
    }
    
    .mobile-search-content {
        display: block !important;
        opacity: 1 !important;
        max-height: none !important;
    }
    
    #mobileSearchCollapse.collapse:not(.show) {
        display: block !important;
    }
    
    .mobile-search-panel .card-body {
        padding: 1rem !important;
    }
}

/* Анимация появления */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-controls-panel {
    animation: slideInUp 0.3s ease;
}

.map-controls-panel.collapsed .map-controls-body,
.map-controls-panel.collapsed .map-controls-header h6 {
    display: none;
}

.map-controls-panel.collapsed .map-controls-header {
    padding: 8px;
    justify-content: center;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 50%;
}

.map-controls-panel.collapsed .map-controls-toggle {
    transform: rotate(180deg);
}

.mini-icon {
    display: none;
}

.map-controls-panel.collapsed .mini-icon {
    display: block;
    font-size: 1rem;
}

/* Вспомогательные классы */
.listing-item.visible {
    display: block;
}

.listing-item.hidden {
    display: none;
}

.carousel {
    cursor: default;
}

.listing-image-container img {
    cursor: pointer !important;
}

/* Показатели */
.listing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 1.5rem;
    color: #0d6efd;
    margin-bottom: 0.5rem;
}

/* Улучшение для сообщения об ошибке загрузки изображения */
img[onerror] {
    object-fit: contain;
    padding: 20px;
    background-color: #f8f9fa;
}

/* Прокрутка в мобильном поиске */
.mobile-search-content.show {
    animation: slideDown 0.3s ease-out;
}

/* Иконки фильтров */
.filter-icon {
    font-size: 0.7rem;
    margin-right: 4px;
    width: 12px;
    text-align: center;
}

/* Ховер эффекты */
.map-controls-panel:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Бейдж результатов */
.results-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    margin-left: 4px;
    font-weight: normal;
}

/* Компактный заголовок */
.compact-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Улучшенный дизайн для квартир */
.apartment-item:last-child {
    border-bottom: none !important;
}

/* Анимация раскрытия */
.apartments-list .accordion-collapse {
    transition: all 0.3s ease;
}

/* Мобильная навигация */
@media (max-width: 991px) {
    .navbar-collapse {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #6c757d #343a40;
    }
    
    .navbar-collapse::-webkit-scrollbar {
        width: 6px;
    }
    
    .navbar-collapse::-webkit-scrollbar-track {
        background: #343a40;
    }
    
    .navbar-collapse::-webkit-scrollbar-thumb {
        background-color: #6c757d;
        border-radius: 3px;
    }
    
    .navbar {
        min-height: 60px;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .navbar-brand {
        font-size: 0.75rem;
    }
    
    .navbar-toggler {
        padding: 0.2rem 0.4rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .nav-link i {
        font-size: 0.8rem;
        margin-right: 0.25rem;
    }
}




/* Стили для маркеров на карте */
.new-building-marker {
    /* Новостройки - зеленый */
    filter: drop-shadow(0 2px 4px rgba(40, 167, 69, 0.3));
}

.secondary-marker {
    /* Вторичка - синий */
    filter: drop-shadow(0 2px 4px rgba(13, 110, 253, 0.3));
}

.commercial-marker {
    /* Коммерческая - фиолетовый */
    filter: drop-shadow(0 2px 4px rgba(111, 66, 193, 0.3));
}

.cottage-marker {
    /* Коттеджи - оранжевый */
    filter: drop-shadow(0 2px 4px rgba(253, 126, 20, 0.3));
}

.default-marker {
    /* По умолчанию - серый */
    filter: drop-shadow(0 2px 4px rgba(108, 117, 125, 0.3));
}

/* Подсветка маркеров при наведении */
.highlighted-marker {
    transform: scale(1.2);
    transition: transform 0.2s ease;
    z-index: 1000 !important;
}

/* Легенда для карты (можно добавить в панель управления) */

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.legend-text {
    color: #333;
}

/* Стили для легенды карты */
.map-legend {

    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 180px;
}

.map-legend .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    line-height: 1.2;
}

.map-legend .legend-item:last-child {
    margin-bottom: 0;
}

.map-legend .legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.map-legend .legend-text {
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Стили для маркеров на карте */
.new-building-marker,
.secondary-marker,
.commercial-marker,
.cottage-marker,
.default-marker {
    transition: transform 0.2s ease;
}

.new-building-marker:hover,
.secondary-marker:hover,
.commercial-marker:hover,
.cottage-marker:hover,
.default-marker:hover {
    transform: scale(1.1);
    z-index: 1000 !important;
}

/* Подсветка маркеров при наведении */
.highlighted-marker {
    transform: scale(1.3);
    transition: transform 0.2s ease;
    z-index: 1001 !important;
    filter: brightness(1.2) drop-shadow(0 3px 6px rgba(0,0,0,0.3));
}

/* Стили для интерактивной легенды карты с прозрачным фоном */
.map-legend {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    z-index: 1000;
    pointer-events: auto !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .map-legend {
        max-width: 180px !important;
        font-size: 10px;
    }
    
    .legend-content {
        font-size: 10px !important;
        max-width: 180px !important;
    }
    
    .legend-item {
        padding: 3px 0 !important;
    }
    
    .legend-color {
        width: 10px !important;
        height: 10px !important;
        margin-right: 6px !important;
    }
    
    .legend-text {
        font-size: 10px !important;
    }
    
    .legend-count {
        font-size: 9px !important;
        padding: 1px 4px !important;
        min-width: 18px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .map-legend {
        max-width: 160px !important;
    }
    
    .legend-content {
        max-width: 160px !important;
    }
    
    .legend-header span {
        font-size: 9px !important;
    }
    
    .legend-body {
        padding: 6px !important;
        max-height: 220px !important;
    }
}

/* Плавные переходы */
.map-legend * {
    transition: all 0.2s ease;
}

/* Улучшаем читаемость на светлом фоне карты */
.leaflet-bottom.leaflet-right .map-legend {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Для темной темы карты (если используется) */
.leaflet-container.dark-theme .map-legend {
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
}

.leaflet-container.dark-theme .legend-content {
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
}

.leaflet-container.dark-theme .legend-text {
    color: white !important;
}

.leaflet-container.dark-theme .legend-header {
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
}

.leaflet-container.dark-theme .legend-count {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Исправление для прозрачного фона легенды на всех устройствах */
.map-legend .legend-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* Для темной темы или при определенных условиях */
.leaflet-container .map-legend .legend-content {
    background: rgba(255, 255, 255, 0.95) !important;
}

/* Легенда на мобильных */
@media (max-width: 768px) {
    .map-legend .legend-content {

        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(1px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
}

/* Для лучшей читаемости текста */
.map-legend .legend-text,
.map-legend .legend-count {
    color: #333 !important;
}

.map-legend .legend-header {
    color: #333 !important;
}

/* Исправление скроллбара */
.map-legend .legend-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3) !important;
}

.map-legend .legend-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.4) !important;
}

.calendar-day.blocked {
    background-color: #d6d8db !important;
    color: #383d41 !important;
}

.legend-color.blocked {
    background-color: #d6d8db !important;
}

.listing-image {
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa 25%, #e9ecef 25%, #e9ecef 50%, #f8f9fa 50%, #f8f9fa 75%, #e9ecef 75%);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: -1;
}

.listing-image-container {
    position: relative;
    overflow: hidden;
}

.listing-image-container .fas {
    font-size: 48px;
    color: #adb5bd;
}

/* Стили для детальной страницы объявления */
.listing-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eaeaea;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-color: #0d6efd;
}

.thumbnail-img {
    transition: all 0.2s;
    opacity: 0.7;
}

.thumbnail-img:hover,
.thumbnail-img.active {
    opacity: 1;
    border-color: #0d6efd;
}

/* Стили для маркеров на карте */
.custom-marker-new-building {
    background: none !important;
    border: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Стили для бейджей */
.badge {
    font-size: 0.75em;
    padding: 0.35em 0.65em;
}

/* Стили для таблицы квартир */
.table th {
    background-color: #f8f9fa;
    border-top: none;
}

.table tbody tr:hover {
    background-color: #f8fdff;
}

/* Стили для карусели */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    background-color: rgba(0,0,0,0.1);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(0,0,0,0.2);
}

.btn-close {
    filter: none !important;
    opacity: 0.7 !important;
    padding:20px !important;
}

.btn-close:hover {
    opacity: 1 !important;
}


/* Добавьте в секцию <style> */
.building-features-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.feature-checkbox {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.feature-checkbox:hover {
    background-color: #e9ecef;
}

.feature-checkbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.feature-checkbox label {
    cursor: pointer;
    margin: 0;
    font-size: 0.95rem;
}

/* Иконки для категорий */
.feature-category {
    border-left: 4px solid;
    padding-left: 10px;
    margin-bottom: 15px;
}

.feature-category.security {
    border-left-color: #dc3545;
}

.feature-category.parking {
    border-left-color: #007bff;
}

.feature-category.sports {
    border-left-color: #28a745;
}

.feature-category.infrastructure {
    border-left-color: #ffc107;
}

.feature-category.comfort {
    border-left-color: #17a2b8;
}

/* Анимация для выбранных чекбоксов */
.feature-checkbox input:checked + label {
    font-weight: 600;
    color: #007bff;
}


/* Стили для особенностей дома */
.feature-card {
    transition: all 0.3s ease;
    border-left: 4px solid #0d6efd !important;
    background-color: white;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #f8faff !important;
}

.feature-icon {
    background-color: rgba(13, 110, 253, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.3rem;
    color: #0d6efd;
}

.feature-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
}

.feature-status {
    font-size: 0.85rem;
}

/* Стили для таблеток-фич */
.feature-tag {
    transition: all 0.2s ease;
    cursor: default;
    white-space: nowrap;
}

.feature-tag:hover {
    transform: translateY(-2px);
    background-color: rgba(13, 110, 253, 0.15) !important;
    border-color: #0d6efd !important;
}

/* Добавьте в style секцию add_listing.html */
.completeness-indicator {
    transition: all 0.3s ease;
}

.progress {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.5s ease;
}

.recommendation-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid;
}

.recommendation-item.high-priority {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.recommendation-item.medium-priority {
    border-left-color: #ffc107;
    background: #fff9e6;
}



/* Стили для рейтинга полноты */
.stars-container-v3 {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 8px 0;
}

.star-v3 {
    color: #ddd;
    font-size: 24px;
    cursor: default;
    transition: color 0.2s;
}

.star-v3.active {
    color: #ffc107;
}

.rating-score-v3 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.rating-tooltip-v3 {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    max-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
}

.rating-tooltip-v3::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.card-body:hover .rating-tooltip-v3 {
    opacity: 1;
    visibility: visible;
}

.tooltip-title-v3 {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.tooltip-progress-v3 {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tooltip-progress-bar-v3 {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.tooltip-desc-v3 {
    font-size: 14px;
    color: #666;
}
.description-section{
word-wrap: break-word; overflow-wrap: break-word; word-break: break-word;
}