/* ==========================================================================
   Shared blog card: home, /blog, /blog/category/{slug}, /blog/tag/{slug},
   /law-firm-tech, /retail. The card only; grid or carousel is per page.
   ========================================================================== */

.blog-card {
    background: var(--paper, #fff);
    border: 1px solid var(--line, rgba(14, 31, 20, 0.12));
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s ease;
}

.blog-card:hover {
    border-color: var(--line-strong, rgba(14, 31, 20, 0.24));
}

.blog-image {
    position: relative;
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--mist, #EEF2EA);
}

.blog-image a {
    display: block;
    height: 100%;
}

.blog-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.03);
}

.blog-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--mist, #EEF2EA);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-4, #7E8F84);
    font-size: 2rem;
}

.blog-content {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.blog-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
}

.blog-category {
    color: var(--signal, #D7262C);
    font-weight: 600;
    background: transparent;
    padding: 0;
    border: 0;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0;
}

.blog-date {
    color: var(--ink-4, #7E8F84);
    order: 0;
}

.blog-category + .blog-date {
    padding-left: 10px;
    border-left: 1px solid var(--line-strong, rgba(14, 31, 20, 0.24));
}

.blog-title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-title a {
    color: var(--ink, #0E1F14);
    text-decoration: none;
    transition: color 0.15s ease;
}

.blog-title a:hover {
    color: var(--forest, #2D5016);
}

.blog-excerpt {
    color: var(--ink-3, #4F6356);
    margin: 0 0 18px;
    font-size: 0.9375rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-link {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--ink, #0E1F14);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--line-strong, rgba(14, 31, 20, 0.24));
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.blog-link:hover {
    color: var(--forest, #2D5016);
    text-decoration-color: var(--forest, #2D5016);
}

.blog-link i {
    display: none;
}

/* ==========================================================================
   Blog closing (fragments/blog-closing.html): the end of /blog and every post.
   Forest, so it stands apart from the ink footer; the two products in their own
   colours (SISU OPUS on white, Phronesis on its teal) with their real logos.
   ========================================================================== */

.blog-closing {
    background: var(--forest, #2D5016);
    color: var(--ivory, #F7F5F0);
    padding: var(--section-y, 96px) 0;
}

.blog-closing-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.blog-closing-title {
    color: var(--ivory, #F7F5F0);
    font-size: clamp(2.125rem, 3.8vw, 3.25rem);
    letter-spacing: -0.03em;
    line-height: 1.04;
    margin: 0 0 20px;
    text-wrap: balance;
}

.blog-closing-lede {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(247, 245, 240, 0.8);
    margin: 0 0 32px;
    max-width: 46ch;
    text-wrap: pretty;
}

.blog-closing-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
}

.blog-closing-link {
    color: rgba(247, 245, 240, 0.8);
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-color: rgba(247, 245, 240, 0.35);
}

.blog-closing-link:hover {
    color: var(--ivory, #F7F5F0);
    text-decoration-color: var(--ivory, #F7F5F0);
}

.blog-closing-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.blog-product {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border-radius: var(--radius-lg, 16px);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-product:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.45);
}

.blog-product-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.blog-product-head img {
    display: block;
    height: 72px;
    width: auto;
}

.blog-product-for {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid var(--line, rgba(14, 31, 20, 0.12));
    border-radius: 999px;
    white-space: nowrap;
}

.blog-product-desc {
    font-size: 0.9375rem;
    line-height: 1.55;
    text-wrap: pretty;
}

.blog-product-link {
    margin-top: auto;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

.blog-product-sisu {
    background: var(--paper, #FFFFFF);
    color: var(--ink-2, #23342A);
}

.blog-product-sisu .blog-product-for {
    color: var(--ink-3, #4F6356);
}

.blog-product-sisu .blog-product-link {
    color: var(--forest, #2D5016);
    text-decoration-color: var(--moss, #6E9B4A);
}

.blog-product-phronesis {
    background: #07332F;
    color: rgba(247, 245, 240, 0.82);
}

.blog-product-phronesis .blog-product-for {
    color: rgba(247, 245, 240, 0.8);
    border-color: rgba(247, 245, 240, 0.2);
}

.blog-product-phronesis .blog-product-link {
    color: var(--ivory, #F7F5F0);
    text-decoration-color: rgba(247, 245, 240, 0.4);
}

.blog-closing .nowrap {
    white-space: nowrap;
}

@media (max-width: 992px) {
    .blog-closing-layout {
        grid-template-columns: 1fr;
    }
}

/* Phones: centred like the other closing calls, the cards one under the other */
@media (max-width: 560px) {
    .blog-closing {
        padding: 56px 0;
    }

    .blog-closing-text {
        text-align: center;
    }

    .blog-closing-lede {
        margin-left: auto;
        margin-right: auto;
        text-wrap: balance;
    }

    .blog-closing-actions {
        flex-direction: column;
    }

    .blog-closing-actions .btn {
        width: 100%;
    }

    .blog-closing-products {
        grid-template-columns: 1fr;
    }
}

/* Phones: the top of the blog list, category and tag pages centred, as on the main pages */
@media (max-width: 560px) {
    .blog-hero .hero-text {
        align-items: center;
        text-align: center;
    }

    .blog-hero .hero-subtitle {
        text-wrap: balance;
    }

    .blog-hero .hero-buttons {
        justify-content: center;
    }
}
