/* =========================================================
   N-FLUX — BLOGS / INSIGHTS
========================================================= */

.blogs-section {

    position: relative;

    padding:
        var(--section-space-lg) 0;

    overflow: hidden;

    background:
        var(--bg);

}


/* =========================================================
   HEADER
========================================================= */

.blogs-header {

    position: relative;

    z-index: 2;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 25px;

    margin-bottom: 34px;

}


.blogs-header-content {

    max-width: 650px;

}


.blogs-header .section-eyebrow {

    margin-bottom: 12px;

}


.blogs-description {

    max-width: 560px;

    margin: 13px 0 0;

    color:
        var(--text-muted);

    font-size: .72rem;

    line-height: 1.75;

}


/* =========================================================
   VIEW ALL
========================================================= */

.blogs-view-all {

    flex: 0 0 auto;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    color:
        var(--primary);

    text-decoration: none;

    font-size: .85rem;

    font-weight: 850;

    transition:
        gap var(--transition),
        color var(--transition);

}


.blogs-view-all:hover {

    gap: 11px;

    color:
        var(--primary-hover);

}


/* =========================================================
   BLOG GRID
========================================================= */

.blogs-grid {

    position: relative;

    z-index: 2;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;

}


/* =========================================================
   BLOG CARD
========================================================= */

.blog-card {

    position: relative;

    display: flex;

    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);

}


.blog-card:hover {

    transform:
        translateY(-5px);

    border-color:
        rgba(22, 141, 226, .2);

    box-shadow:
        var(--shadow-md);

}


/* =========================================================
   BLOG IMAGE
========================================================= */

.blog-image {

    position: relative;

    aspect-ratio:
        16 / 9;

    overflow: hidden;

    background:
        var(--surface-soft);

}


.blog-image img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .55s ease;

}


.blog-card:hover .blog-image img {

    transform:
        scale(1.045);

}


/* =========================================================
   CATEGORY
========================================================= */

.blog-category {

    position: absolute;

    top: 12px;

    left: 12px;

    display: inline-flex;

    align-items: center;

    min-height: 25px;

    padding:
        0 9px;

    border:
        1px solid rgba(255, 255, 255, .16);

    border-radius: 8px;

    background:
        rgba(0, 0, 0, .52);

    color:
        #fff;

    font-size: .85rem;

    font-weight: 800;

    letter-spacing: .04em;

    text-transform: uppercase;

    backdrop-filter:
        blur(10px);

}


/* =========================================================
   BLOG CONTENT
========================================================= */

.blog-content {

    display: flex;

    flex-direction: column;

    flex: 1;

    padding:
        18px 18px 17px;

}


.blog-meta {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 9px;

    color:
        var(--text-muted);

    font-size: .8rem;

    font-weight: 700;

}


.blog-meta-dot {

    width: 3px;

    height: 3px;

    border-radius: 50%;

    background:
        var(--text-muted);

}


/* =========================================================
   BLOG TITLE
========================================================= */

.blog-title {

    display: -webkit-box;

    margin:
        0 0 9px;

    overflow: hidden;

    color:
        var(--text);

    font-size: .88rem;

    font-weight: 850;

    line-height: 1.38;

    letter-spacing:
        -.018em;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

}


.blog-excerpt {

    display: -webkit-box;

    margin:
        0 0 17px;

    overflow: hidden;

    color:
        var(--text-muted);

    font-size: .61rem;

    line-height: 1.7;

    -webkit-line-clamp: 3;

    -webkit-box-orient: vertical;

}


/* =========================================================
   READ MORE
========================================================= */

.blog-read-more {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-top: auto;

    width: fit-content;

    color:
        var(--primary);

    text-decoration: none;

    font-size: .57rem;

    font-weight: 850;

}


.blog-read-more i {

    transition:
        transform var(--transition);

}


.blog-read-more:hover i {

    transform:
        translateX(3px);

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .blogs-section {

        padding:
            var(--section-space) 0;

    }


    .blogs-header {

        display: block;

        margin-bottom:
            25px;

    }


    .blogs-description {

        margin-top:
            10px;

        font-size:
            .67rem;

    }


    .blogs-view-all {

        margin-top:
            15px;

        font-size:
            .58rem;

    }


    /*
       Horizontal cards on mobile.
       Feels more like a mobile app.
    */

    .blogs-grid {

        display: flex;

        gap: 12px;

        margin-right:
            -15px;

        padding-right:
            15px;

        overflow-x: auto;

        scroll-snap-type:
            x mandatory;

        scrollbar-width:
            none;

    }


    .blogs-grid::-webkit-scrollbar {

        display: none;

    }


    .blog-card {

        flex:
            0 0 82%;

        scroll-snap-align:
            start;

        border-radius:
            16px;

    }


    .blog-content {

        padding:
            15px;

    }


    .blog-title {

        font-size:
            .8rem;

    }


    .blog-excerpt {

        font-size:
            .59rem;

    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .blog-card,
    .blog-image img,
    .blogs-view-all,
    .blog-read-more i {

        transition: none;

    }

}