.properties-page {
    padding: 0 20px;
}

.masthead {
    position: relative; /* Ensure the pseudo-element is positioned correctly */
    overflow: hidden;
    width: 100%;
    padding: 130px 20px;
    text-align: center;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    animation: change-picture 30s infinite;
}

.masthead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8); /* Adjust the alpha value for darkness */
    z-index: 1; /* Ensure it sits above the background but below the text */
}

.masthead h1, .masthead p { /* Adjust text color if necessary */
    position: relative; /* Ensure text is above the overlay */
    z-index: 2; /* Ensure text is above the overlay */
}
  @keyframes change-picture {
    0%{
       background: url('../images/properties/1.jpg') no-repeat black;
       background-size: cover;
       background-position: center;
    }
    25%{
       background: url('../images/properties/2.jpg') no-repeat black;
       background-size: cover;
       background-position: center;
    }
    50%{
       background: url('../images/properties/3.jpg') no-repeat black;
       background-size: cover;
       background-position: center;
    }
    75%{
       background: url('../images/properties/4.jpg') no-repeat black;
       background-size: cover;
       background-position: center;
    }
    100%{
       background: url('../images/properties/6.jpg') no-repeat black;
       background-size: cover;
       background-position: center;
    }
 }
.masthead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    z-index: 0;
}

.masthead h1 {
    position: relative;
    font-size: 2em;
    margin: 0;
    z-index: 1;
    font-weight: 900;
    font-family: "Poppins", serif;
}

.masthead p {
    position: relative;
    z-index: 1;
    font-size: 1.2em;
    margin-top: 10px;
}

.section-title {
    text-align: center;
    margin: 3rem 0;
    font-size: 1.4rem;
    color: #333;
    font-family: "Poppins";
}

.location-section {
    margin-bottom: 4rem;
}

.location-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #444;
    position: relative;
    padding-left: 3rem;
}

.location-title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 2rem;
    height: 2px;
    background: #444;
    transform: translateY(-50%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.project-card .image-container {
    position: relative;
    padding-top: 75%;  /* 4:3 aspect ratio */
    overflow: hidden;
}

.project-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-title {
    padding: 1rem;
    background: white;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.property-price {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.sold-out {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ff4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    transform: rotate(5deg);
    animation: pulse 2s infinite;
    z-index: 1;
}

@keyframes pulse {
    0% { transform: rotate(5deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.05); }
    100% { transform: rotate(5deg) scale(1); }
}

@media (max-width: 768px) {
    .masthead h1 {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .location-title {
        font-size: 1.25rem;
    }
}