/* WP Immo Search - Search Results Styles (from original frontend.css) */

/* Results Enhancements */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px 0;
    border-bottom: 2px solid #f1f3f4;
}

.results-count {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.results-total {
    color: #6c757d;
    font-size: 16px;
    margin-left: 8px;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toggle-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.toggle-button:hover {
    border-color: #007cba;
    color: #007cba;
    transform: translateY(-1px);
}

.toggle-button.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.sorting-wrapper select {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sorting-wrapper select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.layout-toggle {
    display: flex;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.layout-button {
    padding: 10px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-button:hover {
    background: #f8f9fa;
}

.layout-button.active {
    background: #007cba;
    color: white;
}

/* Result Items Enhanced */
.result-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #007cba;
}

.result-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.result-item:hover .result-image img {
    transform: scale(1.05);
}

.result-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

.result-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.objektart-badge,
.vermarktungsart-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.objektart-badge {
    background: rgba(0, 124, 186, 0.9);
    color: white;
}

.vermarktungsart-badge {
    background: rgba(255, 107, 107, 0.9);
    color: white;
}

.result-content {
    padding: 24px;
}

.result-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.result-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #007cba;
}

.result-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 16px;
}

.result-details {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 14px;
}

.result-price {
    font-size: 22px;
    font-weight: 800;
    color: #007cba;
    margin-bottom: 20px;
}

.details-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #007cba 0%, #4a90e2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    color: white;
}


/* Enhanced Result Styles (aus frontend.js ausgelagert) */

/* Animation für fadeIn */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item {
    animation: fadeIn 0.3s ease-out;
}

/* Loading States */
.results-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.load-more-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Enhanced No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-icon {
    margin-bottom: 24px;
    opacity: 0.5;
}

.no-results h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #333;
}

/* Enhanced Pagination */
.pagination-info {
    color: #666;
    font-size: 14px;
}

/* Enhanced Grid/List Layout */
.results-container {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}

.layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.layout-list {
    grid-template-columns: 1fr;
}

.layout-list .result-item {
    display: flex;
    align-items: stretch;
}

.layout-list .result-image {
    width: 250px;
    height: auto;
    min-height: 180px;
}

.layout-list .result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.layout-list .result-actions {
    margin-top: auto;
}

/* Card Styles (für neue Card-Variante) */
.result-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.image-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.objektnummer-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}

.card-content {
    padding: 30px 40px;
}

.card-location {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.card-title a {
    color: #333;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--wp-immo-ci-color, #aa9a7f);
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-info {
    flex: 1;
}

.card-details {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.card-price-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--wp-immo-ci-color, #aa9a7f);
}

.card-action {
    margin-left: 16px;
}

/* Mobile Responsive für Cards */
@media (max-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
    
    .layout-list .result-item {
        flex-direction: column;
    }
    
    .layout-list .result-image {
        width: 100%;
        height: 200px;
    }
    
    .card-content {
        padding: 20px 24px;
    }
    
    .card-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .card-action {
        margin-left: 0;
        width: 100%;
    }
    
    .details-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .card-content {
        padding: 16px;
    }
    
    .card-details {
        flex-direction: column;
        gap: 8px;
    }
}