*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    box-shadow: unset;
    text-decoration: none;
    font-family: 'Open Sans', sans-serif;
}

:root{
    --searchBackground: #fff;
    --searchButton: #284a9a;
    --searchIconHeight: 46px;
    --searchIconWidth: 46px;
    --ResetInvert: invert(50%);
    --ResetInvertHover: invert(80%);
    --hoverContrast: contrast(1.8);
    --textColor: #444;
    --textHoverColor: #222;
    --inputFontSize:16px;
    --footerHeight:38px;
     --footerHeightMobile: 120px; 
    --searchPageBarHeight:56px;
    --commercialsGap:8px;
    --comm-image-height:185px;
    --comm-image-width:185px;
    --scroll-width:10px;
}

/* width */
::-webkit-scrollbar {
    width: var(--scroll-width);
    height: var(--scroll-width);
}

/* Track */
::-webkit-scrollbar-track {
    background: #f1f1f1; 
}

/* Handle */
::-webkit-scrollbar-thumb {
background: #888; 
border-radius: 5px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555; 
}

.display-none{
    display: none;
}

.grid-row-auto{
    grid-template-rows:auto !important;
}

.container2 {
    --searchIconHeight: 36px;
    --searchIconWidth: 36px;
    --inputFontSize: 14px;
}

body{
    position: relative;
    display: flex;
    justify-content: stretch;
    align-items: stretch;
}

a{
    color: inherit;
}

.container{
    height: calc(100vh - var(--footerHeight));
    min-height: 600px;
    min-width: 100%;
    display: grid;
    justify-content: stretch;
    /* overflow: hidden; */
    grid-template-rows: calc(var(--comm-image-height) + var(--scroll-width)) minmax(0%, 100%) calc(var(--comm-image-width) + var(--scroll-width));
    grid-template-columns: calc(var(--comm-image-width) + var(--scroll-width)) auto calc(var(--comm-image-width) + var(--scroll-width));
    margin-bottom: var(--footerHeight);
}
.container2{
    padding-top: var(--searchPageBarHeight);
    min-height: 100%;
    width: 100%;
    margin-bottom: var(--footerHeight);
}

.comm-top{grid-area: 1 / 2 / span 1 / span 1;}
.comm-right{grid-area: 1 / 3 / span 3 / span 1;}
.comm-left{grid-area: 1 / 1 / span 3 / span 1;}
.comm-bottom{grid-area: 3 / 2 / span 1 / span 1;}
.searchBar{grid-area: 2 / 2 / span 1 / span 1;}

.searchBar{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    margin: auto;
}

.container .searchBar a img{
    width: 250px;
    margin-bottom: 20px;
    margin-top: 25px;
}

.searchBar p{
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: center;
    vertical-align: bottom;
}

.searchBar-bar{
    display: flex;
    flex-direction: row;
    align-items: center;
}

.searchBar-bar a{
    height: var(--searchIconHeight);
}

.container2 .searchBar{
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--searchPageBarHeight);
    background-color: #F5F5F5;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    z-index: 2;
}

.container2 #searchForm{
    max-width: 710px;
}

.container2 .comm-right{grid-area: 1 / 3 / span 2 / span 1;}
.container2 .comm-left{grid-area: 1 / 1 / span 2 / span 1;}

.resultArea {
    min-height: calc(100vh - var(--searchPageBarHeight) - var(--footerHeight));
    display: grid;
    grid-template-columns: calc(var(--comm-image-width) + 2 * var(--commercialsGap)) auto calc(var(--comm-image-width) + 2 * var(--commercialsGap));
    grid-template-rows: calc(var(--comm-image-height) + 2 * var(--commercialsGap)) auto;
}

.results {
    margin: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 18px;
    padding-bottom: 70px;
    word-break: break-all;
}

.results .resultInfo{
    display: flex;
    flex-direction: column;
    color: var(--textColor);
    font-size: 18px;
}

.results .resultInfo > *{
    padding: 5px 0;
    font-weight: 400;
}

.results div>div{
    display: flex;
}

.results div a h3 {
    font-size: 20px;
    margin: 5px 0;
    font-weight: 300;
    color: #4b41bd;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    box-sizing: border-box;
    font-weight: 400;
}

.results div button {
    position: relative;
    background-color: whitesmoke;
    border: none;
    margin: 0px 8px;
    font-weight: bold;
    color: var(--textColor);
    width: 15px;
    min-width: 15px;
    cursor: pointer;
    z-index: 1;
    height: 28px;
}

.results div button div {
    display: none;
    position: absolute;
    top: 0px;
    left: 15px;
    white-space: nowrap;
    font-weight: 500;
    padding: 0 7px;
    height: 28px;
    line-height: 26px;
    font-size: 14px;
    background-color: whitesmoke;
    border: 1px solid lightgrey;
    color: #222;
}

.results div button::before {
    content: ">";
    font-weight: bold;
}

.showReport{
    background-color: lightgray !important;
}

.showReport:hover{
    background-color: gray !important;
    color: white;
}

.showReport::before{
    content: "X" !important;
}

.showReport div{
    display: block !important;
}

.results div button:hover{
    background-color: lightgray;
}

.results div button div:hover{
    border-color: transparent;
    background-color: rgb(228 32 44);
    color: white;
}

.results div p {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    width: 100%;
    font-weight: 400;
}

.results .pagination {
    display: flex;
    position: absolute;
    bottom: 0px;
    justify-content: center;
    width: 100%;
    height: 38px;
    flex-wrap: wrap;
}

.results .pagination div a {
    display: block;
    text-align: center;
    margin: 0 7px;
    min-width: 35px;
    line-height: 38px;
    font-size: 16px;
}

.results .pagination .active{
    background-color: #eee;
}



.logo{
    height: var(--searchIconHeight);
    margin-right: 15px;
    max-width: 120px;
}

/*Search*/
#searchForm{
    max-width: 520px;
    width: 100%;
    height: var(--searchIconHeight);
    box-sizing: border-box;
    position: relative;
    padding: 0 calc(var(--searchIconWidth) * 2) 0 10px;
    box-shadow: 0px 0px 9px -3px rgb(0 0 0 / 35%);
    border-radius: 3px;
    background-color: var(--searchBackground);
}
#searchText{
    width: 100%;
    height: var(--searchIconHeight);
    border: none;
    color: var(--textColor);
    font-size: var(--inputFontSize);
    background-color: transparent;
}
#searchReset {
    position: absolute;
    top: 0;
    right: var(--searchIconWidth);
    background-image: url(/Home/images/close.svg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 30%;
    background-color: transparent;
    filter: var(--ResetInvert);
    width: var(--searchIconWidth);
    height: var(--searchIconHeight);
    border: none;
}
#searchReset:hover{
    filter: var(--ResetInvertHover);
}
#searchButton {
    position: absolute;
    right: 0;
    top: 0;
    background-color: var(--searchButton);
    background-image: url(/Home/images/search.svg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 45%;
    width: var(--searchIconWidth);
    height: var(--searchIconHeight);
    padding: 10px 8px;
    border-radius: 0 3px 3px 0;
    border: none;
}
#searchButton:hover{
    filter:var(--hoverContrast);
}

/*Commercial*/

.container2 .resultArea .comm-right, .container2 .resultArea .comm-left{
    position: sticky;
    top: var(--searchPageBarHeight);
    align-items: center;
    gap: var(--commercialsGap);
}

.comm-flex-horizontal{
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    text-align: center;
    margin: 0 50px;
}

.container .comm-flex-vertical{
    overflow-x: hidden;
    overflow-y: auto;
    text-align: center;
    display: grid;
    align-items: center;
}

.container2 .comm-flex-vertical{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--commercialsGap);
    flex-direction: column;
    height: calc(100vh - var(--footerHeight));
    overflow-y: auto;
    overflow-x: hidden;
}

.container2 .comm-flex-vertical{
    height: calc(100vh - var(--footerHeight) - var(--searchPageBarHeight));
}

.comm-area{
    position: relative;
    display: inline-block;
    width: var(--comm-image-width);
    height: var(--comm-image-height);
}

.comm-area img{
    height: var(--comm-image-height);
    width: var(--comm-image-width);
    display: block;
}

.comm-area .comm-area-desc{
    position: absolute;
    width: 100%;
    bottom: 0;
    max-height: 90px;
    pointer-events: none;
}

.comm-area .comm-area-desc h3{
    display: block;
    background-color: rgba(255, 255, 255, 0.6);
    color: var(--textColor);
    padding: 5px;
    max-height: 76px;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.renew {
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    line-height: 20px;
    border: 0;
    box-sizing: content-box;
    background-image: url(/Home/images/renew.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 80%;
    background-color: rgba(180, 180, 180, 0.8);
}

.renew:hover{
    box-shadow:inset 0px 0px 2px 1px #444;
}

.renew:active{
    transform: scale(.95);
}

.renew-all{
    display: inline-block;
    background: rgba(180, 180, 180, 0.6);
}

.renew-all.renew-all.down{
    width: var(--comm-image-width);
}

.renew-all.right{
    height: var(--comm-image-height);
}

.renew-all:hover{
    display: inline-block;
    background: rgba(140, 140, 140, 0.6);
    box-shadow:inset 0px 0px 3px 1px #888;
}
.renew-all:active{

    background: rgba(100, 100, 100, 0.6);;
}

.renew-all a{
    display: table;
    background-position: center;
    background-repeat: no-repeat;
}

.renew-all.right a {
    background-image: url(/Home/images/next.svg);
    height: var(--comm-image-height);
    line-height: var(--comm-image-height);
    width: 20px;
    background-size: 50%;
}

.renew-all.down a {
    background-image: url(/Home/images/next2.svg);
    height: 20px;
    line-height: 20px;
    width: var(--comm-image-width);
    background-size: 10%;
}

/*Footer*/

footer{
    position: fixed;
    bottom: 0;
    width: 100%;
    height: var(--footerHeight);
    display: flex;
    justify-content: center;
    background-color: #F5F5F5;
    z-index: 2;
}

footer div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    color: var(--textColor);
    font-size: 12px;
    text-align: center;
    align-items: center;
}

.footerNav div a,
.footerInfo div{
    margin: 0 10px;
    padding: 0 10px;
}

.footerNav div a:hover{
    color: var(--textHoverColor);
}

.usefulLinks{
    position: relative;
    border: 1px solid #525252;
    border-radius: 4px;
    background-color: rgb(173 173 173 / 30%);
    padding: 5px !important;
    color: black;
    cursor: pointer;
}

.usefulLinks:hover{
    background-color: #404040;
    color: white;
}

.usefulLinks div{
    position: absolute;
    flex-direction: column;
    padding: 7px 0 !important;
    bottom: 0;
    right: -100%;
    transform: translateX(50%);
    background-color: white;
    border-radius: 5px;
    border: 1px solid #404040;
}

.usefulLinks div a, .usefulLinks span{
    width: 100%;
    padding: 7px 12px;
}

.usefulLinks div a:hover{
    background-color: #404040;
    color: white;
}

@media(max-width:1738px){
    :root {
        --footerHeight: 55px;
    }

}

@media (max-width:1500px) {
    .resultArea{
        width: 90%;
        margin: auto;
    }
}

@media (max-width:1500px) {
    .container{
        grid-template-columns: 0 auto 0;
    }
    .container .comm-left, .container .comm-right{
        display:none;
    }
}

@media (max-width:1300px) {
    .resultArea{
        grid-template-columns: 0 auto calc(var(--comm-image-width) + 2 * var(--commercialsGap));
    }
    .container{
        height: calc(100vh - var(--footerHeightMobile));
        margin-bottom: var(--footerHeightMobile);
    }
    footer{
        height: var(--footerHeightMobile);
        vertical-align: middle;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    .footerInfo{
        flex-direction: column;
        align-items: center;
    }
    .container2{
        margin-bottom: calc(var(--footerHeightMobile) + 15px);
    }
    .footerNav div a, .footerInfo div {
        margin: 0 5px;
        padding: 5px;
    }
}

@media (max-width:1000px) {
    .resultArea{
        grid-template-columns: 0 auto 0;
        width: 100%;
        margin: 0;
    }

    .comm-flex-horizontal{
        margin: 0;
    }
    .container2 .searchBar{
        grid-template-columns: 0 90% 0;
        margin: auto;
    }
    .logo{
        margin-right: 10px;
        max-width: 90px;
    }

    .results div button div {
    right: 100%;
    left: unset;
    }
    .results div button::before {
        content: "<";
    }
}

@media (max-width: 800px) {
    footer{
        flex-direction: unset;
    }
    .comm-bottom{
        display: none;
    }

    .container .searchBar a img{
        margin-top: 40px;
        margin-bottom: 20px;
    }

    .container .searchBar a img{
        width: 250px;
    }
}

@media(max-width:640px){
    :root {
        --footerHeightMobile: 140px;
    }
    .results .pagination{
        bottom:10px;
    }
}