/**
 * Front-end styles for the Herzstein annual report.
 * Palette approximates the foundation's navy / red identity.
 */

.hzar-report {
	--hzar-navy: #26315a;
	--hzar-red: #c0392b;
	--hzar-blue: #4a6fa5;
	--hzar-ink: #2d3340;
	--hzar-rule: #d9dee6;
	max-width: 1085px;
	margin: 0 auto;
	padding: 0 20px 60px;
	color: var(--hzar-ink);
	font-size: 17px;
	line-height: 1.6;
}

/* ---- Section nav ---- */
.hzar-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	justify-content: center;
	list-style: none;
	margin: 0 0 32px;
	padding: 18px 0;
	border-bottom: 1px solid var(--hzar-rule);
}
.hzar-nav a {
	text-decoration: none;
	color: var(--hzar-blue);
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	font-size: 14px;
}
.hzar-nav a[aria-current="page"] {
	color: var(--hzar-red);
	border-bottom: 2px solid var(--hzar-red);
}

/* ---- Hero / Mission ---- */
.hzar-hero {
	background: var(--hzar-navy);
	color: #fff;
	text-align: center;
	padding: 56px 24px;
	border-radius: 6px;
}
.hzar-hero__eyebrow {
	text-transform: uppercase;
	letter-spacing: .3em;
	font-size: 13px;
	opacity: .8;
	margin: 0;
}
.hzar-hero__year {
	font-size: 72px;
	line-height: 1;
	margin: 8px 0 16px;
	font-weight: 700;
}
.hzar-hero__stat {
	font-size: 26px;
	max-width: 760px;
	margin: 0 auto;
	color: #dbe2f0;
}
.hzar-hero__stat-note {
	opacity: .8;
	margin-top: 8px;
}
.hzar-mission__headline {
	text-align: center;
	color: var(--hzar-navy);
	margin: 40px 0 12px;
}
.hzar-mission__body {
	max-width: 780px;
	margin: 0 auto;
}

/* ---- Section cards ---- */
.hzar-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 20px;
	margin-top: 48px;
}
.hzar-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 120px;
	padding: 24px;
	border: 1px solid var(--hzar-rule);
	border-radius: 6px;
	text-decoration: none;
	color: var(--hzar-navy);
	transition: box-shadow .15s ease, transform .15s ease;
}
.hzar-card:hover {
	box-shadow: 0 6px 20px rgba(38, 49, 90, .12);
	transform: translateY(-2px);
}
.hzar-card__title { font-size: 20px; font-weight: 700; }
.hzar-card__more { color: var(--hzar-red); font-weight: 600; text-transform: uppercase; font-size: 13px; }

/* ---- Section titles ---- */
.hzar-section__title {
	color: var(--hzar-navy);
	text-align: center;
	margin: 8px 0 28px;
}

/* ---- Highlights (collapsible) ---- */
.hzar-highlight {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	padding: 24px 0;
	border-bottom: 1px solid var(--hzar-rule);
}
@media (min-width: 720px) {
	.hzar-highlight { grid-template-columns: 5fr 7fr; }
}
.hzar-highlight__image { width: 100%; height: auto; border-radius: 6px; }
.hzar-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 12px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
	color: var(--hzar-navy);
	text-align: left;
}
.hzar-toggle__label { font-size: 22px; font-weight: 700; }
.hzar-toggle__sign {
	flex: 0 0 auto;
	width: 20px; height: 20px;
	position: relative;
}
.hzar-toggle__sign::before,
.hzar-toggle__sign::after {
	content: "";
	position: absolute;
	background: var(--hzar-red);
	top: 9px; left: 2px; right: 2px; height: 2px;
}
.hzar-toggle__sign::after { transform: rotate(90deg); transition: opacity .15s; }
.hzar-toggle[aria-expanded="true"] .hzar-toggle__sign::after { opacity: 0; }
.hzar-highlight__body[hidden] { display: none; }
.hzar-highlight__subtitle {
	margin: 2px 0 10px;
	color: #a03028;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
}

/* ---- Recipient list (2 columns) ----
   Colors are driven by custom properties so they can be overridden from the
   admin "Recipient Colors" settings (or a per-shortcode wrapper). Each falls
   back to the foundation palette. */
.hzar-recipients {
	--hzar-rl-title: #2C3E6B;
	--hzar-rl-summary: #000000;
	--hzar-rl-org: #408CA6;
	--hzar-rl-amount: #408CA6;
	--hzar-rl-location: #000000;
	--hzar-rl-description: #000000;
	--hzar-rl-rule: #d9dee6;
	--hzar-rl-bg: transparent;
	--hzar-rl-pg-text: #A03028;
	--hzar-rl-pg-active-bg: #A03028;
	--hzar-rl-pg-active-text: #ffffff;
}
.hzar-recipients .hzar-section__title { color: var(--hzar-rl-title); }
.hzar-recipients__summary {
	text-align: center;
	font-size: 18px;
	margin-bottom: 28px;
	color: var(--hzar-rl-summary);
}
.hzar-recipient-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px 48px;
}
@media (min-width: 720px) {
	.hzar-recipient-grid { grid-template-columns: 1fr 1fr; }
}
.hzar-recipient {
	background: var(--hzar-rl-bg);
}
.hzar-recipient__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	border-bottom: 1px solid var(--hzar-rl-rule);
	padding-bottom: 4px;
}
.hzar-recipient__org {
	color: var(--hzar-rl-org);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
	font-size: 15px;
}
.hzar-recipient__amount { color: var(--hzar-rl-amount); font-weight: 700; white-space: nowrap; }
.hzar-recipient__loc { font-style: italic; color: var(--hzar-rl-location); margin-top: 4px; }
.hzar-recipient__desc { margin-top: 6px; font-size: 15px; color: var(--hzar-rl-description); }

/* ---- Recipient search ----
   Rules are scoped under .hzar-recipients so they outrank Elementor's
   global kit button/input styles (e.g. .elementor-kit-N button). */
.hzar-recipients .hzar-recipient-search {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	margin: 0 0 32px;
}
.hzar-recipients .hzar-recipient-search input[type="search"] {
	flex: 0 1 420px;
	min-width: 220px;
	padding: 10px 14px;
	font-size: 15px;
	border: 1px solid var(--hzar-rl-rule, #d9dee6);
	border-radius: 4px;
	background-color: #fff;
	color: var(--hzar-rl-description, #2d3340);
}
.hzar-recipients .hzar-recipient-search input[type="search"]:focus {
	outline: 2px solid var(--hzar-rl-title, #2c3e6b);
	outline-offset: 1px;
	border-color: var(--hzar-rl-title, #2c3e6b);
}
.hzar-recipients .hzar-recipient-search__button {
	padding: 10px 22px;
	font-size: 15px;
	font-weight: 600;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	background-color: var(--hzar-rl-pg-active-bg, #a03028);
	color: var(--hzar-rl-pg-active-text, #fff);
}
.hzar-recipients .hzar-recipient-search__button:hover,
.hzar-recipients .hzar-recipient-search__button:focus {
	background-color: var(--hzar-rl-pg-active-bg, #a03028);
	color: var(--hzar-rl-pg-active-text, #fff);
	opacity: .9;
}
.hzar-recipients .hzar-recipient-search__clear {
	font-size: 14px;
	color: var(--hzar-rl-pg-text, #a03028);
	text-decoration: underline;
}
.hzar-recipients__no-results { text-align: center; }
.hzar-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Pagination (colors inherited from .hzar-recipients) ---- */
.hzar-pagination {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin: 24px 0;
}
/* Breathing room between the pagination and the list. */
.hzar-pagination--top { margin-bottom: 40px; }
.hzar-pagination--bottom { margin-top: 40px; }
.hzar-pagination a,
.hzar-pagination__current {
	display: inline-block;
	min-width: 40px;
	text-align: center;
	padding: 8px 10px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
}
.hzar-pagination a { color: var(--hzar-rl-pg-text, #bf3f3f); }
.hzar-pagination a:hover {
	background: var(--hzar-rl-pg-active-bg, #ba3131);
	color: var(--hzar-rl-pg-active-text, #fff);
}
.hzar-pagination__current {
	background: var(--hzar-rl-pg-active-bg, #ba3131);
	color: var(--hzar-rl-pg-active-text, #fff);
}

/* ---- Charts ---- */
.hzar-charts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
	margin-bottom: 40px;
}
.hzar-chart {
	border: 1px solid var(--hzar-rule);
	border-radius: 6px;
	padding: 16px;
}
/* Shortcode-embedded chart: borderless, centered, reference-site sizing. */
.hzar-chart--standalone {
	border: 0;
	padding: 0;
	max-width: 900px;
	margin: 0 auto;
}
.hzar-chart--compact { max-width: 460px; }
/* HTML legend used by the doughnut on narrow screens (wraps long labels). */
.hzar-legend {
	list-style: none;
	margin: 18px auto 0;
	padding: 0;
	/* Shrink to the longest label so the left-aligned items sit as a
	   centered block under the chart. */
	width: -webkit-fit-content;
	width: fit-content;
	max-width: min(100%, 460px);
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
}
.hzar-legend li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.35;
	color: #1f2430;
}
.hzar-legend__swatch {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	margin-top: 2px;
}

/* ---- Financial statements ----
   Colors driven by custom properties (admin "Display & Colors" settings),
   defaulting to the foundation website palette. */
/* Audited-statement layout: indented line items without row rules, teal
   section + total rows, "$" in its own narrow column, double rule under
   totals. */
.hzar-statement {
	--hzar-fin-title: #2C3E6B;
	--hzar-fin-header: #1f2430;
	--hzar-fin-section: #408CA6;
	--hzar-fin-label: #1f2430;
	--hzar-fin-amount: #1f2430;
	--hzar-fin-total: #408CA6;
	--hzar-fin-rule: #408CA6;
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 40px;
	font-size: 15px;
	line-height: 1.35;
	color: var(--hzar-fin-label);
}
.hzar-statement caption {
	text-align: left;
	font-size: 22px;
	font-weight: 700;
	color: var(--hzar-fin-title);
	padding: 12px 0;
}
.hzar-statement th,
.hzar-statement td {
	padding: 5px 14px;
	border: 0;
	text-align: left;
	vertical-align: baseline;
	background: none;
}
.hzar-statement .hzar-amt {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: var(--hzar-fin-amount);
	width: 17%;
	padding-left: 12px;
}
.hzar-statement__cur {
	width: 4%;
	text-align: center !important;
	color: var(--hzar-fin-section);
}
/* Column headers: small, right-aligned years over a single rule. */
.hzar-statement thead th {
	font-size: 13px;
	font-weight: 400;
	color: var(--hzar-fin-header);
	padding: 0 14px 10px;
	border-bottom: 1px solid var(--hzar-fin-rule);
}
.hzar-statement thead .hzar-amt { color: var(--hzar-fin-header); }
/* Section heading (Assets, Revenue…). */
.hzar-statement__section th {
	color: var(--hzar-fin-section);
	font-weight: 700;
	padding: 20px 14px 6px;
}
/* Ordinary line items: indented, no rules. */
.hzar-statement__line th {
	font-weight: 400;
	color: var(--hzar-fin-label);
	padding-left: 30px;
}
/* Totals: teal, rule above, double rule below. */
.hzar-statement__total th,
.hzar-statement__total td {
	padding-top: 12px;
	padding-bottom: 12px;
	border-top: 1px solid var(--hzar-fin-rule);
	border-bottom: 4px double var(--hzar-fin-rule);
}
.hzar-statement__total th { font-weight: 700; color: var(--hzar-fin-total); }
.hzar-statement__total .hzar-amt { color: var(--hzar-fin-total); }
/* Change in net assets: headless block of total-style rows separated by
   single rules, double rule only under the last one. */
.hzar-statement__group--summary .hzar-statement__total th,
.hzar-statement__group--summary .hzar-statement__total td {
	border-top: 0;
	border-bottom: 1px solid var(--hzar-fin-rule);
}
.hzar-statement__group--summary tr:first-child th,
.hzar-statement__group--summary tr:first-child td {
	border-top: 1px solid var(--hzar-fin-rule);
}
.hzar-statement__group--summary tr:last-child th,
.hzar-statement__group--summary tr:last-child td {
	border-bottom: 4px double var(--hzar-fin-rule);
}
/* Neutralize theme table defaults (Hello Elementor's zebra striping, hover
   tint and grey top rule) — the statement design has none. Doubled class to
   outrank selectors like `table tbody>tr:nth-child(odd)>td`. */
.hzar-statement.hzar-statement tbody > tr > th,
.hzar-statement.hzar-statement tbody > tr > td {
	background-color: transparent;
}
.hzar-statement.hzar-statement thead tr:first-child th {
	border-top: 0;
}
@media (max-width: 600px) {
	.hzar-statement { font-size: 13px; }
	.hzar-statement th, .hzar-statement td { padding-left: 8px; padding-right: 8px; }
	.hzar-statement__line th { padding-left: 16px; }
	.hzar-statement .hzar-amt { width: auto; }
}

/* ---- Year selector dropdown ---- */
.hzar-year-selector {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.hzar-year-selector__label {
	font-weight: 600;
	color: var(--hzar-navy, #26315a);
}
.hzar-year-select {
	appearance: none;
	-webkit-appearance: none;
	background: #fff;
	border: 1px solid var(--hzar-navy, #26315a);
	color: var(--hzar-navy, #26315a);
	font: inherit;
	font-weight: 600;
	padding: 8px 40px 8px 14px;
	border-radius: 4px;
	cursor: pointer;
	/* Chevron indicator drawn inline so no external image is needed. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2326315a' d='M6 8 0 2 1.5.5 6 5 10.5.5 12 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}
.hzar-year-select:focus {
	outline: 2px solid var(--hzar-red, #c0392b);
	outline-offset: 1px;
}
.hzar-year-links {
	list-style: none;
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0;
}
