/* Guides & Workflows (/guides/): the articles as cards, then each article in one
   comfortable reading column */

.blog-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 14px;
    margin-top: 30px;
}

.blog-card{
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 10px 18px;
    border: 1px solid #181e23;
    border-radius: 12px;
    background: #111315;
    color: #c4cad0;
    transition: border-color .18s ease;
}

.blog-card:hover{
    border-color: var(--c);
}

.blog-card img{
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
}

.blog-card-meta{
    display: flex;
    gap: 10px;
    margin: 6px 8px 0;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a97a3;
}

.blog-card-meta b{
    color: var(--c);
    font-weight: 600;
}

.blog-card h2{
    margin: 0 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.blog-card p{
    margin: 0 8px;
    font-size: 14px;
    line-height: 22px;
}

/* One article */
.blog-article{
    max-width: 820px;
}

.blog-draft{
    margin: 0 0 18px;
    padding: 10px 16px;
    border: 1px dashed #ffa35c;
    border-radius: 10px;
    color: #ffa35c;
    font-size: 14px;
}

.blog-cover{
    display: block;
    width: 100%;
    height: auto;
    margin-top: 26px;
    border: 1px solid #1d2329;
    border-radius: 12px;
}

.blog-body{
    margin-top: 28px;
    font-size: 14.5px;
    line-height: 1.7;
    color: #d6dbe0;
}

/* Paragraphs and lists read the same: one size, one color */
.blog-body .paragraph,
.blog-body ul{
    margin: 0 0 16px;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.blog-body ul{
    padding-left: 22px;
}

.blog-body li + li{
    margin-top: 4px;
}

.blog-body h2{
    margin: 28px 0 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.blog-body strong{
    color: inherit;
    font-weight: 700;
}

.blog-body a{
    color: var(--c);
    word-break: break-word;
}

.blog-body img,
.blog-body video{
    display: block;
    max-width: 100%;
    height: auto;
    margin: 6px 0 22px;
    border: 1px solid #1d2329;
    border-radius: 10px;
}

/* Each part of an article in its own box: short texts read better framed */
.blog-part{
    margin: 0 0 20px;
    padding: 22px 24px;
    border: 1px solid #1d2329;
    border-radius: 12px;
    background: #111315;
    scroll-margin-top: 60px;
}

.blog-body .blog-part h2{
    margin-top: 0;
}

.blog-part > :last-child,
.blog-part > .blog-zoom:last-child img{
    margin-bottom: 0;
}

.blog-part img,
.blog-part video{
    margin: 14px 0 0;
}

/* Pictures open full size: a small magnifier says so */
.blog-zoom{
    position: relative;
    display: block;
    cursor: zoom-in;
}

.blog-zoom::after{
    content: "";
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(10, 12, 14, .75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.5-4.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center no-repeat;
    opacity: .8;
    transition: opacity .18s ease;
}

.blog-zoom:hover::after{
    opacity: 1;
}

@container packs (max-width: 900px){
    .blog-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container packs (max-width: 560px){
    .blog-grid{
        grid-template-columns: 1fr;
    }

    .blog-body h2{
        font-size: 15.5px;
    }
}

/* An article on the left, the most read articles on the right, like a
   newspaper */
.blog-layout{
    display: grid;
    grid-template-columns: minmax(0, 760px) 280px;
    gap: 40px;
    align-items: start;
}

.blog-layout .blog-main{
    grid-column: 1;
    grid-row: 1;
}

.blog-reading .category-tags{
    margin: 0 0 22px;
}

.blog-crumbs{
    margin: 0 0 10px;
    font-size: 13px;
    color: #8a97a3;
}

.blog-crumbs a{
    color: inherit;
}

.blog-crumbs a:hover{
    color: var(--c);
}

/* A press-like title: big and bold, the summary opened by the reading time */
.blog-reading #content-title{
    margin: 0 0 16px;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.5px;
    text-wrap: balance;
}

.blog-reading #title-description{
    font-size: 17px;
    line-height: 1.6;
}

.blog-kind{
    display: inline-block;
    margin-right: 6px;
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--c);
    font-size: 13px;
    font-weight: 600;
    color: #06201f;
    vertical-align: 2px;
}

.blog-date{
    margin: 10px 0 0;
    font-size: 13px;
    color: #8a97a3;
}

.blog-most{
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 60px;
    border-top: 1px solid #1d2329;
}

.blog-most h2{
    margin: 14px 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.blog-most a{
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 0;
    border-bottom: 1px solid #1d2329;
    color: #fff;
}

.blog-most span{
    font-size: 13px;
    color: var(--c);
}

.blog-most b{
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.blog-most a:hover b{
    color: var(--c);
}

/* The small line under a picture (a link to the client's channel...) */
.blog-caption{
    margin: 8px 0 0;
    font-size: 12.5px;
    color: #8a97a3;
}

.blog-caption a{
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-caption a:hover{
    color: var(--c);
}

/* The articles before and after, side by side, with their picture */
.blog-neighbours{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.blog-neighbour{
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid #1d2329;
    border-radius: 12px;
    background: #111315;
    color: #fff;
    transition: border-color .18s ease;
}

.blog-neighbour:hover{
    border-color: var(--c);
}

.blog-neighbour.is-next{
    grid-column: 2;
    flex-direction: row-reverse;
    text-align: right;
}

.blog-neighbour img{
    flex: none;
    width: 120px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
}

.blog-neighbour span{
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.blog-neighbour small{
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--c);
}

.blog-neighbour b{
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

/* Phones and narrow windows: one column, the most read after the article */
@container packs (max-width: 1000px){
    .blog-layout{
        display: flex;
        flex-direction: column;
        gap: 28px;
    }

    .blog-most{
        position: static;
        order: 2;
        width: 100%;
    }

    .blog-reading #content-title{
        font-size: 26px;
    }

    .blog-part{
        padding: 16px;
    }

    .blog-neighbours{
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-neighbour.is-next{
        grid-column: auto;
    }
}

/* The blog home as a magazine: the newest article in big, then the cards
   (picture, section, date, reading time, title), filtered by the tags */
.blog-home .category-tags{
    margin-top: 22px;
}

.blog-home .blog-featured,
.blog-home .blog-grid{
    max-width: 1180px;
}

.blog-featured{
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    margin-top: 30px;
    color: #c4cad0;
}

.blog-featured video,
.blog-featured img{
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid #1d2329;
    border-radius: 14px;
}

.blog-featured-text{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.blog-featured h2{
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
    color: #fff;
}

.blog-featured p{
    margin: 0;
    font-size: 15px;
    line-height: 23px;
    color: #8a97a3;
}

.blog-featured:hover h2,
.blog-home .blog-card:hover h2{
    color: var(--c);
}

.blog-home .blog-grid{
    gap: 28px 22px;
    margin-top: 36px;
}

.blog-home .blog-card{
    padding: 0;
    border: 0;
    background: none;
}

.blog-home .blog-card img{
    border: 1px solid #1d2329;
    border-radius: 10px;
}

.blog-home .blog-card-meta,
.blog-featured .blog-card-meta{
    margin: 4px 0 0;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.blog-home .blog-card h2{
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
}

.blog-card-draft{
    margin-right: 8px;
    font-style: normal;
    color: #ffa35c;
}

@media (max-width: 900px){
    .blog-featured{
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin-top: 22px;
    }

    .blog-featured h2{
        font-size: 19px;
    }

    .blog-home .blog-grid{
        grid-template-columns: minmax(0, 1fr);
        margin-top: 28px;
    }
}

/* A picture of an article opened big over the page */
.blog-lightbox{
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(5, 6, 7, .94);
    overflow: auto;
    cursor: zoom-out;
}

.blog-lightbox::backdrop{
    background: transparent;
}

.blog-lightbox img{
    display: block;
    max-width: none;
    margin: auto;
    box-sizing: border-box;
    padding: 56px 24px 24px;
    cursor: default;
}

.blog-lightbox.fit img{
    max-width: 100%;
    max-height: 100vh;
    cursor: zoom-in;
}

.blog-lightbox button{
    position: fixed;
    top: 14px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 1px solid #2a323a;
    border-radius: 50%;
    background: #111315;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.blog-part > .blog-zoom:has(+ .blog-caption) img{
    margin-bottom: 0;
}
