/**
 * Pontiac Ouest — styles for pages migrated from Elementor into Theme Builder
 * (municipality landing pages, regional hubs, service pages).
 * Rides on the .po-meetings tokens (--po-accent per municipality) where a wrapper sets them.
 */

/* Keep pages that carry a .po-muni-hub html block inside the 1280px container
   (the generic .po-meetings rule in po-theme-builder.css makes main full width). */
body.tb-core-page .tb-core-page__main:has(> .tb-core-page__block--html .po-muni-hub) {
	max-width: 1280px;
	margin: 0 auto;
	padding: 56px 20px 0;
}

body.tb-core-page .tb-core-page__block--html .tb-core-page__block-inner:has(.po-muni-hub) {
	padding: 0;
}

/* ---------- Section titles on TB blocks (.po-section, .po-muni-intro, .po-feature, .po-contact-cards) ----------
   One heading style for every section: Fjalla uppercase + short accent underline. */
body.tb-core-page .po-section .tb-core-page__block-title,
body.tb-core-page .po-muni-intro .tb-core-page__block-title,
body.tb-core-page .po-feature .tb-core-page__block-title,
body.tb-core-page .po-contact-cards .tb-core-page__block-title,
body.tb-core-page .po-text .tb-core-page__block-title,
body.tb-core-page .po-acc .tb-core-page__block-title {
	position: relative;
	margin: 0 0 28px;
	padding-bottom: 14px;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
	font-weight: 400;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}

body.tb-core-page .po-section .tb-core-page__block-title::after,
body.tb-core-page .po-muni-intro .tb-core-page__block-title::after,
body.tb-core-page .po-feature .tb-core-page__block-title::after,
body.tb-core-page .po-contact-cards .tb-core-page__block-title::after,
body.tb-core-page .po-text .tb-core-page__block-title::after,
body.tb-core-page .po-acc .tb-core-page__block-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 4px;
	border-radius: 2px;
	background: var(--po-accent, var(--po-primary, #222233));
}

/* ---------- Municipality intro: large image left, copy right ---------- */
body.tb-core-page .po-muni-intro {
	padding-block: 72px;
}

body.tb-core-page .po-muni-intro .tb-core-page__block-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: center;
	gap: 56px;
}

body.tb-core-page .po-muni-intro .tb-core-page__block-image {
	margin: 0;
}

body.tb-core-page .po-muni-intro .tb-core-page__block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(20, 20, 40, .12);
}

body.tb-core-page .po-muni-intro .tb-core-page__block-text {
	font-size: 1.05rem;
	line-height: 1.7;
}

/* ---------- Buttons (.po-pill): one style on every migrated page ----------
   Outlined pill in the site's primary colour; on municipality pages, the municipality colour
   (darkened for contrast on white). Fills on hover/focus. Overrides TB's link colour in block copy. */
body.tb-core-page .tb-core-page__main .po-pill {
	--po-btn: var(--po-primary, #222233);
	border-color: var(--po-btn);
	background: transparent;
	color: var(--po-btn);
}

body.tb-core-page.po-has-muni .tb-core-page__main .po-pill {
	--po-btn: color-mix(in srgb, var(--po-accent, #222233) 72%, #000);
}

/* Waltham's maroon is already dark enough — use it as is. */
body.tb-core-page.po-muni--waltham .tb-core-page__main .po-pill {
	--po-btn: var(--po-accent, #750d0c);
}

body.tb-core-page .tb-core-page__main .po-pill:hover,
body.tb-core-page .tb-core-page__main .po-pill:focus {
	background: var(--po-btn);
	color: #fff;
}

body.tb-core-page .tb-core-page__main .po-pill:focus-visible {
	outline-color: var(--po-btn);
}

/* Audience-card buttons (TB's own .tb-core-page__cta) follow the same colour rule. */
body.tb-core-page.po-has-muni .tb-core-page__audience-card .tb-core-page__cta {
	--po-btn: color-mix(in srgb, var(--po-accent, #222233) 72%, #000);
	border-color: var(--po-btn);
	color: var(--po-btn);
}

body.tb-core-page.po-muni--waltham .tb-core-page__audience-card .tb-core-page__cta {
	--po-btn: var(--po-accent, #750d0c);
}

body.tb-core-page.po-has-muni .tb-core-page__audience-card .tb-core-page__cta:hover,
body.tb-core-page.po-has-muni .tb-core-page__audience-card .tb-core-page__cta:focus {
	background: var(--po-btn);
	color: #fff;
}

/* Button rows inside block copy: space above, wrap with an even gap. */
body.tb-core-page .tb-core-page__block-text p:has(> .po-pill) {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 24px 0 0;
}

@media (max-width: 900px) {
	body.tb-core-page .po-muni-intro { padding-block: 48px; }
	body.tb-core-page .po-muni-intro .tb-core-page__block-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* ---------- Audience cards ("Are you a resident / business / visitor?") ---------- */
body.tb-core-page .tb-core-page__audience-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 32px 28px;
	border-top: 6px solid var(--po-primary, #222233);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(20, 20, 40, .08);
	text-align: center;
}

body.tb-core-page .tb-core-page__audience-card .tb-core-page__column-title {
	margin: 0;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-weight: 400;
	font-size: 1.6rem;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}

body.tb-core-page .tb-core-page__audience-card .tb-core-page__column-text {
	flex: 1 1 auto;
}

body.tb-core-page .tb-core-page__audience-card .tb-core-page__column-cta {
	margin: 0;
}

body.tb-core-page .tb-core-page__audience-card .tb-core-page__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 24px;
	border: 2px solid var(--po-primary, #222233);
	border-radius: 30px;
	font-family: Raleway, sans-serif;
	font-weight: 900;
	font-size: 15px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--po-primary, #222233);
	transition: background .2s, color .2s;
}

body.tb-core-page .tb-core-page__audience-card .tb-core-page__cta::after {
	content: "→";
}

body.tb-core-page .tb-core-page__audience-card .tb-core-page__cta:hover,
body.tb-core-page .tb-core-page__audience-card .tb-core-page__cta:focus {
	background: var(--po-primary, #222233);
	color: #fff;
}

/* ---------- Municipality hub: notices / council meetings / newsletter ---------- */
.po-muni-hub {
	padding: 24px 0;
}

.po-muni-hub__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.po-muni-hub__col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	min-width: 0;
	padding: 28px 24px;
	border-top: 6px solid var(--po-accent, #222233);
	border-radius: 14px;
	background: var(--po-accent-soft, #f3f3f6);
}

.po-muni-hub__col > .po-meetings__heading,
.po-muni-hub .po-meetings__heading {
	margin: 0;
}

.po-muni-hub__col > :not(h2):not(.po-pill):not(.po-muni-hub__note) {
	width: 100%;
}

.po-muni-hub__col .po-pill {
	margin-top: auto;
	border-color: var(--po-accent-ink, #222233);
	color: var(--po-accent-ink, #222233);
}

.po-muni-hub__col .po-pill:hover,
.po-muni-hub__col .po-pill:focus {
	background: var(--po-accent-ink, #222233);
	color: #fff;
}

.po-muni-hub__note {
	margin: 0;
	font-size: .9rem;
	font-style: italic;
	color: #444;
}

@media (max-width: 1024px) {
	.po-muni-hub__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.po-muni-hub__col--news { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
	.po-muni-hub__grid { grid-template-columns: 1fr; }
}

/* Event cards: Delegatr styles titles white for a dark background; the hub is light. */
.po-muni-hub .delegatr-event-cards {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.po-muni-hub .delegatr-event-cards .event-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border: 0;
	border-left: 4px solid var(--po-accent, #222233);
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
}

.po-muni-hub .delegatr-event-cards .event-image img {
	width: 44px;
	height: 44px;
}

.po-muni-hub .delegatr-event-cards .event-title-text {
	display: block;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-size: 1.15rem;
	line-height: 1.2;
	color: var(--po-accent-ink, #222233) !important;
}

.po-muni-hub .delegatr-event-cards .event-date-text {
	margin-top: 4px;
	font-size: .9rem;
	color: #444 !important;
}

/* ---------- Contact cards (columns block with css_class po-contact-cards) ---------- */
body.tb-core-page .po-contact-cards .tb-core-page__column {
	padding: 24px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(20, 20, 40, .08);
}

body.tb-core-page .po-contact-cards .tb-core-page__column-title {
	margin: 0 0 10px;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-weight: 400;
	font-size: 1.3rem;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}

.po-contact-cards a[href^="tel:"],
.po-contact-cards a[href^="mailto:"] {
	overflow-wrap: anywhere;
}

/* ---------- Contact list (label / value rows) ---------- */
.po-contact-list {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 18px;
	margin: 0;
}

.po-contact-list dt {
	font-weight: 700;
}

.po-contact-list dd {
	margin: 0;
	overflow-wrap: anywhere;
}

@media (max-width: 480px) {
	.po-contact-list { grid-template-columns: 1fr; }
	.po-contact-list dd { margin-bottom: 8px; }
}

/* ---------- Office cards [po_offices] ---------- */
.po-offices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;
}

.po-office-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 28px 24px 24px;
	border-top: 6px solid var(--po-primary, #222233);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(20, 20, 40, .08);
}

.po-office-card__name {
	margin: 0;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}

.po-office-card__map {
	display: block;
	width: 100%;
	height: 220px;
	margin-top: auto;
	border: 0;
	border-radius: 10px;
}

/* ---------- Forms [po_form] ---------- */
.po-form {
	max-width: 860px;
}

.po-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 24px;
}

.po-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.po-form__field--wide {
	grid-column: 1 / -1;
}

.po-form label {
	font-weight: 700;
	color: var(--po-primary, #222233);
}

.po-form__req {
	color: #b01515;
}

.po-form input,
.po-form select,
.po-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #c9c9d3;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	color: #222233;
}

.po-form input:focus-visible,
.po-form select:focus-visible,
.po-form textarea:focus-visible {
	outline: 2px solid var(--po-accent, var(--po-primary, #222233));
	outline-offset: 1px;
	border-color: transparent;
}

.po-form__field--error input,
.po-form__field--error select,
.po-form__field--error textarea {
	border-color: #b01515;
}

.po-form__error {
	margin: 0;
	font-size: .9rem;
	color: #b01515;
}

.po-form__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 24px 0 0;
}

.po-form__legend {
	font-size: .9rem;
	color: #555;
}

.po-form button.po-pill {
	cursor: pointer;
}

.po-form__notice {
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 8px;
	font-weight: 600;
}

.po-form__notice--ok {
	border-left: 4px solid #2e7d32;
	background: #edf7ee;
	color: #1b5e20;
}

.po-form__notice--error {
	border-left: 4px solid #b01515;
	background: #fdeeee;
	color: #8a1010;
}

.po-form__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 640px) {
	.po-form__grid { grid-template-columns: 1fr; }
}

/* ---------- Quick links row (pill buttons) ---------- */
.po-link-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Feature rows (image + copy, optional partner logo) ---------- */
body.tb-core-page .po-feature .tb-core-page__block-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 56px;
}

body.tb-core-page .po-feature.tb-core-page__block--image-right .tb-core-page__block-image { order: 2; }
body.tb-core-page .po-feature.tb-core-page__block--image-right .tb-core-page__block-body { order: 1; }

body.tb-core-page .po-feature .tb-core-page__block-image {
	margin: 0;
}

body.tb-core-page .po-feature .tb-core-page__block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(20, 20, 40, .12);
}

body.tb-core-page .po-feature .tb-core-page__block-text {
	font-size: 1.05rem;
	line-height: 1.7;
}

.po-feature__logo img {
	display: block;
	width: auto;
	max-width: 220px;
	max-height: 90px;
	object-fit: contain;
}

body.tb-core-page .po-feature {
	padding-block: 28px;
}

@media (max-width: 900px) {
	body.tb-core-page .po-feature .tb-core-page__block-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	body.tb-core-page .po-feature.tb-core-page__block--image-right .tb-core-page__block-image { order: 0; }
}

/* ---------- Standalone section heading (html block) ---------- */
.po-section-head {
	margin: 32px 0 8px;
}

.po-section-head h2 {
	position: relative;
	margin: 0;
	padding-bottom: 14px;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
	font-weight: 400;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}

.po-section-head h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 4px;
	border-radius: 2px;
	background: var(--po-accent, var(--po-primary, #222233));
}

/* ---------- Card tiles for 2/3-column section blocks (mirrors the columns-4 cards in po-blocks.css) ---------- */
/* ---------- Theme Builder 4-column block (municipality cards) ---------- */
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__block-inner--columns { max-width: var(--po-width, 1280px); margin: 0 auto; padding: 0 20px; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) { padding: 56px 0; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__columns { gap: 28px; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__column { position: relative; display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(34, 34, 51, .08); transition: transform .25s ease, box-shadow .25s ease; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) a.tb-core-page__column--linked:hover,
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) a.tb-core-page__column--linked:focus-visible { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(34, 34, 51, .18); }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__column-image { margin: 0; overflow: hidden; aspect-ratio: 4 / 3; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__column-image--top .tb-core-page__column-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .5s ease; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) a.tb-core-page__column--linked:hover .tb-core-page__column-img { transform: scale(1.06); }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__column-title { margin: 0; padding: 22px 22px 0; font-family: var(--po-font-head, "Fjalla One", sans-serif); font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: .02em; text-transform: uppercase; color: var(--po-primary, #222233); }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__column-title::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 12px; border-radius: 2px; background: var(--po-card-accent, var(--po-accent, #018000)); transition: width .25s ease; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) a.tb-core-page__column--linked:hover .tb-core-page__column-title::after { width: 80px; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__column-text { flex: 1 1 auto; padding: 14px 22px 22px; font-family: var(--po-font-body); font-size: 15px; line-height: 1.6; color: #333; text-align: left; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) a.tb-core-page__column--linked::after { content: "\2192"; position: absolute; right: 16px; bottom: 16px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--po-primary, #222233); color: #fff; font-size: 18px; line-height: 1; transition: background .2s, transform .25s; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) a.tb-core-page__column--linked:hover::after { background: var(--po-card-accent, var(--po-accent, #018000)); transform: translateX(4px); }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__column { padding-bottom: 64px; }
.tb-core-page__block.po-section:is([data-layout="columns-3"], [data-layout="columns-2"]) .tb-core-page__column-text { padding-bottom: 0; }

/* Continuation rows: a tile set split across blocks (TB caps columns-N at N tiles). */
.tb-core-page__block.po-section--cont { padding-top: 0 !important; }
.tb-core-page__block.po-section.po-grid-3 .tb-core-page__columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tb-core-page__block.po-section.po-grid-4 .tb-core-page__columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
	.tb-core-page__block.po-section.po-grid-4 .tb-core-page__columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.tb-core-page__block.po-section:is(.po-grid-3, .po-grid-4) .tb-core-page__columns { grid-template-columns: minmax(0, 1fr); }
}

/* HTML blocks holding page sections line up with the other blocks' content width. */
body.tb-core-page .tb-core-page__block--html .tb-core-page__block-inner--html:has(> .po-section-head, > .po-offices, > .po-form, > .po-link-row, > .po-page-section) {
	max-width: var(--po-width, 1280px);
	margin-inline: auto;
	padding-inline: 20px;
}

/* A tile row followed by its continuation row: keep the same gap as between cards. */
.tb-core-page__block.po-section:has(+ .po-section--cont) { padding-bottom: 28px !important; }

/* Section tiles show their full description (no 6-line clamp). */
.tb-core-page__block.po-section .tb-core-page__column-text {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

/* Card sections line up with the other blocks (po-blocks.css adds 20px inner padding to columns-4). */
body.tb-core-page .tb-core-page__block.po-section .tb-core-page__block-inner--columns {
	padding-inline: 0;
}

/* ---------- Generic page sections (Wave 3+: text runs, shortcodes, logo rows) ---------- */
.po-page-section > * + * {
	margin-top: 24px;
}

.po-page-section .po-section-head {
	margin-top: 40px;
}

.po-page-section > .po-section-head:first-child {
	margin-top: 0;
}

/* Native text blocks (.po-text, TB text-focus layout): readable measure, site typography. */
body.tb-core-page .po-text .tb-core-page__block-inner {
	max-width: var(--po-width, 1280px);
	margin-inline: auto;
	padding-inline: 0; /* main already pads; lines up with feature rows */
}

body.tb-core-page .po-text .tb-core-page__block-text {
	max-width: 860px;
	font-size: 1.05rem;
	line-height: 1.7;
	color: #222233;
}

body.tb-core-page .po-text .tb-core-page__block-text h4 {
	margin: 32px 0 10px;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-weight: 400;
	font-size: 1.4rem;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}

body.tb-core-page .po-text .tb-core-page__block-text blockquote {
	margin: 16px 0;
	padding: 16px 20px;
	border-left: 4px solid var(--po-accent, var(--po-primary, #222233));
	border-radius: 0 8px 8px 0;
	background: #f6f6f8;
}

/* Municipality logo row (building permit). */
.po-logo-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.po-logo-row img {
	display: block;
	width: 96px;
	height: 96px;
	object-fit: contain;
}

.po-cta-row {
	margin-top: 32px;
}

/* ---------- Wave 4: service pages ---------- */

/* Sub-headings inside text / feature copy. */
body.tb-core-page :is(.po-text, .po-feature) .tb-core-page__block-text h3 {
	margin: 32px 0 10px;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-weight: 400;
	font-size: 1.45rem;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}

body.tb-core-page :is(.po-text, .po-feature) .tb-core-page__block-text h4 {
	margin: 24px 0 8px;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--po-primary, #222233);
}

/* Posters / brochures after the copy. */
.po-img-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 24px;
}

.po-img-grid a {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(20, 20, 40, .1);
}

.po-img-grid img {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: cover;
	object-position: top;
	transition: transform .3s ease;
}

.po-img-grid a:hover img,
.po-img-grid a:focus-visible img {
	transform: scale(1.03);
}

.po-inline-img img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 10px;
}

/* Linked municipality logos (tax pages etc.): wide circle+name artwork. */
.po-logo-row img {
	width: auto;
	height: 72px;
	max-width: 220px;
}

.po-logo-row a {
	display: block;
	transition: transform .2s ease;
}

.po-logo-row a:hover,
.po-logo-row a:focus-visible {
	transform: translateY(-3px);
}

/* Document link lists (flooding guides, etc.). */
.po-doc-list {
	padding-left: 1.2em;
}

.po-doc-list li {
	margin: 6px 0;
}

/* Cards whose image is a logo, not a photo (schools): show the whole logo. */
.tb-core-page__block.po-cards-text .tb-core-page__column-image {
	background: #fff;
	border-bottom: 1px solid #eee;
}

.tb-core-page__block.po-cards-text .tb-core-page__column-image--top .tb-core-page__column-img {
	object-fit: contain !important;
	padding: 20px;
}

.tb-core-page__block.po-cards-text a.tb-core-page__column--linked:hover .tb-core-page__column-img {
	transform: none;
}

/* ---------- Accordion sections (Parks & Recreation) ---------- */
body.tb-core-page .po-acc .tb-core-page__block-inner {
	max-width: var(--po-width, 1280px);
	margin-inline: auto;
	padding-inline: 20px;
	gap: 48px;
	align-items: center;
}

body.tb-core-page .po-acc {
	padding-block: 40px;
}

.po-acc-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(20, 20, 40, .12);
}

body.tb-core-page .po-acc .tb-accordion__item {
	border-bottom: 1px solid #e3e3ea;
}

body.tb-core-page .po-acc .tb-accordion__summary {
	padding: 16px 0;
	cursor: pointer;
}

body.tb-core-page .po-acc .tb-accordion__title {
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-size: 1.3rem;
	font-weight: 400;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}

body.tb-core-page .po-acc .tb-accordion__panel {
	padding: 0 0 20px;
	font-size: 1rem;
	line-height: 1.65;
}

.po-acc-links a {
	font-weight: 700;
}

/* ---------- Tax cards (Wave 5): text cards, no image ---------- */
.tb-core-page__block.po-tax-cards .tb-core-page__column {
	padding-bottom: 8px;
	border-top: 6px solid var(--po-accent, var(--po-primary, #222233));
}

.tb-core-page__block.po-tax-cards .tb-core-page__column-text {
	font-size: 1rem;
	line-height: 1.6;
}

.tb-core-page__block.po-tax-cards .tb-core-page__column-text ul {
	margin: 0 0 12px;
	padding-left: 1.1em;
}

.tb-core-page__block.po-tax-cards .tb-core-page__column-text li {
	margin: 6px 0;
}

.tb-core-page__block.po-tax-cards .tb-core-page__column-text p {
	margin: 0 0 10px;
}

/* ---------- Staff dashboards (Municipal Dashboard shortcodes) ---------- */
body.tb-core-page .tb-core-page__main:has(> .tb-core-page__block--html .po-dashboard) {
	max-width: 1280px;
	margin: 0 auto;
	padding: 48px 20px 0;
}

body.tb-core-page .tb-core-page__block--html .tb-core-page__block-inner:has(.po-dashboard) {
	padding: 0;
}

.po-dashboard__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
}

.po-dashboard__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

.po-dashboard__head .po-meetings__heading {
	margin: 0;
}

.po-dashboard__subhead {
	margin: 28px 0 12px;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-weight: 400;
	font-size: 1.25rem;
	text-transform: uppercase;
	color: var(--po-accent-ink, #222233);
}

@media (max-width: 980px) {
	.po-dashboard__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Events page: community events (main) + submit CTA and council meetings (side) ---------- */
.po-events-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.po-events-cols .po-section-head { margin-top: 0; }
.po-events-cols .po-sc + .po-section-head { margin-top: 40px; }
.po-events-main .po-card { padding: 14px 18px 14px 14px; }
.po-events-side { display: grid; gap: 20px; position: sticky; top: 24px; }
.po-events-submit { padding: 24px; background: var(--po-primary, #222233); color: #fff; border-radius: 12px; border-bottom: 6px solid var(--po-accent, #018000); }
.po-events-submit h3 { margin: 0 0 8px; font-family: var(--po-font-head, "Fjalla One", sans-serif); font-weight: 400; font-size: 1.6rem; text-transform: uppercase; color: #fff; }
.po-events-submit p { margin: 0 0 16px; line-height: 1.5; }
.po-events-submit p:last-child { margin-bottom: 0; }
body.tb-core-page .tb-core-page__main .po-events-submit a.po-pill { --po-btn: #fff; background: #fff; border-color: #fff; color: var(--po-primary, #222233); }
body.tb-core-page .tb-core-page__main .po-events-submit a.po-pill:hover, body.tb-core-page .tb-core-page__main .po-events-submit a.po-pill:focus { background: var(--po-accent, #018000); border-color: var(--po-accent, #018000); color: #fff; }
.po-events-side .po-sc { margin-top: 0; }
@media (max-width: 900px) {
	.po-events-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.po-events-side { position: static; }
}

/* ---------- Employee directory (one section per municipality) ---------- */
body.tb-core-page .tb-core-page__block--html:has(.po-directory) {
	margin-bottom: 0;
}

/* Keep the page in the 1280px container (the generic .po-meetings rule makes main full width). */
body.tb-core-page .tb-core-page__main:has(> .tb-core-page__block--html .po-directory) {
	max-width: 1280px;
	margin: 0 auto;
	padding: 56px 20px 0;
}

body.tb-core-page .tb-core-page__block--html .tb-core-page__block-inner--html:has(> .po-directory) {
	padding: 0;
}

.po-meetings.po-directory {
	padding: 32px 0 8px;
	scroll-margin-top: 120px;
}

.po-staff-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.po-staff {
	padding: 18px 20px;
	border-left: 4px solid var(--po-accent, #222233);
	border-radius: 0 10px 10px 0;
	background: #fff;
	box-shadow: 0 2px 10px rgba(34, 34, 51, .08);
}

.po-staff p {
	margin: 0;
}

.po-staff__role {
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--po-accent-ink, #222233);
}

.po-staff__name {
	margin-top: 4px !important;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-size: 1.3rem;
	line-height: 1.2;
	color: var(--po-primary, #222233);
}

.po-staff__contact {
	margin-top: 8px !important;
	font-size: .92rem;
	overflow-wrap: anywhere;
}

/* Jump links to each municipality (directory intro). */
.po-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 24px;
}

.po-chip {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border: 2px solid var(--po-chip, #222233);
	border-radius: 999px;
	font-weight: 700;
	font-size: .85rem;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--po-chip, #222233) !important;
}

.po-chip:hover,
.po-chip:focus-visible {
	background: var(--po-chip, #222233);
	color: #fff !important;
}

.po-chip--allumettes { --po-chip: #0a6f91; }
.po-chip--chichester { --po-chip: #b01515; }
.po-chip--sheenboro  { --po-chip: #357a1a; }
.po-chip--waltham    { --po-chip: #750d0c; }

/* ---------- History: long copy beside photos ---------- */
body.tb-core-page .po-history .tb-core-page__block-inner {
	align-items: start;
}

body.tb-core-page .po-history .tb-core-page__block-image {
	position: sticky;
	top: 120px;
}

/* ---------- Legal text (privacy policy) ---------- */
body.tb-core-page .po-legal .tb-core-page__block-text h2,
body.tb-core-page .po-legal .tb-core-page__block-text h3 {
	margin: 36px 0 12px;
	font-family: var(--po-font-head, "Fjalla One", sans-serif);
	font-weight: 400;
	font-size: 1.4rem;
	text-transform: uppercase;
	color: var(--po-primary, #222233);
}
