/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles */
.site-header {
    background-color: var(--text-primary-color);
    color: var(--background-color);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

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

.main-navigation {
    display: flex;
    justify-content: center;
    flex-grow: 1;
    gap: 2rem;
}

.nav-item {
    color: var(--background-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-1px);
}

.nav-item.active {
    background-color: var(--primary-hover-color);
    font-weight: 600;
}

/* Language Dropdown */
.language-selector .dropdown {
    position: relative;
}

.dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--background-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 0.5rem;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--muted-background-color);
}

.dropdown-item.active {
    background-color: var(--muted-background-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Fullwidth Mode for Search Pages */
.main-content.fullwidth-mode {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content.fullwidth-mode .search-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
}

/* Landing Page Styles */
.hero-section {
    background-color: var(--primary-color);
    color: var(--background-color);
    min-height: 100vh;
    margin: -2rem calc(-50vw + 50%) 0 calc(-50vw + 50%);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 2rem 0;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem;
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 3rem;
    align-items: center;
    min-height: calc(100vh - 4rem);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.85;
    line-height: 1.7;
}

.hero-actions {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 4px 15px rgba(0, 102, 51, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 51, 0.4);
}

.btn-cta {
    background-color: var(--accent-cta-color);
    color: var(--background-color);
}

.btn-cta:hover {
    background-color: var(--accent-light-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.building-svg {
    width: 100%;
    height: 300px;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.2));
}

.building-main {
    fill: var(--primary-color);
    opacity: 0.8;
}

.building-red {
    fill: #dc3545;
    opacity: 0.9;
}

.building-white {
    fill: var(--background-color);
    stroke: #e0e0e0;
    stroke-width: 1;
}

.building-window {
    fill: var(--background-color);
}

.building-window-alt {
    fill: var(--warning-color);
}

.building-window-light {
    fill: var(--background-color);
}

.building-window-dark {
    fill: #333333;
}

.building-window-accent {
    fill: var(--warning-color);
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    margin-top: -3rem;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.features-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary-color);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid var(--border-divider-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-light-color);
}

.feature-icon {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary-color);
    line-height: 1.7;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background-color: var(--primary-color);
    color: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Real Estate Form Styles */
.realestate-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.realestate-form {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-divider-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h2 {
    color: var(--text-primary-color);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-divider-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--muted-background-color);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.1);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
}

.calculate-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background-color: var(--accent-cta-color);
    border: none;
    border-radius: 8px;
    color: var(--background-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.calculate-btn:hover {
    background-color: var(--accent-light-color);
    transform: translateY(-2px);
}

.results-section {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 7rem;
}

.results-container h2 {
    color: var(--text-primary-color);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.total-cost-card {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

.total-cost-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.total-amount {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
}

.results-grid {
    display: grid;
    gap: 1.5rem;
}

.results-card {
    background: var(--muted-background-color);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.results-card h3 {
    color: var(--text-primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-divider-color);
}

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

.breakdown-label {
    font-weight: 500;
    color: var(--text-secondary-color);
}

.breakdown-amount {
    font-weight: 600;
    color: var(--text-primary-color);
}

.roi-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.metric-item.highlight {
    background: rgba(0, 102, 51, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

.metric-label {
    font-weight: 500;
    color: var(--text-secondary-color);
}

.metric-value {
    font-weight: 600;
}

.metric-value.positive {
    color: var(--success-color);
}

.metric-value.negative {
    color: var(--danger-color);
}

.divider {
    height: 1px;
    background: var(--border-divider-color);
    margin: 0.5rem 0;
}

/* Footer Styles */
.site-footer {
    background: var(--text-primary-color);
    color: var(--background-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--background-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--muted-background-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-brand p {
    color: var(--muted-background-color);
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid var(--text-secondary-color);
    padding-top: 1rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--muted-background-color);
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
}

/* RTL Support */
html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .hero-content {
    direction: rtl;
}

html[dir="rtl"] .form-row {
    direction: rtl;
}

html[dir="rtl"] .breakdown-item,
html[dir="rtl"] .metric-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .results-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

html[dir="rtl"] .header-container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .main-navigation {
        order: -1;
        gap: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        min-height: calc(100vh - 2rem);
        padding: 1rem;
    }
    
    .hero-search-container {
        margin-top: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .realestate-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-section {
        position: static;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    html[dir="rtl"] .header-container {
        flex-direction: column;
    }
}

/* Hero Search Container */
.hero-search-container {
    margin-top: 2rem;
}

.hero-search-container .tabs-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.hero-search-container .tab-buttons {
    background: rgba(248, 249, 250, 0.9);
}

.hero-search-container .tab-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
}

.tabs-wrapper {
    background: var(--background-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.tab-buttons {
    display: flex;
    background: var(--muted-background-color);
    border-radius: 12px 12px 0 0;
}

.tab-btn {
    flex: 1;
    padding: 1.5rem 2rem;
    border: none;
    background: transparent;
    color: var(--text-secondary-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(0, 102, 51, 0.1);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--background-color);
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.tab-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.property-types {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.property-type-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary-color);
    transition: color 0.3s ease;
}

.property-type-checkbox:hover {
    color: var(--primary-color);
}

.property-type-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-divider-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.property-type-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.property-type-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: var(--background-color);
    font-size: 12px;
    font-weight: bold;
}

.location-search {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.location-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-divider-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.location-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.1);
}

.search-btn {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 51, 0.3);
}

.search-btn:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 51, 0.4);
}

.estimate-cta {
    text-align: center;
    padding: 2rem;
}

.estimate-content h3 {
    font-size: 1.8rem;
    color: var(--text-primary-color);
    margin-bottom: 1rem;
}

.estimate-content p {
    color: var(--text-secondary-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Search Page Styles */
.search-page {
    max-width: 100vw;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Compact Filters */
.search-filters-compact {
    background: var(--background-color);
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-divider-color);
    flex-shrink: 0;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-label {
    font-weight: 600;
    color: var(--text-primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary-color);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkbox-item .checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-divider-color);
    border-radius: 3px;
}

.filter-input {
    padding: 0.75rem;
    border: 2px solid var(--border-divider-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 180px;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.1);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-input-small {
    padding: 0.75rem;
    border: 2px solid var(--border-divider-color);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 120px;
}

.range-separator {
    color: var(--text-secondary-color);
    font-weight: 500;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.btn-secondary {
    background: var(--text-secondary-color);
    color: var(--background-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--text-primary-color);
    transform: translateY(-1px);
}

/* Search Results Grid */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.property-card {
    background: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--border-divider-color);
    min-width: 0;
    display: flex;
    min-height: 180px;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: var(--accent-light-color);
}

/* Property Images Carousel */
.property-images {
    position: relative;
    width: 280px;
    min-height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

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

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.carousel-btn {
    background: rgba(0,0,0,0.5);
    color: var(--background-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.7);
    transform: scale(1.1);
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

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

.indicator.active {
    background: var(--background-color);
    transform: scale(1.3);
}

/* Property Details */
.property-details {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
}

.property-header {
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.property-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary-color);
    margin-bottom: 0.4rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.main-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success-color);
}

.price-per-sqm {
    font-size: 0.9rem;
    color: var(--text-secondary-color);
    font-weight: 500;
}

.property-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-divider-color);
    flex: 1;
    align-content: flex-start;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-secondary-color);
    font-weight: 500;
}

.spec-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary-color);
    font-size: 0.85rem;
    overflow: hidden;
}

.property-location svg {
    color: var(--danger-color);
    flex-shrink: 0;
}

.property-location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.property-seller {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    flex-shrink: 0;
    min-height: 40px;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.seller-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.seller-name {
    font-weight: 600;
    color: var(--text-primary-color);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seller-type {
    font-size: 0.8rem;
    color: var(--text-secondary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-btn {
    background: var(--success-color);
    color: var(--background-color);
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-btn:hover {
    background: #229954;
    transform: scale(1.1);
}

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    overflow: hidden;
    max-height: 2.5rem;
    align-content: flex-start;
}

.feature-tag {
    background: var(--muted-background-color);
    color: var(--text-secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-divider-color);
}

/* No Results */
.no-results {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    text-align: center;
}

.no-results-content {
    color: var(--text-secondary-color);
}

.no-results-content svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results-content h3 {
    font-size: 1.4rem;
    color: var(--text-primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-divider-color);
    background: var(--background-color);
    position: sticky;
    bottom: 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--background-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: var(--primary-hover-color);
    transform: translateY(-1px);
}

.pagination-info {
    color: var(--text-secondary-color);
    font-weight: 500;
}

/* Mobile Responsive for Search */
@media (max-width: 768px) {
    .search-header-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .search-nav {
        order: -1;
        gap: 1rem;
    }
    
    .search-main {
        height: calc(100vh - 80px);
    }
    
    .search-filters-compact {
        padding: 0.5rem;
    }
    
    .filters-form {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-actions {
        margin-left: 0;
        justify-content: center;
    }
    
    .search-results-split {
        grid-template-columns: 1fr;
    }
    
    .results-map {
        order: -1;
        height: 60vh;
        max-height: 60vh; /* Ensure map doesn't exceed 60% of viewport height */
        flex-shrink: 0; /* Don't let the map shrink */
    }
    
    .results-cards {
        height: 40vh;
        max-height: 40vh;
        padding: 0.75rem;
        overflow-y: auto; /* Ensure cards can scroll on mobile */
    }
    
    .property-card {
        flex-direction: column;
        height: auto;
    }
    
    .property-images {
        width: 100%;
        height: 200px;
    }
    
    .property-specs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .range-inputs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-input-small {
        width: 100%;
    }
    
    .range-separator {
        display: none;
    }
}

/* Split Screen Layout */
.search-results-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
    height: calc(100vh - 140px); /* Account for header (80px) + filters (60px) */
}

.results-cards {
    overflow-y: auto;
    height: 100%;
    padding: 1rem;
    background: var(--muted-background-color);
    flex-shrink: 1; /* Allow cards to shrink if needed */
    min-height: 0; /* Allow flexbox to work properly */
}

.results-summary {
    font-size: 0.9rem;
    color: var(--text-secondary-color);
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    font-weight: 500;
}

.results-cards::-webkit-scrollbar {
    width: 6px;
}

.results-cards::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.results-cards::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.results-cards::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Map Styles */
.results-map {
    height: 100%;
    overflow: hidden;
    flex-shrink: 0; /* Prevent map from shrinking */
}

.map-container {
    background: var(--background-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-divider-color);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-divider-color);
    background: var(--muted-background-color);
}

.map-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary-color);
    margin: 0;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
}

.map-toggle {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-divider-color);
    background: var(--background-color);
    color: var(--text-secondary-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.map-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.map-toggle.active {
    background: var(--primary-color);
    color: var(--background-color);
    border-color: var(--primary-color);
}

.map-placeholder {
    flex: 1;
    position: relative;
    background: var(--muted-background-color);
    min-height: 0;
}

.map-content {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.map-placeholder-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary-color);
    z-index: 1;
}

.map-placeholder-content svg {
    opacity: 0.3;
    margin-bottom: 1rem;
}

.map-placeholder-content h4 {
    font-size: 1.4rem;
    color: var(--text-primary-color);
    margin-bottom: 0.5rem;
}

.map-placeholder-content p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.map-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.feature-badge {
    background: rgba(0, 102, 51, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(0, 102, 51, 0.2);
}

/* Map Pins */
.map-pins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.map-pin {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-pin:hover {
    transform: scale(1.1);
    z-index: 10;
}

.pin-marker {
    background: var(--success-color);
    color: var(--background-color);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: relative;
    white-space: nowrap;
}

.pin-marker::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--success-color);
}

.pin-price {
    font-size: 0.85rem;
}

/* Map Footer */
.map-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-divider-color);
    background: var(--muted-background-color);
}

.map-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary-color);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Desktop Split Screen Optimizations */
@media (min-width: 1024px) {
    .search-results-split {
        height: calc(100vh - 140px); /* Account for header + filters */
        max-height: calc(100vh - 140px); /* Ensure it doesn't exceed screen height */
    }
    
    .results-map {
        max-height: calc(100vh - 140px); /* Constrain map to screen height */
    }
}

@media (max-width: 768px) {
    .map-header {
        padding: 1rem;
    }
    
    .map-legend {
        gap: 1rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .map-features {
        gap: 0.3rem;
    }
    
    .feature-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}
