@import 'normalize.css';

@font-face {
    font-family: 'FF DIN Round Pro';
    src: url("FF_DIN_Round_Pro_Regular.otf");
    font-weight: 400;
}

@font-face {
    font-family: 'FF DIN Round Pro';
    src: url("FF_DIN_Round_Pro_Bold.OTF");
    font-weight: 700;
}

@font-face {
    font-family: 'FF DIN Round Pro';
    src: url("FF_DIN_Round_Pro_Black.OTF");
    font-weight: 900;
}

@font-face {
    font-family: 'FF DIN Round Pro';
    src: url("FF_DIN_Round_Pro_Light.OTF");
    font-weight: 300;
}

@font-face {
    font-family: 'FF DIN Round Pro';
    src: url("FF_DIN_Round_Pro_Medium.OTF");
    font-weight: 500;
}

body, html {
    --color: #fff;
    --white: #fff;
    --bg-color: #fff;
    --grey: #666666;
    --lightgrey: #4b505a73; /*#d0d0d0;*/
    --lightergrey: #edecec;
    --blue: #1e7cb2;
    --black: #000; /*#5a4b41;*/
    --black2: #4b505a; /* opacity 0.41 for lighter */
    /*--bluelight: #cfe3ef;*/
    --orange: #e1f01e; /*#fac110;*/
    /*--orangelight: #fde0a1;*/
    --gap: 1em;
    --width: 940px;
    font-family: "FF DIN Round Pro", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    overflow-x: hidden;
    color: var(--black);
    background-color: #f7f7f7;
}

.bvi-open {
    display: none;
}

.wrapper {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

a,
a.nav-link,
a.btn-link {
    font-size: 1rem;
    color: var(--grey);
    text-decoration: none;
}

h1 {
    color: var(--blue);
    font-size: 1.3rem;
    font-weight: 300;
    margin: 0 var(--gap);
}

h3 {
    font-size: 1rem;
    line-height: 1rem;
}

h4,
h4 > a {
    font-size: 1.1rem;
    line-height: 1.1rem;
    font-weight: 500;
}

.table-responsive {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    width: calc(100vw - 2rem);
}

.table {
    border-spacing: 0;
    width: 100%;
    font-size: 80%;
}

.table td,
.table th {
    padding: var(--gap);
    border: 1px solid var(--lightgrey);
    text-align: center;
    vertical-align: middle;
}

.text-left {
    text-align: left !important;
}

.lightgrey {
    color: var(--lightgrey);
}

.table.header-bg-lighter tr > th,
.bg-lighter,
.table th {
    background: var(--orange);
}

.container {
    margin: 0;
    /*width: 100%;*/
    padding: 0 var(--gap);
}

/* ---------------------------------- */
header {
    display: grid;
    grid-template: "logo links"
                   "nav tel";
    justify-items: center;
    align-items: center;
    width: calc(100% - 2*var(--gap));
}
header .logo img {
    width: 80%;
    max-width: 200px;
}
header > .logo {
    grid-area: logo;
    text-align: center;
    /*grid-column: 1 / 3;*/
}
header > .navbar {
    grid-area: nav;
    justify-self: flex-start;
    /*grid-column: 2 / 3;*/
}
header > .links {
    grid-area: links;
}
header > a.tel {
    grid-area: tel;
}

/* ---------------------------------- */

.navbar > button.navbar-toggler {
    display: block;
    /*position: absolute;*/
    top: 0;
    right: 0;
    /*width: 40px;*/
    height: 40px;
    /*color: #fff;*/
    background: var(--orange);
    outline: none;
    border: 0;
    cursor: pointer;
}

.navbar > .navbar-collapse {
    display: none;
}

.navbar.show > .navbar-collapse {
    display: block;
    position: absolute;
    margin: 0 -1em;
    /* right: 0; */
    /* top: 40px; */
    z-index: 99;
    right: 0;
    left: 0;
    padding: 0 1em;
}

/* ---------------------------------- */
.main-menu {
    list-style: none;
    flex-direction: column;
    display: flex;
    padding: 0;
    margin: 0;
    background: var(--orange);
}

.main-menu .dropdown-menu {
    padding-left: var(--gap);
}

.main-menu .nav-item {
    border-bottom: 2px solid transparent;
}

.main-menu .nav-link {
    display: block;
    /* height: 100%; */
    padding: var(--gap);
    color: var(--black);
    font-size: 0.9rem;
    font-weight: 500;
}

header a.tel {
    background-color: var(--orange);
    border-radius: 999px;
    height: 32px;
    display: block;
    width: 150px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 32px;
    font-weight: 500;
    color: var(--black);
    -webkit-transition: .2s;
    transition: .2s;
    border: 2px solid var(--orange);
    margin: 0;
    padding: 0;
}

main {
    /*width: 100%;*/
    display: grid;
    grid-template-rows: auto;
    grid-gap: var(--gap);
    align-items: flex-start;
    align-content: flex-start;
}

/* ---------------------------------- */
.tab-content {
    /*padding: 0 var(--gap);*/
}

.submenu {
    display: flex;
    flex: 1 0 auto;
    grid-gap: 1vw;
    grid-template-columns: repeat(auto-fit, minmax(111px, auto));
    justify-content: flex-end;
    padding: 0 var(--gap);
    flex-wrap: wrap;
}

.submenu > a {
    color: var(--grey);
    padding: 0.5vw;
    margin: 0 0.5vw;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: solid 1px var(--grey);
    border-bottom: 1px solid var(--grey);
    white-space: nowrap;
}

.submenu > a:hover {
    border-bottom: 1px solid transparent;
}

.submenu > a.active {
    border-bottom: 1px solid transparent;
    color: var(--lightgrey);
}

/* ----------------------------------- */
#house-view {
    display: grid;
    grid-template-columns: auto;
    grid-gap: 1vw;
    grid-template-areas: "hi" "sb" "tc";
    align-items: flex-start;
}

#house-view > .submenu {
    grid-area: sb;
}

#house-view > .house-images {
    grid-area: hi;
}

#house-view > .tab-content {
    grid-area: tc;
}

#house-view img {
    max-width: 100%;
}

/* ----------------------------------- */
.house-images {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.image-thumb {
    height: 150px;
    margin-right: 0.5vw;
}

.image-thumb:first-of-type {
    width: 100%;
    height: auto;
    margin-bottom: 0.5vw;
}

/* ----------------------------------- */
.tab-content > .tab-pane {
    display: none !important;
}

.tab-content > .tab-pane.active {
    display: block !important;
}

.tab-content > #profile.active {
    display: grid !important;
}

#gallery {
    /*padding: 0 var(--gap);*/
    font-size: 1rem;
}
#gallery img {
    max-width: calc(100% - 10px);
    height: auto !important;
    /* transition: all 0.2s; */
    object-fit: contain;
}
img.gallery {
    cursor: pointer;
}
#gallery img.show {
    /*transition: all 0.2s;*/
    position: absolute;
    top: 0 !important;
    left: 0 !important;
    width: calc(100% - 2*var(--gap)) !important;
    height: calc(100% - 2*var(--gap)) !important;
    max-width: calc(100% - 2*var(--gap)) !important;
    max-height: calc(100% - 2*var(--gap)) !important;
    object-fit: contain;
    background-color: #0f0f0f99;
    padding: var(--gap);
    margin: 0 !important;
}

/* ----------------------------------- */
.media {
    min-height: 60px;
    font-size: 0.8rem;
}

.media img {
    height: 60px;
    float: left;
    margin-right: var(--gap);
}

.media h5 {
    margin: 0;
}

.media a {
    font-size: 0.8rem !important;
}

.media time {
    opacity: 0.41;
}

/* ----------------------------------- */
ol {
    margin: 0;
    padding: 0 0 0 var(--gap);
}

dl > dt {
    font-weight: 700;
    line-height: normal;
    padding-bottom: 5px;
}

dl > dd {
    font-weight: 400;
    font-size: 1.2rem;
    margin: 0 0 var(--gap);
}

/* ----------------------------------- */

.fotorama {
    /*width: 99vw;*/
    margin: 1em -1em;
}

.fotorama__html {
    width: 99vw;
}

.fotorama__html > div {
    width: 99vw;
    max-height: 70vh;
    float: right;
    background: url(/images/banners/slider_back.png) center no-repeat;
    background-size: cover;
}

.fotorama__html h2 {
    color: #5a4b41;
    position: absolute;
    font-size: 1.3rem;
    font-weight: 700;
    left: 2%;
    top: 20%;
    margin: 0;
    border-bottom: 10px solid var(--orange);
}

.fotorama__html h2:after {
    background: var(--orange);
    content: "";
    position: absolute;
    width: 100%;
    height: 20px;
    left: 0;
    top: 50%;
    z-index: -1;
}

.fotorama__html p {
    color: #5a4b41;
    font-size: 1rem;
    position: absolute;
    left: 2%;
    top: 40%;
    width: 50%;
    text-shadow: 0 0 5px #fff;
    font-weight: 600;
}

.fotorama__html img {
    width: 55%;
    max-height: 70vh !important;
    margin-left: 45%;
    /*height: calc(99vw / 2.33);*/
    /*margin-right: 10%;*/
    z-index: -2;
    position: relative;
    object-fit: cover;
}

.contacts {
    display: grid;
    grid-gap: var(--gap);
    grid-template-columns: 100%;
    /*padding: 0 var(--gap);*/
}

.page {
    /*padding: 0 var(--gap);*/
}

#houses > .items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1vw;
}

.card {
    position: relative;
    display: flex !important;
    overflow: hidden !important;
    border: none;
    justify-content: center;
    justify-items: center;
    padding-bottom: 100%;
    height: 0 !important;
    position: relative;
}

.card h5 {
    position: absolute;
    display: block;
    width: 100%;
    margin: 0;
    bottom: 0;
    left: 0;
    color: #fff;
    text-shadow: 0 0 5px #000000;
    font-size: 0.75rem;
    text-align: center;
}

.card img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.2s;
    transition-delay: 0.1s;
}

.card:hover img,
.card:hover svg {
    transform: scale(1.1);
}

.card svg {
    height: 65%;
    width: 65%;
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 20%;
    top: 20px;
    margin: 10% auto;
    display: block;
    transition: 0.2s;
}

.card svg path {
    fill: lightgray;
}

.pagination ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 1vw;
    text-align: center;
    justify-content: center;
}

.pagination ul > li {
    padding: 0px;
    width: 35px;
    height: 35px;
    line-height: 35px;
}

.pagination ul > li.active {
    background-color: var(--orange);
}

.pagination ul > li > a {
    color: var(--blue);
    font-weight: 600;
    font-size: 1.2rem;
    padding: 5px 10px;
}

.pagination ul > li.active > a,
.pagination ul > li.disabled > a {
    color: var(--grey);
}

#worktime {
    border: none;
    display: block;
    font-size: 1rem;
}

#worktime thead,
#worktime tbody {
    display: contents;
}

#worktime tr {
    display: grid;
    grid-template-columns: auto 1fr 100px 100px;
    grid-gap: var(--gap);
    margin-bottom: var(--gap);
}

#worktime tr > td:nth-child(1) {
    /*font-size: 1.2rem;*/
    font-weight: 400;
}

#worktime tr > td:nth-child(2) {
    border-bottom: dashed 1px var(--lightgrey);
}

#worktime tr > td:nth-child(3),
#worktime tr > td:nth-child(4) {
    /*font-size: 1.2rem;*/
    font-weight: 700;
}

#worktime [colspan="2"] {
    grid-column-end: 5;
    grid-column-start: 3;
    justify-self: center;
}

footer {
    display: grid;
    grid-template-columns: 100%;
    grid-gap: var(--gap);
    padding: var(--gap);
    background-color: var(--orange);
}

footer > div {
    display: grid;
    grid-gap: var(--gap);
    grid-template-columns: auto 1fr;
}

@media (min-width: 910px) {
    .bvi-open {
        display: block;
        position: fixed;
        top: 80px;
        right: 80px;
        /*border:4px solid var(--orange);*/
        z-index: 999;
    }

    .bvi-open > img {
        width: 60px;
    }

    h3 {
        font-size: 1.2rem;
        line-height: 1.2rem;
    }

    .container {
        margin: 0 auto;
        /*width: 100%;*/
        max-width: 940px;
    }

    header {
        grid-template-columns: auto 1fr 160px;
        max-width: 1359px !important;
        grid-gap: var(--gap);
        grid-template: "logo links tel" "nav nav nav";
    }

    header > .logo {    }
    header > .navbar {    }

    .navbar > button.navbar-toggler {
        display: none;
    }

    .navbar > .navbar-collapse {
        display: block;
    }

    .main-menu {
        flex-direction: row;
        background: #f7f7f7;
    }

    .main-menu .nav-item .dropdown-menu {
        display: none;
    }

    .main-menu .nav-item.active,
    .main-menu .nav-item:hover {
        border-bottom-color: var(--orange);
    }

    .main-menu .nav-item.active .dropdown-menu,
    .main-menu .nav-item:hover .dropdown-menu {
        display: flex;
        flex-direction: column;
        position: absolute;
        background: var(--orange);
        align-items: flex-start;
        /*padding-top: 5px;*/
        z-index: 1;
        text-align: center;
        margin: 0;
    }

    .main-menu .nav-link {
        padding: var(--gap);
    }

    .submenu > a {
        font-size: 1.2rem;
    }

    main {
        margin: var(--gap) auto !important;
        max-width: var(--width) !important;
        width: var(--width) !important;
        display: grid;
        grid-template-rows: auto;
        grid-gap: var(--gap);
        align-items: flex-start;
        align-content: flex-start;
    }

    .contacts {
        grid-template-columns: 1fr 1fr;
    }

    .table-responsive {
        font-size: 100%;
        width: 100%;
    }

    .table {
        font-size: 100%;
    }

    #worktime {
        font-size: 1.2rem;
    }

    #house-view {
        grid-template-columns: 13fr 21fr;
        grid-template-areas: "sb sb" "hi tc";
    }

    .fotorama {
        margin: -1em calc((var(--width) - 99vw) / 2) 0;
    }

    .fotorama__html h2 {
        color: #5a4b41;
        position: absolute;
        font-size: 2.5rem;
        font-weight: 700;
        left: 20%;
        top: 20%;
    }

    .fotorama__html h2:after {
        background: var(--orange);
        content: "";
        position: absolute;
        width: 100%;
        height: 30px;
        left: 0;
        top: 50%;
        z-index: -1;
    }

    .fotorama__html p {
        color: #5a4b41;
        font-size: 1.3rem;
        position: absolute;
        left: 10%;
        top: 40%;
        text-shadow: 0 0 5px #fff;
        font-weight: 600;
    }
    /*
    .fotorama__html img {
        !*float: right;*!
        width: 99vw;
        height: calc(99vw / 2.33);
        !*margin-right: 10%;*!
        z-index: -2;
        position: relative;
        object-fit: cover;
    }*/

    .media {
        /*height: 100px;*/
        font-size: 1rem;
    }

    .media h5,
    .media h5 a {
        font-size: 1.05rem !important;
        font-weight: 500;
    }

    .media img {
        height: 62px;
        float: left;
        margin-right: var(--gap);
    }

    .media a.download {
        font-size: 1rem !important;
        color: var(--orange);
        border-bottom: 1px dashed var(--orange);
        padding-bottom: 2px;
        margin: 0 15px;
    }

    .media a.download:hover {
        border-color: transparent;
    }

    .card h5 {
        font-size: 1.3rem;
        bottom: 0;
        padding-bottom: 6px;
    }

    .pagination ul > li {
        padding: 0px;
        width: 40px;
        height: 40px;
        line-height: 40px;
    }

    .pagination ul > li > a {
        color: var(--blue);
        font-weight: 600;
        font-size: 1.5rem;
        padding: 5px 15px;
    }

    footer {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: var(--gap);
        background-color: var(--orange);
    }
}

@media (min-width: 1200px) {
    h1 {
        font-size: 2rem;
    }

    header {
        grid-template-columns: 200px auto auto 160px;
        /* grid-template-columns: auto 1fr 200px 160px; */
        grid-template: "logo nav links tel";
    }

    header > .navbar {
    }

    .navbar > button.navbar-toggler {
        display: none;
    }

    .navbar > .navbar-collapse {
        display: block;
    }
    
    .main-menu .nav-link {
        font-size: 1rem;
    }

    /*.container {
        margin: 0 auto;
        width: 100%;
        min-width: 1200px;
        max-width: 1200px;
    }*/
    main {
        margin: var(--gap) auto !important;
        max-width: var(--width) !important;
        width: var(--width) !important;
        display: grid;
        grid-template-rows: auto;
        grid-gap: var(--gap);
        align-items: flex-start;
        align-content: flex-start;
    }

    .contacts {
        grid-template-columns: repeat(2, 1fr);
    }

    footer {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-gap: var(--gap);
        padding: var(--gap) calc((100% - 1400px) / 2 - 18px);
        background-color: var(--orange);
    }
}

@media (orientation: landscape) {
    .image-thumb {
        max-height: 60vh !important;
        object-fit: contain;
    }
}

@media (orientation: portrait) {
    .image-thumb {
        max-height: 60vh !important;
        object-fit: contain;
    }
}