/* Property card fixes to prevent text overflow */

/* General property card fixes */
.property-card {
    overflow: hidden; /* Ensure no content overflows */
    word-wrap: break-word; /* Allow long words to break */
    hyphens: auto; /* Enable hyphenation for long words */
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 2rem;
}

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

/* Property image container */
.property-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    border-radius: 8px 8px 0 0;
}

.property-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Property badge styles */
.property-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
    z-index: 2;
}

.property-badge.rent {
    background-color: #4CAF50;
}

.property-badge.sale {
    background-color: #2196F3;
}

.property-badge.commercial {
    background-color: #FF9800;
}

/* Property info section */
.property-info {
    padding: 1.25rem;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
}

/* Fix property title overflow */
.property-info h3 {
    font-size: 1.3rem;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #333;
}

/* Fix location text overflow */
.property-location {
    white-space: normal;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix property details overflow */
.property-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
    max-width: 100%;
}

.property-details span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Property price */
.property-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #8B4513;
    margin-top: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .property-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .property-location {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .property-details {
        font-size: 0.8rem;
    }
    
    .property-price {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .property-info {
        padding: 1rem;
    }
    
    .property-info h3 {
        font-size: 1rem;
    }
    
    .property-details {
        column-gap: 0.25rem;
        row-gap: 0.5rem;
    }
    
    .property-details span {
        padding: 0.25rem 0.5rem;
        background-color: rgba(0,0,0,0.05);
        border-radius: 4px;
    }
    
    .property-image {
        height: 180px;
    }
}
