/* careers_portal_news.css - the "meet the team" / news cards + article modal on a careers portal.

   Rendered by careers_portal_view.render_scraped_news_block(), data from tbl_content rows with
   variableName = 'scraped_news' (careers_portal_model.scrape_goodwood_news writes them nightly).

   Brand-neutral on purpose: fonts and colours inherit from the page, so a client's own include CSS
   retints it (see the .cpn_ block at the bottom of includes/goodwood/css/goodwood2026.css).
   Prefix cpn_ = careers portal news. Lives outside .arj-custom, so no bootstrap dependency. */

.cpn_news {
	display: flex;
	gap: 3rem;
	padding: 3rem 0 3rem 2.5rem;
}

.cpn_news_intro {
	flex: 0 0 260px;
	padding-top: 1rem;
}

.cpn_heading {
	margin: 0 0 1rem;
}

.cpn_news_intro p {
	font-size: 1.15rem;
	margin: 0;
}

/* the card row is an NW1 strip (scroll_strip_arrows.css): scrollbar hidden, chevrons page it */

.cpn_strip {
	flex: 1 1 auto;
}

.cpn_scroll {
	display: flex;
	gap: 2.5rem;
	scroll-snap-type: x mandatory;
	padding: .5rem 2.5rem 1.5rem 0;
}

.cpn_strip .strip_ctrl {
	top: 100px;
}

.cpn_card {
	flex: 0 0 310px;
	scroll-snap-align: start;
	cursor: pointer;
}

.cpn_img {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	margin-bottom: 1.25rem;
	background: #ddd;
}

.cpn_img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(1);
	transition: transform .3s ease;
}

.cpn_card:hover .cpn_img img {
	transform: scale(1.05);
}

.cpn_label {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	margin: 0 0 .5rem;
}

.cpn_card h3 {
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.3;
	margin: 0 0 .5rem;
}

.cpn_blurb {
	font-size: 1rem;
	margin: 0;
}

/* "opens in a pop-up" cue - the expand icon is Font Awesome 5 Pro, which the careers page already loads */

.cpn_more {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	margin: 1.25rem 0 0;
}

.cpn_more i {
	margin-left: .5rem;
	transition: transform .2s;
}

.cpn_card:hover .cpn_more i {
	transform: scale(1.2);
}

/* modal */

.cpn_modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	overflow-y: auto;
	padding: 3rem 1rem;
}

.cpn_modal[hidden] {
	display: none;
}

.cpn_modal_backdrop {
	position: fixed;
	inset: 0;
	background: rgba(19,19,19,.8);
}

.cpn_modal_panel {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 760px;
	box-shadow: 0 35px 60px -15px rgba(0,0,0,.5);
}

.cpn_modal_close {
	position: absolute;
	top: .75rem;
	right: .75rem;
	z-index: 1;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: #131313;
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.cpn_modal_img {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #ddd;
}

.cpn_modal_img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cpn_modal_body {
	padding: 2rem 2.5rem 2.5rem;
}

.cpn_modal_title {
	font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem);
	font-weight: 400;
	letter-spacing: .04em;
	line-height: 1.15;
	margin: 0 0 1.25rem;
}

.cpn_article {
	font-size: 1.15rem;
	line-height: 1.6;
}

.cpn_article p {
	margin: 0 0 1.25rem;
}

.cpn_article strong {
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.cpn_article img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* the article's standfirst / intro - a blockquote because safetext() strips class attributes on the way into tbl_content */

.cpn_article blockquote {
	border-left: 3px solid #131313;
	padding-left: 1.25rem;
	margin: 0 0 1.5rem;
}

.cpn_modal_source {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	margin: 1.5rem 0 0;
}

.cpn_modal_source a {
	color: inherit;
	text-decoration: underline;
}

body.cpn_modal_open {
	overflow: hidden;
}

@media (max-width: 767px) {

	.cpn_news {
		flex-direction: column;
		gap: 1.5rem;
		padding-left: 1.25rem;
	}

	.cpn_news_intro {
		flex-basis: auto;
	}

	.cpn_card {
		flex-basis: 260px;
	}

	.cpn_modal {
		padding: 0;
	}

	.cpn_modal_body {
		padding: 1.5rem 1.25rem 2rem;
	}

}
