.blog__header {
    margin-block: 24px 64px;
}

.blog-details .blog__header {
    margin-bottom: 32px;
}

.blog__header h1 {
    font: 700 clamp(24px, 4vw, 32px)/1.25 var(--font), sans-serif;
}

.blog__categories.top {
    margin-top: 35px;
}

.blog__hero {
    margin-bottom: 64px;
}

.blog__posts-ctrl {
    margin-block: 64px;
}

.blog__posts-ctrl .btn-wrapper {
    text-align: center;
}

.blog__posts-ctrl .btn {
    appearance: none;
    cursor: pointer;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 115px;
    gap: 16px;
    margin-inline: auto;
    border: 1px solid #EFF3F6;
    border-radius: 12px;
}

.blog__posts-ctrl .btn:hover {
    background: #EFF3F6;
}

.blog__posts-ctrl .icon {
    width: 13px;
    height: 8px;
}

.blog__posts-ctrl .icon-left {
    width: 8px;
    height: 13px;
}

.blog__posts-ctrl span {
    font: 700 16px/1.5 var(--font), sans-serif;
}

.blog .breadcrumbs li:last-child a::after {
    content: none;
}

.blog-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-content p {
    font: 400 16px/1.5 var(--font), sans-serif;
}

.blog-content picture {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
}

.blog-content picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-detail-wrp {
    margin-bottom: 64px;
}

.blog-detail-wrp .blog__posts-ctrl {
    margin-bottom: 0;
}

/* TAGS LIST */

.blog__categories-title {
    font: 700 clamp(24px, 4vw, 32px)/1.25 var(--font), sans-serif;
    margin-block: 64px 32px;
}

.tags-btn-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-btn-links a {
    display: block;
    text-decoration: none;
    font: 400 16px/1.5 var(--font), sans-serif;
    padding: 10px 16px;
    border: 1px solid #EFF3F6;
    border-radius: 4px;
    color: #000000;
    transition: ease-in-out .25s;
}

.tags-btn-links a:hover {
    background: #EFF3F6 !important;
    color: #000000 !important;
    border: 1px solid #EFF3F6 !important;
}

.tags-btn-links li.active a {
    font-weight: 700;
    color: #ffffff !important;
    background: #0054AA !important;
    border-color: #0054AA !important;
}

/* BLOGS LAYOUT */
.blog__posts {
    margin-bottom: 64px;
}

.blog__posts-wrp.with_popular {
    display: grid;
    grid-template-columns: 1fr 398px;
    gap: 16px;

    .blog-details & {
        gap: 40px;
    }
}

.blogs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(305px, 1fr)); /* min 301 */
    gap: 32px 8px;
}

.blogs-footer {
    grid-column: 1 / 3;
    order: 3;
}

.blogs-popular {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 66px;
}

.blogs-popular h3 {
    font: 700 clamp(24px, 4vw, 32px)/1 var(--font), sans-serif;
    margin-bottom: 16px;
}

/* BLOG CARD */
.blog-card-container {
    container-type: inline-size;
}

.blog-card-image picture {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
}

.blog-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-tags {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;

    a {
        font: 400 13px/1.5 var(--font), sans-serif;
        color: #05ADFF;
        white-space: nowrap;

        &:hover {
            color: #0054AA;
        }
    }
}

.blog-card-title {
    font: 700 clamp(24px, 2.5vw, 32px)/1.25 var(--font), sans-serif;
    margin-block: 20px;
    max-width: 50%;

    :hover {
        color: #0054aa;
    }

    a {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }
}

.blog-card-title a {
    color: inherit;
}

.blog-card-description {
    font: 400 16px/1.5 var(--font), sans-serif;
    color: #8c8c8c;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    min-height: 3lh;
    overflow: hidden;
}

.blog-card-date {
    font: 400 13px/21px var(--font), sans-serif;
    color: #8c8c8c;
    margin-top: 24px;
}

@container (width < 600px) {
    .blog-card-image picture {
        border-radius: 4px;
    }

    .blog-card-title {
        font: 700 clamp(16px, 2vw, 24px)/1.33 var(--font), sans-serif;
        max-width: 100%;
        margin-block: 16px 10px;

        a {
            min-height: 2lh;
        }
    }

    .blog-card-description {
        -webkit-line-clamp: 2;
        min-height: 2lh;
    }
}


.blog-card-small {
    .blog-card {
        display: flex;
        gap: 16px;
    }

    .blog-card-title {
        margin-top: -3px;
    }

    .blog-card-description {
        -webkit-line-clamp: 3;
        min-height: 3lh;
    }

    .blog-card-image picture {
        width: 150px;
        aspect-ratio: 1;
    }

    .blog-card-tags,
    .blog-card-date {
        display: none;
    }

}

@media screen and (max-width: 991px) {
    .blog__posts-wrp.with_popular {
        display: block;
    }

    .blogs-popular h3 {
        margin-top: 32px;
    }

    .blogs-popular-container {
        margin-top: 32px;
    }

    .blog__posts-ctrl {
        margin-top: 32px !important;
        margin-bottom: 32px !important;

        .blog-content & {
            margin-top: 0 !important;
        }
    }

    .blog__categories-title {
        margin-top: 35px;
    }
}

@media screen and (max-width: 767px) {
    .blog__posts-ctrl .btn {
        padding: 16px;
        width: 100%;
    }

    .blog-card-tags,
    .blog-card-title {
        margin-top: 8px;
    }

    .blog-card-date {
        margin-top: 12px;
    }
}

/* OTHER FIXES */

.blog-text {
    ol, ul {
        list-style-position: inside;
    }
    ul {
        list-style-type: disc;
    }
    ol {
        list-style-type: decimal;
    }
    p, ol, ul {
        &:not(:first-child) {
            margin-top: 24px;
        }
        &:not(:last-child) {
            margin-bottom: 24px;
        }
    }
}