/* Realty Page Styles - STATIC MAP 1536x1536 */
.realty-hero {
    background: linear-gradient(132deg, #000000, #1C1C1C, #131313, #282828);
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.realty-title {
    font-family: 'Druk Wide', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.realty-subtitle {
    font-size: 1.3rem;
    opacity: 0.8;
    color: var(--white);
    max-width: 600px;
    margin: 0 auto;
}

.realty-section {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

/* Stats Section */
.realty-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--yellow);
    box-shadow: 0 15px 30px rgba(255, 180, 0, 0.1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(255, 180, 0, 0.1);
    color: var(--yellow);
    flex-shrink: 0;
}

.stat-icon.available {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.stat-icon.occupied {
    background: rgba(245, 87, 108, 0.1);
    color: #f5576c;
}

.stat-icon.gang-zone {
    background: rgba(255, 105, 180, 0.1);
    color: #ff69b4;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-family: 'Druk Wide', sans-serif;
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Controls */
.realty-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.view-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Druk Wide', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    border-color: var(--yellow);
    color: var(--yellow);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--black);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.control-group:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.control-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.toggle-switch {
    width: 44px;
    height: 22px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    top: 1px;
    left: 2px;
    transition: all 0.3s ease;
}

.control-toggle input[type="checkbox"] {
    display: none;
}

.control-toggle input[type="checkbox"]:checked + .toggle-switch {
    background: var(--yellow);
    border-color: var(--yellow);
}

.control-toggle input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(22px);
    background: var(--black);
}

.search-group {
    flex: 1;
    max-width: 400px;
}

.search-input {
    position: relative;
}

.search-input i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    z-index: 2;
}

.search-input input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input input:focus {
    outline: none;
    border-color: var(--yellow);
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.realty-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    min-height: 600px;
    height: auto;
}

/* Map Container - STATIC 1536x1536 */
.map-container {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Карта 1536x1536 с правильным отображением */
.map-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* House Markers - точное позиционирование для 1536x1536 */
.house-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    border: 2px solid white;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.house-marker.available {
    background: #4facfe;
}

.house-marker.occupied {
    background: #f5576c;
}

.house-marker:hover {
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 100;
}

.marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1000;
    pointer-events: none;
}

.house-marker:hover .marker-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 8px);
}

/* Глобальные стили для территорий банд */
.gang-zones-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.gang-zone {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.4s ease;
    border-radius: 6px;
    overflow: hidden;
}

/* Фон территории */
.zone-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    backdrop-filter: blur(1px);
}

/* Граница территории */
.zone-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Номер территории */
.zone-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    font-family: 'Druk Wide', sans-serif;
    border: 2px solid white;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    white-space: nowrap;
}

/* Подсказка */
.zone-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1000;
    pointer-events: none;
    min-width: 180px;
}

.zone-fraction {
    font-weight: bold;
    color: var(--yellow);
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.zone-id {
    font-weight: 600;
    margin-bottom: 2px;
}

.zone-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
}

/* Поведение при наведении */
.gang-zone:hover {
    z-index: 100 !important;
}

.gang-zone:hover .zone-fill {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.gang-zone:hover .zone-border {
    border-width: 3px;
    box-shadow: 0 0 20px currentColor;
}

.gang-zone:hover .zone-number {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.gang-zone:hover .zone-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-15px);
}

/* Активная территория */
.gang-zone.active {
    z-index: 90;
}

.gang-zone.active .zone-border {
    border-width: 3px;
    box-shadow: 0 0 25px currentColor, 0 0 15px rgba(255, 180, 0, 0.5);
}

.gang-zone.active .zone-number {
    opacity: 1;
    background: rgba(255, 180, 0, 0.9);
    color: black;
}

/* Map Legend */
.sidebar-legend {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 1.5rem;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 40vh;
}

.legend-header {
    margin-bottom: 0.8rem;
}

.legend-header h4 {
    font-family: 'Druk Wide', sans-serif;
    font-size: 0.9rem;
    color: var(--yellow);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.legend-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    flex-shrink: 0;
    margin-top: 2px;
}

.legend-color.available {
    background: #4facfe;
}

.legend-color.occupied {
    background: #f5576c;
}

.legend-color.gang-zone {
    background: linear-gradient(45deg, #CC00FF, #FFCD00, #009F00, #00CCFF, #6666FF);
    position: relative;
}

.legend-color.gang-zone::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.legend-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.legend-title {
    font-weight: 600;
    color: var(--white);
    font-size: 0.85rem;
}

.legend-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

/* Легенда для фракций */
.gang-zones-legend {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    flex-shrink: 0;
}

.legend-title {
    font-family: 'Druk Wide', sans-serif;
    font-size: 0.9rem;
    color: var(--yellow);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.fraction-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fraction-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.fraction-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.fraction-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid;
    flex-shrink: 0;
}

.fraction-name {
    font-size: 0.8rem;
    font-weight: 500;
}

.fraction-count {
    margin-left: auto;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Sidebar */
.houses-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    height: auto;
    min-height: 600px;
    max-height: 80vh;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 180, 0, 0.1);
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-family: 'Druk Wide', sans-serif;
    font-size: 1.2rem;
    color: var(--white);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-count {
    color: var(--yellow);
    font-size: 0.9rem;
    font-weight: 600;
}

.houses-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 300px;
    max-height: calc(80vh - 200px);
}

/* House Cards */
.house-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.house-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.house-card:hover::before {
    left: 100%;
}

.house-card:hover {
    border-color: var(--yellow);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.house-card.available {
    border-left: 4px solid #4facfe;
}

.house-card.occupied {
    border-left: 4px solid #f5576c;
}

.house-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.house-id {
    font-family: 'Druk Wide', sans-serif;
    font-weight: 700;
    color: var(--white);
    font-size: 1.1rem;
    line-height: 1.2;
}

.house-status {
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.house-status.available {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.house-status.occupied {
    background: rgba(245, 87, 108, 0.15);
    color: #f5576c;
    border: 1px solid rgba(245, 87, 108, 0.3);
}

.house-price {
    font-family: 'Druk Wide', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--yellow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.house-owner, .house-coords {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.house-actions {
    margin-top: 0.8rem;
}

.btn-view {
    width: 100%;
    padding: 0.7rem 1rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Druk Wide', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.btn-view:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--black);
    transform: translateY(-1px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    margin: 0 auto;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    top: 50%;
    transform: translateY(-50%);
}

.modal-header {
    padding: 1.8rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 180, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Druk Wide', sans-serif;
    font-size: 1.3rem;
    color: var(--white);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.modal-close:hover {
    background: var(--yellow);
    color: var(--black);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.house-info-grid, .gangzone-info-grid {
    display: grid;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item.full-width {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-badge.available {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.status-badge.occupied {
    background: rgba(245, 87, 108, 0.15);
    color: #f5576c;
    border: 1px solid rgba(245, 87, 108, 0.3);
}

.status-badge.gang-zone {
    background: rgba(255, 180, 0, 0.15);
    color: var(--yellow);
    border: 1px solid rgba(255, 180, 0, 0.3);
}

.price-value {
    font-family: 'Druk Wide', sans-serif;
    font-weight: 700;
    color: var(--yellow);
    font-size: 1.2rem;
}

.fraction-name {
    font-weight: 600;
    color: var(--white);
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Druk Wide', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--yellow);
    color: var(--black);
}

.btn-primary:hover {
    background: #ffa500;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 180, 0, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
    border-color: var(--yellow);
    color: var(--yellow);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1200px) {
    .realty-content {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 1024px) {
    .realty-content {
        grid-template-columns: 1fr 350px;
    }
    
    .map-container {
        height: 500px;
    }
    
    .houses-sidebar {
        height: auto;
        min-height: 500px;
        max-height: 70vh;
    }
    
    .sidebar-legend {
        padding: 1.2rem;
    }
    
    .legend-item {
        padding: 0.7rem;
    }
    
    .legend-color {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    .realty-content {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1.5rem;
    }
    
    .realty-hero {
        padding: 100px 0 40px;
    }
    
    .realty-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .view-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: center;
    }
    
    .search-group {
        max-width: none;
    }
    
    .realty-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .map-container {
        height: 400px;
        order: 2;
    }
    
    .houses-sidebar {
        height: auto;
        min-height: 400px;
        max-height: 60vh;
        order: 1;
    }
    
    .sidebar-legend {
        padding: 1rem;
        max-height: 30vh;
    }
    
    .houses-list {
        padding: 0.8rem;
        max-height: calc(60vh - 150px);
    }
    
    .house-card {
        padding: 1rem;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        top: 20px;
        transform: none;
        margin-bottom: 20px;
    }
    
    .map-container,
    .houses-sidebar {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .realty-title {
        font-size: 2rem;
    }
    
    .filter-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .house-card {
        padding: 1.2rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .map-container {
        height: 350px;
    }
    
    .houses-sidebar {
        height: auto;
        min-height: 350px;
        max-height: 50vh;
    }
    
    .houses-list {
        max-height: calc(50vh - 120px);
    }
    
    .house-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .house-status {
        align-self: flex-start;
    }
}

/* Scrollbar */
.houses-list::-webkit-scrollbar {
    width: 8px;
}

.houses-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.houses-list::-webkit-scrollbar-thumb {
    background: var(--yellow);
    border-radius: 4px;
}

.houses-list::-webkit-scrollbar-thumb:hover {
    background: #ffa500;
}

.sidebar-legend::-webkit-scrollbar {
    width: 6px;
}

.sidebar-legend::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.sidebar-legend::-webkit-scrollbar-thumb {
    background: rgba(255, 180, 0, 0.5);
    border-radius: 3px;
}

.sidebar-legend::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 180, 0, 0.7);
}

/* Protection - полный запрет взаимодействия */
.map-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow: hidden !important;
}

.map-wrapper {
    overflow: hidden !important;
}

.map-image {
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Notification styles */
.realty-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(46, 204, 113, 0.95);
    color: white;
    padding: 1.2rem 1.8rem;
    border-radius: 12px;
    z-index: 10000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transform: translateX(100%);
    transition: transform 0.4s ease;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.realty-notification.error {
    background: rgba(231, 76, 60, 0.95);
}

.realty-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Стили для скрытых элементов */
.house-marker.hidden {
    display: none !important;
}

.houses-list.hidden {
    display: none !important;
}