/* Brentwood Blog — post grid matching the brentwood.ca Student Blog section.
   Section background is transparent; cards are the white surfaces.
   Equal heights: CSS grid stretches rows; the excerpt is flex:1 so the meta
   row pins to the card bottom. Image height equalized via padding-bottom
   ratio (set inline from the block's Image ratio option). */
.bw-blog{background:transparent}
.bw-blog__header{display:flex;align-items:center;gap:1rem;margin:0 0 1.25rem;position:relative}
.bw-blog__heading{font-size:1.875rem;font-weight:300;line-height:1.2;color:#4b5563;margin:0}
.bw-blog__search{margin-left:auto;display:flex;align-items:center}
.bw-blog__search input{width:0;opacity:0;padding:.3rem 0;border:1px solid #e5e7eb;border-radius:.25rem;background:#fff;font:inherit;font-size:.9375rem;transition:width .25s,opacity .25s,padding .25s}
.bw-blog__search.is-open input{width:14rem;opacity:1;padding:.3rem .6rem}
.bw-blog__search-toggle{display:inline-flex;align-items:center;gap:.4em;margin-left:.5rem;border:1px solid #e5e7eb;border-radius:.25rem;background:transparent;padding:.3rem .6rem;color:#6b7280;opacity:.8;cursor:pointer;font:inherit;font-size:.9375rem;box-shadow:none}
.bw-blog__search-toggle:hover{opacity:1;background:transparent;color:#6b7280}
.bw-blog__search-toggle svg{width:1em;height:1em}
.bw-blog__grid{display:grid;grid-template-columns:repeat(var(--bw-blog-cols,4),1fr);gap:1rem;align-items:stretch;transition:opacity .2s}
.bw-blog.is-loading .bw-blog__grid{opacity:.45;pointer-events:none}
.bw-blog__empty{padding:2rem 0;color:#6b7280}

.bw-blog-card{display:flex;flex-direction:column;background:#fff;border-radius:.25rem;border-bottom:2px solid #e5e7eb;overflow:hidden;text-decoration:none;color:inherit}
.bw-blog-card__media{position:relative;width:100%;overflow:hidden;background:#e5e7eb;border-radius:.25rem .25rem 0 0}
.bw-blog-card__media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .4s}
.bw-blog-card:hover .bw-blog-card__media img{transform:scale(1.04)}
.bw-blog-card__noimg{position:absolute;inset:0;background:linear-gradient(135deg,#e5e7eb,#d1d5db)}
.bw-blog-card__title{min-height:56px;display:grid;align-items:center;padding:.5rem;background:rgba(255,255,255,.9)}
.bw-blog-card__title h3{margin:0;font-size:1.0625rem;font-weight:500;line-height:1.3;color:#374151}
.bw-blog-card:hover .bw-blog-card__title h3{color:var(--global-palette1,#c8272c)}
.bw-blog-card__excerpt{flex:1;padding:0 .5rem}
.bw-blog-card__excerpt p{margin:0 0 .75rem;font-size:.9375rem;line-height:1.5;color:#4b5563}
.bw-blog-card__meta{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem 1rem;padding:.5rem;font-size:.875rem;color:#6b7280}
.bw-blog-card__ago{display:inline-flex;align-items:center;gap:.35em}
.bw-blog-card__ago svg{width:.875em;height:.875em}

.bw-blog__pagination{display:flex;justify-content:center;margin-top:1.5rem}
.bw-blog__page{width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border:0;border-radius:0;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.18);cursor:pointer;font:inherit;font-size:.9375rem;color:#374151;padding:0}
.bw-blog__page:hover{color:var(--global-palette1,#c8272c);background:#fff}
.bw-blog__page.is-current{background:var(--global-palette1,#c8272c);color:#fff;cursor:default}
.bw-blog__page svg{width:.55em;height:1em}
.bw-blog__page--prev,.bw-blog__page--next{background:var(--global-palette1,#c8272c);color:#fff}
.bw-blog__page--prev{border-radius:.25rem 0 0 .25rem}
.bw-blog__page--next{border-radius:0 .25rem .25rem 0}
.bw-blog__page--prev:hover,.bw-blog__page--next:hover{background:var(--global-palette1,#c8272c);color:#fff;opacity:.88}
.bw-blog__page:disabled{opacity:.45;cursor:default}

/* Featured first post — brentwood.ca/news "feature": a wide full-width image
   on top, then title/excerpt/meta in a band offset to the right half. Shown on
   page 1 only; the container is hidden when empty (later pages / feature off). */
.bw-blog__featured:empty{display:none}
.bw-blog__featured{margin-bottom:1rem}
.bw-blog-card--featured{position:relative;display:block;background:#fff;border-radius:.25rem;border-bottom:2px solid #e5e7eb;overflow:hidden}
.bw-blog-card--featured .bw-blog-card__body{position:relative}
/* Vertical red rule at 33% (opt-in via the block's "Vertical red rule" toggle,
   which adds .bw-blog--rule to the wrapper). Spans only the body band (title /
   excerpt / meta), not the image. Desktop only — on mobile the body is a single
   full-width column and a line through it would cut the text. */
@media(min-width:768px){
	.bw-blog--rule .bw-blog-card--featured .bw-blog-card__body::before{content:"";position:absolute;top:0;bottom:0;left:33%;width:4px;background:rgb(200,39,44);z-index:3;pointer-events:none}
}
.bw-blog-card--featured .bw-blog-card__media{padding-bottom:42% !important;border-radius:.25rem .25rem 0 0}
.bw-blog-card--featured .bw-blog-card__body{display:block}
.bw-blog-card--featured .bw-blog-card__text{padding:1.25rem 1rem 1.5rem}
.bw-blog-card--featured .bw-blog-card__title{min-height:0;padding:0;background:transparent}
.bw-blog-card--featured .bw-blog-card__title h3{font-size:1.75rem;font-weight:300;line-height:1.2}
.bw-blog-card--featured .bw-blog-card__excerpt{padding:0}
.bw-blog-card--featured .bw-blog-card__excerpt p{font-size:1rem;line-height:1.6;margin-bottom:1rem}
.bw-blog-card--featured .bw-blog-card__meta{padding:0}
@media(min-width:768px){
	.bw-blog-card--featured .bw-blog-card__body{display:grid;grid-template-columns:33% 67%}
	.bw-blog-card--featured .bw-blog-card__text{grid-column:2;align-self:center;padding:1.5rem 2rem 1.5rem 2.25rem}
}

@media(max-width:1024px){.bw-blog__grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){
	.bw-blog__grid{grid-template-columns:1fr}
	.bw-blog__search.is-open input{width:9rem}
}
@media print{.bw-blog__search,.bw-blog__pagination{display:none !important}}
