/* 
 Theme Name:   NJV Custom Theme
 Theme URI:    
 Description:  
 Author:       adminMS
 Author URI:   https://new.njv-enterprises.com
 Template:     astra
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

 /* == Add your own styles below this line ==
/*
 * NJV GS Projects Single Page
 *
 * Desktop:
 * - Full-width featured image and title row
 * - Narrower centered content and gallery below
 *
 * Mobile:
 * - Featured image above title
 * - 20px page padding
 */

/* =========================================================
   PAGE RESET
   ========================================================= */

body.single-gs-project .site-content,
body.single-gsp-project .site-content,
body.single-project .site-content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: #fff;
}

body.single-gs-project #secondary,
body.single-gsp-project #secondary,
body.single-project #secondary {
	display: none !important;
}

main#primary.njv-project-single {
	display: block !important;
	float: none !important;
	flex: none !important;
	flex-basis: 100% !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

/* =========================================================
   MAIN PROJECT GRID
   ========================================================= */

main#primary.njv-project-single article.njv-project {
	display: grid !important;
	grid-template-columns:
		minmax(0, 1.15fr)
		minmax(300px, 0.85fr) !important;
	grid-template-areas:
		"image heading"
		"content content"
		"back back" !important;
	column-gap: clamp(34px, 4vw, 60px);
	row-gap: clamp(40px, 5vw, 64px);
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 40px 80px !important;
	box-sizing: border-box;
}

.njv-project__container {
	display: contents !important;
}

/* =========================================================
   FEATURED IMAGE
   ========================================================= */

.njv-project__hero {
	grid-area: image;
	width: 100%;
	min-width: 0;
	height: clamp(330px, 34vw, 470px);
	margin: 0;
	overflow: hidden;
	background: #f3f1ec;
}

.njv-project__hero-image {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

/* =========================================================
   TITLE AREA
   ========================================================= */

.njv-project__header {
	grid-area: heading;
	align-self: center;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

.njv-project__category {
	margin: 0 0 14px;
	color: var(--ast-global-color-1, #2d6b3f);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
}

.njv-project__title {
	width: 100%;
	max-width: 500px !important;
	margin: 0;
	font-size: clamp(2.4rem, 3.6vw, 3.75rem);
	line-height: 1.04;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

/* =========================================================
   NARROWER CONTENT AREA
   ========================================================= */

.njv-project__content {
	grid-area: content;
	display: block !important;
	position: relative;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 1080px !important;
	margin: 0 auto !important;
	padding: 0 !important;
	columns: auto !important;
	z-index: 1;
}

.njv-project__content > :first-child {
	margin-top: 0;
}

/* Intro paragraph */

.njv-project__content > p:first-of-type {
	max-width: 820px;
	margin: 0 auto clamp(28px, 4vw, 42px);
	font-size: clamp(1rem, 1.2vw, 1.125rem);
	line-height: 1.75;
}

/* Project details box */

.njv-project__content > p:nth-of-type(2) {
	max-width: 820px;
	margin: 0 auto clamp(42px, 5vw, 62px);
	padding: clamp(22px, 3vw, 30px);
	border: 1px solid rgba(33, 62, 39, 0.18);
	background: #f8f7f3;
	font-size: 0.98rem;
	line-height: 1.8;
	box-sizing: border-box;
}

/* =========================================================
   GALLERY
   ========================================================= */

.njv-project__content .wp-block-gallery {
	display: flex !important;
	flex-wrap: wrap !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	gap: 16px !important;
}

.njv-project__content
	.wp-block-gallery.has-nested-images
	figure.wp-block-image {
	flex-grow: 0 !important;
	width: calc((100% - 32px) / 3) !important;
	margin: 0 !important;
}

.njv-project__content .wp-block-gallery img,
.njv-project__content .wp-block-image img {
	display: block;
	width: 100%;
	border-radius: 0;
}

.njv-project__content
	.wp-block-gallery.has-nested-images
	figure.wp-block-image
	img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.njv-project__content figcaption {
	font-size: 0.8rem;
	line-height: 1.4;
}

/* =========================================================
   OPTIONAL CLOSING PARAGRAPH
   ========================================================= */

.njv-project__content .wp-block-gallery + p,
.njv-project__content .wp-block-gallery + .wp-block-paragraph {
	max-width: 760px;
	margin: 44px auto 0;
	font-size: 1rem;
	line-height: 1.75;
	text-align: center;
}

/* =========================================================
   SEE ALL PROJECTS BUTTON
   ========================================================= */

.njv-project__back {
	grid-area: back !important;
	display: block !important;
	position: static !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 1080px !important;
	margin: 0 auto 70px !important;
	padding: 0 !important;
	text-align: center !important;
	transform: none !important;
	z-index: 1;
}

.njv-project__back-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 190px;
	padding: 14px 26px;
	border: 1px solid var(--ast-global-color-1, #2d6b3f);
	background: var(--ast-global-color-1, #2d6b3f);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition:
		background-color 180ms ease,
		color 180ms ease;
}

.njv-project__back-button:hover,
.njv-project__back-button:focus {
	background: transparent;
	color: var(--ast-global-color-1, #2d6b3f);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 921px) {

	main#primary.njv-project-single article.njv-project {
		grid-template-columns:
			minmax(0, 1.05fr)
			minmax(270px, 0.95fr) !important;
		column-gap: 30px;
		padding: 40px !important;
	}

	.njv-project__hero {
		height: clamp(300px, 42vw, 410px);
	}

	.njv-project__title {
		font-size: clamp(2.15rem, 5vw, 3rem);
	}

	.njv-project__content {
		max-width: 900px !important;
	}

	.njv-project__back {
		max-width: 900px !important;
	}

	.njv-project__content
		.wp-block-gallery.has-nested-images
		figure.wp-block-image {
		width: calc((100% - 16px) / 2) !important;
	}
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

	main#primary.njv-project-single article.njv-project {
		grid-template-columns: 1fr !important;
		grid-template-areas:
			"image"
			"heading"
			"content"
			"back" !important;
		row-gap: 28px;
		width: 100% !important;
		padding: 20px !important;
	}

	.njv-project__hero {
		height: 240px;
	}

	.njv-project__header {
		align-self: auto;
	}

	.njv-project__category {
		margin-bottom: 10px;
	}

	.njv-project__title {
		max-width: none !important;
		font-size: clamp(2rem, 9vw, 2.65rem);
		line-height: 1.06;
	}

	.njv-project__content,
	.njv-project__back {
		max-width: none !important;
	}

	.njv-project__content > p:first-of-type {
		margin-bottom: 28px;
		line-height: 1.65;
	}

	.njv-project__content > p:nth-of-type(2) {
		margin-bottom: 34px;
		padding: 20px;
		font-size: 0.94rem;
	}

	.njv-project__content
		.wp-block-gallery.has-nested-images
		figure.wp-block-image {
		width: 100% !important;
	}

	.njv-project__content
		.wp-block-gallery.has-nested-images
		figure.wp-block-image
		img {
		aspect-ratio: auto;
	}

	.njv-project__back {
		margin: 12px auto 50px !important;
	}

	.njv-project__back-button {
		width: 100%;
		max-width: 320px;
	}
}

/*
 * NJV Projects Archive
 * Desktop: three-column project grid
 * Tablet: two columns
 * Mobile: one column
 */

/* =========================================================
   ARCHIVE PAGE
   ========================================================= */

.njv-projects-archive {
	display: block !important;
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff;
}

/* =========================================================
   ARCHIVE INTRO
   ========================================================= */

.njv-projects-archive__header {
	padding: 64px 80px 52px;
	text-align: center;
}

.njv-projects-archive__eyebrow {
	margin: 0 0 12px;
	color: var(--ast-global-color-1, #2d6b3f);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
}

.njv-projects-archive__title {
	margin: 0;
	font-size: clamp(2.7rem, 5vw, 4.6rem);
	line-height: 1.05;
	letter-spacing: -0.025em;
}

.njv-projects-archive__intro {
	max-width: 680px;
	margin: 20px auto 0;
	font-size: clamp(1rem, 1.2vw, 1.125rem);
	line-height: 1.7;
}

/* =========================================================
   PROJECT GRID
   ========================================================= */

.njv-projects-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px 28px;
	width: 100%;
	padding: 0 80px 80px;
	box-sizing: border-box;
}

/* =========================================================
   PROJECT CARD
   ========================================================= */

.njv-project-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	background: transparent;
}

.njv-project-card__image-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.njv-project-card__image {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #f3f1ec;
	aspect-ratio: 4 / 3;
}

.njv-project-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 350ms ease;
}

.njv-project-card__image-link:hover img,
.njv-project-card__image-link:focus img {
	transform: scale(1.025);
}

.njv-project-card__placeholder {
	width: 100%;
	height: 100%;
	background: #f3f1ec;
}

.njv-project-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 0 0;
}

.njv-project-card__category {
	margin: 0 0 9px;
	color: var(--ast-global-color-1, #2d6b3f);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.4;
	text-transform: uppercase;
}

.njv-project-card__title {
	margin: 0;
	font-size: clamp(1.35rem, 2vw, 1.75rem);
	line-height: 1.18;
	letter-spacing: -0.015em;
}

.njv-project-card__title a {
	color: inherit;
	text-decoration: none;
}

.njv-project-card__title a:hover,
.njv-project-card__title a:focus {
	color: var(--ast-global-color-1, #2d6b3f);
}

.njv-project-card__excerpt {
	margin-top: 14px;
	font-size: 0.96rem;
	line-height: 1.65;
}

.njv-project-card__excerpt p {
	margin: 0;
}

.njv-project-card__link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	margin-top: 20px;
	color: var(--ast-global-color-1, #2d6b3f);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-decoration: none;
	text-transform: uppercase;
}

.njv-project-card__link span {
	transition: transform 180ms ease;
}

.njv-project-card__link:hover span,
.njv-project-card__link:focus span {
	transform: translateX(4px);
}

/* =========================================================
   PAGINATION
   ========================================================= */

.njv-projects-archive .navigation.pagination {
	width: 100%;
	margin: 0;
	padding: 0 80px 80px;
	text-align: center;
	box-sizing: border-box;
}

.njv-projects-archive .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.njv-projects-archive .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid rgba(33, 62, 39, 0.2);
	color: inherit;
	text-decoration: none;
}

.njv-projects-archive .page-numbers.current,
.njv-projects-archive .page-numbers:hover,
.njv-projects-archive .page-numbers:focus {
	border-color: var(--ast-global-color-1, #2d6b3f);
	background: var(--ast-global-color-1, #2d6b3f);
	color: #fff;
}

/* =========================================================
   EMPTY ARCHIVE
   ========================================================= */

.njv-projects-empty {
	padding: 40px 80px 100px;
	text-align: center;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 921px) {

	.njv-projects-archive__header {
		padding: 54px 40px 44px;
	}

	.njv-projects-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 42px 22px;
		padding: 0 40px 70px;
	}

	.njv-projects-archive .navigation.pagination {
		padding: 0 40px 70px;
	}
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

	.njv-projects-archive__header {
		padding: 42px 20px 34px;
		text-align: left;
	}

	.njv-projects-archive__title {
		font-size: clamp(2.4rem, 12vw, 3.25rem);
	}

	.njv-projects-archive__intro {
		margin-left: 0;
	}

	.njv-projects-grid {
		grid-template-columns: 1fr;
		gap: 42px;
		padding: 0 20px 56px;
	}

	.njv-project-card__body {
		padding-top: 18px;
	}

	.njv-projects-archive .navigation.pagination {
		padding: 0 20px 56px;
	}

	.njv-projects-empty {
		padding: 20px 20px 70px;
	}
}