/* Professionelle Immobilien-Grid-Ansicht */
.immobilien-masonry-list {
    margin: 30px 0;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

.masonry-header {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
}

.masonry-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    padding: 30px;
    background: #f8f9fa;
}

.masonry-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.masonry-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.property-card-masonry {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.property-card-masonry .property-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.property-card-masonry .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.masonry-item:hover .property-card-masonry .property-image img {
    transform: scale(1.05);
}

.property-id {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(26, 37, 47, 0.95); /* Dunkler Hintergrund */
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtiler weißer Rand */
}

.property-card-masonry .property-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-card-masonry .property-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50; /* Dunklere Farbe für besseren Kontrast */
    line-height: 1.4;
    margin: 0 0 12px 0;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-masonry .property-details {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.property-card-masonry .property-details .detail {
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-card-masonry .property-price {
    font-size: 20px;
    font-weight: 700;
    color: #007cba;
    margin: 12px 0;
    text-align: center;
    padding: 8px 0;
    border-top: 1px solid #e9ecef;
}

.property-card-masonry .property-link {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.property-card-masonry .property-link:hover {
    background: linear-gradient(135deg, #005a87 0%, #003d5c 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

/* Standort-Slider Verbesserungen */
.immobilien-standort-slider {
    margin: 30px 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.slider-header {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 20px 30px;
}

.slider-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-container {
    position: relative;
    padding: 25px;
    background: #f8f9fa;
}

.slider-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 25px;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slider-item {
    flex: 0 0 320px;
    min-width: 320px;
}

.property-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-content h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50; /* Dunklere Farbe für besseren Kontrast */
    line-height: 1.4;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-details {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.property-details .detail {
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-price {
    margin: 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: #007cba;
    text-align: center;
    padding: 8px 0;
    border-top: 1px solid #e9ecef;
}

.property-link {
    display: inline-block;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.property-link:hover {
    background: linear-gradient(135deg, #005a87 0%, #003d5c 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.slider-prev,
.slider-next {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.slider-prev:hover,
.slider-next:hover {
    background: linear-gradient(135deg, #005a87 0%, #003d5c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 124, 186, 0.4);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
}

.load-more-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #003d5c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 124, 186, 0.4);
}

.load-more-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.load-more-btn.loading {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    position: relative;
}

.load-more-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design - Verbessert für Smartphones */
@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .slider-item {
        flex: 0 0 280px;
        min-width: 280px;
    }
    
    .masonry-header,
    .slider-header {
        padding: 15px 20px;
    }
    
    .masonry-header h3,
    .slider-header h3 {
        font-size: 20px;
    }
    
    .property-card-masonry .property-image,
    .property-image {
        height: 180px;
    }
    
    .property-card-masonry .property-content,
    .property-content {
        padding: 15px;
    }
    
    /* Verbesserte Objekt-ID für Mobile */
    .property-id {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 11px;
        font-weight: 800;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        padding: 15px;
        gap: 15px;
    }
    
    .slider-container {
        padding: 15px;
    }
    
    .slider-item {
        flex: 0 0 250px;
        min-width: 250px;
    }
    
    .property-card-masonry .property-content,
    .property-content {
        padding: 12px;
    }
    
    .property-card-masonry .property-content h4,
    .property-content h4 {
        font-size: 14px;
        color: #1a252f !important;
        font-weight: 700;
    }
    
    .property-card-masonry .property-price,
    .property-price {
        font-size: 18px;
        font-weight: 800;
    }
    
    /* Noch kompaktere Objekt-ID für kleine Bildschirme */
    .property-id {
        top: 6px;
        left: 6px;
        padding: 3px 6px;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.3px;
    }
    
    /* Verbesserte Details für Mobile */
    .property-card-masonry .property-details .detail,
    .property-details .detail {
        font-size: 12px;
        padding: 4px 8px;
        font-weight: 600;
    }
    
    /* Kompaktere Buttons für Mobile */
    .property-card-masonry .property-link,
    .property-link {
        padding: 10px 16px;
        font-size: 13px;
        font-weight: 600;
    }
}

/* Zusätzliche Kontrast-Verbesserungen für bessere Lesbarkeit */
.property-card-masonry .property-content h4,
.property-content h4 {
    color: #1a252f !important; /* Noch dunkler für maximalen Kontrast */
    font-weight: 700; /* Fettere Schrift */
}

.property-card-masonry .property-details .detail,
.property-details .detail {
    color: #495057; /* Dunklere Details */
    font-weight: 600; /* Fettere Schrift für Details */
}

.property-card-masonry .property-price,
.property-price {
    color: #007cba; /* Behält die blaue Farbe für Preise */
    font-weight: 800; /* Noch fetter für Preise */
}

/* Breadcrumb Styles */
.immobilien-location-breadcrumb {
    margin: 10px 0 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb-item {
    color: #007cba;
    text-decoration: none;
}

.breadcrumb-item:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb-location {
    color: #007cba;
    font-weight: 600;
    text-decoration: none;
}

.breadcrumb-location:hover {
    text-decoration: underline;
}

/* Produkt-ID Display */
.immobilien-id-display {
    background: #f8f9fa;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 4px;
    border-left: 4px solid #007cba;
    font-size: 14px;
}

.id-label {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.id-value {
    color: #007cba;
    font-family: monospace;
    font-weight: bold;
}

/* Standort-Slider Styles */
.immobilien-standort-slider {
    margin: 30px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.slider-header {
    background: #007cba;
    color: white;
    padding: 15px 20px;
}

.slider-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.slider-container {
    position: relative;
    padding: 20px;
}

.slider-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slider-item {
    flex: 0 0 300px;
    min-width: 300px;
}

.property-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-id {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 124, 186, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.property-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.property-details {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.property-details .detail {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.property-price {
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
}

.property-link {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: background 0.3s ease;
    margin-top: auto;
}

.property-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.slider-prev,
.slider-next {
    background: #007cba;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-prev:hover,
.slider-next:hover {
    background: #005a87;
}

/* Mauerwerk-Liste Styles */
.immobilien-masonry-list {
    margin: 30px 0;
}

.masonry-header {
    background: #007cba;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
}

.masonry-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.masonry-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.property-card-masonry {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.property-card-masonry .property-image {
    height: 180px;
}

.property-card-masonry .property-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-card-masonry .property-content h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.property-card-masonry .property-details {
    margin: 8px 0;
}

.property-card-masonry .property-price {
    font-size: 16px;
    margin: 8px 0;
}

.property-card-masonry .property-link {
    font-size: 13px;
    padding: 6px 12px;
    margin-top: auto;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.load-more-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.load-more-btn:hover {
    background: #005a87;
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.load-more-btn.loading {
    background: #007cba;
    position: relative;
}

.load-more-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .slider-item {
        flex: 0 0 280px;
        min-width: 280px;
    }
    
    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .property-card-masonry .property-image {
        height: 160px;
    }
    
    .slider-header h3,
    .masonry-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        padding: 15px;
    }
    
    .slider-item {
        flex: 0 0 250px;
        min-width: 250px;
    }
    
    .property-content {
        padding: 12px;
    }
    
    .property-content h4 {
        font-size: 14px;
    }
    
    .property-price {
        font-size: 16px;
    }
}
