.entry-tpl-grid {
    position: relative;
    width:100%;

    @if( 'miami' == $stack ) {
        margin-bottom: 60px;
    } @else {
        margin-bottom: 30px;
    }

    .entry-featured-media {
        @if ( 'bunchy' == $stack ) {
            margin-bottom:12px;
        } @else{
            margin-bottom: 0;
        }
    }

    @if ( 'top' == $badge_position ) {
        .entry-flags {
            padding: 0 10px;
            margin-bottom: 10px;

            position: absolute;
            z-index: 3;
            @if ( 'bunchy' == $stack ) {
                #{$left}: auto;
                #{$right}: 0;
                top: 10px;
            } @else{
                top: -10px;
                #{$left}: 0;
                #{$right}: auto;
            }
        }

        .entry-flags:first-child {
            position: relative;
        }

    } @else {
        .entry-flags {
            position: absolute;
            z-index: 3;
            @include translateY(-100%);
            margin-bottom: 0;
        }
    }

    .entry-header {
        position: relative;
    }

    .entry-before-title {
        @include box-sizing( border-box );

        @if ( 'bunchy' != $stack ) {
            font-size: 0;
        }

        .entry-categories,
        .entry-categories-inner {
            display: inline; // AMP !important;
            float: none; // AMP !important;
            clear: none; // AMP !important;
            vertical-align: middle; // AMP !important;
        }
    }

    .entry-featured-media ~ .entry-body .entry-before-title {
        @include box-sizing( border-box );
        @if ( 'bunchy' != $stack ) {
            position: absolute;
        }
        #{$left}: 0;
        #{$right}: 0;
        bottom: 100%;
    }

    @if ( 'bottom' == $badge_position ) {
        .entry-featured-media + .entry-flags + .entry-body .entry-before-title {
            padding-#{$left}: $badge_size;
        }
    }

    .entry-meta-stats {
        display: inline-block;
        margin-top: 0;
        margin-bottom: 0;
        font-size: 13px;
    }

    .entry-categories {
        display: inline-block;
        margin-top: 0;
        margin-bottom: 0;

        @if ( 'bunchy' != $stack ) {
            font-size: 0;
        }
    }

    .entry-title {
        padding-top: 0.75em;
        margin-bottom: 0.75em;
    }

    .g1-button {
        float: $right;
        margin-bottom: 15px;
    }
}





// Cards.
@if ( 'cards' == $stack ) {
    .entry-tpl-grid {
        margin-bottom: 10px;
        padding-bottom: 10px;

        background-color: $skin_background_color;
        box-shadow: 0 1px 1px #ededed;

        .entry-header,
        .entry-summary,
        footer {
            padding-#{$left}: 10px;
            padding-#{$right}: 10px;
        }
    }

    @media only screen and (min-width: $mobile_breakpoint + 1px) {
        .entry-tpl-grid {
            margin-bottom: 20px;

            .entry-header,
            .entry-summary,
            footer {
                padding-#{$left}: 20px;
                padding-#{$right}: 20px;
            }

            .entry-before-title {
                .entry-meta-stats {
                    padding-#{$left}: 20px;
                }
            }
        }
    }

    @media only screen and ( min-width: 1025px ) {
        .entry-tpl-grid {
            margin-bottom: 30px;

            .entry-header,
            .entry-summary,
            footer {
                padding-#{$left}: 30px;
                padding-#{$right}: 30px;
            }

            .entry-before-title {
                .entry-meta-stats {
                    padding-#{$left}: 30px;
                }
            }
        }
    }
}
