* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Josefin Sans", sans-serif;
}

body{
    width: 100%;
    height: 100%;
    background-color: white;
    color: white;
}

.cabecera{
    width: 100%;
    height: 7rem;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.1rem 2rem;
    background: linear-gradient(to right, #1E90FF, #0073E6);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cabecera a img{
    width: 6.8rem;
    height: 6.8rem;
}

.menu-toggle {
    display: none;
}

.nav{
    width: 50%;
    height: 100%;
    display: inline-flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
}

.nav li {
    flex: 1;
    height: 100%;
    list-style: none;
    text-align: center;
    font-size: 1.5rem;
    line-height: 6.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    white-space: nowrap;
    padding: 0 0.5rem;
}

.nav li a{
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: white;
    text-align: center;
    font-size: 1.5rem;
}

.nav li:hover {
    background-color: white;
    border-radius: 0.3rem;
}

.nav li:hover > a {
    color: rgb(30, 144, 255);
}

.buscador{
    width: 100%;
    height: 5rem;
    padding: 1rem;
    display: inline-flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
    background-color: rgba(250,250,250,255);
}

.formulario{
    width: 100%;
    height: 3rem;
    padding: 0 8rem;
    display: flex;
    justify-content: space-evenly;
}

.formulario select{
    width: 15rem;
    height: 3rem;
    border-radius: 0.3rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.formulario select option{
    font-size: 1rem;
    text-align: center;
}

.formulario button{
    width: 5rem;
    height: 3rem;
    border-radius: 0.3rem;
}

.no_resultados{
    width: 100%;
    height: 10rem;
}

.no_resultados p{
    color: rgb(30, 144, 255);
    text-align: center;
    font-size: 3rem;
    line-height: 10rem;
}

.resultados{
    width: 100%;
    height: 3rem;
    padding: 0 3rem;
    background-color: rgba(250,250,250,255);
}

.resultados p{
    color: rgb(30, 144, 255);
    text-align: start;
    font-size: 2rem;
    line-height: 3rem;
    background-color: rgba(250,250,250,255);
}

.inmuebles{
    width: 100%;
    height: auto;
    padding-top: 2rem;
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
    color: black;
    background-color: rgba(250,250,250,255);
}

.grid_inmuebles{
    width: 80%;
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.inmueble{
    width: 100%;
    height: 100%;
    display: inline-flex;
    flex-flow: column wrap;
    justify-content: space-evenly;
    align-items: center;
    border: 0.1rem solid #D9D9D9;
    border-radius: 0.5rem;
    background-color: white;
}

.inmueble a{
    width: 100%;
    height: auto;
    text-decoration: none;
    display: flex;
    justify-content: center;
}

.inmueble a img{
    width: 100%;
    height: 14rem;
}

.inmueble a h1{
    width: 100%;
    height: 4rem;
    padding: 0 0.5rem;
    color: rgb(30, 144, 255);
    text-align: start;
    line-height: 4rem;
}

.inmueble a p{
    width: 100%;
    height: auto;
    padding: 0 0.5rem;
    color: black;
    text-align: start;
    line-height: 2rem;
}

.inmueble hr{
    width: 95%;
    height: 0.08rem;
    background-color: black;
}

.pregunta{
    width: 100%;
    height: auto;
    margin: 0.5rem 0;
    display: inline-flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
}

.pregunta a{
    width: auto;
    height: auto;
    text-decoration: none;
}

.pregunta a img{
    width: 2rem;
    height: 2rem;
    margin-left: 0.5rem;
}

.pagination{
    width: 100%;
    height: 2rem;
    margin: 2rem 0;
    display: inline-flex;
    flex-flow: row wrap;
    justify-content: center;
}

.pagination a{
    width: auto;
    height: 2rem;
    display: inline-flex;
    flex-flow: row wrap;
    justify-content: center;
    font-size: 1.5rem;
    color: rgb(30, 144, 255);
    text-decoration: none;
}

.pagination a p{
    width: 2rem;
    height: auto;
    text-align: center;
    line-height: 2rem;
}

.pagination a p:hover{
    background-color: rgb(30, 144, 255);
    color: white;
}


.botones_flotantes{
    position: fixed;
    bottom: -4rem;
    right: 2rem;
    width: 4.5rem;
    height: 11rem;
    display: inline-flex;
    flex-flow: column wrap;
}

.botones_flotantes a{
    width: 4rem;
    height: 4rem;
    margin: 0.5rem 0;
    border-radius: 50%;
    background-color: rgb(30, 144, 255);
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.botones_flotantes a img{
    width: 3rem;
    height: 3rem;
}

.botones_flotantes a:hover{
    width: 4.5rem;
    height: 4.5rem;
}

.botones_flotantes a img:hover{
    width: 3.5rem;
    height: 3.5rem;
}

.pie{
    width: 100%;
    height: 25rem;
    display: inline-flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    align-items: start;
    background-color: #2C2C2C;
    padding: 1rem 0;
}

.pie img{
    width: 12rem;
    height: 12rem;
}

.texto_pie{
    width: 18%;
    height: 100%;
    display: inline-flex;
    flex-flow: column wrap;
    justify-content: space-evenly;
    align-items: center;
}

.menu_pie{
    width: 18%;
    height: 100%;
    display: inline-flex;
    flex-flow: column wrap;
    justify-content: space-evenly;
    align-items: center;
}

.menu_pie a{
    text-decoration:none;
    color: white;
}

.info{
    width: 100%;
    height: auto;
    display: inline-flex;
    flex-flow: row wrap;
    justify-content: start;
    align-items: center;
    margin: 1rem 0;
}

.info img{
    width: 2rem;
    height: 2rem;
    margin-right: 0.5rem;
}

.copy{
    width: 100%;
    height: 2rem;
    line-height: 2rem;
    background-color: #2C2C2C;
    text-align: center;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: block;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 50vw; 
        height: 100vh;
        background-color: rgb(30, 144, 255);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .nav.nav-open {
        transform: translateX(0);
    }
    
    .nav li {
        font-size: 1.2rem;
        line-height: 3rem;
        position: relative;
        list-style: none;
        width: 100%;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 0;
        margin: 0;
    }
    
    .nav li a {
        font-size: 1.2rem;
        line-height: 3rem;
        position: relative;
        list-style: none;
        width: 100%;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 0;
        margin: 0;
    }
    
    button{
        width: 3rem;
        height: 3rem;
    }
    
    .buscador {
        height: auto; /* Permite que el contenedor crezca en altura */
        padding: 1rem;
    }
    
    .formulario {
        height: auto;
        flex-direction: column; /* Cambia la disposición a columna */
        align-items: center; /* Centra los elementos en la columna */
        padding: 0; /* Ajusta el padding para pantallas pequeñas */
    }
    
    .resultados{
        padding: 1rem;
    }
    
    .grid_inmuebles{
        display: inline-flex;
        flex-flow: column wrap;
    }
    
    .inmueble a h1{
        height: auto;
    }

    .pie {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        height: auto;
    }
    
    .pie img {
        width: 8rem;
        height: 8rem;
    }
    
    .mapa {
        width: 100%;
        height: auto;
        max-width: 500px; /* Ajusta el tamaño máximo del mapa */
        margin: 1rem 0;
    }
    
    .texto_pie {
        width: 100%;
        max-width: 500px; /* Ajusta el tamaño máximo del contenedor del texto */
        margin: 1rem 0;
        text-align: center;
        align-items: center;
    }
    
    .info {
        width: auto;
        margin: 0.5rem 0;
    }
    
    .info img {
        width: 2rem;
        height: 2rem;
    }
    
    .copy {
        width: 100%;
        height: 2rem;
        background-color: #717171;
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); /* Color negro con opacidad del 50% */
        opacity: 0;
        pointer-events: none; /* Permite que los clics pasen a través del overlay cuando está oculto */
        transition: opacity 0.3s ease-in-out;
        z-index: 900; /* Asegura que el overlay esté detrás del menú pero encima del contenido */
    }
    
    .overlay.active {
        opacity: 1;
    }
}