/* =========================================================
   MODERN BLOG GRID
   ========================================================= */

.mbg-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 20px 70px;
    box-sizing: border-box;
}


/* =========================================================
   GRID
   ========================================================= */

.mbg-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 48px 30px;

    width: 100%;
}


/* =========================================================
   CARD
   ========================================================= */

.mbg-card {
    min-width: 0;
    background: #ffffff;

    border-radius: 14px;

    overflow: hidden;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;

    box-shadow:
        0 5px 25px rgba(0, 0, 0, 0.06);
}


.mbg-card:hover {
    transform: translateY(-7px);

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   IMAGE
   ========================================================= */

.mbg-image-link {
    display: block;

    text-decoration: none;

    overflow: hidden;
}


.mbg-image-wrapper {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #f1f1f1;
}


.mbg-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.6s cubic-bezier(
            0.2,
            0.7,
            0.2,
            1
        );
}


.mbg-card:hover .mbg-image {
    transform: scale(1.07);
}


/* =========================================================
   IMAGE OVERLAY
   ========================================================= */

.mbg-image-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 0, 0, 0.25);

    opacity: 0;

    transition:
        opacity 0.35s ease;
}


.mbg-card:hover .mbg-image-overlay {
    opacity: 1;
}


.mbg-view-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    border-radius: 50%;

    background: #ffffff;

    color: #111111;

    font-size: 22px;

    transform: translateY(15px);

    transition:
        transform 0.35s ease;
}


.mbg-card:hover .mbg-view-icon {
    transform: translateY(0);
}


/* =========================================================
   PLACEHOLDER
   ========================================================= */

.mbg-placeholder {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #eeeeee,
            #dcdcdc
        );

    color: #777777;

    font-size: 15px;
    font-weight: 600;
}


/* =========================================================
   CONTENT
   ========================================================= */

.mbg-content {
    padding: 25px 25px 28px;
}


/* =========================================================
   META
   ========================================================= */

.mbg-meta {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 12px;

    font-size: 12px;

    line-height: 1.4;

    text-transform: uppercase;

    letter-spacing: 0.7px;

    color: #888888;
}


.mbg-category {
    color: #555555;

    font-weight: 600;
}


.mbg-separator {
    color: #bbbbbb;
}


/* =========================================================
   TITLE
   ========================================================= */

.mbg-title {
    margin: 0 0 13px;

    padding: 0;

    font-size: 23px;

    line-height: 1.3;

    font-weight: 700;

    letter-spacing: -0.3px;
}


.mbg-title a {
    color: #171717;

    text-decoration: none;

    transition:
        color 0.25s ease;
}


.mbg-title a:hover {
    color: #777777;
}


/* =========================================================
   EXCERPT
   ========================================================= */

.mbg-excerpt {
    margin-bottom: 20px;

    color: #707070;

    font-size: 15px;

    line-height: 1.75;
}


/* =========================================================
   READ MORE
   ========================================================= */

.mbg-read-more {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    color: #171717;

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 0.5px;

    text-transform: uppercase;

    transition:
        gap 0.25s ease;
}


.mbg-read-more:hover {
    gap: 14px;
}


.mbg-arrow {
    font-size: 18px;

    line-height: 1;
}


/* =========================================================
   LOAD MORE
   ========================================================= */

.mbg-load-more-wrapper {
    display: flex;

    justify-content: center;

    margin-top: 55px;
}


.mbg-load-more {
    position: relative;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 170px;

    min-height: 54px;

    padding: 14px 30px;

    border: 1px solid #222222;

    border-radius: 50px;

    background: #222222;

    color: #ffffff;

    font-family: inherit;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 1px;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}


.mbg-load-more:hover {
    background: #ffffff;

    color: #222222;

    transform: translateY(-2px);
}


.mbg-load-more:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.25);

    outline-offset: 4px;
}


.mbg-load-more.is-loading {
    pointer-events: none;

    opacity: 0.75;
}


.mbg-button-text {
    transition:
        opacity 0.2s ease;
}


.mbg-load-more.is-loading
.mbg-button-text {
    opacity: 0;
}


/* =========================================================
   SPINNER
   ========================================================= */

.mbg-spinner {
    position: absolute;

    width: 18px;
    height: 18px;

    border: 2px solid rgba(255, 255, 255, 0.35);

    border-top-color: #ffffff;

    border-radius: 50%;

    opacity: 0;

    animation:
        mbg-spin 0.7s linear infinite;
}


.mbg-load-more.is-loading
.mbg-spinner {
    opacity: 1;
}


@keyframes mbg-spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   NO MORE POSTS
   ========================================================= */

.mbg-no-more {
    margin-top: 45px;

    text-align: center;

    color: #999999;

    font-size: 14px;
}


/* =========================================================
   EMPTY
   ========================================================= */

.mbg-empty {
    padding: 80px 20px;

    text-align: center;

    background: #f8f8f8;

    border-radius: 14px;
}


.mbg-empty-icon {
    width: 50px;
    height: 50px;

    margin: 0 auto 20px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #e9e9e9;

    color: #777777;

    font-size: 24px;
}


.mbg-empty h3 {
    margin: 0 0 8px;

    font-size: 22px;
}


.mbg-empty p {
    margin: 0;

    color: #777777;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .mbg-wrapper {
        padding-left: 18px;
        padding-right: 18px;
    }


    .mbg-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 30px 22px;
    }


    .mbg-content {
        padding: 22px;
    }


    .mbg-title {
        font-size: 21px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .mbg-wrapper {
        padding:
            10px
            15px
            50px;
    }


    .mbg-grid {
        grid-template-columns: 1fr;

        gap: 25px;
    }


    .mbg-card {
        border-radius: 12px;
    }


    .mbg-image-wrapper {
        aspect-ratio: 16 / 10;
    }


    .mbg-content {
        padding: 20px 20px 24px;
    }


    .mbg-title {
        font-size: 20px;
    }


    .mbg-excerpt {
        font-size: 14px;
    }


    .mbg-load-more-wrapper {
        margin-top: 40px;
    }


    .mbg-load-more {
        width: 100%;
        max-width: 280px;
    }

}


/* =========================================================
   REDUCE MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .mbg-card,
    .mbg-image,
    .mbg-image-overlay,
    .mbg-view-icon,
    .mbg-read-more,
    .mbg-load-more {
        transition: none !important;
    }

    .mbg-spinner {
        animation: none !important;
    }

}