* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFD700;
    --secondary-color: #1E40AF;
    --success-color: #10B981;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --white: #FFFFFF;
    --red-accent: #EF4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #000;
}

.hero-slide-container {
    display: flex;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.6) 100%);
}

.hero-content {
    position: absolute;
    bottom: 60px;
    left: 150px;
    right: 150px;
    color: white;
    z-index: 10;
    max-width: 800px;
}

.hero-developer {
    display: inline-block;
    background: rgba(102, 126, 234, 0.9);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.hero-address {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-price {
    font-size: 36px;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-price-label {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 100;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.hero-dot.active {
    background: white;
    width: 40px;
    border-radius: 6px;
}

.container {
    display: flex;
    min-height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 150px;
}

@media (max-width: 1400px) {
    .container {
        padding: 0 80px;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }
}

/* Sidebar - Modern Design */
.sidebar {
    width: 350px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.filter-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid rgba(102, 126, 234, 0.3);
}

.filter-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

.reset-filters-top {
    padding: 8px 16px;
    background: transparent;
    border: 2px solid #667eea;
    border-radius: 20px;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-filters-top:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.filter-section {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
}

.sort-section {
    margin-bottom: 16px;
}

.filter-label {
    display: block;
    font-size: 14px;
    color: #4B5563;
    font-weight: 600;
    margin-bottom: 8px;
}

.modern-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    color: #1F2937;
    transition: all 0.3s ease;
}

.modern-select:hover {
    border-color: #667eea;
}

.modern-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.map-toggle-modern {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.map-toggle-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.map-icon {
    font-size: 20px;
}

.filter-group {
    margin-bottom: 0;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    overflow: hidden;
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group-modern {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.checkbox-modern:hover {
    background: rgba(102, 126, 234, 0.05);
}

.checkbox-modern input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.range-inputs-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.range-inputs-modern .modern-select {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
    cursor: pointer;
}

.range-inputs-modern .modern-select:hover {
    border-color: #667eea;
}

.range-inputs-modern .modern-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-input {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modern-input:hover {
    border-color: #667eea;
}

.modern-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.range-separator {
    color: #9CA3AF;
    font-weight: 700;
    flex-shrink: 0;
}

.room-buttons-modern, .material-buttons-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.room-btn-modern, .material-btn-modern {
    padding: 12px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #374151;
}

.room-btn-modern:hover, .material-btn-modern:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.room-btn-modern.active, .material-btn-modern.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.material-buttons-modern {
    grid-template-columns: repeat(2, 1fr);
}

.results-count {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    color: #6B7280;
    text-align: center;
    border-top: 3px solid rgba(102, 126, 234, 0.3);
}

.results-count strong {
    color: #667eea;
    font-size: 18px;
    font-weight: 700;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* Listings grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
    gap: 24px;
}

/* Apartment card - RED BLOCK */
.apartment-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    display: flex;
    flex-direction: row;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.apartment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Image slider - WHITE BLOCK */
.image-slider {
    position: relative;
    width: 60%;
    min-height: 196px;
    overflow: hidden;
    background: #E5E7EB;
    flex-shrink: 0;
}

.slider-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-dark);
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-nav:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slider-nav.prev {
    left: 12px;
}

.slider-nav.next {
    right: 12px;
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--white);
    width: 24px;
    border-radius: 4px;
}

/* Card content - BROWN BLOCK */
.card-content {
    padding: 10px 11px;
    background: var(--white);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
    background: #000000;
    padding: 8px 10px;
    margin: -10px -11px 8px -11px;
    border-radius: 0;
}

.building-info h2 {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 3px;
}

.building-address {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.building-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-bottom: 7px;
    margin-bottom: 7px;
    border-bottom: 1px solid var(--border-color);
}

.tag {
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.tag.installment {
    background: #D1FAE5;
    color: #065F46;
}

.tag.terrace {
    background: #DBEAFE;
    color: #1E40AF;
}

.developer-logo {
    flex-shrink: 0;
}

.developer-logo img {
    height: 28px;
    width: auto;
}

.apartments-list {
    margin-top: 8px;
}

.apartment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.apartment-item:hover {
    background: var(--bg-light);
    padding-left: 8px;
    padding-right: 8px;
    margin: 0 -8px;
    border-radius: 6px;
}

.apartment-item:last-child {
    border-bottom: none;
}

.apartment-specs {
    display: flex;
    gap: 11px;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
    filter: grayscale(100%);
}

.spec-item::before {
    font-weight: bold;
}

.apartment-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.show-more {
    display: block;
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    background: var(--bg-light);
    border: none;
    border-radius: 6px;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more:hover {
    background: var(--border-color);
}

.location-info {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.location-info .location-icon {
    filter: grayscale(100%);
}

/* Map */
.map-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--white);
}

#map {
    width: 100%;
    height: 100%;
}

.close-map {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
    padding: 12px 24px;
    background: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.close-map:hover {
    background: var(--red-accent);
    color: var(--white);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h2 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.no-results p {
    font-size: 16px;
    color: var(--text-light);
}

/* Mobile responsive */
@media (max-width: 1200px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 400px;
    }

    .hero-content {
        bottom: 40px;
        left: 20px;
        right: 20px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-address {
        font-size: 16px;
    }

    .hero-price {
        font-size: 28px;
    }

    .container {
        flex-direction: column;
        padding: 0;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .filter-header {
        padding: 16px;
    }

    .filter-header h2 {
        font-size: 20px;
    }

    .filter-section,
    .filter-group {
        padding: 16px;
    }

    .results-count {
        padding: 16px;
    }

    .main-content {
        padding: 16px;
    }

    .listings-grid {
        gap: 16px;
    }

    .apartment-card {
        flex-direction: column;
    }

    .image-slider {
        width: 100%;
        min-height: 250px;
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
    }

    .developer-logo {
        align-self: flex-start;
    }

    .apartment-specs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .apartment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .room-buttons-modern {
        grid-template-columns: repeat(3, 1fr);
    }

    .material-buttons-modern {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 16px;
    }

    .filter-group h3 {
        font-size: 14px;
    }

    .room-buttons, .material-buttons {
        gap: 6px;
    }

    .room-btn, .material-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .card-content {
        padding: 16px;
    }

    .building-info h2 {
        font-size: 18px;
    }

    .apartment-price {
        font-size: 16px;
    }
}

/* Loading animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.sidebar::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}
