.residencias{
    position: relative;
    display: flex;
    align-items: flex-end;
    z-index: 1;
    overflow: hidden;
    height: 640px;
}
.residencia-background-image{
    background-image: url('../images/bed-and-breakfast-3.jpg');
    width: 130%;
    height: 640px;
    position: absolute;
    background-repeat: no-repeat;
    background-position-y: center;
    background-position-x: left;
    background-size: cover;
    z-index: 0;
}
.residencias-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background-color: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
}

.residencias-container .residencias-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}
.residencia-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.residencias-container .residencias-grid {
    display: flex;
    gap: 30px;
}

.residencias-container .residencia-card {
    background: white;
    /* border-radius: 8px; */
    /* overflow: hidden; */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    position: relative;
    /* width: 33%; */
}

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

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

.residencias-container .residencia-card:hover .residencia-image img {
    transform: scale(1.05);
}

.residencias-container .residencia-content {
    padding-top: 20px;
}

.residencias-container .residencia-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.residencias-container .residencia-location {
    color: #666;
    
}

.residencias-container .residencia-price {
    color: #e74c3c;
    font-weight: 600;
}

.residencias-container .ribbon {
    width: 100px;
    height: 100px;
    /* overflow: hidden; */
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
}

.residencias-container .ribbon-content {
    position: absolute;
    top: 25px;
    right: -26px;
    width: 140px;
    /* background: #4CAF50; */
    color: black;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    transform: rotate(45deg);
    /* box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); */
    padding: 10px 0;
}
.residencias-container .ribbon-content::before {
    content: "";
    position: absolute;
    border-bottom: 40px solid #b3e6ca;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    left: -30px;
    right: -30px;
    bottom: 0;
    z-index: -4;
}
.residencias-container .ribbon-content::after {
    content: "";
    position: absolute;
    left: -30px;
    right: -30px;
    bottom: -20px;
    border-bottom: 20px solid transparent;
    border-left: 20px solid #277644;
    border-right: 20px solid #277644;
    z-index: 5;
}

.residencias-container .background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
    background-image: url('https://images.unsplash.com/photo-1540518614846-7eded433c457?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1739&q=80');
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    .residencias{
        height: auto;
    }
    .residencias-container .residencias-grid {
        flex-direction: column;

    }
    .residencias-container .residencia-card {
        width: 100%;
    }
    .residencia-background-image {
        height: 100%;
    }
    .residencias-container{
        width: 90%;
        margin-top: 40px;
    }
}