/*
 * Blog cards and article styles. The bp- prefix keeps these rules clear of
 * the Webflow export's class names. Thumbnails are often logos with
 * arbitrary ratios, so every image sits contained on a tinted tile instead
 * of being rendered raw.
 */

.bp-container {
    width: 100%;
    max-width: 1266px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 30px;
    padding-left: 30px;
}

.bp-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
}

.bp-section-head .section-title {
    margin-top: 0;
    margin-bottom: 0;
}

/* --- Card --- */

.bp-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: left;
    border: 1px solid rgba(52, 78, 65, 0.12);
    border-radius: 4px;
    background-color: #fff;
    color: #344e41;
    text-decoration: none;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .bp-card:hover {
        border-color: rgba(52, 78, 65, 0.3);
        box-shadow: 0 2px 6px rgba(29, 43, 36, 0.05),
            0 12px 32px rgba(29, 43, 36, 0.08);
    }
}

/* The image is absolutely positioned so its intrinsic size can never
   stretch the tile past its ratio (thumbnails are arbitrary-sized logos). */
.bp-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: rgba(192, 170, 129, 0.08);
    border-bottom: 1px solid rgba(52, 78, 65, 0.08);
}

.bp-thumb img {
    position: absolute;
    top: 28px;
    left: 28px;
    width: calc(100% - 56px);
    height: calc(100% - 56px);
    object-fit: contain;
}

.bp-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 28px 28px;
}

.bp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 14px;
}

.bp-tag {
    padding: 3px 10px;
    border-radius: 2px;
    background-color: rgba(52, 78, 65, 0.08);
    color: #344e41;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.bp-date {
    color: rgba(52, 78, 65, 0.7);
    font-size: 14px;
}

.bp-card-title {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 16px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-family: Cardo, serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
    color: #1d2b24;
}

.bp-author {
    margin-top: auto;
    padding-top: 16px;
    color: rgba(52, 78, 65, 0.7);
    font-size: 14px;
}

/* --- Featured card (newest post) --- */

.bp-featured {
    flex-direction: row;
    align-items: stretch;
    margin-bottom: 30px;
}

.bp-featured .bp-card-body {
    flex: 1 1 55%;
    padding: 36px 40px;
}

.bp-featured .bp-thumb {
    flex: 1 1 45%;
    order: 2;
    aspect-ratio: auto;
    min-height: 300px;
    border-bottom: none;
    border-left: 1px solid rgba(52, 78, 65, 0.08);
}

.bp-featured .bp-card-title {
    -webkit-line-clamp: 4;
    font-size: 34px;
    line-height: 1.2;
}

/* --- Card grid --- */

.bp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Homepage variant: exactly two cards under the featured post. */
@media (min-width: 768px) {
    .bp-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .bp-featured {
        flex-direction: column;
    }

    .bp-featured .bp-thumb {
        order: -1;
        aspect-ratio: 16 / 9;
        min-height: 0;
        border-bottom: 1px solid rgba(52, 78, 65, 0.08);
        border-left: none;
    }

    .bp-featured .bp-card-body {
        padding: 24px 28px 28px;
    }

    .bp-featured .bp-card-title {
        font-size: 26px;
    }

    .bp-section-head {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 30px;
    }
}

/* --- Article detail --- */

.bp-article {
    max-width: 720px;
    margin-right: auto;
    margin-left: auto;
    padding: 30px 20px 50px;
    color: #344e41;
}

.bp-back {
    display: inline-block;
    margin-bottom: 30px;
    color: rgba(52, 78, 65, 0.7);
    font-size: 15px;
    text-decoration: none;
    transition: color 200ms ease;
}

.bp-back:hover {
    color: #ff7100;
}

.bp-article-title {
    margin-top: 0;
    margin-bottom: 18px;
    font-family: Cardo, serif;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.15;
    color: #1d2b24;
    text-wrap: balance;
}

.bp-article-meta {
    margin-bottom: 32px;
}

.bp-article-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    margin: 0 0 40px;
    padding: 32px;
    background-color: rgba(192, 170, 129, 0.08);
    border: 1px solid rgba(52, 78, 65, 0.08);
    border-radius: 4px;
}

.bp-article-figure img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bp-article-body {
    font-size: 18px;
    line-height: 1.7;
    text-wrap: pretty;
}

.bp-article-body p {
    margin-top: 0;
    margin-bottom: 20px;
}

.bp-article-body h2,
.bp-article-body h3,
.bp-article-body h4 {
    margin: 36px 0 14px;
    font-family: Cardo, serif;
    font-weight: 400;
    line-height: 1.25;
    color: #1d2b24;
}

.bp-article-body h2 {
    font-size: 30px;
}

.bp-article-body h3 {
    font-size: 24px;
}

.bp-article-body h4 {
    font-size: 20px;
}

.bp-article-body a {
    color: #ff7100;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bp-article-body a:hover {
    color: #d95f00;
}

.bp-article-body ul,
.bp-article-body ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.bp-article-body li {
    margin-bottom: 8px;
}

.bp-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.bp-article-body blockquote {
    margin: 0 0 20px;
    padding: 4px 0 4px 20px;
    border-left: 3px solid rgba(192, 170, 129, 0.6);
    font-style: italic;
}

.bp-article-body strong {
    color: #1d2b24;
}

.bp-article-body table {
    width: 100%;
    margin-bottom: 24px;
    border-collapse: collapse;
    font-size: 16px;
}

.bp-article-body th,
.bp-article-body td {
    padding: 8px 12px;
    border: 1px solid rgba(52, 78, 65, 0.15);
    text-align: left;
}

@media (max-width: 767px) {
    .bp-article-title {
        font-size: 32px;
    }

    .bp-article-figure {
        height: 200px;
        padding: 24px;
    }

    .bp-article-body {
        font-size: 17px;
    }
}
