/* Residential Section */
.residential {
    background-color: #0f0f0f;
    padding: 80px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0;
    animation: revealText 1s ease forwards;
}

.section-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: #e0e0e0;
    opacity: 0;
    animation: revealText 1s ease forwards 0.3s;
}

.residential-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.residential-card {
    position: relative;
    height: 500px; /* Increased from 450px */
    overflow: hidden;
    border-radius: 0; /* Removed rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #1a1a1a; /* Fallback color if image fails */
}

.residential-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.residential-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Ensures image fills the increased height */
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

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

.residential-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    color: #fff;
}

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

.residential-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.residential-content p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    margin: 0;
}

.btn-view-all {
    padding: 10px 30px;
    border: 2px solid #fff;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    background-color: transparent;
    color: #fff;
    opacity: 0;
    animation: revealText 1s ease forwards 0.9s;
}

.btn-view-all:hover {
    background: #fff;
    color: #0f0f0f;
    transform: scale(1.05);
}

/* Reveal Animation */
@keyframes revealText {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .residential {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .residential-grid {
        grid-template-columns: 1fr;
    }
    
    .residential-card {
        height: 450px; /* Increased from 400px */
        margin-bottom: 20px;
    }
}