/*
Theme Name:   Fundrize Child
Theme URI:    https://womensandgirls.org.au/
Description:  Child theme for Fundrize. Holds the breadcrumb customisations for Blacktown Women's and Girls' Health Centre so they survive parent theme updates.
Author:       Blacktown Women's and Girls' Health Centre
Template:     fundrize
Version:      1.1.1
Text Domain:  fundrize-child
*/

/* Add custom CSS below this line. */


/* ==========================================================================
   News cards
   Home page ("Latest News", 4 across) and News page ("Archived news", 3 across).
   Both grids use WPBakery's built-in item template, so one set of rules covers
   them. Each grid also carries its own class - .bwghc-latest-news and
   .bwghc-archived-news - if the two ever need to differ.
   Added 2026-09-03.
   ========================================================================== */

/* Equal-height cards. The items sit inside .vc_pageable-slide-wrapper; the
   load-more button is outside it, so pagination is unaffected. Items hidden by
   pagination use display:none and are ignored by the flex layout - do not set
   a display value on .vc_grid-item itself or all 133 archive items appear. */
.bwghc-news-cards .vc_grid .vc_pageable-slide-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	width: 100%;
}

/* In Pagination mode Owl wraps each .vc_pageable-slide-wrapper - one whole page
   of four cards - in a single .owl-item, so the rule above keeps doing the
   equal-height work and every card keeps its own vc_col-sm-* width. Owl's
   autoHeight setting sizes the slide, so no flex rules belong on .owl-stage or
   .owl-item: they fight its transform layout and blank out slides 2 and up. */

.bwghc-news-cards .vc_grid-item-mini {
	height: 100%;
	display: flex;
	flex-direction: column;
	background-color: #F1F7F6;
	/* 50% alpha of #664D8C rather than a lighter flat colour, so the border reads
	   the same against the card fill and the page behind it. */
	border: 2px solid rgba( 102, 77, 140, 0.5 );
	border-radius: 6px;
	overflow: hidden; /* keeps the image corners inside the rounded edge */
}

/* Show the featured image in these two grids only. A sitewide rule from 2018
   hides .vc_gitem-animated-block on every grid and carousel; this is more
   specific, so it wins here and leaves that rule doing its job everywhere else. */
.bwghc-news-cards .vc_gitem-animated-block {
	visibility: visible;
	height: auto;
}

/* Crop every image to one shape, so a landscape, a square and a 4:3 photo
   all sit in the same box. The image is a background on the zone. */
.bwghc-news-cards .vc_gitem-zone-a {
	height: 0;
	padding-bottom: 62.5%; /* 16:10 */
	background-size: cover;
	background-position: center;
}

/* Posts with no featured image fall back to WPBakery's own placeholder
   (vc_gitem_image.png). Collapse that image area entirely rather than showing a
   stock graphic - the card still matches its neighbours' height because the
   flex row stretches it. Browsers without :has() simply show the placeholder. */
.bwghc-news-cards .vc_gitem-zone-a:has( img[src*="vc_gitem_image" ] ) {
	display: none;
}

/* Text area fills the remaining height so the button can sit on the bottom. */
.bwghc-news-cards .vc_gitem-zone-c,
.bwghc-news-cards .vc_gitem-zone-c .vc_gitem-zone-mini,
.bwghc-news-cards .vc_gitem-zone-c .vc_gitem_row,
.bwghc-news-cards .vc_gitem-zone-c .vc_gitem-col {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	background-color: transparent;
}

.bwghc-news-cards .vc_gitem-zone-c {
	padding: 18px 18px 20px;
}

.bwghc-news-cards .vc_gitem-post-data-source-post_title h4 {
	color: #664D8C;
	font-size: 16px;
	line-height: 1.3;
	margin: 0 0 2px;
}

/* The title's wrapper carries a 15px bottom margin of its own, which is most of
   the gap above the date. Both grids. */
.bwghc-news-cards .vc_gitem-post-data-source-post_title {
	margin-bottom: 4px;
}

/* Post date, added to the excerpt by bwghc_grid_card_date() in functions.php.
   Sits between the heading and the excerpt, matching the carousel above. */
/* Selector matches the excerpt paragraph rule below, plus the class, so it wins
   on specificity - otherwise the date inherits the excerpt's size and clamp. */
.bwghc-news-cards .vc_gitem-post-data-source-post_excerpt p.bwghc-card-date {
	font-size: 12px;
	color: #4A5B59;
	margin: 0 0 9px;
	line-height: 1.4;
	display: block;
	overflow: visible;
	-webkit-line-clamp: none;
}

.bwghc-news-cards .vc_gitem-post-data-source-post_excerpt {
	flex: 1 1 auto;
	margin: 0 0 12px;
}

/* WPBakery emits an empty paragraph before the content; collapse it so the date
   sits directly under the heading. */
.bwghc-news-cards .vc_gitem-post-data-source-post_excerpt p:empty {
	display: none;
}

/* Clamp to four lines so cards stay even whatever the excerpt length. */
.bwghc-news-cards .vc_gitem-post-data-source-post_excerpt p {
	color: #4A5B59;
	font-size: 14px;
	line-height: 1.55;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bwghc-news-cards .vc_btn3-container {
	margin: auto 0 0;
	flex: 0 0 auto;
}

.bwghc-news-cards a.vc_general.vc_btn3 {
	background-color: #117A73;
	border: 0;
	color: #ffffff;
}

.bwghc-news-cards a.vc_general.vc_btn3:hover,
.bwghc-news-cards a.vc_general.vc_btn3:focus {
	background-color: #0D625C;
	border-color: #0D625C;
	color: #ffffff;
}

/* Two columns on tablets, one on phones. */
@media (max-width: 991px) {
	.bwghc-news-cards .vc_grid-item.vc_col-sm-3,
	.bwghc-news-cards .vc_grid-item.vc_col-sm-4 { width: 50%; }
}
@media (max-width: 600px) {
	.bwghc-news-cards .vc_grid-item.vc_col-sm-3,
	.bwghc-news-cards .vc_grid-item.vc_col-sm-4 { width: 100%; }
}


/* ==========================================================================
   News carousel (theme [news] shortcode, News page)
   Matched to the card design above so the page reads as one thing.
   Added 2026-09-03.
   ========================================================================== */

/* Equal-height slides. Owl lays items out inline-block by default, which is why
   they ranged from 277px to 456px. */
.wprt-news .owl-stage { display: flex; }
/* Owl sizes each slide at a fractional width (427.875px here), so every page of
   the carousel shifts the track by a non-whole number of pixels. On some pages a
   card's border then lands exactly on the clipping edge and renders as a half
   line, or disappears. Padding the track and pulling it back with an equal
   negative margin gives borders room to draw without moving the layout. */
.wprt-news .owl-stage-outer {
	padding-left: 4px;
	padding-right: 4px;
	margin-left: -4px;
	margin-right: -4px;
}

/* 2px of horizontal padding keeps each card's border inside .owl-stage-outer,
   which clips overflow. Without it the first slide's left border is cut off,
   because it sits flush against that clipping edge. */
.wprt-news .owl-item {
	display: flex;
	height: auto;
	box-sizing: border-box;
	padding-left: 2px;
	padding-right: 2px;
}
.wprt-news .news-item { display: flex; width: 100%; }

.wprt-news .news-item .inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	background-color: #F1F7F6;
	border: 2px solid rgba( 102, 77, 140, 0.5 );
	border-radius: 6px;
	overflow: hidden;
	box-shadow: none; /* the border does this job now */
}

.wprt-news .news-item .inner > img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.wprt-news .news-item .text-wrap {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 18px 18px 20px;
}

/* The theme gives the title 23px of padding plus a decorative 1px rule, which
   pushed the date a long way below it. Both removed so the date sits with the
   heading, as it does in the grid below. */
.wprt-news .news-item .inner .text-wrap h3.title {
	margin: 0 0 3px;
	padding-bottom: 0;
	font-size: 16px;
	line-height: 1.3;
	/* The theme sets these in uppercase; sentence case matches the grid below
	   and is easier to read across two lines. */
	text-transform: none;
	letter-spacing: 0;
}

.wprt-news .news-item .inner .text-wrap h3.title::after {
	display: none;
}

.wprt-news .news-item .inner .text-wrap .meta {
	margin: 0 0 10px;
	padding-top: 0;
}

.wprt-news .news-item h3.title a { color: #664D8C; }
.wprt-news .news-item h3.title a:hover { color: #4E3A6B; }

.wprt-news .news-item .meta {
	margin: 0 0 10px;
	font-size: 12px;
}

.wprt-news .news-item .meta,
.wprt-news .news-item .meta .post-date,
.wprt-news .news-item .meta a { color: #4A5B59; }

.wprt-news .news-item p.excerpt {
	color: #4A5B59;
	font-size: 14px;
	line-height: 1.55;
	margin: 0 0 14px;
	flex: 1 1 auto;
}

/* "Read more" becomes the same button as the cards. */
.wprt-news .news-item .post-btn { margin-top: auto; }

.wprt-news .news-item .post-btn a {
	display: inline-block;
	background-color: #117A73;
	color: #ffffff;
	padding: 9px 17px;
	border-radius: 2px;
	font-size: 13px;
	text-decoration: none;
	border: 0;
	/* The theme prints the label as "READ MORE". Lowercasing it and restoring the
	   first capital gives "Read more", matching the buttons in the grid below. */
	text-transform: lowercase;
	letter-spacing: 0;
}

.wprt-news .news-item .post-btn a::first-letter {
	text-transform: uppercase;
}

.wprt-news .news-item .post-btn a:hover,
.wprt-news .news-item .post-btn a:focus {
	background-color: #0D625C;
	color: #ffffff;
}
