/* ===== Grid ===== */
.boc-posts-wrapper{
    display:grid;
    gap:2rem;
    align-items:start;
}
.columns-4{ grid-template-columns:repeat(4,1fr); }
.columns-3{ grid-template-columns:repeat(3,1fr); }

/* ===== Card base ===== */
.boc-post-item{
    padding:.75rem .5rem;
    position:relative;
    overflow:visible;
    height:100%;
}
.boc-post-card-wrapper{
    display:flex;
    flex-direction:column;
    height:100%;
}

/* ===== Image ===== */
.boc-post-thumb img{
    width:100%;
    height:300px;
    object-fit:cover;
    display:block;
}

/* ===== Header (title only; date moved to body) =====
 * JS sets --boc-header-h per visual row so paragraphs start aligned. */
.boc-header-wrap{
    margin-top:.5rem;
    margin-bottom:1rem;
    min-height:var(--boc-header-h,5.25rem); /* fallback keeps rows tidy without JS */
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
}
.boc-post-title{
    margin:.4rem 0 .6rem 0;
    font-size:1.35rem;
    line-height:1.2;
    color:#941B80;
}
.boc-post-title a{
    color:#941B80;
    text-decoration:none;
    transition:color .3s ease,text-decoration .3s ease;
}
.boc-post-title a:hover,
.boc-post-title a:focus{
    color:#F8B133; /* gold on hover */
    text-decoration:underline;
}

/* ===== Body (date + excerpt + button) ===== */
.boc-body-wrap{
    position:relative;
    display:flex;
    flex-direction:column;
    flex:1 1 auto;              /* equal card heights in each row */
    padding-bottom:4.75rem;     /* room for the button */
}
.boc-body-wrap .boc-post-meta{
    font-size:.8rem;
    color:#777;
    margin-bottom:.4rem;
    order:-1;                   /* keeps date above paragraph */
}
.boc-excerpt-wrap{
    flex:1 1 auto;              /* grow to fill, pushes button down */
}
.boc-post-excerpt{ margin:0; }

/* main page clamp (~4 lines). Archive can omit .boc-excerpt-main */
.boc-excerpt-main{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:4;
    overflow:hidden;
}

/* ===== Button ===== */
.boc-read-more{
    position:absolute;
    right:1rem;
    bottom:1rem;
    z-index:10;
    display:inline-block;
    background:#F8B133;
    color:#fff;
    padding:.8rem 1.4rem;
    border-radius:4px;
    text-decoration:none;
    font-weight:600;
    text-transform:uppercase;
    line-height:1;
    transition:background-color .3s ease,transform .2s ease;
}
.boc-read-more:hover,
.boc-read-more:focus{
    background:#e6a929;
    transform:translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width:1024px){
    .columns-4,.columns-3{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:600px){
    .columns-4,.columns-3{ grid-template-columns:1fr; }
}

/* =========================================================
 *   RELATED LIST (for [boc_related]) — sidebar/module styling
 *   ========================================================= */
.boc-related{ }
.boc-related-heading{
    margin:0 0 .75rem 0;
    font-size:1.25rem;
    color:#941B80;
}
.boc-related-list{
    display:flex;
    flex-direction:column;
    gap:1rem;
}
.boc-related-item{
    display:grid;
    grid-template-columns: 120px 1fr;
    gap:.85rem;
    align-items:start;
}
.boc-related-thumb{
    display:block;
    overflow:hidden;
    border-radius:6px;
}
.boc-related-thumb img,
.boc-related-thumb--ph{
    width:100%;
    height:100%;
    min-height:90px;
    max-height:120px;
    object-fit:cover;
    display:block;
    background:#f3f3f3;
}
.boc-related-body{ display:flex; flex-direction:column; gap:.35rem; }
.boc-related-title{
    margin:0;
    font-size:1rem;
    line-height:1.25;
}
.boc-related-title a{
    color:#941B80;
    text-decoration:none;
    transition:color .2s ease,text-decoration .2s ease;
}
.boc-related-title a:hover{ color:#F8B133; text-decoration:underline; }
.boc-related-meta{
    font-size:.8rem;
    color:#777;
}
.boc-related-excerpt{
    margin:0;
    font-size:.9rem;
    line-height:1.35;
}
.boc-related-readmore{
    align-self:flex-start;
    margin-top:.25rem;
    display:inline-block;
    background:#F8B133;
    color:#fff;
    padding:.45rem .75rem;
    border-radius:4px;
    text-decoration:none;
    font-weight:600;
    font-size:.8rem;
    text-transform:uppercase;
    line-height:1;
    transition:background-color .2s ease,transform .2s ease;
}
.boc-related-readmore:hover{ background:#e6a929; transform:translateY(-1px); }

/* Compact on very narrow sidebars */
@media (max-width:420px){
    .boc-related-item{ grid-template-columns:1fr; }
}
