/* Pontiac Ouest — native theme templates (header, footer, banners, notices). */

:root {
	--po-primary: #222233;
	--po-text: #000;
	--po-accent: #018000;
	--po-red: #EF2424;
	--po-bg-soft: #efefef;
	--po-font-body: "Source Sans 3", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
	--po-font-head: "Fjalla One", Roboto, sans-serif;
	--po-width: 1280px;
	/* Heights: page headers (theme banners + Theme Builder page headers) and the homepage video hero. */
	--po-page-header-h: 500px;
	--po-hero-h: max(640px, 85vh);
}
@media (max-width: 767px) {
	:root {
		--po-page-header-h: 340px;
		--po-hero-h: max(480px, 70vh);
	}
}

.po-wrap { max-width: var(--po-width); margin: 0 auto; padding: 0 20px; }
.po-content { padding-top: 40px; padding-bottom: 60px; }
.po-content--page { padding: 0; }
.po-main { font-family: var(--po-font-body); color: var(--po-text); }

/* Buttons */
.po-btn { display: inline-block; padding: 10px 20px; background: var(--po-accent); color: #fff; text-decoration: none; font-weight: 700; border-radius: 3px; }
.po-entry--nomuni .po-btn { background: #000; }
.po-btn:hover, .po-btn:focus { background: var(--po-primary); color: #fff; }
.po-actions, .po-event__links { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; list-style: none; margin: 24px 0; }

/* Banner */
.po-banner { background: #222233 var(--po-banner-image, none) center / cover; color: #fff; min-height: var(--po-page-header-h); display: flex; align-items: flex-end; position: relative; border-bottom: 6px solid var(--po-accent); }
.po-banner::before { content: ""; position: absolute; inset: 0; background: rgba(34, 34, 51, .75); }
.po-banner .po-wrap { position: relative; width: 100%; padding-bottom: 24px; }
.po-banner__title { margin: 0; font-family: var(--po-font-head); font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.2; text-transform: uppercase; color: #fff; }
@media (max-width: 767px) { .po-banner .po-wrap { padding-bottom: 20px; text-align: center; } }
.po-banner__sub { margin: 8px 0 0; font-size: 1.1rem; }

/* ===== Header (rebuild of Elementor header 170827) ===== */
.po-header { font-family: var(--po-font-body); background: #fff; position: relative; z-index: 50; }
/* Neutralise assets/reset.css button/link styling (pink #c36 border, radius, hover fill). */
.po-header button,
.po-header button:hover,
.po-header button:focus { background: none; border: 0; border-radius: 0; color: inherit; padding: 0; margin: 0; font: inherit; box-shadow: none; text-transform: none; white-space: normal; }
.po-header a,
.po-header a:hover { color: inherit; text-decoration: none; }
.po-header ul { list-style: none; margin: 0; padding: 0; }

.po-news { background: var(--po-red); color: #fff; padding: 5px; text-align: center; font-weight: 700; }

/* Top bar */
.po-topbar { background: #EFEFEF; }
.po-topbar__inner { display: flex; justify-content: flex-end; align-items: center; gap: 20px; max-width: var(--po-width); margin: 0 auto; padding: 0 20px; }
.po-menu--inline { display: flex; flex-wrap: wrap; }
.po-header .po-topbar a { display: block; padding: 13px 20px; font-size: 11px; font-weight: 900; text-transform: uppercase; color: var(--po-primary); }
.po-header .po-topbar a:hover { color: var(--po-red); }
.po-header .po-topbar__lang a { color: var(--po-red); }
.po-charter { background: #fff; color: #333; padding: 6px 0; text-align: center; font-size: 12px; line-height: 1.4; border-bottom: 1px solid #e2e2e2; }
.po-header .po-charter a { text-decoration: underline; font-weight: 700; }

/* Main bar with hanging logo */
.po-mainbar { position: relative; }
.po-mainbar__inner { display: flex; align-items: center; justify-content: flex-end; min-height: 85px; max-width: var(--po-width); margin: 0 auto; padding: 0 20px; position: relative; }
.po-mainbar__logo { position: absolute; left: 20px; top: -40px; width: 230px; z-index: 99; }
.po-mainbar__logo .po-logo__img { display: block; width: 100%; height: auto; }
.po-sublogo { position: absolute; left: 275px; top: 50%; transform: translateY(-50%); width: 50px; z-index: 99; }
.po-sublogo__img { display: block; width: 100%; height: auto; }
.po-nav { flex: 1; display: flex; justify-content: flex-end; }

/* Top-level items */
.po-nav__list { display: flex; justify-content: flex-end; gap: 5px; }
.po-nav__item { display: flex; align-items: center; }
.po-header .po-nav__link { display: block; padding: 30px 12px; font-family: "Francois One", var(--po-font-head); font-size: 24px; font-weight: 900; text-transform: uppercase; color: var(--po-primary); line-height: 1.2; }
.po-header .po-nav__item:hover > .po-nav__link,
.po-header .po-nav__item.is-open > .po-nav__link { color: var(--po-red); }
.po-header .po-nav__caret { width: 20px; height: 20px; margin-left: -8px; cursor: pointer; color: var(--po-primary); display: flex; align-items: center; justify-content: center; }
.po-nav__caret::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.po-nav__item.is-open .po-nav__caret::before { transform: translateY(2px) rotate(-135deg); }
.po-header .po-nav__caret:focus-visible,
.po-header .po-nav__link:focus-visible,
.po-header .po-nav-toggle:focus-visible { outline: 2px solid var(--po-primary); outline-offset: 2px; }

/* Mega panel */
.po-mega { display: none; position: absolute; left: 0; right: 0; top: 100%; background: transparent; }
.po-nav__item--mega:hover > .po-mega,
.po-nav__item--mega:focus-within > .po-mega,
.po-nav__item.is-open > .po-mega { display: flex; }
.po-mega__spacer { flex: 0 0 230px; }
.po-mega__inner { flex: 1; display: flex; gap: 0; background: #fff; padding: 10px; max-width: 1400px; box-shadow: 0 12px 20px rgba(0, 0, 0, .15); }
.po-mega__col { flex: 1 1 0; background: #fff; padding: 20px; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.po-mega__col--brand { flex: 0 0 auto; }
/* Municipality divider: thick left edge that curves in at top and bottom, in the municipality's colour. */
.po-mega__col--muni { border-left: 6px solid var(--po-muni, var(--po-primary)); border-radius: 18px 0 0 18px; margin-right: 8px; }
.po-mega__col--allumettes { --po-muni: #16BDF3; }
.po-mega__col--chichester { --po-muni: #EF2424; }
.po-mega__col--sheenboro { --po-muni: #63C93B; }
.po-mega__col--waltham { --po-muni: #750D0C; }
.po-mega__col--pontiac-ouest { --po-muni: #000; }
.po-mega__imglink { display: block; margin-bottom: 10px; }
.po-mega__img { display: block; width: 150px; max-width: 100%; height: auto; }
.po-mega__col--brand .po-mega__img { width: 90px; }
/* Waltham's logo file has almost no padding, so it renders larger than the others; scale it down to match. */
.po-mega__inner > .po-mega__col:nth-child(4) .po-mega__img { width: 118px; }
.po-mega__heading { font-family: "Francois One", var(--po-font-head); font-size: 1.1rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; padding-bottom: 10px; color: var(--po-red); position: relative; }
.po-mega__heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 32px; height: 3px; border-radius: 2px; background: var(--po-primary); }
.po-header .po-mega__menu a { display: block; padding: 7px 0; font-family: "Source Sans 3", Roboto, system-ui, sans-serif; font-size: 16px; font-weight: 600; letter-spacing: .005em; color: var(--po-primary); line-height: 1.3; transition: color .15s, transform .15s; }
.po-header .po-mega__menu a:hover,
.po-header .po-mega__menu a:focus { color: var(--po-red); text-decoration: none; transform: translateX(4px); }
/* Menu items with the linked page's featured image (Residents, Business). */
.po-header .po-mega__menu--thumbs a { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.po-mega__thumb { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--po-bg-soft); display: block; }
/* Events in the mega menu: flat rows that match the link items (48px date tile, serif title, no card box). */
.po-header .po-mega .po-card { gap: 12px; padding: 6px 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; transform: none; }
.po-header .po-mega .po-card__date { flex: 0 0 48px; height: 48px; width: 48px; padding-top: 4px; border-radius: 8px; gap: 0; }
.po-header .po-mega .po-card__date::before { height: 4px; }
.po-header .po-mega .po-card__day { font-size: 1.2rem; }
.po-header .po-mega .po-card__month { font-size: .6rem; letter-spacing: .06em; }
.po-header .po-mega .po-card__year { display: none; }
.po-header .po-mega .po-card__eyebrow { font-size: .62rem; letter-spacing: .05em; }
.po-header .po-mega .po-card__title { margin: 2px 0 0; font: 600 16px/1.3 "Source Sans 3", Roboto, system-ui, sans-serif; -webkit-line-clamp: 2; }
.po-header .po-mega .po-card__arrow { display: none; }
.po-header .po-mega .po-card:hover .po-card__title a { color: var(--po-red); text-decoration: none; }
.po-header .po-mega .home-events .po-btn { margin-top: 8px; }
.po-header .po-btn:hover, .po-header .po-btn:focus { color: #fff; }
.po-mega__thumb--icon { display: flex; align-items: center; justify-content: center; background: #000; color: #fff; }
.po-mega__menu .sub-menu { padding-left: 12px; }
.po-header .po-mega__menu .sub-menu a { font-size: .9em; padding: 5px 0; }
.po-header .po-btn--small { font-size: 10px; padding: 10px 15px; margin-top: 12px; color: #fff; }

/* Event cards inside the mega panel (ported from the Elementor widget's custom CSS) */
.home-events { width: 100%; }

/* Mobile bar (original: only on phones) */
.po-mobilebar { display: none; position: relative; }
.po-header .po-nav-toggle { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: absolute; left: 10px; top: 12px; z-index: 99; }
.po-nav-toggle__bars,
.po-nav-toggle__bars::before,
.po-nav-toggle__bars::after { display: block; width: 30px; height: 3px; background: var(--po-primary); content: ""; position: relative; transition: transform .2s; }
.po-nav-toggle__bars::before { position: absolute; top: -9px; }
.po-nav-toggle__bars::after { position: absolute; top: 9px; }
.po-nav-toggle[aria-expanded="true"] .po-nav-toggle__bars { background: transparent; }
.po-nav-toggle[aria-expanded="true"] .po-nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.po-nav-toggle[aria-expanded="true"] .po-nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }
.po-mobilebar__logo { display: flex; justify-content: center; padding: 10px 0; background: #fff; }
.po-mobilebar__logo .po-logo__img { width: 200px; height: auto; }
.po-mobile-nav { background: #fff; box-shadow: 0 10px 20px rgba(0, 0, 0, .2); position: absolute; left: 0; right: 0; top: 68px; z-index: 98; max-height: 80vh; overflow: auto; }
.po-header .po-mobile-nav a { display: block; padding: 20px; font-family: "Fjalla One", var(--po-font-head); font-size: 20px; font-weight: 900; text-transform: uppercase; color: var(--po-primary); border-bottom: 1px solid #eee; }
.po-mobile-nav .sub-menu { display: none; background: #f6f6f6; }
.po-header .po-mobile-nav .sub-menu a { font-size: 16px; padding: 14px 64px 14px 36px; }
.po-mobile-nav li.is-open > .sub-menu { display: block; }
.po-mobile-nav .menu-item-has-children { position: relative; }
.po-header .po-subtoggle { position: absolute; right: 0; top: 0; width: 64px; height: 68px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.po-subtoggle::before { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--po-primary); border-bottom: 2px solid var(--po-primary); transform: rotate(45deg); }
.po-mobile-nav li.is-open > .po-subtoggle::before { transform: rotate(-135deg); }

@media (max-width: 1320px) and (min-width: 1025px) {
	.po-header .po-nav__link { font-size: 21px; padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 1024px) {
	.po-mega__spacer { display: none; }
	.po-mainbar__logo { width: 170px; top: -30px; }	.po-sublogo { left: 205px; width: 40px; }
	.po-header .po-nav__link { font-size: 16px; padding: 24px 6px; }
}
@media (max-width: 767px) {
	.po-topbar__quick,
	.po-mainbar { display: none; }
	.po-mobilebar { display: block; }
}

/* Footer */
.po-footer { margin-top: 100px; background: var(--po-primary); color: #fff; padding: 48px 0 24px; font-family: var(--po-font-body); }
.po-footer a { color: #fff; }
.po-footer__brand img { max-height: 90px; width: auto; }
.po-footer__offices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin: 32px 0; }
.po-office__name { font: 400 1.4rem var(--po-font-head); text-transform: uppercase; margin: 0 0 12px; color: #fff; }
.po-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .25); padding-top: 16px; font-size: .85rem; }

/* Notices / cards: see po-notices.css */
.po-pagination { margin-top: 24px; }
.po-pagination .page-numbers { padding: 6px 12px; margin-right: 4px; border: 1px solid var(--po-primary); text-decoration: none; }
.po-pagination .current { background: var(--po-primary); color: #fff; }
.po-video, .po-event__map { margin: 24px 0; }
.po-video iframe { max-width: 100%; }
.po-credit { font-size: .9rem; color: #555; margin-top: 32px; }

.po-credit--equity { display: flex; align-items: center; gap: 14px; width: fit-content; margin: 40px 0 0; padding-top: 20px; border-top: 1px solid #e2e2ea; color: #555; text-decoration: none; }
.po-credit--equity img { display: block; width: 110px; height: auto; }
.po-credit--equity:hover, .po-credit--equity:focus { color: var(--po-primary); }

/* Single event (Events Delegatr shortcode): banner already carries title + date, so drop the duplicates. */
.po-entry .epr-event-single-full { max-width: none; }
.po-entry .epr-event-single-full .epr-event-title,
.po-entry .epr-event-single-full .epr-event-single-meta p:first-child { display: none; }
.po-entry .epr-event-single-full__hero { gap: 48px; align-items: flex-start; }
.po-entry .epr-event-single-full__media { flex-basis: 34%; width: 34%; max-width: 34%; }
.po-entry .epr-event-poster__img { border-radius: 6px; box-shadow: 0 8px 24px rgba(34, 34, 51, .18); }
.po-entry .epr-event-single-full__details { gap: 20px; padding-top: 0; }
.po-entry .epr-event-single-full .epr-event-single-meta { display: grid; gap: 14px; padding: 20px 24px; background: #f6f6f9; border: 0; border-left: 5px solid var(--po-accent); border-radius: 4px; }
.po-entry .epr-event-single-full .epr-event-single-meta p { margin: 0; font-size: 1.1rem; line-height: 1.4; }
.po-entry .epr-event-single-full .epr-event-single-meta strong { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--po-primary); margin-bottom: 2px; }
.po-entry .epr-event-ticket-cta { background: var(--po-accent); border-radius: 3px; padding: 12px 24px; font-weight: 700; color: #fff; }
.po-entry .epr-event-ticket-cta:hover, .po-entry .epr-event-ticket-cta:focus { background: var(--po-primary); opacity: 1; color: #fff; }
.po-entry .epr-event-single-full__about { font-family: var(--po-font-head); text-transform: uppercase; font-size: 1.4rem; margin-top: 8px; }
.po-entry .epr-event-single-full__below { max-width: none; margin-top: 40px; }
@media (max-width: 767px) { .po-entry .epr-event-single-full__media { width: 100%; max-width: 100%; flex-basis: auto; } }
