/* main_section */

.main_section {
    position: relative;
    width: 100%;
    height: 45vh;
    background-image: url('../img/layout_objects.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.main_section.rent_property {
    background-image: url('../img/rent_property.webp');
}

.main_section .text {
    position: absolute;
    bottom: 5%;
    left: 7vw;
    font-size: 48px;
    line-height: 50px;
}


/* filter */
.objects_section .filter {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    gap: 2vw;
    margin: 3em 7vw;
}

.objects_section .filter .params {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    gap: 1em;
    width: 100%;
    padding: .5em 2.5em;
    color: #000;
    background: #fff;
    border-radius: var(--border-radius);
}

.objects_section .filter .params .param {
    position: relative;
}

.objects_section .filter .params .param .title {
    position: relative;
    padding-right: 1.1em;
    cursor: pointer;
    display: inline-block;
    font-weight: normal;
    letter-spacing: 0.01em;
}

.objects_section .filter .params .param .title::after {
    position: absolute;
    right: 0;
    top: 50%;
    -webkit-transform: translate(0%, -50%);
        -ms-transform: translate(0%, -50%);
            transform: translate(0%, -50%);
    content: "";
    width: 1em;
    height: 1em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23828282' d='M8 12L3 7l1.4-1.4L8 9.2l3.6-3.6L13 7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
}

.objects_section .filter .params .param .title.active {
    font-weight: bold;
}

.objects_section .filter .params .param .list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: -webkit-max-content;
    width: -moz-max-content;
    width: max-content;
    padding: 1rem;
    color: #000;
    background-color: #ededed;
    border-radius: var(--border-radius);
    z-index: 3;
}

.objects_section .filter .params .param .list.locations {
    -ms-grid-columns: 1fr 2em 1fr;
    grid-template-columns: repeat(2, 1fr);
    gap: 0em 2em;
}

.objects_section .filter .params .param .list div {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: .25em;
    margin: .75em 0;
}

.objects_section .filter .params .param .list.locations div {
    margin: .375em 0;
}

.objects_section .filter .params .param .list input[type="number"] {
    width: 15ch;
}


.objects_section .filter .params .favorite [type="checkbox"] {
    display: none;
}

.objects_section .filter .params .favorite .like {
    cursor: pointer;
    -webkit-transition: 0.3s;
    -o-transition: 0.3s;
    transition: 0.3s;
}

.objects_section .filter .params .favorite .liked path {
    fill: #828282 !important;
    stroke: #828282 !important;
}


.objects_section .filter .btns {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    gap: 6%;
}

.objects_section .filter .btns button {
    width: 100%;
    font-weight: 300;
}

.objects_section .filter .btns .reset {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    color: #000;
    background-color: #fff;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    border-left: 1px solid #fff;
    border-right: 1px solid #fff;
}


/* text_section */

.text_section {
    margin: var(--section-margin);
}

.text_section h3 {
    margin-bottom: 0.75rem;
    font-size: calc(1.325rem + 0.9vw);
    font-weight: 400;
}


/* map */

#map {
    aspect-ratio: 16/6;
    overflow: hidden;
    color: #000;
}


/* read_more */

.read_more {
    color: #fff;
    text-decoration: underline;
    border: none;
    background: none;
}

.hidden_text {
    display: none;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    -o-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.hidden_text.visible {
    display: inline;
    opacity: 1;
}



/* media for phone */
@media screen and (max-width: 700px) {
    .main_section .text {
        font-size: 27px !important;
    }

    .objects_section .filter {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
    }

    .objects_section .filter .params {
        display: -ms-grid;
        display: grid;
        -ms-grid-columns: 1fr 1em 1fr;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        gap: 1em;
        padding: 0;
        background: none;
    }
    
    /* Каждый 3-й элемент занимает всю ширину */
    .objects_section .filter .params > *:nth-child(3n) {
        grid-column: 1 / -1;
    }

    .objects_section .filter .params .param {
        height: 100%;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        padding: .5em;
        background-color: #fff;
        border-radius: var(--border-radius);
    }

    .objects_section .filter .params .param .title {
        width: 100%;
    }

    .objects_section .filter .params .param .list {
        min-width: 100%;
        padding: .5em;
    }

    .objects_section .filter .params .param .list.locations {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }

    .objects_section .filter .params .param.favorite {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
    }

    .objects_section .filter .btns {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        gap: 1em;
        margin-top: 1em;
    }

    .objects_section .filter .btns > * {
        display: block !important;
    }
}