/* =========================================================================
   Blog listing — the [blog_list] cards and pager.

   Replica of crystelehomes.com.au/blog/. The banner, heading and intro copy
   above the grid are built in Divi, so nothing here styles them.

   Measurements come from two places on live, and both matter. The per-card
   sizes and the pager are inline styles on the Bricks element (#brxe-csaqkj).
   The featured card's side-by-side layout, the card body padding, the "Read
   more" arrow and the pager spacing are in the theme, under `.blog_posts` and
   `.bloglist` in bricks-child/style.css and responsive.css.

   Palette: navy #304056, teal #008083.

   Centuma is already loaded globally by public/styles.css.
   ====================================================================== */

.wscf-blog {
	--wscf-blog-navy: #304056;
	--wscf-blog-teal: #008083;
	/* The shortcode's `columns` attribute sets -desktop inline. Kept as a second
	   variable so the breakpoints below can still win: an inline style beats any
	   media query, so they can't override the inline value directly. */
	--wscf-blog-columns: var(--wscf-blog-columns-desktop, 3);
	--wscf-blog-gap: 50px;
	font-family: "Centuma", Helvetica, Arial, sans-serif;
	line-height: normal;
	color: var(--wscf-blog-navy);
}

.wscf-blog *,
.wscf-blog *::before,
.wscf-blog *::after {
	box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   Grid
   ---------------------------------------------------------------------- */

.wscf-blog-grid {
	display: grid;
	grid-template-columns: repeat(var(--wscf-blog-columns), 1fr);
	gap: var(--wscf-blog-gap);
}

.wscf-blog-card {
	display: flex;
	flex-direction: column;
}

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

.wscf-blog .wscf-blog-card-image {
	display: block;
	text-decoration: none;
}

/* Featured images run anywhere from portrait to wide, so the 16/9 box has to
   crop rather than letterbox. */
.wscf-blog .wscf-blog-card-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.wscf-blog .wscf-blog-card-body {
	padding-top: 25px;
}

.wscf-blog .wscf-blog-card-date {
	font-size: 15px;
	color: var(--wscf-blog-navy);
}

/* Bricks leaves h3 at the browser's bold, so live's card titles are 700. Divi
   resets heading weights, so it has to be said out loud here. */
.wscf-blog .wscf-blog-card-title {
	margin: 10px 0;
	padding: 0;
	font-size: 19px;
	line-height: normal;
	font-weight: 700;
	color: var(--wscf-blog-navy);
}

.wscf-blog .wscf-blog-card-title a {
	color: inherit;
	text-decoration: none;
}

.wscf-blog .wscf-blog-card-title a:hover,
.wscf-blog .wscf-blog-card-title a:focus-visible {
	color: var(--wscf-blog-teal);
}

.wscf-blog .wscf-blog-card-excerpt {
	font-family: "Roboto", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--wscf-blog-navy);
}

.wscf-blog .wscf-blog-card-more {
	margin-top: 10px;
}

.wscf-blog .wscf-blog-card-more a {
	font-size: 16px;
	color: var(--wscf-blog-teal);
	text-transform: capitalize;
	text-decoration: none;
}

/* The teal arrow after "Read more", copied from the live theme's
   right-arw.svg into public/images/. */
.wscf-blog .wscf-blog-card-more a::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 15px;
	vertical-align: middle;
	background: url("images/read-more-arrow.svg") no-repeat center center;
	background-size: contain;
}

.wscf-blog .wscf-blog-card-more a:hover,
.wscf-blog .wscf-blog-card-more a:focus-visible {
	text-decoration: underline;
}

.wscf-blog .wscf-blog-empty {
	margin: 0;
	font-size: 16px;
	color: var(--wscf-blog-navy);
}

/* -------------------------------------------------------------------------
   Featured card

   Spans the full row and lays its two halves out side by side, text left and
   image right. Live does this in bricks-child, not in the Bricks element.
   ---------------------------------------------------------------------- */

.wscf-blog .wscf-blog-card--featured {
	grid-column: 1 / -1;
	flex-direction: row;
	align-items: center;
}

.wscf-blog .wscf-blog-card--featured .wscf-blog-card-image {
	order: 2;
	max-width: 48%;
	margin-left: auto;
}

.wscf-blog .wscf-blog-card--featured .wscf-blog-card-body {
	max-width: 48%;
	padding: 0 50px 0 0;
}

.wscf-blog .wscf-blog-card--featured .wscf-blog-card-title {
	font-size: 30px;
}

/* -------------------------------------------------------------------------
   Pagination
   ---------------------------------------------------------------------- */

.wscf-blog-pagination {
	margin-top: 45px;
}

/* Divi's `.et-l--body ul` adds disc bullets and 1em padding; beat it.
   Every pill rule below is scoped to `li .page-numbers` on purpose:
   paginate_links() puts class="page-numbers" on the <ul> as well, so an
   unscoped rule sizes the whole list to one pill and the pager collapses into
   a column. */
.wscf-blog .wscf-blog-pagination ul.page-numbers,
.wscf-blog .wscf-blog-pagination ul.page-numbers > li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wscf-blog .wscf-blog-pagination ul.page-numbers {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.wscf-blog .wscf-blog-pagination li .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	border: 1px solid #212121;
	color: #000;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
}

/* Live fills the current page with #0cbbda, a cyan that appears nowhere else
   in the brand palette and reads like a Bricks default nobody styled. Teal
   keeps the pager in the palette. Swap these two values back to #0cbbda for
   an exact replica. */
.wscf-blog .wscf-blog-pagination li .page-numbers.current {
	background: var(--wscf-blog-teal);
	border-color: var(--wscf-blog-teal);
	color: #fff;
}

.wscf-blog .wscf-blog-pagination li a.page-numbers:hover,
.wscf-blog .wscf-blog-pagination li a.page-numbers:focus-visible {
	background: var(--wscf-blog-navy);
	border-color: var(--wscf-blog-navy);
	color: #fff;
}

.wscf-blog .wscf-blog-pagination li .page-numbers.dots {
	border-color: transparent;
}

/* -------------------------------------------------------------------------
   Breakpoints

   The ladder is live's, and it comes from two sources that don't quite agree.
   478px is the Bricks element's column switch; 568px and 480px are the
   theme's featured-card steps. Both are kept so the result matches live.
   ---------------------------------------------------------------------- */

@media (max-width: 1250px) {

	.wscf-blog {
		--wscf-blog-gap: 35px;
	}
}

@media (max-width: 991px) {

	.wscf-blog {
		--wscf-blog-columns: 2;
	}

	.wscf-blog .wscf-blog-card--featured .wscf-blog-card-title {
		font-size: 24px;
	}

	.wscf-blog .wscf-blog-card--featured .wscf-blog-card-body {
		padding: 0 30px 0 0;
	}

	.wscf-blog .wscf-blog-pagination li .page-numbers {
		width: 35px;
		height: 35px;
		font-size: 17px;
	}
}

@media (max-width: 767px) {

	.wscf-blog .wscf-blog-card-body {
		padding-top: 16px;
	}

	.wscf-blog .wscf-blog-card--featured .wscf-blog-card-body {
		padding: 0;
	}
}

@media (max-width: 568px) {

	.wscf-blog .wscf-blog-card--featured {
		flex-direction: column;
	}

	.wscf-blog .wscf-blog-card--featured .wscf-blog-card-image {
		order: 0;
		max-width: 100%;
		margin-left: 0;
		margin-bottom: 30px;
	}

	.wscf-blog .wscf-blog-card--featured .wscf-blog-card-body {
		max-width: 100%;
	}
}

@media (max-width: 480px) {

	.wscf-blog .wscf-blog-card--featured .wscf-blog-card-title {
		font-size: 22px;
	}
}

@media (max-width: 478px) {

	.wscf-blog {
		--wscf-blog-columns: 1;
		--wscf-blog-gap: 20px;
	}

	.wscf-blog .wscf-blog-pagination ul.page-numbers {
		gap: 10px;
	}

	.wscf-blog .wscf-blog-pagination li .page-numbers {
		width: 30px;
		height: 30px;
		font-size: 16px;
	}
}
