/* Property Listings Styles */
.property-listings {
    max-width: 1200px;
    margin: 0 auto; /* centers the container */
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(166, 111, 20, 0.2);
    margin-top: 2rem;
}

.property-listings h2 {
    width: 100%;
    color: rgba(166, 111, 20, 1);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Define grid with fixed 300px columns that centers items */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px); /* fixed width cards */
    gap: 2rem;
    justify-content: center; /* center grid items */
    margin: 0 auto; /* center grid container */
}

/* Property Card Styles */
.property-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Make the entire card clickable */
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative; /* Added to allow absolute positioning of overlay */
}

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

.property-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative; /* Added to position the property-id div */
}

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

/* Property detail overlay styles - updated to cover entire card */
.property-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    border-radius: 15px; /* Match the card's border radius */
}

.property-card:hover .property-detail-overlay {
    opacity: 1;
}

.overlay-content {
    color: white;
    text-align: center;
    padding: 1rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.property-card:hover .overlay-content {
    transform: translateY(0);
}

.detail-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.overlay-content span {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Added new styles for SVG icon */
.detail-icon-svg {
    display: block;
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
}

/* New style for property ID display */
.property-id {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #000;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: normal;
    z-index: 2;
}

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

.property-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.property-content h3 {
    color: rgba(166, 111, 20, 1);
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 0rem;
}

.property-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    max-height: 4.8em;
}

.property-details {
    padding: 1rem;
}

.property-specs {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(166, 111, 20, 0.1);
}

.property-spec {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.property-spec i {
    color: rgba(166, 111, 20, 0.8);
    font-size: 1.1rem;
}

.property-price {
    color: rgba(166, 111, 20, 1);
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 1rem;
}

/* Hidden class */
.hidden {
    display: none !important;
    visibility: hidden;
    position: absolute;
    left: -9999px;
}

/* Overlay Styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Property Modal Styles */
.property-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    z-index: 9999;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.3s ease;
}

.property-modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.property-modal .property-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    transition: color 0.3s ease;
    z-index: 10000;
}

.property-modal .property-close:hover {
    color: #333;
}

.property-modal .property-content {
    padding: 0;
}

.property-modal .property-gallery {
    margin: -2rem -2rem 2rem -2rem;
    position: relative;
    height: 100%;
}

.property-modal .property-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-modal h2 {
    color: rgba(166, 111, 20, 1);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.property-modal .property-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.property-modal .property-description {
    color: #333;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.property-modal .property-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.property-modal .property-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

/* Neue Styles für den Property-Link */
.property-card .property-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.property-card .property-content h3 a:hover {
    color: var(--primary-color, #a66f14);
}

.property-link {
    display: none;
}

.property-link:hover {
    background-color: var(--primary-hover, rgba(166, 111, 20, 0.8));
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .property-grid {
        grid-template-columns: 1fr;
    }
    
    .property-modal {
        width: 95%;
        padding: 1.5rem;
    }
    
    .property-modal .property-gallery {
        height: 300px;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    }
    
    .property-modal .property-details {
        grid-template-columns: 1fr;
    }
    
    .property-modal .property-features {
        grid-template-columns: 1fr;
    }
}