/*
 * A single newsletter issue. Enqueued in functions.php for is_singular(
 * 'newsletter' ) — sjc_page_assets() can't pick this up, since it matches on
 * page slug and an issue's slug is its own ("pinchas-2026").
 *
 * Reading order: masthead, then Shabbos times + upcoming events side by side
 * (stacked on narrow screens), then the column. Times and events are the
 * "what do I need to know this week" facts, so they sit together right under
 * the masthead rather than after the column — nobody should have to scroll
 * past the whole article to find candle lighting.
 */

.newsletter-issue {
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* --- Masthead ---------------------------------------------------------- */

.newsletter-issue__masthead {
	background: var(--wash, #eef4fa);
	border-bottom: 3px solid var(--brand, #0974b2);
	padding-block: clamp(2.5rem, 5vw, 4rem);
	text-align: center;
}

.newsletter-issue__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--brand, #0974b2);
}

.newsletter-issue__parsha {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1.1;
	color: var(--ink, #143d56);
}

.newsletter-issue__dates {
	margin: 0.75rem 0 0;
	color: var(--muted, #64748b);
	font-size: 1rem;
}

.newsletter-issue__dates-sep {
	margin-inline: 0.5rem;
	opacity: 0.5;
}

.newsletter-issue__pdf-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
	padding: 0.7rem 1.4rem;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--brand, #0974b2);
	border: none;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.newsletter-issue__pdf-button:hover {
	background: var(--brand-dark, #075d8e);
	transform: translateY(-1px);
}

.newsletter-issue__pdf-icon {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
}

/* --- Top: upcoming events ------------------------------------------------ */

.newsletter-issue__top {
	padding-block: clamp(2rem, 4vw, 3rem);
	border-bottom: 1px solid var(--line, #dbe3ea);
}

.newsletter-issue__top-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
	gap: clamp(2rem, 4vw, 3rem);
	max-width: 58rem;
}

.newsletter-issue__top-heading {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	color: var(--brand, #0974b2);
}

.newsletter-issue__top-icon {
	width: 1.15em;
	height: 1.15em;
	flex-shrink: 0;
}

/* --- The column -------------------------------------------------------- */

.newsletter-issue__column {
	max-width: 58rem;
	padding-block: clamp(2rem, 4vw, 3rem);
}

.newsletter-issue__column-title {
	margin: 0;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1.15;
	color: var(--ink, #143d56);
}

.newsletter-issue__column-author {
	margin: 0.4rem 0 2rem;
	font-style: italic;
	font-weight: 600;
	color: var(--muted, #64748b);
}

.newsletter-issue__body {
	/* Nudged up with the wider column: at 58rem the old size left the line
	   length past comfortable, and larger type pulls the measure back down. */
	font-size: 1.125rem;
	line-height: 1.75;
}

.newsletter-issue__body p {
	margin: 0 0 1.25rem;
}

.newsletter-issue__body p:last-child {
	margin-bottom: 0;
}

/* --- Upcoming events (right column of newsletter-issue__top) ----------- */

/*
 * Cards, not a fixed sidebar column like the printed sheet — the page has
 * room to give each event room to breathe.
 *
 * An event is only a link when its own Link Behavior resolves to one
 * (post_page or external — see sjc_event_link()); anything else, including
 * Lightbox, renders as a plain <div> with no click at all. There is no
 * lightbox on this page to open one in.
 */
.newsletter-events {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.newsletter-events__item {
	display: flex;
	gap: 0.85rem;
	padding: 1rem 1.1rem;
	background: var(--wash, #eef4fa);
	border-radius: 0.5rem;
	text-decoration: none;
	color: inherit;
}

a.newsletter-events__item {
	transition: background-color 0.15s ease;
}

a.newsletter-events__item:hover,
a.newsletter-events__item:focus-visible {
	background: var(--sand, #e3edf7);
}

.newsletter-events__icon {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	color: var(--brand, #0974b2);
}

.newsletter-events__icon svg {
	width: 1.1rem;
	height: 1.1rem;
}

.newsletter-events__body {
	min-width: 0;
}

.newsletter-events__day {
	margin: 0 0 0.15rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--brand, #0974b2);
}

.newsletter-events__title {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.25;
	color: var(--ink, #143d56);
}

.newsletter-events__desc {
	margin: 0.3rem 0 0;
	font-style: italic;
	color: var(--muted, #64748b);
}

.newsletter-events__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 1rem;
	margin: 0.5rem 0 0;
	font-size: 0.9375rem;
	color: var(--ink, #143d56);
}

.newsletter-events__meta-row {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.newsletter-events__meta-icon {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
	color: var(--muted, #64748b);
}

.newsletter-events__note {
	margin: 1rem 0 0;
	font-size: 0.875rem;
	color: var(--muted, #64748b);
}

/* --- Prev / next ------------------------------------------------------- */

.newsletter-issue__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 58rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line, #dbe3ea);
}

.newsletter-issue__nav-link {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	text-decoration: none;
	color: inherit;
	max-width: 45%;
}

.newsletter-issue__nav-link--next {
	text-align: right;
	margin-inline-start: auto;
}

.newsletter-issue__nav-dir {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted, #64748b);
}

.newsletter-issue__nav-title {
	font-weight: 600;
	color: var(--brand, #0974b2);
}

.newsletter-issue__nav-link:hover .newsletter-issue__nav-title {
	text-decoration: underline;
}

.newsletter-issue__nav-all {
	order: 3;
	flex-basis: 100%;
	text-align: center;
	padding-top: 0.5rem;
	font-weight: 600;
	color: var(--muted, #64748b);
}
