/* ==========================================================================
   Newsletters: blocks, newsletter page, listing cards
   ========================================================================== */

:root {
	--nl-red: #aa1e31;
	--nl-navy: #00354f;
	--nl-page-bg: #f4f4f4;
	--nl-col: 640px;
}

/* --- Blocks (used on the newsletter page and in the editor) ------------- */

.nl-block {
	--nl-bg: transparent;
	--nl-text: #222;
	background: var(--nl-bg);
	color: var(--nl-text);
	margin: 0;
	overflow: hidden;
}

.nl-block img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	border: 0;
}

.nl-block a img {
	transition: opacity .2s ease;
}

.nl-block a:hover img,
.nl-block a:focus img {
	opacity: .92;
}

/* Image */
.nl-image--padded {
	padding: 18px 24px;
}

.nl-image--padded img {
	width: auto;
	max-height: 120px;
	margin: 0 auto;
}

/* Story */
.nl-story {
	--nl-bg: #00354f;
	--nl-text: #fff;
	--nl-btn-bg: #fff;
	--nl-btn-text: var(--nl-bg);
}

.nl-story__content {
	padding: 22px 7.5% 30px;
	font-size: 16px;
	line-height: 1.6;
}

.nl-story__title {
	color: inherit;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 .6em;
	text-transform: uppercase;
	letter-spacing: .01em;
}

.nl-story__body p {
	color: inherit;
	font-size: inherit;
	line-height: inherit;
	margin: 0 0 1em;
}

.nl-story__body p:last-child,
.nl-story__body ul:last-child,
.nl-story__body ol:last-child {
	margin-bottom: 0;
}

.nl-story__body ul,
.nl-story__body ol {
	margin: 0 0 1em 1.25em;
	padding: 0;
}

.nl-story__body ul { list-style: disc; }
.nl-story__body ol { list-style: decimal; }

.nl-story__body a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 600;
}

.nl-story__body a:hover {
	text-decoration-thickness: 2px;
}

.nl-story__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-top: 22px;
}

.nl-btn,
.nl-story .nl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 24px;
	background: var(--nl-btn-bg);
	color: var(--nl-btn-text);
	border: 2px solid var(--nl-btn-bg);
	border-radius: 2px;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .1em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	transition: background-color .2s ease, color .2s ease;
}

.nl-btn:hover,
.nl-btn:focus-visible {
	background: transparent;
	color: var(--nl-btn-bg);
	text-decoration: none;
}

.nl-btn:focus-visible {
	outline: 2px solid var(--nl-btn-bg);
	outline-offset: 3px;
}

/* Social */
.nl-social {
	--nl-bg: #fff;
	--nl-icon: #00354f;
	padding: 24px 16px;
	text-align: center;
}

.nl-social__list {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nl-social__list li {
	margin: 0;
	padding: 0;
}

.nl-social__list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--nl-icon);
	color: #fff;
	transition: transform .2s ease;
}

.nl-social__list a:hover {
	transform: translateY(-2px);
	color: #fff;
}

.nl-social__handle {
	margin: 12px 0 0;
	font-size: 15px;
	font-weight: 600;
}

.nl-social__handle a {
	color: var(--nl-icon);
	text-decoration: none;
}

/* Editor placeholder */
.nl-placeholder {
	padding: 28px 20px;
	border: 2px dashed #c3c4c7;
	background: #fff;
	color: #50575e;
	font-size: 14px;
	text-align: center;
}

/* Editor canvas: show blocks at newsletter width */
.editor-styles-wrapper .wp-block[data-type^="acf/newsletter-"] {
	max-width: var(--nl-col);
	margin-top: 0;
	margin-bottom: 14px;
}

/* --- Newsletter page ---------------------------------------------------- */

.nl-page {
	background: var(--nl-page-bg);
	padding: 0 0 56px;
}

.nl-page__header {
	max-width: var(--nl-col);
	margin: 0 auto;
	padding: 28px 16px 20px;
	text-align: center;
}

.nl-breadcrumb {
	font-size: 14px;
	margin: 0 0 10px;
	color: #575555;
}

.nl-breadcrumb a {
	color: var(--nl-red);
	font-weight: 600;
}

.nl-breadcrumb span[aria-hidden] {
	margin: 0 6px;
}

.nl-page__title {
	color: var(--nl-navy);
	font-size: clamp(1.4rem, 4vw, 2rem);
	font-weight: 900;
	line-height: 1.2;
	margin: 0;
	text-transform: uppercase;
}

.nl-page__date {
	margin: 8px 0 0;
	color: #575555;
	font-size: 14px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.nl-page__body {
	max-width: var(--nl-col);
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	box-sizing: content-box;
}

.nl-page__legacy {
	background: #fff;
}

.nl-page__legacy iframe {
	display: block;
	width: 100%;
	height: 80vh;
	min-height: 600px;
	border: 0;
}

.nl-page__footer {
	max-width: var(--nl-col);
	margin: 36px auto 0;
	padding: 0 16px;
	text-align: center;
}

.nl-more__title {
	color: var(--nl-navy);
	font-size: 1.1rem;
	font-weight: 800;
	margin: 0 0 16px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.nl-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: left;
}

.nl-cards li {
	margin: 0;
}

.nl-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	box-shadow: 0 3px 5px rgba(0, 0, 0, .15);
	color: #282728;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease;
}

.nl-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, .18);
	color: #282728;
}

/* Newsletter graphics carry baked-in text, so never crop them. */
.nl-card img {
	display: block;
	width: 100%;
	height: auto;
}

.nl-card__swatch {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--nl-bg, var(--nl-navy));
}

.nl-card__title {
	display: block;
	padding: 12px 14px 16px;
	color: var(--nl-red);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
}

/* --- Mobile ------------------------------------------------------------- */

@media (max-width: 680px) {
	.nl-page__body {
		padding: 0;
		gap: 10px;
	}

	.nl-story__content {
		padding: 18px 18px 24px;
		font-size: 16px;
	}

	.nl-cards {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		padding: 0 4px;
	}

	.nl-page__footer {
		padding: 0 12px;
	}
}

@media (max-width: 420px) {
	.nl-story__actions {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.nl-btn {
		width: 100%;
	}

	.nl-cards {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nl-block a img,
	.nl-btn,
	.nl-card,
	.nl-social__list a {
		transition: none;
	}
}
