/** 
 * CSS Style: Template "Custom"
 * 
 * @since 1.0
 */
.page-template-custom .theme-custom-singular {
    margin-bottom: var(--theme-margin);
}

.page-template-custom .theme-widget:not(:last-child) { /*  */
    margin-bottom: calc(2 * var(--theme-margin));
}

.theme-posts .theme-grid-card, 
.theme-iframe-widget .theme-grid-iframe {
    justify-content: space-between;
}

.theme-iframe-widget .theme-grid-iframe.theme-columns {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    /*flex-wrap: nowrap;*/
}

.theme-posts .theme-grid-card .theme-card, .theme-iframe-widget .theme-grid-iframe .theme-iframe {
    /*min-width: calc( 25% - var(--theme-margin) );*/
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding-bottom: var(--theme-padding);
}


.theme-iframe-widget .theme-iframe-video {
    margin-bottom: 0;
}

.theme-iframe-widget .theme-iframe-title {
    font-weight: bold;
    font-size: 18px;
    padding: 10px 0 0 10px;
}

.theme-posts .theme-grid-card.theme-columns-2 .theme-card,
.theme-iframe-widget .theme-grid-iframe.theme-columns-2 .theme-iframe, 
.theme-iframe-widget .theme-grid-iframe.theme-columns .theme-iframe {
    flex: 0 0 calc((100% / 2) - var(--theme-margin));
    max-width: 50%;
}

.theme-posts .theme-grid-card.theme-columns-3 .theme-card,
.theme-iframe-widget .theme-grid-iframe.theme-columns-3 .theme-iframe {
    flex: 0 0 calc((100% / 3) - var(--theme-margin));
    max-width: 33.3333333%;
}

.theme-posts .theme-grid-card.theme-columns-4 .theme-card,
.theme-iframe-widget .theme-grid-iframe.theme-columns-4 .theme-iframe {
    flex: 0 0 calc((100% / 4) - var(--theme-margin));
    max-width: 25%;
}

@media only screen and (max-width: 1100px) {

    .theme-posts .theme-grid-card.theme-columns-3 .theme-card, 
    .theme-posts .theme-grid-card.theme-columns-4 .theme-card,
    .theme-iframe-widget .theme-grid-iframe.theme-columns-3 .theme-iframe,
    .theme-iframe-widget .theme-grid-iframe.theme-columns-4 .theme-iframe {
        flex: 0 0 calc((100% / 2) - var(--theme-margin));
        max-width: 50%;
    }
    
}

@media only screen and (max-width: 768px) {

    .theme-posts .theme-grid-card.theme-columns-2 .theme-card,
    .theme-posts .theme-grid-card.theme-columns-3 .theme-card,
    .theme-posts .theme-grid-card.theme-columns-4 .theme-card,
    .theme-iframe-widget .theme-grid-iframe.theme-columns-2 .theme-iframe,
    .theme-iframe-widget .theme-grid-iframe.theme-columns-3 .theme-iframe,
    .theme-iframe-widget .theme-grid-iframe.theme-columns-4 .theme-iframe{
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

}

.page-template-custom .theme-project-posts {
    /*margin-bottom: calc( 2 * var(--theme-margin) );*/
    padding: var(--theme-padding);
    background-color: #e2e2e2;
}

.theme-widget-custom .textwidget {
    line-height: 1.5;
    font-size: 19px;
}

/**
 * Сustom html widget navigation
 *
 */
.theme-widget-custom .textwidget.custom-html-widget nav > ul {
    padding: 0;
}

.theme-widget-custom .textwidget.custom-html-widget nav > ul > li {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 5px 10px;
    list-style: none;
    min-height: auto;
    margin-bottom: 0;
}

.theme-widget-custom .textwidget.custom-html-widget nav > ul > li:before {
    display: none;
}

.theme-widget-custom .textwidget.custom-html-widget nav ul > li > a {
    border: 2px solid var(--theme-color);
    padding: 5px 15px !important;
    color: var(--theme-color) !important;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}