.references-container{
    -webkit-box-pack: start;
        -ms-flex-pack: start;
            justify-content: flex-start;
    margin-top: 10px;
}

.page-template-template-sidebarmenu .reference-box .boxgrid-content {
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.reference-box:hover .boxgrid-content {
    background-color: #ddd;
}

.reference-box .count-images {
    position: absolute;
    right: 10px;
    top: 10px;
    background-color: var(--primary);
    color: #fff;
    padding: 8px 12px;
}

/*Boxen*/

.references-container p{
    margin-bottom: 0!important;
    color: var(--dark);
    font-size: 0.9em;
}

@media screen and (min-width: 1000px){
    .page-template-template-sidebarmenu .references-container .box-33.with-img .img-side img,
    .page-template-template-sidebarmenu .references-container .box-33.with-img .img-side {
        max-height: 150px;
        min-height: 150px;
    }

    .page-template-template-sidebarmenu .references-container p{
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;  
        overflow: hidden;
    }
    
}

/*Slider*/

.popup-slider{
    width: 100%;
    margin-top: 20px;
}

.img-popup-container {
    max-width: 100%;
}

.img-popup-slider {
    max-height: calc(100vh - 300px);
    height: 100%;
    width: auto;
    margin: 0 auto;
}

/*Popup*/

:root {
    --box-max-width: 900px;
}

section.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 11111998;
}
section.modalWindow {
    display: none;
    position: fixed;
    top: 20%;
    left: 50%;
    z-index: 11111999 !important;
    width: 100%;
    max-width: var(--box-max-width);
    min-height: 200px;
    /* margin-left: -300px; */
    background: #FFF;
    cursor: default;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
}

section.modal.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 11111997;
    cursor: pointer;
}
section.modalWindow section.modalWrapper {
    margin: 30px;
    /* border: 1px solid #DADADA; */
    padding: 15px;
    text-align: left;
    line-height: 20px !important;
  /* height: 300px; */
    height: auto;
}
.closeBtn {
    position: absolute;
    right: 0px;
    top: 0px;
    cursor: pointer;
    background-color: var(--primary);
    color: #fff;
    padding: 5px 16px 10px;
    font-size: 30px;
}
