/* Nachbarschafts Immobilien Plugin - Frontend Styles (CLEAN VERSION) */

:root {
    --nim-primary: #2D5546;
    --nim-secondary: #54595F;
    --nim-accent: #61CE70;
    --nim-light-gray: #f8fafc;
    --nim-gray: #e2e8f0;
    --nim-text: #2D5546;
    --nim-border-radius: 12px;
    --nim-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --nim-shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

/* Reset */
.nim-properties-grid,
.nim-property-card {
    box-sizing: border-box;
}

.nim-properties-grid *,
.nim-property-card * {
    box-sizing: inherit;
}

/* Grid Layout */
.nim-properties-grid {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
    width: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.8s ease-out;
}

.nim-properties-grid.nim-columns-1 { 
    grid-template-columns: 1fr; 
}
.nim-properties-grid.nim-columns-2 { 
    grid-template-columns: repeat(2, 1fr); 
}
.nim-properties-grid.nim-columns-3 { 
    grid-template-columns: repeat(3, 1fr); 
}

/* Ensure grid items (property cards) are properly contained */
.nim-properties-grid > .nim-property-card {
    grid-column: auto;
    grid-row: auto;
}

/* Property Cards - KOMPLETT NEU */
.nim-property-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--nim-border-radius);
    box-shadow: var(--nim-shadow);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    width: 100%;
    box-sizing: border-box;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.8s ease-out;
    animation-fill-mode: both;
    transform-origin: center bottom;
}

.nim-property-card:nth-child(1) { animation-delay: 0.1s; }
.nim-property-card:nth-child(2) { animation-delay: 0.2s; }
.nim-property-card:nth-child(3) { animation-delay: 0.3s; }
.nim-property-card:nth-child(4) { animation-delay: 0.4s; }
.nim-property-card:nth-child(5) { animation-delay: 0.5s; }
.nim-property-card:nth-child(6) { animation-delay: 0.6s; }
.nim-property-card:nth-child(7) { animation-delay: 0.7s; }
.nim-property-card:nth-child(8) { animation-delay: 0.8s; }
.nim-property-card:nth-child(9) { animation-delay: 0.9s; }

.nim-property-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(97, 206, 112, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.nim-property-card:hover::before {
    opacity: 1;
}

.nim-property-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(45, 85, 70, 0.15),
        0 8px 16px rgba(45, 85, 70, 0.1);
    z-index: 2;
    border-color: rgba(97, 206, 112, 0.2);
}

/* Property Image */
.nim-property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.nim-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.nim-property-card:hover .nim-property-image img {
    transform: scale(1.05);
}

/* Badges */
.nim-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--nim-accent);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.nim-property-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 2;
}

.nim-status-available { background: var(--nim-accent); color: white; }
.nim-status-reserved { background: #f59e0b; color: white; }
.nim-status-sold { background: #ef4444; color: white; }
.nim-status-rented { background: var(--nim-secondary); color: white; }

/* Property Content */
.nim-property-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.nim-property-header {
    margin-bottom: 1rem;
}

.nim-property-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.nim-property-title a {
    color: var(--nim-text);
    text-decoration: none;
}

.nim-property-title a:hover {
    color: var(--nim-primary);
}

.nim-property-type {
    display: inline-block;
    background: var(--nim-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Location */
.nim-property-location {
    color: var(--nim-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Price */
.nim-property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nim-primary);
    margin-bottom: 1rem;
}

/* Details */
.nim-property-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.nim-detail-item {
    background: var(--nim-light-gray);
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.8rem;
}

/* Description */
.nim-property-excerpt {
    color: var(--nim-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Features */
.nim-property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.nim-feature {
    background: var(--nim-light-gray);
    color: var(--nim-primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Footer */
.nim-property-footer {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--nim-gray);
}

/* Buttons */
.nim-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.nim-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translate(-50%, -50%);
}

.nim-btn:hover::before {
    width: 200%;
    height: 200%;
}

.nim-btn-primary {
    background: linear-gradient(135deg, var(--nim-primary) 0%, #1e4133 100%);
    color: white;
    flex: 1;
    min-width: 0;
    box-shadow: 0 4px 12px rgba(45, 85, 70, 0.2);
}

.nim-btn-primary:hover {
    background: linear-gradient(135deg, #1e4133 0%, var(--nim-primary) 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 85, 70, 0.3);
}

.nim-btn-secondary {
    background: transparent;
    color: var(--nim-primary);
    border: 2px solid var(--nim-primary);
    flex-shrink: 0;
    white-space: nowrap;
}

.nim-btn-secondary:hover {
    background: var(--nim-primary);
    color: white;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nim-properties-grid.nim-columns-2,
    .nim-properties-grid.nim-columns-3 {
        grid-template-columns: 1fr;
    }
    
    .nim-property-content {
        padding: 1rem;
    }
    
    .nim-property-details {
        grid-template-columns: 1fr;
    }
    
    .nim-property-footer {
        flex-direction: column;
    }
}

/* No Properties Message */
.nim-no-properties {
    text-align: center;
    color: var(--nim-secondary);
    font-size: 1.1rem;
    padding: 2rem;
    grid-column: 1 / -1;
    animation: fadeIn 0.8s ease-out;
}

/* Animations - matching service section style */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Property Content Animations */
.nim-property-content > * {
    position: relative;
    z-index: 2;
}

.nim-property-title,
.nim-property-type,
.nim-property-price {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.nim-property-card:hover .nim-property-title {
    color: var(--nim-primary);
}

.nim-property-card:hover .nim-property-price {
    transform: scale(1.05);
    color: var(--nim-accent);
}

/* Badge animations */
.nim-featured-badge,
.nim-property-status {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.nim-property-card:hover .nim-featured-badge,
.nim-property-card:hover .nim-property-status {
    transform: scale(1.1);
}

/* Detail items subtle animation */
.nim-detail-item {
    transition: all 0.3s ease;
}

.nim-property-card:hover .nim-detail-item {
    background: rgba(97, 206, 112, 0.05);
    transform: translateY(-1px);
}

