/** 
 * CSS Style: Theme card 
 * 
 * @since 1.0
 */

/** 
 * Theme grid card
 * 
 * @since 1.0.0
 */
.theme-grid-card.theme-card-columns {
    margin-left: calc( var(--theme-margin) * -1 );
    margin-right: calc( var(--theme-margin) * -1 );

}

@media only screen and (max-width: 1100px) {

    .theme-grid-card.theme-card-columns {
        max-width: 725px;
        margin: 0 auto;
    }

}

/** 
 * Theme card
 * 
 * @since 1.0.0
 */
.theme-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 0 var(--theme-padding) 0; /* 0 0 calc(var(--theme-padding) * 1.5) 0 */
}

/*.theme-widget .theme-card:last-child {
    padding-bottom: 0;
}*/

.theme-card.theme-grid-col-6,
.theme-card.theme-grid-col-4,
.theme-card.theme-grid-col-3 {
    padding: 0 var(--theme-padding) var(--theme-padding) var(--theme-padding); /* 0 var(--theme-padding) calc(var(--theme-padding) * 2) var(--theme-padding) */
}

/*.theme-home-second > .theme-grid-col:nth-child(2) .theme-posts .theme-card:last-child {
    padding-bottom: 0;
}*/

@media only screen and (max-width: 1100px) {
    .theme-card.theme-grid-col-6,
    .theme-card.theme-grid-col-4,
    .theme-card.theme-grid-col-3 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 0 var(--theme-padding) 0; /*calc(var(--theme-padding) * 2)*/
    }

    /*.theme-home-second>.theme-grid-col:nth-child(2) .theme-posts .theme-card:last-child {
        padding-bottom: var(--theme-padding);
    }*/
}

.theme-card-items {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.theme-card-items.theme-card-image-left {
    flex-direction: row;
}

.theme-card-items.theme-card-image-right {
    flex-direction: row-reverse;
}

.theme-card-items.theme-card-image-after-text {
    position: relative;
}

.theme-card a {
    color: #000000;
}

.theme-card .theme-card-items.theme-card-image-after-text,
.theme-card .theme-card-items.theme-card-image-after-text a {
    color: #ffffff;
}

/** 
 * Theme card image
 *
 */
.theme-card-image {
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: 10px;
}

.theme-card-items.theme-card-image-left .theme-card-image,
.theme-card-items.theme-card-image-right .theme-card-image {
    flex: 0 0 calc((100% / 2) - var(--theme-margin));
    max-width: calc((100% / 2) - var(--theme-margin));
}

.theme-card-items.theme-card-image-left .theme-card-image {
    margin-right: var(--theme-margin);
    margin-bottom: 0;
}

.theme-card-items.theme-card-image-right .theme-card-image {
    margin-left: var(--theme-margin);
    margin-bottom: 0;
}

.theme-card-items.theme-card-image-after-text .theme-card-image {
    margin-bottom: 0;
}

.theme-card-items.theme-card-image-after-text .theme-card-image:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .2) 40%, #222222 100%);
    border-radius: 10px;
    z-index: 8;
}

.theme-card-image .theme-thumbnail-has {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.theme-card-image .theme-thumbnail-has svg {
    fill: #ffffff;
    width: 80px;
    height: auto;
    display: block;
    opacity: 0.8;
}

@media only screen and (max-width: 580px) {
    .theme-card-image .theme-thumbnail-has svg {
        width: 40px;
        height: auto;
    }
}

.theme-card-image a {
    display: block;
    position: relative;
    /* aspect-ratio: 16/9; */
    padding-bottom: 36.25%; /* 16/9 -  56.25%, 4/3 - 75% / 133.33% 125% */
    width: 100%;
    min-width: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-color: #f9f9f9;
    /*border-radius: 10px;*/
}

@media only screen and (max-width: 768px) {

    .theme-card-items.theme-card-image-left .theme-card-image,
    .theme-card-items.theme-card-image-right .theme-card-image {
        flex: 0 0 115px;
        max-width: 115px;
    }

    .theme-card-items.theme-card-image-left .theme-card-image a,
    .theme-card-items.theme-card-image-right .theme-card-image a {
        padding-bottom: 90px;
    }

}

@media only screen and (max-width: 560px) {

    .theme-card-items.theme-card-image-left .theme-card-image,
    .theme-card-items.theme-card-image-right .theme-card-image {
        flex: 0 0 90px;
        max-width: 90px;
    }

}

/** 
 * Theme card title
 *
 */
.theme-card-title {
    font-weight: 500;
    line-height: 1.35;
}

.theme-card-title.theme-title-has-highlight {
    font-weight: 600 !important;
}

.theme-card-title .theme-title-has {
    color: var(--theme-color);
    font-weight: 600;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;    
}

.theme-card-title .theme-title-has svg {
    width: auto;
    height: 16px;
    fill: var(--theme-color);
    display: block;
    margin-bottom: 3px;
}

/*.theme-card-title .theme-title-has-update {
    background-color: var(--theme-color);
    color: #ffffff !important;
    padding: 1px 6px 0 6px;
    font-weight: normal;
    font-style: normal;
    border-radius: 4px;
    font-size: 11px;
    line-height: 18px;
    height: 18px;
    vertical-align: middle;
    display: inline-block;
    margin-top: 0;
    margin-left: 3px;
    margin-right: 0;
}*/

/*.theme-card-all-posts .theme-card-title .theme-title-has-update, 
.theme-card-popular-posts .theme-card-title .theme-title-has-update {*/
.theme-card-title .theme-title-has-update {
    width: 11px;
    height: 11px;
    background-color: #ff0000;
    border-radius: 50%;
    padding: 0;
    font-size: 0;
    line-height: 0;
    margin-top: -2px;
    margin-left: 0;
    margin-right: 5px;
    animation: post-has-update 1s infinite alternate;
}

@keyframes post-has-update {
    from {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }

    to {
        opacity: .2;
    }
}

h2.theme-card-title {
    font-size: 30px;
}

h3.theme-card-title {
    font-size: 17px;
}

@media only screen and (max-width: 1100px) {
    .theme-card-image-after-text h3.theme-card-title {
        font-size: 30px;
    }
}

@media only screen and (max-width: 768px) {

    .theme-card-image-after-text h2.theme-card-title,
    .theme-card-image-after-text h3.theme-card-title {
        font-size: 20px;
    }

    h3.theme-card-title {
        font-size: 16px;
    }
}

@media only screen and (max-width: 560px) {

    .theme-card-image-after-text h2.theme-card-title,
    .theme-card-image-after-text h3.theme-card-title {
        font-size: 16px;
    }
}

h4.theme-card-title {
    font-size: 16px;
}

h5.theme-card-title {
    font-size: 15px;
}

h6.theme-card-title {
    font-size: 14px;
}

/** 
 * Theme card text
 *
 */
.theme-card-text {
    display: flex;
    flex-direction: column;
    /*justify-content: space-between;*/
}

.theme-card-items.theme-card-image-after-text .theme-card-text {
    position: absolute;
    padding: var(--theme-padding);
    /*bottom: 0;*/
    z-index: 9;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/*.theme-card-text .theme-card-text-item:first-child {
    order: 2;
}

.theme-card-text .theme-card-text-item:last-child {
    order: 1;
    margin-bottom: 5px;
}*/

@media only screen and (max-width: 1100px) {
    .theme-card-text .theme-card-text-item:first-child {
        order: 1;
    }
    
    .theme-card-text .theme-card-text-item:last-child {
        order: 2;
        margin-top: 10px;
        margin-bottom: 0;
    }
}

/** 
 * Theme card description
 *
 */
.theme-card-description {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.35;
}

@media only screen and (max-width: 768px) {
    .theme-card-items.theme-card-image-left .theme-card-description, 
    .theme-card-items.theme-card-image-right .theme-card-description {
        display: none;
    }
}

/** 
 * Theme card info
 *
 */
.theme-card-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 12px;
    font-weight: 400;
    color: var( --theme-color-dark-grey );
    /*margin-top: 10px;*/
}

.theme-card-items.theme-card-image-after-text .theme-card-info {
    color: #ffffff;
}

/*.theme-card-info a {
    color: var( --theme-color-dark-grey );
}*/

.theme-card-info .theme-card-category a {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    color: #ffffff;
    background-color: var(--theme-color);
    padding: 3px 5px;
    display: inline-block;
}

.theme-card-info .theme-card-date {
    display: none;
}

.theme-card-all-posts .theme-card-info .theme-card-date {
    display: block;
}

@media only screen and (max-width: 1100px) {
    .theme-card-info .theme-card-category a {
        text-transform: uppercase;
        font-weight: normal;
        font-size: 12px;
        color: var(--theme-color-dark-grey);
        background-color: transparent;
        padding: 0;
    }

    .theme-card-info .theme-card-date {
        display: inline-block;
    }
}

/* .theme-card-info>div: not(:last-child):not(:empty):after */
.theme-card-info > div:not(:first-child):before { 
    content: '-';
    margin: 0 5px;
}

/*.archive .theme-card, 
.search .theme-card {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    min-height: 250px;
}

@media only screen and (max-width: 1100px) {
    .search .theme-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media only screen and (max-width: 768px) {
    .search .theme-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}*/