/*
 Theme Name:   Brackenridge Park Child Theme
 Theme URI:    https://www.brackenridgepark.org/
 Description:  A custom child theme for the Genesis Block Theme.
 Author:       Lorne Barfield
 Author URI:   https://innov8.place/
 Template:     genesis-block-theme
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  genesis-block-child
*/

@import url("../genesis-block-theme/style.css");

/* Your custom styles go below */

/* --------------------------------------------------------------
Park Projects — hub + single
Colours and fonts mirror Elementor kit 13 so this section reads as
part of the site while the rest of it is still Elementor.
-------------------------------------------------------------- */

:root {
	--bpc-primary: #6d7138;
	--bpc-text: #2c2d16;
	--bpc-off-white: #f2f2e6;
	--bpc-heading-font: "Young Serif", Georgia, serif;

	/* Container width from Elementor kit 13, so these templates line up with
	   the Elementor pages either side of them. */
	--bpc-container: 1512px;
	/* Inline padding the original page used on the hero and every project
	   row, so the title and the card grid share a left edge. */
	--bpc-gutter: 36px;
	/* Reading measure for long-form copy on single projects. */
	--bpc-measure: 42rem;
}

/* --------------------------------------------------------------
Layout container

The parent theme pins #primary to width:70%/max-width:830px for its blog
layout. Every other page on this site sidesteps that by rendering on the
Elementor canvas, which is why these templates looked narrow next to
/things-to-do/ and /art-installations/. Opt out here and constrain each
block to the kit width instead.
-------------------------------------------------------------- */

.page-template-template-projects-hub #primary,
.single-project #primary {
	width: 100%;
	max-width: none;
	margin: 0;
}

.bpc-hub__hero-inner,
.bpc-cards {
	max-width: var(--bpc-container);
	margin-inline: auto;
	padding-inline: var(--bpc-gutter);
}

/* Long-form copy stays at a readable measure inside that wider container. */
.bpc-hub__intro,
.bpc-project__header,
.bpc-project__content,
.bpc-project__back {
	max-width: var(--bpc-measure);
	margin-inline: auto;
	padding-inline: var(--bpc-gutter);
}

/* Elementor narrows its container at the tablet and mobile breakpoints. */
@media (max-width: 1024px) {
	:root {
		--bpc-container: 1024px;
		--bpc-gutter: 24px;
	}
}

@media (max-width: 767px) {
	:root {
		--bpc-container: 767px;
		--bpc-gutter: 16px;
	}
}

/* Hub hero ---------------------------------------------------- */

/* Without a featured image this matches the original Elementor hero: a solid
   dark block. Set a featured image on the Page to swap in a photograph. */
/* Padding and left alignment match the original hero container: 64px block
   on desktop and tablet, 24px on mobile. Inline padding comes from
   .bpc-hub__hero-inner via --bpc-gutter. */
.bpc-hub__hero {
	margin-bottom: 2rem;
	padding-block: 64px;
	background: var(--bpc-text);
	color: var(--bpc-off-white);
	text-align: left;
}

@media (max-width: 767px) {
	.bpc-hub__hero {
		padding-block: 24px;
	}
}

.bpc-hub__hero.has-image {
	position: relative;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

/* Scrim so the title stays legible on any photograph. */
.bpc-hub__hero.has-image::before {
	position: absolute;
	background: rgba(44, 45, 22, 0.45);
	content: "";
	inset: 0;
}

/* Two classes deep so this beats the Elementor kit's h1 rule. */
.bpc-hub__hero .bpc-hub__title {
	position: relative;
	margin: 0;
	color: inherit;
	font-family: var(--bpc-heading-font);
}

.bpc-hub__intro {
	margin-bottom: 3rem;
}

/* Card grid ---------------------------------------------------
Matches the pp-posts grids on /things-to-do/ and /art-installations/:
image-led cards, 300px cover crop, 19px Young Serif title underneath,
and the same darken-and-scale hover from the site Global CSS.
Breakpoints mirror Elementor's (tablet <=1024, mobile <=767).
-------------------------------------------------------------- */

.bpc-cards {
	display: grid;
	margin-bottom: 4rem;
	gap: 24px 16px;
	grid-template-columns: 1fr;
	list-style: none;
}

@media (min-width: 768px) {
	.bpc-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1025px) {
	.bpc-cards {
		grid-template-columns: repeat(3, 1fr);
	}
}

.bpc-cards .bpc-card {
	margin: 0;
}

.bpc-cards .bpc-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

/* Clips the scaled image and hosts the hover scrim. */
.bpc-cards .bpc-card__media {
	position: relative;
	display: block;
	margin-bottom: 5px;
	overflow: hidden;
}

.bpc-cards .bpc-card__media::before {
	position: absolute;
	z-index: 2;
	background: rgba(0, 0, 0, 0.3);
	content: "";
	inset: 0;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.bpc-cards .bpc-card__image {
	display: block;
	width: 100%;
	height: 300px;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.4s ease;
}

.bpc-cards .bpc-card__link:hover .bpc-card__media::before,
.bpc-cards .bpc-card__link:focus-visible .bpc-card__media::before {
	opacity: 1;
}

.bpc-cards .bpc-card__link:hover .bpc-card__image,
.bpc-cards .bpc-card__link:focus-visible .bpc-card__image {
	transform: scale(1.11);
}

/* Two classes deep so this beats the Elementor kit's h2 rule. */
.bpc-cards .bpc-card__title {
	margin: 0;
	color: var(--bpc-text);
	font-family: var(--bpc-heading-font);
	font-size: 19px;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.4em;
	transition: color 0.3s ease;
}

.bpc-cards .bpc-card__link:hover .bpc-card__title,
.bpc-cards .bpc-card__link:focus-visible .bpc-card__title {
	color: var(--bpc-primary);
}

.bpc-cards .bpc-card__link:focus-visible {
	outline: 3px solid var(--bpc-primary);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.bpc-cards .bpc-card__image,
	.bpc-cards .bpc-card__title {
		transition: none;
	}

	.bpc-cards .bpc-card__link:hover .bpc-card__image,
	.bpc-cards .bpc-card__link:focus-visible .bpc-card__image {
		transform: none;
	}
}

/* Single project ---------------------------------------------- */

.bpc-project__hero {
	margin: 0 0 2rem;
}

.bpc-project__hero img {
	width: 100%;
	height: auto;
}

.bpc-project__header {
	margin-bottom: 2rem;
}

/* Two classes deep so this beats the kit's `h1 { color: #FFFFFF }`, which
   would otherwise render this title white on a white background. */
.bpc-project .bpc-project__title {
	margin: 0 0 0.75rem;
	color: var(--bpc-text);
	font-family: var(--bpc-heading-font);
}

.bpc-project__lead {
	margin: 0;
	font-size: 1.125rem;
}

.bpc-project__back {
	margin-block: 3rem 4rem;
}

.bpc-project__back a {
	color: var(--bpc-primary);
	font-weight: 600;
}

.bpc-project__back a::before {
	content: "\2190\00a0";
}
