/* Projects Section */
.projects {
    padding: 6rem 5%;
    background-color: var(--color-a);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-c);
    position: relative;
    font-size: 2.2rem;
    font-weight: 700;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(to right, var(--color-c), var(--color-c));
    border-radius: 3px;
}

.subsection-title {
    text-align: center;
    margin: 4rem 0 2rem;
    color: var(--color-b);
    font-size: 1.8rem;
    font-weight: 600;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.8rem;
    background-color: #0a0a0a;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--color-c);
}

.filter-btn.active, 
.filter-btn:hover {
    background-color: var(--color-d);
    color: var(--color-c);
    border-color: var(--color-d);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* New Card Styles */
.property-card {
    width: 100%; /* Adjust as needed for responsive grid */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    cursor: pointer;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    background-color: var(--color-c); /* White background */
}

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

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

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

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

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--color-a) 0%, var(--color-d) 100%);
    color: var(--color-c);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.card-content {
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-a);
    margin-bottom: 5px;
}

.property-address {
    color: #7f8c8d; /* Keep gray for now, not directly mapped */
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.property-features {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.feature {
    display: flex;
    align-items: center;
    color: #34495e; /* Keep dark gray for now */
    font-size: 0.9rem;
}

.feature i {
    margin-right: 5px;
    color: var(--color-d);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.agent-info {
    display: flex;
    align-items: center;
}

.agent-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: var(--color-d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-c);
    font-weight: bold;
}

.agent-name {
    font-size: 0.9rem;
    color: var(--color-a);
}

.view-details {
    background: linear-gradient(135deg, var(--color-a) 0%, var(--color-d) 100%);
    color: var(--color-c);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(85, 107, 47, 0.3);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    color: var(--color-c);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
}

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

.overlay-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.property-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.property-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 25px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--color-b);
}

.contact-btn {
    background: transparent;
    color: var(--color-c);
    border: 2px solid var(--color-c);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: var(--color-c);
    color: var(--color-a);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: var(--color-c);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Limit height to enable scrolling */
    overflow-y: auto; /* Enable vertical scrolling */
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-a);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--color-d);
}

.modal-image {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

.modal-details h3 {
    font-size: 2rem;
    color: var(--color-a);
    margin-bottom: 0.5rem;
}

.modal-address {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.modal-description {
    color: var(--color-a);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-feature-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--color-a);
}

.modal-feature-item i {
    margin-right: 8px;
    color: var(--color-d);
    font-size: 1.2rem;
}

.modal-contact {
    text-align: center;
    margin-top: 2rem;
}

.modal-contact .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .modal-details h3 {
        font-size: 1.5rem;
    }

    .modal-image {
        height: 200px;
    }
}