/* -------------------------------------------
    Blog
        - Default
        - Video
        - List
        - Image gap
        - Ovelay
        - Large
        - Filters
---------------------------------------------- */

// Posts
.posts {
    &.text-left {

        .post-cats,
        .post-meta {
            justify-content: flex-start;
        }
    }

    &.text-center {

        .post-cats,
        .post-meta {
            justify-content: center;
        }
    }

    &.text-right {

        .post-cats,
        .post-meta {
            justify-content: flex-end;
        }
    }

    .wp-video-shortcode {
        height: auto;
    }

    .post-meta {
        margin-bottom: .3rem;
    }
}

.post-meta>span:last-of-type {
    margin-#{$right}: 2rem;
}

.post-meta>span:last-child {
    margin-#{$right}: 0;
}

// Default
.post {
    .btn {
        font-size: 1.4rem;
        font-weight: 400;
        text-transform: capitalize;
        color: var(--wolmart-dark-color, $dark-color);

        i {
            margin-#{$left}: 8px;

            &::before {
                margin: 0;
            }
        }
    }

    .post-details>*:last-child {
        margin-bottom: 0;
    }

    // added (925)
    &.sticky .post-title::after {
        content: 'Sticky';
    }

    &.format-video .post-title::after {
        content: 'Video';
    }

    &.sticky,
    &.format-video {
        .post-title::after {
            position: relative;
            top: -10px;
            padding: 0 4px;
            margin-#{$left}: 5px;
            border-radius: 2px;
            color: #fff;
            background-color: var(--wolmart-primary-color, $primary-color);
            font-size: .5em;
            font-weight: 400;
            letter-spacing: 0;
        }
    }
}

.post-calendar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 4.1rem;
    height: 4.2rem;
    color: var(--wolmart-dark-color, $dark-color);
    background: #fff;
    font-weight: 600;
    line-height: 1;

    .post-day {
        display: block;
        margin-bottom: 1px;
        font-size: 1.4rem;
    }

    .post-month {
        display: block;
        margin-#{$left}: 2px;
        font-size: 1rem;
    }

    +.post-details .post-meta {
        display: none;
    }
}

.post-media {
    position: relative;

    img {
        display: block;
        width: 100%;
    }

    .post-calendar {
        position: absolute;
        text-transform: uppercase;
        #{$left}: 1.5rem;
        top: 1.5rem;
    }

    .slider-pagination {
        bottom: 2.5rem;

        .slider-pagination-bullet {
            span {
                border-color: #fff;
                background-color: transparent;
            }

            &:hover span {
                border-color: #fff;
                background-color: #fff;
            }
        }
    }
}

.post-details {
    padding: 0 0 2.5rem;

    .post-media+&,
    .post-media-carousel+& {
        padding-top: 1.7rem;
    }
}

.post-title {
    overflow: hidden;
    margin-bottom: .9rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    word-wrap: break-word;
    text-transform: none;
    text-overflow: ellipsis;
    white-space: nowrap;

    a:hover,
    a:focus {
        color: var(--wolmart-primary-color, $primary-color);
    }

    &.page-title {
        font-size: 3rem;
    }
}

.post-content {
    color: var(--wolmart-body-color, $body-color);
    font-size: 1.3rem;
    line-height: 1.9;
    letter-spacing: -.025em;

    p {
        margin-top: 0;
        margin-bottom: 1.4rem;
    }
}


.post-meta {
    margin-bottom: .7rem;
    font-size: 1.4rem;
    line-height: 1.5;

    .post-author+*:before {
        content: '-';
        margin: 0 4px;
    }

    mark {
        transition: inherit;
        background-color: transparent;
    }

    mark {
        font-weight: 600;
    }

    a,
    mark {
        color: var(--wolmart-dark-color, $dark-color);
    }

    a:hover,
    a:focus {
        color: var(--wolmart-primary-color, $primary-color );
    }

    .post-author {
        color: $grey-color;
        font-size: 1.3rem;

        a {
            font-size: 1.077em;
            font-weight: 600;
        }
    }

    .comments-link {
        color: $grey-color;

        &:hover mark {
            color: var(--wolmart-primary-color, $primary-color );
        }

        &:before {
            content: '\e92e';
            display: inline-block;
            margin-#{$right}: .8rem;
            vertical-align: middle;
            font-family: 'wolmart';
            font-size: 1.16em;
            line-height: 1;
            margin-top: -2px;
        }
    }
}

.post-cats {
    line-height: 1.2;

    a {
        color: $grey-color;

        &:not(:#{if-rtl(last, first)}-child) {
            margin-left: 5px;
        }

        &:hover {
            color: var(--wolmart-primary-color-hover, #3c78b3);
        }
    }
}

.post-sm {
    .post-details {
        padding: 2.2rem .3rem 2rem;
    }
}

.post-meta,
.post-cats {
    display: flex;
    flex-wrap: wrap;
}

.post {
    .mejs-overlay-button {
        background: none;
        border: 2px solid #fff;
        border-radius: 50%;
        font-family: 'wolmart';
        font-size: 1.8rem;
        font-weight: 600;
        color: #fff;
        text-align: center;
        transition: background .3s, color .3s, box-shadow .3s, opacity .3s;

        &:hover {
            box-shadow: 0px 0px 0px 15px rgba(255, 255, 255, .2);
            background: #fff;
            color: var(--wolmart-primary-color, $primary-color);
        }

        &::before {
            content: '\e9c5';
            margin-#{$left}: 4px;
        }

        .posts & {
            width: 4rem;
            height: 4rem;
            line-height: 3.6rem;
        }
    }

    .mejs-overlay-button,
    &.post-full .mejs-overlay-button {
        width: 6.8rem;
        height: 6.8rem;
        line-height: 6.4rem;
    }
}

// List Type
.post-list {
    img {
        object-fit: cover;
        height: 100%;
        min-height: 100%;
    }

    .post-details {
        padding: 2rem 0;
    }

    .post-media {
        display: flex;
        align-self: stretch;

        >a {
            width: 100%;
        }
    }
}

@include mq(sm) {
    .post-list {
        display: flex;
        align-items: center;

        .post-media {
            margin-#{$right}: 2rem;
            width: calc(50% - 1rem);
            max-width: 400px;
        }

        .post-details {
            width: calc(50% - 1rem);
            flex: 1;
        }
    }
}

.post-list-xs {
    display: flex;
    align-items: center;

    .post-details {
        flex: 1;
        margin: side-values(0 0 0 2rem);
        padding: 0;
    }

    .post-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 0;
        text-transform: none;

        font: {
            size: inherit;
            weight: 400
        }

        line-height: 1.69;
        color: inherit;
        white-space: normal;
    }
}

.post-widget {
    display: flex;
    align-items: center;

    .post-media {
        width: 8rem;
        flex: 0 0 8rem;
    }

    .post-details {
        padding: 0;

        &:not(:first-child) {
            margin-#{$left}: 1.6rem;
        }
    }

    .post-title {
        margin-bottom: 0;
        white-space: normal;
        text-transform: none;
        font-weight: 500;
        line-height: 1.43;
    }

    .post-meta,
    .post-title {
        font-size: 1.3rem;
    }

    .post-meta {
        color: #666;
    }

    .post-details .post-meta span a {
        color: inherit;
    }
}

// Mask Type
.post-mask {
    position: relative;

    &::before {
        content: '';
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 50%;
        background: linear-gradient(to bottom, rgba(125, 185, 232, 0) 0%, #000 100%);
        opacity: .75;
        transition: all 0.3s;
        pointer-events: none;
        z-index: 1;
    }

    .post-details {
        position: absolute;
        padding: 0;
        left: 3rem;
        right: 3rem;
        bottom: 2.4rem;
        z-index: 2;

        a {
            color: #fff;

            &:hover {
                color: #fff;
                text-decoration: underline;
            }
        }
    }

    .post-calendar {
        z-index: 3;
    }

    .post-title {
        white-space: normal;
        color: #fff;
    }

    &:hover {
        .post-media a::before {
            opacity: .1;
        }
    }

    .post-author,
    .post-meta,
    .post-cats,
    .post-author+*:before {
        color: #ebebeb;
    }

    mark,
    .comments-link:hover mark {
        color: #fff;
    }

    .post-details {
        transform: translateY(100%);
        will-change: transform;
        transition: transform .3s;
    }

    .post-meta-visible {
        position: absolute;
        bottom: 100%;
    }

    .post-meta {
        opacity: 0;
        transition: opacity .3s;
    }

    &:hover {
        .post-details {
            transform: translateY(0);
        }

        .post-meta:last-child {
            opacity: 1;
        }
    }
}

// Filters
ul.blog-filters {
    text-transform: capitalize;
    font-weight: 600;
    color: var(--wolmart-dark-color, $dark-color);

    li {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
}

.blog-filters {
    justify-content: center;

    span {
        margin-#{$left}: 10px;
        color: #aaa;
    }

    li {
        padding: 0;
        margin-#{$right}: .8rem;
        border-bottom: 2px solid transparent;
        line-height: 2.143;
    }
}

// in grid item
.posts.grid:not(.masonry) {
    .post-wrap {
        margin-bottom: 0;
    }

    .post {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .post-media {
        flex: 1;
        height: 0;

        >a {
            display: block;
            height: 100%;
        }

        img {
            height: 100%;
        }
    }
}

.post-media-carousel .slider-pagination {
    bottom: 2.5rem;
}

// sidebar posts widget
.posts .post-wrap,
.posts-col .post-wrap {
    margin-bottom: 2rem;
}

// .slider-slide > .post-wrap {
//     margin-bottom: 0;
// }

// Thumbnail Caption // added (925)
.thumbnail-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
}

// Tag Cloud
.post-tags>a,
.sidebar .tagcloud>a {
    display: inline-block;
    margin: side-values(5px 10px 5px 0);
    padding: 5px 9px;
    font-size: 1.3rem;
    border: 1px solid var(--wolmart-light-color, $light-color);
    color: var(--wolmart-body-color, $body-color);
    line-height: 1.35;
    transition: color .3s, border-color .3s;
    text-transform: capitalize;

    &:hover,
    &:focus {
        // updated(925)
        color: var(--wolmart-primary-color, $primary-color);
        border-color: var(--wolmart-primary-color, $primary-color);
    }
}

// Posts navigation widget
.widget-posts.slider-container {
    position: relative;
}

.widget-posts-nav .posts-nav li.active a {
    color: var(--wolmart-primary-color, $primary-color);
}