body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* header format - 10vh - horizontal row centered */
header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 7.5vh;
}

/* header logo, account and search bar ------------------------------------*/
header .logo {
    width: 15vw;
    display: flex;
    margin-left: 20px;
    align-items: center;
    font-size: 25px;
    color: #0177ad;
}

header .logo img {
    display: flex;
    width: 50px;
    margin-right: 10px;

}

header .account {
    width: 15vw;
    display: flex;
    justify-content: right;
    margin: 1vw;
    margin-right: 20px;
}

header .account img {

    display: flex;
    width: 50px;
}

header input[type="search-bar"] {
    width: 50%;
    padding: 5px;
    height: 35%;
    border-radius: 35px;
    border: 1px solid #000000;
    outline: none;
    font-size: 125%;
    box-shadow: 0px 2px 6px #000000;

}

header input[type="search-bar"]:focus {
    border-color: #007BFF;
    /* Change border color on focus */
}
/*-------------------- Search Bar Container --------------------*/
.search-bar-container {
    background: linear-gradient(to bottom, #e3e3e3 60%, #0177ad 90%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 20px;
}

.search-bar-container img {
    width: 70%;
}

.search-bar-container h2 {
    font-size: 8vh;
    color: #0177ad;
    margin-bottom: 0px;
}

.search-bar-container p {
    font-size: 25px;
}

.search-bar-container input[type="search-bar"] {
    font-family: 'Poppins', sans-serif;
    width: 20%;
    height: 30px;
    padding: 10px;
    padding-left: 20px;
    border-radius: 35px;
    border: 1px solid #000000;
    outline: none;
    font-size: 1rem;
    box-shadow: 0px 2px 6px #000000;
    margin-bottom: 50px;
}

/*------------------------------------------------------------------------*/
hr {
    background-color: #c3c3c3;
    width: 90%;
    height: 2px;
    margin: 40px;
}

main {
    display: flex;
    flex-direction: column;
    align-items: left;
    gap: 20px;
    height: auto;
}

/* container for filter and map----------------------------------------------*/

.filter-container {
    position: sticky;
    top: 20px;
    display: none;
    flex-direction: row;
    justify-content: space-between;
    margin: 0px 20px 0px 20px;
    height: 100%;
    z-index: 5;
    
}

.filter {

    height: 200%;
    overflow-y: auto;
    border: 2px solid #ddd;
    position: sticky;
    top: 20px;
    overflow: hidden;

}

.filter-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background-color: rgb(255, 255, 255);
    padding: 0px 30px 0px 30px;
    align-items: center;
}

.filter-header img {
    width: 50px;
    height: 50px;
}
/*accordion css for all filter options---------------------------------------*/
.accordion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: #ffffff;
    width: 100%;
    height: 2rem;
    border: 1px solid #ddd;
    text-align: left;
    padding: 20px 30px 20px 30px;
    font-size: 20px;
    transition: 0.4s;
}

.accordion:hover {
    background-color: #ccc;
}

.accordion.active {
    background-color: #f0f0f0;
}

.accordion img {
    width: 20px;
    height: 20px;
}

.panel {
    background-color: rgb(255, 255, 255);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    align-items: center;
}

.panel .min-max-price,.min-max-review {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 0px 15px 0px 15px;
    background-color: rgb(255, 255, 255);
}

.panel p {
    margin: 0px 0px 0px 0px;
    font-size: 15px;
}

#review-button-container,#button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px;
    height: 60px;
}

#review-trend-button,#price-button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 20px;
    width: 75%;
    height: 30px;
}

#review-trend-button:hover,#price-button:hover {
    background-color: #dedede;
    transform: scale(0.98);
}

#review-trend-button img,#price-button img {
    display: none;
}

#review-filter {
    display: flex;
    flex-direction: column;
    background-color: rgb(255, 255, 255);
}

#star-rating-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 15px 20px 15px 20px;
    background-color: rgb(255, 255, 255);
}

.star-button {
    width: 25px;
    height: 25px;
    background-color: transparent;
    background-image: url("../images/star.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    cursor: pointer;
    
}
.star-button.active {
    background-image: url("../images/star_filled.png");
}
.checkbox {
    display: flex;
    align-items: center;
    margin: 15px 20px 15px 20px;
}
.district-input,.name-input {
    margin: 15px 20px 15px 20px;
}
.district-input select, .name-input input[type="text"] {
    width: 100%;
    font-size: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    outline: none;
}
.filter-icon{
    display: flex;
    flex-direction: row;
    justify-content: right;
    margin-right: 30px;

}
#toggle-button{
    margin-top: 20px;
    margin-right: 20px;
}
.filter-icon img,
.map-icon img {
    width: 30px;
    height: 30px;
}

.list-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 15px 20px 25px 15px;
    border-radius: 5px;
    gap: 40px;
    overflow-y: auto;
}

/* list-container for apartments---------------------- */
.apartment {
    display: flex;
    flex-direction: column;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 12px;
    height: 30rem;
    position: relative;
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
    transform: scale(1);
    transition: 0.2s ease-in-out, transform 0.2s ease-in-out;
    /* Übergang für Apartment */
}

.apartment .image-container {
    width: 100%;
    height: 80%;
    overflow: hidden;
    position: relative;
}

/*hover effect for apartment*/
.apartment:hover {
    background-color: #e6dfdf;
}

.apartment .image-container img {
    transition: transform 0.3s ease-in-out;
    transform: scale(1);
}

.apartment:hover .image-container img {
    transform: scale(0.98);
}

/*---------------------------------------------------*/
.apartment img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*anti-distortion!!!*/
    border-radius: 5px 5px 0 0;
}

.apartment .overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ffffff;
    padding: 5px 25px;
    border-radius: 20px;
    border: 0.5px solid #ddd;
    font-size: 15px;
    text-align: center;
}

.apartment .info {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    height: 20%;

    color: rgb(0, 0, 0);
    border-radius: 0 0 5px 5px;
}

.apartment .info p {
    margin: 2px 0 0 10px;
    line-height: 1.5;
}

.absolute-link {

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

/* media mode for mobile - change grid, header and searchbar  */

@media (max-width: 1536px) {
    main {
        display: flex;
        flex-direction: column;
    }

    .list-container {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .info {
        font-size: 12px;
    }

    

}

@media (max-width: 1300px) {

    .list-container {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .list-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    main {
        grid-template-columns: 1fr;
    }

    .apartment {
        height: 400px;
    }

    header .logo h1 {
        display: none;
    }

    header .logo img,
    header .account img {
        width: 30px;
        height: 30px;
    }

    header input[type="search-bar"] {
        height: 25%;
        font-size: 100%;
    }

    .list-container {
        grid-template-columns: 1fr;
    }

    .info {
        font-size: 14px;
    }
}

footer {
    background: #0177ad;
    color: white;
    text-align: center;
}

