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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-logo {
    font-size: 1.5rem;
    font-weight: 300;
    color: #333;
    text-decoration: none;
    font-family: 'Playfair Display', Georgia, serif;
}

.header-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.currency-toggle {
    display: flex;
    gap: 0;
    background: rgba(0,0,0,0.08);
    border-radius: 20px;
    padding: 2px;
}

.currency-btn {
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 18px;
    transition: all 0.2s;
}

.currency-btn.active {
    background: #2c5530;
    color: white;
}

.currency-btn:hover:not(.active) {
    color: #333;
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-btn-primary {
    background: #2c5530;
    color: white;
}

.nav-btn-primary:hover {
    background: #1e3d22;
}

.nav-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.nav-btn-secondary:hover {
    background: #e0e0e0;
}

.back-btn {
    display: none;
}

.back-btn.visible {
    display: inline-block;
}

/* Map Container */
#map {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 60px);
}

/* Custom Marker Styles */
.neighborhood-marker {
    background: #2c5530;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.neighborhood-marker:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.neighborhood-marker .count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-size: 12px;
}

/* Property Markers */
.property-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
    border: 3px solid white;
}

.property-marker:hover {
    transform: scale(1.2);
}

.property-marker.for-sale {
    background: #22c55e;
}

.property-marker.pending {
    background: #f97316;
}

.property-marker.sold {
    background: #3b82f6;
}

.property-marker.off-market {
    background: #6b7280;
}

.property-marker.rental {
    background: #8b5cf6;
}

/* Info Window Styles */
.gm-style-iw {
    padding: 0 !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
}

.neighborhood-info {
    padding: 15px;
    min-width: 200px;
}

.neighborhood-info h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.1rem;
}

.neighborhood-info p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9rem;
}

.neighborhood-info .view-btn {
    background: #2c5530;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
}

.neighborhood-info .view-btn:hover {
    background: #1e3d22;
}

/* Property Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.property-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .property-modal {
    transform: translateY(0);
}

.modal-header {
    position: relative;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e0e0e0;
}

.modal-title {
    font-size: 1.4rem;
    margin: 0 0 5px 0;
    color: #333;
    padding-right: 40px;
}

.modal-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
    text-transform: uppercase;
}

.status-badge.for-sale {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending {
    background: #ffedd5;
    color: #c2410c;
}

.status-badge.sold {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.off-market {
    background: #f3f4f6;
    color: #4b5563;
}

.status-badge.rental {
    background: #ede9fe;
    color: #6d28d9;
}

.modal-body {
    padding: 20px;
}

.property-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.property-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: 500;
    color: #333;
}

.property-notes {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.property-notes h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #666;
}

.property-notes p {
    margin: 0;
    color: #333;
    font-style: italic;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.modal-btn-primary {
    background: #2c5530;
    color: white;
}

.modal-btn-primary:hover {
    background: #1e3d22;
}

.modal-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.modal-btn-secondary:hover {
    background: #e0e0e0;
}

/* Gallery */
.property-gallery {
    margin-bottom: 20px;
}

.gallery-placeholder {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    height: 200px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 0.9rem;
}

/* Legend */
.map-legend {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 50;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #333;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #666;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 20px;
    height: 14px;
    border-radius: 3px;
    border: 2px solid;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.legend-color.for-sale {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}
.legend-color.pending {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.15);
}
.legend-color.sold {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    opacity: 0.67;
}
.legend-color.off-market {
    border-color: #6b7280;
    background: rgba(107, 114, 128, 0.15);
    opacity: 0.34;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }

    .header-logo {
        font-size: 1.2rem;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .property-modal {
        width: 95%;
        max-height: 90vh;
    }

    .property-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-actions {
        flex-direction: column;
    }

    .map-legend {
        left: 10px;
        bottom: 10px;
        padding: 10px;
    }

    .legend-title {
        font-size: 0.8rem;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    .neighborhood-modal {
        width: 95%;
        max-height: 90vh;
    }
}

/* Neighborhood Modal */
.neighborhood-modal {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .neighborhood-modal {
    transform: translateY(0);
}

.neighborhood-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.neighborhood-stats .stat-item {
    text-align: center;
}

.neighborhood-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c5530;
}

.neighborhood-stats .stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.chart-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.filter-buttons {
    display: flex;
    gap: 0;
}

.filter-btn {
    padding: 5px 12px;
    border: 1px solid #ccc;
    background: white;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.filter-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.filter-btn:not(:first-child) {
    border-left: none;
}

.filter-btn.active {
    background: #2c5530;
    border-color: #2c5530;
    color: white;
}

.filter-btn:hover:not(.active) {
    background: #f0f0f0;
}

.chart-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 15px;
}

.toggle-btn {
    padding: 8px 20px;
    border: 1px solid #2c5530;
    background: white;
    color: #2c5530;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.toggle-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.toggle-btn.active {
    background: #2c5530;
    color: white;
}

.toggle-btn:hover:not(.active) {
    background: #f0f7f0;
}

.chart-container {
    position: relative;
    height: 300px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Neighborhood Modal Tabs */
.neighborhood-tabs {
    display: flex;
    border-bottom: 2px solid #e5e5e5;
    padding: 0 20px;
}

.neighborhood-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.neighborhood-tab:hover {
    color: #333;
}

.neighborhood-tab.active {
    color: #2c5530;
    border-bottom-color: #2c5530;
}

.neighborhood-tab-content {
    display: none;
}

.neighborhood-tab-content.active {
    display: block;
}

/* Units for Sale List */
.for-sale-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.for-sale-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.for-sale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.for-sale-item:hover {
    background: #f0f7f0;
    border-color: #2c5530;
}

.for-sale-item-info {
    flex: 1;
}

.for-sale-item-unit {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 4px;
}

.for-sale-item-details {
    font-size: 0.85rem;
    color: #666;
}

.for-sale-item-right {
    text-align: right;
}

.for-sale-item-price {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c5530;
    margin-bottom: 4px;
}

.for-sale-item-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.for-sale-item-status.for-sale {
    background: #dcfce7;
    color: #166534;
}

.for-sale-item-status.pending {
    background: #ffedd5;
    color: #c2410c;
}

/* Overview Tab */
.overview-content {
    padding: 10px 0;
}

.overview-description {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.overview-stat {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.overview-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #2c5530;
}

.overview-stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.overview-tags {
    margin-bottom: 20px;
}

.overview-tags-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.overview-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.overview-tag {
    background: #e8f5e9;
    color: #2c5530;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
}

.overview-tag.negative {
    background: #fef2f2;
    color: #991b1b;
}

.overview-amenities {
    margin-top: 20px;
}

.overview-amenities-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.overview-amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.overview-amenity {
    background: #f3f4f6;
    color: #374151;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
}
