/**
 * SJ Morse Projects Page — Figma frame 18:2
 *
 * Loaded only on the Projects page. Uses .sj-prj-* classes (not body.sj-morse-projects). Mirrors the same
 * design tokens used elsewhere in the theme (Barlow Condensed for headings,
 * Source Sans Pro for body, #bec852 CTA, #333638 dark page background).
 *
 * Reference artboard width: 1440px.
 */

body.sj-morse-projects {
	background-color: #333638;
}

body.sj-morse-projects .site-main,
body.sj-morse-projects main.site-main,
body.sj-morse-projects .elementor-location-single,
body.sj-morse-projects .elementor-section-wrap {
	background-color: #333638;
}

/* =========================================================================
   Cancel Elementor stretch-section inline math on inner rows that live
   inside a padded column. Same fix applied on Services and Home.
   ========================================================================= */
.sj-prj-gallery-col .sj-prj-grid-row.elementor-section.elementor-section-stretched,
.sj-prj-list-col   .sj-prj-list-row.elementor-section.elementor-section-stretched {
	left: 0 !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none !important;
}

/* =========================================================================
   Hero — "PROJECTS BUILT TO PERFORM"
   Figma rect: 1448 × 549, fill #333638. Heading group at X=109 / Y=233
   (W=1171), body paragraph at X=111 / Y=364 (W=973). Left-aligned.
   ========================================================================= */
.sj-prj-hero.elementor-section {
	background-color: #333638 !important;
	min-height: 549px;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
}

.sj-prj-hero > .elementor-background-holder,
.sj-prj-hero > .elementor-element-populated > .elementor-background-holder {
	background-position: center center !important;
	background-repeat: no-repeat !important;
	background-size: cover !important;
}

.sj-prj-hero > .elementor-container {
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
}

.sj-prj-hero-col > .elementor-widget-wrap,
.sj-prj-hero-col.elementor-column > .elementor-element-populated {
	background-color: transparent !important;
}

/* Hero typography — Figma frame 18:2 inspector:
   Heading: Barlow Condensed SemiBold (600) / 90px / line-height Auto / 0 tracking
   Body:    Source Sans Pro Regular   (400) / 32px / 50px line-height / 0 tracking
   Both white (#FFFFFF). Heading container W=1171, body container W=973. */
.sj-prj-hero-title .elementor-heading-title {
	font-family: "Barlow Condensed", sans-serif !important;
	font-weight: 600;
	font-size: 90px;
	line-height: normal;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #ffffff !important;
	margin: 0;
	max-width: 1171px;
}

.sj-prj-hero-body,
.sj-prj-hero-body p {
	font-family: "Source Sans Pro", "Source Sans 3", sans-serif !important;
	font-weight: 400;
	font-size: 32px;
	line-height: 50px;
	letter-spacing: 0;
	color: #ffffff !important;
	max-width: 973px;
	margin: 0;
}

/* =========================================================================
   Gallery — Figma title strip 1440 × 101 (#000000) + gallery group
   1439 × 1383 (#000000). The two share a 3px #777E85 separator from the
   hero on top; the bottom #777E85 separator is on the SELECT PROJECT
   EXPERIENCE section so the dark area flows continuously between them.
   ========================================================================= */
.sj-prj-gallery.elementor-section {
	background-color: #000000 !important;
	border-top: 3px solid #777E85;
	box-sizing: border-box;
}

.sj-prj-gallery > .elementor-container {
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
}

.sj-prj-gallery-col > .elementor-widget-wrap,
.sj-prj-gallery-col.elementor-column > .elementor-element-populated {
	background-color: transparent !important;
}

/* Elementor JSON: 120px (gallery) / 200px (list) side padding — reset on smaller screens */
@media (max-width: 1200px) {
	.sj-prj-gallery-col > .elementor-element-populated,
	.sj-prj-list-col > .elementor-element-populated {
		padding-left: 32px !important;
		padding-right: 32px !important;
	}
}

.sj-prj-gallery-col > .elementor-widget-wrap > .sj-prj-grid-row.elementor-section,
.sj-prj-list-col > .elementor-widget-wrap > .sj-prj-list-row.elementor-section {
	width: 100% !important;
	max-width: 100% !important;
	display: block !important;
	clear: both;
}

/* Gallery title — Figma: Barlow Condensed Regular (400) / 50px / line-height
   Auto / 4% letter-spacing (= 2px) / white / centered. */
.sj-prj-gallery-title .elementor-heading-title {
	font-family: "Barlow Condensed", sans-serif !important;
	font-weight: 400;
	font-size: 50px;
	line-height: normal;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff !important;
	margin: 0;
}

.sj-prj-gallery-sub .elementor-heading-title {
	font-family: "Source Sans Pro", "Source Sans 3", sans-serif !important;
	font-weight: 400;
	font-style: italic;
	font-size: 22px;
	line-height: 32px;
	letter-spacing: 0;
	text-transform: none;
	color: #ffffff !important;
	margin: 0;
}

/* Grid rows: 2 columns 50/50 with a fixed gap. We center the row inside the
   column so the layout stays consistent if the page widens slightly. */
.sj-prj-grid-row > .elementor-container,
.sj-prj-grid-row > .elementor-container > .elementor-row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	column-gap: 24px;
	align-items: flex-start;
	justify-content: center;
	box-sizing: border-box;
}

.sj-prj-grid-row > .elementor-container > .elementor-row {
	width: 100%;
}

.sj-prj-grid-row.elementor-section > .elementor-container {
	max-width: none !important;
	width: 100%;
}

.sj-prj-grid-row .sj-prj-card {
	flex: 1 1 0;
	width: 50% !important;
	max-width: 590px;
	box-sizing: border-box;
}

/* Gallery photos — fixed crop box, never stretch */
.sj-prj-card .elementor-widget-image,
.sj-prj-card .elementor-widget-image-box {
	margin: 0 !important;
	width: 100%;
}

.sj-prj-card .elementor-widget-image img,
.sj-prj-card .elementor-image-box-img img {
	display: block !important;
	width: 100% !important;
	height: 360px !important;
	max-height: 360px !important;
	object-fit: cover !important;
	object-position: center center !important;
}

/* imgzoom hover — see imgzoom.css (class on gallery images only) */

.sj-prj-grid-row .sj-prj-card.elementor-column {
	align-self: flex-start !important;
	height: auto !important;
}

/* =========================================================================
   Select Project Experience — sits in the same continuous black zone as
   the gallery (no top separator from it). A 3px #777E85 bottom border
   divides it from the slate CTA below.
   ========================================================================= */
.sj-prj-list.elementor-section {
	background-color: #000000 !important;
	border-bottom: 3px solid #777E85;
	box-sizing: border-box;
}

.sj-prj-list > .elementor-container {
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
}

.sj-prj-list-col > .elementor-widget-wrap,
.sj-prj-list-col.elementor-column > .elementor-element-populated {
	background-color: transparent !important;
}

/* Section title — Figma: Barlow Condensed SemiBold (600) / 52px / Auto / 0
   tracking / white / centered. (W=592 in Figma frame.) */
.sj-prj-list-title .elementor-heading-title {
	font-family: "Barlow Condensed", sans-serif !important;
	font-weight: 600;
	font-size: 52px;
	line-height: normal;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #ffffff !important;
	margin: 0;
}

.sj-prj-list-row > .elementor-container,
.sj-prj-list-row > .elementor-container > .elementor-row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	column-gap: 80px;
	align-items: flex-start;
	justify-content: center;
	box-sizing: border-box;
}

.sj-prj-list-row > .elementor-container > .elementor-row {
	width: 100%;
}

.sj-prj-list-row.elementor-section > .elementor-container {
	max-width: none !important;
	width: 100%;
}

/* Figma columns: left W=538, right W=507; both height 294 with 9 lines at
   20/30. Cap each at 538 / 507 so the rendered widths mirror the design. */
.sj-prj-list-col-l {
	flex: 0 0 auto;
	width: auto !important;
	max-width: 538px;
}

.sj-prj-list-col-r {
	flex: 0 0 auto;
	width: auto !important;
	max-width: 507px;
}

/* List rows — Figma: Source Sans Pro Regular (400) / 20px / 30px line-h
   / 0 tracking / white. No paragraph spacing (continuous lines). */
.sj-prj-list-text,
.sj-prj-list-text p {
	font-family: "Source Sans Pro", "Source Sans 3", sans-serif !important;
	font-weight: 400;
	font-size: 20px;
	line-height: 30px;
	letter-spacing: 0;
	color: #ffffff !important;
	margin: 0;
}

/* =========================================================================
   Bottom CTA — Figma: full-width slate band 1440 × 428, fill #5b5e60.
   Title at Y 2631 (Barlow Condensed SemiBold 60 / Auto / 0), body at Y 2735
   (Source Sans Pro Regular 32 / 50 / 0), button 328 × 70 at Y 2823
   (Open Sans Condensed Bold 40, black on #BEC852). All centered.
   ========================================================================= */
.sj-prj-cta.elementor-section {
	background-color: #5b5e60 !important;
	min-height: 0 !important;
	padding-top: 64px !important;
	padding-bottom: 64px !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box;
}

.sj-prj-cta > .elementor-container {
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
	min-height: 0 !important;
}

.sj-prj-cta-col > .elementor-widget-wrap,
.sj-prj-cta-col.elementor-column > .elementor-element-populated {
	background-color: transparent !important;
}

.sj-prj-cta-title .elementor-heading-title {
	font-family: "Barlow Condensed", sans-serif !important;
	font-weight: 600;
	font-size: 60px;
	line-height: normal;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #ffffff !important;
	margin: 0;
}

.sj-prj-cta-body,
.sj-prj-cta-body p {
	font-family: "Source Sans Pro", "Source Sans 3", sans-serif !important;
	font-weight: 400;
	font-size: 32px;
	line-height: 50px;
	letter-spacing: 0;
	color: #ffffff !important;
	margin: 0;
}

/* Button — Figma frame 328 × ~70, Open Sans Condensed Bold 40 / Auto.
   Reset Elementor's default size sizing math so the button is exactly
   328 × 70 with no extra padding-induced growth. */
.sj-prj-cta-btn .elementor-button {
	font-family: "Open Sans Condensed", "Barlow Condensed", sans-serif !important;
	font-weight: 700;
	font-size: 40px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #000000 !important;
	background-color: #bec852 !important;
	border: 0;
	border-radius: 0;
	box-sizing: border-box;
	width: 328px;
	min-height: 70px;
	height: 70px;
	padding: 0 20px;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* =========================================================================
   Responsive — collapse the 2-column gallery + the 2-column list on small
   viewports. Desktop figma layout is the source of truth above 1200px.
   ========================================================================= */
@media (max-width: 1200px) {
	.sj-prj-hero > .elementor-container .sj-prj-hero-col {
		padding-left: 32px !important;
		padding-right: 32px !important;
	}
	.sj-prj-hero-title .elementor-heading-title {
		font-size: clamp(48px, 8vw, 90px);
		line-height: 1.05;
	}
	.sj-prj-hero-body,
	.sj-prj-hero-body p {
		font-size: clamp(18px, 2.6vw, 32px);
		line-height: 1.5;
	}
	.sj-prj-card .elementor-widget-image img,
	.sj-prj-card .elementor-image-box-img img {
		height: auto !important;
		max-height: none !important;
		aspect-ratio: 580 / 360;
	}
}

@media (max-width: 1024px) {
	.sj-prj-grid-row > .elementor-container,
	.sj-prj-grid-row > .elementor-container > .elementor-row {
		flex-wrap: wrap !important;
		flex-direction: column !important;
		row-gap: 24px;
		column-gap: 0;
	}
	.sj-prj-grid-row .sj-prj-card {
		width: 100% !important;
		max-width: 100%;
		flex-basis: 100%;
	}
	.sj-prj-list-row > .elementor-container,
	.sj-prj-list-row > .elementor-container > .elementor-row {
		flex-wrap: wrap !important;
		flex-direction: column !important;
		row-gap: 24px;
		column-gap: 0;
	}
	.sj-prj-list-col-l,
	.sj-prj-list-col-r {
		width: 100% !important;
		max-width: 100%;
	}
	.sj-prj-list-text,
	.sj-prj-list-text p {
		max-width: 100% !important;
		line-height: 1.5 !important;
	}
}

@media (max-width: 768px) {
	.sj-prj-grid-row > .elementor-container,
	.sj-prj-grid-row > .elementor-container > .elementor-row {
		flex-wrap: wrap;
		row-gap: 24px;
		column-gap: 0;
	}
	.sj-prj-grid-row .sj-prj-card {
		width: 100% !important;
		max-width: 100%;
		flex-basis: 100%;
	}
	.sj-prj-list-row > .elementor-container,
	.sj-prj-list-row > .elementor-container > .elementor-row {
		flex-wrap: wrap;
		row-gap: 20px;
		column-gap: 0;
	}
	.sj-prj-list-col-l,
	.sj-prj-list-col-r {
		width: 100% !important;
		max-width: 100%;
	}
	.sj-prj-list-text,
	.sj-prj-list-text p {
		text-align: left !important;
		max-width: 100% !important;
		word-wrap: break-word;
		overflow-wrap: anywhere;
	}
	.sj-prj-gallery-title .elementor-heading-title {
		font-size: 34px;
		line-height: 1.15;
	}
	.sj-prj-list-title .elementor-heading-title {
		font-size: 36px;
		line-height: 1.15;
	}
	.sj-prj-cta-title .elementor-heading-title {
		font-size: 40px;
		line-height: 1.15;
	}
	.sj-prj-cta-body,
	.sj-prj-cta-body p {
		font-size: 20px;
		line-height: 30px;
	}
	.sj-prj-list-text,
	.sj-prj-list-text p {
		font-size: clamp(15px, 3.8vw, 18px) !important;
		line-height: 1.5 !important;
	}
	.sj-prj-cta-btn .elementor-widget-container {
		text-align: center;
	}

	.sj-prj-cta-btn .elementor-button {
		font-size: clamp(22px, 5vw, 28px);
		width: 100% !important;
		max-width: 328px !important;
		min-height: 56px !important;
		height: auto !important;
		padding: 12px 20px !important;
		line-height: 1.15 !important;
		white-space: normal !important;
	}

	.sj-prj-cta-btn .elementor-button-text {
		white-space: normal !important;
	}
}
