/* Crawford Packaging USA: News templates. Tokens mirror the Elementor kit. */

.cpusa-news {
	--cp-bg: #ffffff;
	--cp-surface: #f4f4f4;
	--cp-ink: #2e2e2e;
	--cp-body: #585858;
	--cp-muted: #7a7a7a;
	--cp-accent: #6cc24a;
	--cp-accent-deep: #027935;
	--cp-line: #e3e3e3;
	--cp-font: "Poppins", sans-serif;
	--cp-r-sm: 6px;
	--cp-r-md: 12px;
	--cp-r-pill: 50px;
	--cp-wrap: 1140px;
	--cp-narrow: 760px;
	--cp-gutter: 20px;

	background: var(--cp-bg);
	color: var(--cp-body);
	font-family: var(--cp-font);
	font-weight: 300;
	font-size: 16px;
	line-height: 1.6;
}

/* Neutralize Hello Elementor resets without raising specificity. */
.cpusa-news :where(h1:not(.cpusa-article--elementor *), h2:not(.cpusa-article--elementor *), h3:not(.cpusa-article--elementor *), h4:not(.cpusa-article--elementor *), h5:not(.cpusa-article--elementor *), h6:not(.cpusa-article--elementor *)) {
	font-family: var(--cp-font);
	margin: 0;
}
.cpusa-news :where(p:not(.cpusa-article--elementor *), figure:not(.cpusa-article--elementor *), ul:not(.cpusa-article--elementor *), ol:not(.cpusa-article--elementor *), blockquote:not(.cpusa-article--elementor *)) {
	margin: 0;
}
.cpusa-news :where(a:not(.cpusa-article--elementor *)) {
	color: inherit;
	text-decoration: none;
}
.cpusa-news :where(img:not(.cpusa-article--elementor *)) {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Layout */
.cpusa-wrap {
	box-sizing: content-box;
	max-width: var(--cp-wrap);
	margin-inline: auto;
	padding-inline: var(--cp-gutter);
}
.cpusa-wrap--narrow {
	max-width: var(--cp-narrow);
}

/* Shared bits */
.cpusa-rule {
	display: block;
	width: 124px;
	height: 2px;
	background: var(--cp-accent);
	margin: 22px 0 20px;
}

.cpusa-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	font-size: 13px;
	font-weight: 400;
	color: var(--cp-muted);
	margin-bottom: 10px;
}
.cpusa-meta__cat {
	color: var(--cp-accent-deep);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 12px;
}
.cpusa-meta--lg {
	font-size: 15px;
}
.cpusa-meta--lg > * + *::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--cp-accent);
	margin-right: 14px;
	vertical-align: middle;
}

.cpusa-btn {
	display: inline-block;
	background: var(--cp-accent);
	color: #fff !important;
	font-family: var(--cp-font);
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	padding: 15px 28px;
	border-radius: var(--cp-r-pill);
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.cpusa-btn:hover,
.cpusa-btn:focus-visible {
	background: var(--cp-accent-deep);
}
.cpusa-btn:active {
	transform: translateY(1px);
}

.cpusa-readmore {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 15px;
	color: var(--cp-accent-deep) !important;
}
.cpusa-readmore::after {
	content: "";
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: width 0.2s ease;
}
.cpusa-readmore:hover::after {
	width: 28px;
}

.cpusa-chips,
.cpusa-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.cpusa-chips {
	justify-content: center;
	margin-bottom: 56px;
}
.cpusa-chip {
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-r-pill);
	background: #fff;
	color: var(--cp-ink) !important;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.cpusa-chip:hover {
	border-color: var(--cp-accent);
	color: var(--cp-accent-deep) !important;
}
.cpusa-chip.is-active {
	background: var(--cp-accent);
	border-color: var(--cp-accent);
	color: #fff !important;
	font-weight: 600;
}

.cpusa-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14px;
	font-weight: 400;
	color: var(--cp-muted);
	margin-bottom: 18px;
}
.cpusa-crumbs a {
	color: var(--cp-accent-deep) !important;
}
.cpusa-crumbs a:hover {
	text-decoration: underline;
}

.cpusa-section-title {
	color: var(--cp-accent);
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 600;
	line-height: 1.15;
}

.cpusa-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 180px;
	background:
		radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.22) 0 18%, transparent 19%),
		radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.12) 0 30%, transparent 31%),
		linear-gradient(135deg, var(--cp-accent) 0%, var(--cp-accent-deep) 100%);
}

/* Hero (every news view). Mirrors the site's page heroes: full-width photo under a
   dark overlay, pulled up behind the transparent header, centered text. */
.cpusa-hero {
	--cp-header-offset: 150px;
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 600px;
	margin-top: calc(var(--cp-header-offset) * -1);
	padding: calc(var(--cp-header-offset) + 64px) var(--cp-gutter) 88px;
	background: var(--cp-ink);
	text-align: center;
	overflow: hidden;
}
.cpusa-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(0, 0, 0, 0.68);
}
.cpusa-hero .cpusa-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}
.cpusa-hero__inner {
	width: 100%;
	max-width: 1080px;
}
.cpusa-hero__title {
	color: var(--cp-accent);
	font-size: clamp(30px, 4.6vw, 65px);
	font-weight: 600;
	line-height: 1.2;
}
.cpusa-hero--article .cpusa-hero__title {
	font-size: clamp(28px, 3.8vw, 54px);
}
.cpusa-hero .cpusa-rule {
	width: 240px;
	margin: 26px auto 24px;
}
.cpusa-hero__intro {
	max-width: 720px;
	margin-inline: auto;
	font-size: clamp(16px, 1.6vw, 22px);
	font-weight: 300;
	line-height: 1.5;
	color: #fff;
}
.cpusa-hero__intro p {
	margin: 0;
}
.cpusa-hero .cpusa-crumbs {
	justify-content: center;
	color: rgba(255, 255, 255, 0.75);
}
.cpusa-hero .cpusa-crumbs a {
	color: #fff !important;
}
.cpusa-hero .cpusa-meta {
	justify-content: center;
	margin-bottom: 0;
	color: #fff;
	font-size: clamp(15px, 1.4vw, 18px);
	font-weight: 300;
}

/* Listing */
.cpusa-listing {
	padding-top: 64px;
	padding-bottom: 88px;
}

.cpusa-feature {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 48px;
	align-items: center;
	margin-bottom: 72px;
}
.cpusa-feature__media {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: var(--cp-r-md);
	overflow: hidden;
	background: var(--cp-surface);
}
.cpusa-feature__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.cpusa-feature:hover .cpusa-feature__media img {
	transform: scale(1.03);
}
.cpusa-feature__title {
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 600;
	line-height: 1.15;
	color: var(--cp-ink);
	margin-bottom: 16px;
}
.cpusa-feature__title a:hover {
	color: var(--cp-accent-deep);
}
.cpusa-feature__excerpt {
	font-size: 17px;
	margin-bottom: 28px;
}

.cpusa-section-title + .cpusa-grid {
	margin-top: 28px;
}
.cpusa-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 32px;
}

.cpusa-card {
	display: flex;
	flex-direction: column;
}
.cpusa-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: var(--cp-r-md);
	overflow: hidden;
	background: var(--cp-surface);
	margin-bottom: 18px;
}
.cpusa-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.cpusa-card:hover .cpusa-card__media img {
	transform: scale(1.04);
}
.cpusa-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
}
.cpusa-card__title {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--cp-ink);
	margin-bottom: 10px;
}
.cpusa-card__title a:hover {
	color: var(--cp-accent-deep);
}
.cpusa-card__excerpt {
	font-size: 15px;
	margin-bottom: 16px;
}
.cpusa-card .cpusa-readmore {
	margin-top: auto;
}

.cpusa-empty {
	background: var(--cp-surface);
	border-radius: var(--cp-r-md);
	padding: 56px 40px;
	text-align: center;
}
.cpusa-empty__title {
	color: var(--cp-ink);
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 8px;
}
.cpusa-empty .cpusa-readmore {
	margin-top: 18px;
}

/* Pagination */
.cpusa-pagination {
	margin-top: 64px;
}
.cpusa-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.cpusa-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-r-pill);
	color: var(--cp-ink);
	font-weight: 400;
	font-size: 15px;
}
.cpusa-pagination a.page-numbers:hover {
	border-color: var(--cp-accent);
	color: var(--cp-accent-deep);
}
.cpusa-pagination .page-numbers.current {
	background: var(--cp-accent);
	border-color: var(--cp-accent);
	color: #fff;
	font-weight: 600;
}
.cpusa-pagination .page-numbers.dots {
	border: 0;
}

/* Single */
.cpusa-article {
	padding-top: 72px;
	padding-bottom: 96px;
}
/* Posts built with Elementor: Elementor controls the layout and typography of its own content. */
.cpusa-article--elementor {
	padding-bottom: 0;
	font-weight: inherit;
}
.cpusa-article--after {
	padding-top: 0;
}
.cpusa-article--after > .cpusa-article-foot:first-child {
	margin-top: 56px;
}

.cpusa-prose {
	font-size: 17px;
	line-height: 1.8;
	color: var(--cp-body);
}
.cpusa-prose > * + * {
	margin-top: 1.25em;
}
.cpusa-prose h2,
.cpusa-prose h3,
.cpusa-prose h4 {
	color: var(--cp-accent);
	font-weight: 600;
	line-height: 1.2;
	margin-top: 1.9em;
}
.cpusa-prose h2 { font-size: 30px; }
.cpusa-prose h3 { font-size: 24px; }
.cpusa-prose h4 { font-size: 20px; color: var(--cp-ink); }
.cpusa-prose h2 + *,
.cpusa-prose h3 + *,
.cpusa-prose h4 + * {
	margin-top: 0.6em;
}
.cpusa-prose strong {
	font-weight: 600;
	color: var(--cp-ink);
}
.cpusa-prose a {
	color: var(--cp-accent-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.cpusa-prose a:hover {
	color: var(--cp-accent);
}
.cpusa-prose .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.cpusa-prose .wp-block-button__link {
	display: inline-block;
	background: var(--cp-accent);
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	padding: 15px 28px;
	border-radius: var(--cp-r-pill);
	text-decoration: none;
	transition: background-color 0.2s ease;
}
.cpusa-prose .wp-block-button__link:hover,
.cpusa-prose .wp-block-button__link:focus-visible {
	background: var(--cp-accent-deep);
	color: #fff;
}
.cpusa-prose ul,
.cpusa-prose ol {
	padding-left: 1.3em;
}
.cpusa-prose li + li {
	margin-top: 0.4em;
}
.cpusa-prose li::marker {
	color: var(--cp-accent);
}
.cpusa-prose blockquote {
	border: 0;
	border-left: 3px solid var(--cp-accent);
	padding: 4px 0 4px 24px;
	font-size: 20px;
	line-height: 1.6;
	font-style: italic;
	color: var(--cp-ink);
}
.cpusa-prose blockquote cite {
	display: block;
	margin-top: 10px;
	font-size: 15px;
	font-style: normal;
	color: var(--cp-muted);
}
.cpusa-prose img,
.cpusa-prose .wp-block-image img {
	border-radius: var(--cp-r-md);
}
.cpusa-prose figcaption {
	font-size: 14px;
	color: var(--cp-muted);
	margin-top: 8px;
}
.cpusa-prose hr {
	border: 0;
	border-top: 1px solid var(--cp-line);
	margin: 2.5em 0;
}
.cpusa-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
.cpusa-prose th,
.cpusa-prose td {
	border: 0;
	border-bottom: 1px solid var(--cp-line);
	padding: 10px 12px;
	text-align: left;
}
.cpusa-prose th {
	font-weight: 600;
	color: var(--cp-ink);
	background: var(--cp-surface);
}

.cpusa-article-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 56px;
	padding-top: 28px;
	border-top: 1px solid var(--cp-line);
}
.cpusa-share {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}
.cpusa-share__label {
	font-size: 14px;
	font-weight: 600;
	color: var(--cp-ink);
	margin-right: 4px;
}
.cpusa-share a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--cp-surface);
	color: var(--cp-ink);
	transition: background-color 0.2s ease, color 0.2s ease;
}
.cpusa-share a:hover {
	background: var(--cp-accent);
	color: #fff;
}
.cpusa-share svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.cpusa-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 48px 0 0;
}
.cpusa-postnav__link {
	display: block;
	padding: 22px 24px;
	border-radius: var(--cp-r-md);
	background: var(--cp-surface);
	transition: background-color 0.2s ease;
}
.cpusa-postnav__link:hover {
	background: #ebf5e6;
}
.cpusa-postnav__link--next {
	grid-column: 2;
	text-align: right;
}
.cpusa-postnav__dir {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cp-accent-deep);
	margin-bottom: 6px;
}
.cpusa-postnav__title {
	display: block;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--cp-ink);
}

.cpusa-related {
	padding: 72px 0 88px;
	background: var(--cp-surface);
}
.cpusa-related__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}

/* Closing CTA */
.cpusa-cta {
	border-top: 1px solid var(--cp-line);
	padding: 80px 0;
	text-align: center;
}
.cpusa-related + .cpusa-cta {
	border-top: 0;
}
.cpusa-cta__inner {
	max-width: 720px;
}
.cpusa-cta__title {
	color: var(--cp-accent);
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 600;
	line-height: 1.1;
	margin-bottom: 14px;
}
.cpusa-cta__text {
	font-size: 17px;
	margin-bottom: 28px;
}

/* Responsive */
@media (max-width: 1024px) {
	.cpusa-hero {
		min-height: 480px;
	}
	.cpusa-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.cpusa-feature {
		gap: 32px;
	}
}

@media (max-width: 767px) {
	.cpusa-hero {
		/* Mobile header is ~95px tall: pull the photo up behind it so the white logo sits on the image. */
		--cp-header-offset: 95px;
		min-height: 420px;
		padding-top: calc(var(--cp-header-offset) + 40px);
		padding-bottom: 56px;
	}
	.cpusa-hero .cpusa-rule {
		width: 160px;
	}
	.cpusa-listing {
		padding-top: 40px;
		padding-bottom: 64px;
	}
	.cpusa-feature {
		grid-template-columns: 1fr;
		gap: 22px;
		margin-bottom: 56px;
	}
	.cpusa-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.cpusa-chips {
		justify-content: flex-start;
		margin-bottom: 40px;
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-inline: calc(var(--cp-gutter) * -1);
		padding-inline: var(--cp-gutter);
		scrollbar-width: none;
	}
	.cpusa-chip {
		white-space: nowrap;
	}
	.cpusa-article {
		padding-top: 44px;
		padding-bottom: 64px;
	}
	.cpusa-prose {
		font-size: 16px;
	}
	.cpusa-prose h2 { font-size: 24px; }
	.cpusa-prose h3 { font-size: 20px; }
	.cpusa-share {
		margin-left: 0;
	}
	.cpusa-postnav {
		grid-template-columns: 1fr;
	}
	.cpusa-postnav__link--next {
		grid-column: 1;
	}
	.cpusa-related {
		padding: 56px 0 64px;
	}
	.cpusa-cta {
		padding: 56px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cpusa-news * {
		transition: none !important;
	}
	.cpusa-feature:hover .cpusa-feature__media img,
	.cpusa-card:hover .cpusa-card__media img {
		transform: none;
	}
}
