/**
 * PGS Learning — global layout: announcement bar, header, mobile menu, footer (Phase 9).
 * Loaded on every page after components.css. Colours from tokens only.
 */

/* ==========================================================================
   Announcement bar (9.1) — green gradient, deep-navy text (7.6 : 1)
   ========================================================================== */
.pgs-announcement {
	position: relative;
	background: var(--pgs-grad-green);
	color: var(--pgs-navy-deep);
	font-size: var(--pgs-fs-small);
	font-weight: 600;
	line-height: 1.45;
}

.pgs-announcement__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding-block: 10px;
	padding-inline: 52px; /* room for the 44px close button, same with or without JS (no shift) */
}

.pgs-announcement__text {
	max-width: 72ch;
	margin: 0;
	text-align: center;
	overflow-wrap: anywhere; /* long words / URLs never push the page sideways */
}

.pgs-announcement .pgs-nowrap {
	white-space: nowrap;
}

.pgs-announcement__link {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.pgs-announcement__link:hover {
	color: inherit;
	text-decoration-thickness: 2px;
}

.pgs-announcement__link:focus-visible {
	outline-color: var(--pgs-navy-deep);
	outline-offset: 2px;
}

.pgs-announcement__arrow {
	margin-inline-start: 4px;
	transition: transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-announcement__link:hover .pgs-announcement__arrow {
	transform: translateX(3px);
}

/* Close button: only with JavaScript (it needs JS to work). */
.pgs-announcement__close {
	display: none;
}

.pgs-js .pgs-announcement__close {
	position: absolute;
	top: 50%;
	right: 0;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--pgs-navy-deep);
	font-size: 1.125rem;
	transform: translateY(-50%);
	transition: background-color var(--pgs-duration) var(--pgs-ease);
}

.pgs-announcement__close:hover {
	background: rgba(0, 19, 56, .12);
}

.pgs-announcement__close:focus-visible {
	outline-color: var(--pgs-navy-deep);
	outline-offset: -3px;
}

/* Urdu announcement (lang="ur" dir="rtl"): Nastaliq needs taller lines; the arrow points left. */
.pgs-announcement__text[lang="ur"] {
	font-size: 1rem;
	font-weight: 500;
	line-height: 2;
}

/* Nastaliq letters drop well below the line: keep the underline clear of them. */
.pgs-announcement__text[lang="ur"] .pgs-announcement__link {
	text-underline-offset: 0.75em;
	text-decoration-skip-ink: auto;
}

.pgs-announcement__text[dir="rtl"] .pgs-announcement__arrow {
	transform: scaleX(-1);
}

.pgs-announcement__text[dir="rtl"] .pgs-announcement__link:hover .pgs-announcement__arrow {
	transform: scaleX(-1) translateX(3px);
}

/* ==========================================================================
   Header (9.2) — navy, sticky; glass blur once the page scrolls (.is-scrolled, main.js)
   ========================================================================== */
.pgs-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px); /* sits under the WordPress admin bar when logged in */
	z-index: 80;
	background: var(--pgs-navy-deep);
	border-bottom: 1px solid transparent;
	transition:
		background-color var(--pgs-duration) var(--pgs-ease),
		box-shadow var(--pgs-duration) var(--pgs-ease),
		border-color var(--pgs-duration) var(--pgs-ease);
}

/* Below 601px the admin bar scrolls away with the page, so the header sticks to the very top. */
@media (max-width: 600px) {
	.pgs-header {
		top: 0;
	}
}

.pgs-header.is-scrolled {
	border-bottom-color: var(--pgs-border);
	background: rgba(0, 19, 56, .86);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.pgs-header__inner {
	position: relative; /* the mega dropdown is placed against the header row */
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 64px;
}

@media (min-width: 1024px) {
	.pgs-header__inner {
		gap: 24px;
		min-height: 76px;
	}
}

/* ---- Logo ---- */
.pgs-logo {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 10px; /* badge ↔ wordmark */
	min-height: 44px;
	color: var(--pgs-text);
	font-family: var(--pgs-font-head);
	font-size: 1.375rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.pgs-logo:hover {
	color: var(--pgs-text);
}

.pgs-logo__mark {
	color: var(--pgs-accent);
}

/* Client badge (round, transparent corners) next to the wordmark. */
.pgs-logo__badge {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.pgs-logo__word {
	white-space: nowrap;
}

.pgs-footer .pgs-logo__badge {
	width: 56px;
	height: 56px;
}

.pgs-logo__img {
	width: auto;
	max-height: 44px;
}

/* ---- Main menu (desktop only; phones get the 9.3 menu) ---- */
.pgs-nav {
	display: none;
}

@media (min-width: 1024px) {
	.pgs-nav {
		display: block;
	}
}

.pgs-nav__list {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pgs-nav__item {
	display: flex;
	align-items: center;
}

.pgs-nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 10px;
	color: var(--pgs-text-body);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--pgs-duration) var(--pgs-ease);
}

@media (min-width: 1280px) {
	.pgs-nav__link {
		padding: 0 14px;
	}
}

/* Green underline: grows on hover, stays for the active page / section. */
.pgs-nav__link::after {
	content: "";
	position: absolute;
	right: 10px;
	bottom: 6px;
	left: 10px;
	height: 2px;
	border-radius: 2px;
	background: var(--pgs-green);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-nav__link:hover,
.pgs-nav__link.is-active {
	color: var(--pgs-text);
}

.pgs-nav__link:hover::after,
.pgs-nav__link.is-active::after {
	transform: scaleX(1);
}

.pgs-nav__item--has-panel .pgs-nav__link {
	padding-inline-end: 2px;
}

.pgs-nav__item--has-panel .pgs-nav__link::after {
	right: 2px;
}

.pgs-nav__toggle {
	display: grid;
	place-items: center;
	width: 32px;
	min-height: 44px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--pgs-text-body);
}

.pgs-nav__toggle .pgs-icon {
	width: 16px;
	height: 16px;
	transition: transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-nav__toggle:hover,
.pgs-nav__toggle[aria-expanded="true"] {
	color: var(--pgs-text);
}

.pgs-nav__toggle[aria-expanded="true"] .pgs-icon {
	transform: rotate(180deg);
}

/* Without JavaScript the toggle cannot work, so it is hidden; hover / focus opens the panel instead. */
html:not(.pgs-js) .pgs-nav__toggle {
	display: none;
}

/* ---- Panels: mega dropdown + simple submenu (white "paper" cards under the navy bar) ---- */
.pgs-mega,
.pgs-subnav {
	position: absolute;
	top: calc(100% - 6px);
	z-index: 5;
	display: none;
	border: 1px solid var(--pgs-border);
	border-radius: var(--pgs-radius);
	box-shadow: 0 24px 60px rgba(0, 19, 56, .28);
	animation: pgs-fade-down .2s var(--pgs-ease);
}

.pgs-nav__item.is-open > .pgs-mega,
.pgs-nav__item.is-open > .pgs-subnav,
html:not(.pgs-js) .pgs-nav__item--has-panel:hover > .pgs-mega,
html:not(.pgs-js) .pgs-nav__item--has-panel:focus-within > .pgs-mega,
html:not(.pgs-js) .pgs-nav__item--has-panel:hover > .pgs-subnav,
html:not(.pgs-js) .pgs-nav__item--has-panel:focus-within > .pgs-subnav {
	display: block;
}

.pgs-mega {
	right: 0;
	left: 0;
	width: min(880px, 100% - 2 * var(--pgs-gutter));
	margin-inline: auto; /* centred without transform, which the fade-in animation uses */
	padding: 24px;
}

.pgs-mega__groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 8px 24px;
}

.pgs-mega__title {
	margin: 0 0 8px;
	padding-inline: 12px;
	color: var(--pgs-text-muted);
	font-family: var(--pgs-font-label);
	font-size: var(--pgs-fs-eyebrow);
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

.pgs-mega__list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pgs-mega__class {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: 12px;
	color: var(--pgs-text);
	text-decoration: none;
	transition: background-color var(--pgs-duration) var(--pgs-ease);
}

.pgs-mega__class:hover {
	background: var(--pgs-surface-2);
	color: var(--pgs-text);
}

.pgs-mega__icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--pgs-tint-green);
	color: var(--pgs-accent);
	transition:
		background-color var(--pgs-duration) var(--pgs-ease),
		color var(--pgs-duration) var(--pgs-ease);
}

.pgs-mega__class:hover .pgs-mega__icon {
	background: var(--pgs-navy);
	color: #FFFFFF;
}

.pgs-mega__label {
	display: grid;
	line-height: 1.3;
}

.pgs-mega__name {
	font-weight: 700;
}

.pgs-mega__count {
	color: var(--pgs-text-muted);
	font-size: var(--pgs-fs-small);
}

.pgs-mega__footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--pgs-border);
}

.pgs-mega__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding-inline: 12px;
	color: var(--pgs-link);
	font-weight: 700;
	text-decoration: none;
}

.pgs-mega__all:hover {
	color: var(--pgs-text);
}

.pgs-mega__all .pgs-icon--arrow {
	transition: transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-mega__all:hover .pgs-icon--arrow {
	transform: translateX(3px);
}

/* Simple submenus (menu items with children) open under their own item. */
.pgs-nav__item--has-panel:not(:has(.pgs-mega)) {
	position: relative;
}

.pgs-subnav {
	left: 0;
	min-width: 220px;
	margin: 0;
	padding: 8px;
	list-style: none;
}

.pgs-subnav__link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 10px;
	color: var(--pgs-text);
	font-weight: 600;
	text-decoration: none;
}

.pgs-subnav__link:hover,
.pgs-subnav__link[aria-current="page"] {
	background: var(--pgs-surface-2);
	color: var(--pgs-text);
}

/* ---- Right side: Become an Instructor + Enroll Now ---- */
.pgs-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-inline-start: auto;
}

.pgs-header__teach {
	display: none;
	align-items: center;
	min-height: 44px;
	color: var(--pgs-text-body);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 4px;
	white-space: nowrap;
	transition:
		color var(--pgs-duration) var(--pgs-ease),
		text-decoration-color var(--pgs-duration) var(--pgs-ease);
}

.pgs-header__teach:hover {
	color: var(--pgs-text);
	text-decoration-color: var(--pgs-green);
}

/* Only where there is room next to the full menu. */
@media (min-width: 1280px) {
	.pgs-header__teach {
		display: inline-flex;
	}
}

.pgs-header__enroll {
	min-height: 44px;
	padding: .6em 1.3em;
	font-size: var(--pgs-fs-small);
}

@media (min-width: 30em) { /* 480px at normal text size */
	.pgs-header__enroll {
		font-size: var(--pgs-fs-button);
	}
}

/* ==========================================================================
   Mobile menu button (9.3) — below 1024px; hamburger ↔ close
   ========================================================================== */
.pgs-menu-toggle {
	display: none;
}

.pgs-js .pgs-menu-toggle {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--pgs-border-strong);
	border-radius: 50%;
	background: var(--pgs-fill);
	color: var(--pgs-text);
	font-size: 1.25rem;
	transition:
		background-color var(--pgs-duration) var(--pgs-ease),
		border-color var(--pgs-duration) var(--pgs-ease);
}

.pgs-menu-toggle:hover {
	border-color: var(--pgs-green);
	background: var(--pgs-fill-hover);
}

.pgs-menu-toggle .pgs-icon {
	grid-area: 1 / 1;
	transition:
		opacity var(--pgs-duration) var(--pgs-ease),
		transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-menu-toggle__close,
.pgs-menu-toggle[aria-expanded="true"] .pgs-menu-toggle__open {
	opacity: 0;
	transform: rotate(-90deg) scale(.6);
}

.pgs-menu-toggle[aria-expanded="true"] .pgs-menu-toggle__close {
	opacity: 1;
	transform: none;
}

@media (min-width: 1024px) {
	.pgs-js .pgs-menu-toggle {
		display: none;
	}
}

/* Very narrow phones (< 350px): the header shows the badge + "PGS" only. */
@media (max-width: 21.8125em) { /* 349px */
	.pgs-header .pgs-logo__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

/* Phones (< 480px): no Enroll arrow, tighter gaps — logo + Enroll + menu button need 379px
   (full-size they need 425px, which pushed the page sideways at 381–424px; fixed 2026-10-31).
   The header steps use em, so a larger default text size on the phone switches them earlier. */
@media (max-width: 29.9375em) { /* 479px */
	.pgs-header__inner {
		gap: 8px;
	}

	.pgs-header__actions {
		gap: 8px;
	}

	.pgs-header__enroll {
		padding-inline: 1em;
	}

	.pgs-header__enroll .pgs-icon--arrow {
		display: none;
	}
}

/* Narrow phones (< 420px, down to 320px): smaller logo too — the row needs 346px. */
@media (max-width: 26.1875em) { /* 419px */
	.pgs-logo {
		gap: 6px;
		font-size: 1.1875rem;
	}

	.pgs-header .pgs-logo__badge {
		width: 34px;
		height: 34px;
	}
}

/* ==========================================================================
   Mobile menu panel (9.3) — navy, fills the screen below the header
   ========================================================================== */
.pgs-mobile-menu {
	position: fixed;
	top: var(--pgs-menu-top, 64px); /* main.js sets it to the header's bottom edge when opening */
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 79;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-top: 1px solid var(--pgs-border);
	background: var(--pgs-bg);
}

.pgs-mobile-menu[hidden] {
	display: none;
}

@media (min-width: 1024px) {
	.pgs-mobile-menu {
		display: none !important; /* desktop uses the header menu */
	}
}

.pgs-mobile-menu__inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-height: 100%;
	padding-block: 16px 32px;
}

.pgs-mobile-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pgs-mobile-menu__item {
	border-bottom: 1px solid var(--pgs-border);
}

.pgs-mobile-menu__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
	color: var(--pgs-text);
	font-family: var(--pgs-font-head);
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	list-style: none;
}

.pgs-mobile-menu__link::-webkit-details-marker {
	display: none;
}

.pgs-mobile-menu__link:hover {
	color: var(--pgs-accent);
}

/* Current page / section: lime text + a green bar on the left. */
.pgs-mobile-menu__link.is-active {
	padding-inline-start: 14px;
	box-shadow: inset 4px 0 0 var(--pgs-green);
	color: var(--pgs-accent);
}

.pgs-mobile-menu__chevron {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin-inline-start: auto;
	border-radius: 50%;
	background: var(--pgs-fill);
	color: var(--pgs-text-body);
}

.pgs-mobile-menu__chevron .pgs-icon {
	transition: transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-mobile-menu__group[open] .pgs-mobile-menu__chevron .pgs-icon {
	transform: rotate(180deg);
}

.pgs-mobile-menu__panel {
	padding-bottom: 16px;
	animation: pgs-fade-down .2s var(--pgs-ease);
}

.pgs-mobile-menu__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	color: var(--pgs-link);
	font-weight: 700;
	text-decoration: none;
}

.pgs-mobile-menu__level {
	margin: 12px 0 4px;
	color: var(--pgs-text-muted);
	font-family: var(--pgs-font-label);
	font-size: var(--pgs-fs-eyebrow);
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

.pgs-mobile-menu__classes {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pgs-mobile-menu__class {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 10px;
	background: var(--pgs-fill);
	color: var(--pgs-text);
	font-weight: 600;
	text-decoration: none;
}

.pgs-mobile-menu__class:hover {
	background: var(--pgs-fill-hover);
	color: var(--pgs-text);
}

.pgs-mobile-menu__count {
	color: var(--pgs-text-muted);
	font-size: var(--pgs-fs-small);
	font-weight: 500;
	white-space: nowrap;
}

.pgs-mobile-menu__actions {
	display: grid;
	gap: 12px;
	margin-top: auto; /* buttons sit at the bottom when the menu is short */
}

.pgs-mobile-menu__socials {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pgs-mobile-menu__socials a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--pgs-border-strong);
	border-radius: 50%;
	color: var(--pgs-text);
	transition:
		background-color var(--pgs-duration) var(--pgs-ease),
		border-color var(--pgs-duration) var(--pgs-ease),
		color var(--pgs-duration) var(--pgs-ease);
}

.pgs-mobile-menu__socials a:hover {
	border-color: var(--pgs-green);
	background: var(--pgs-green);
	color: var(--pgs-navy-deep);
}

/* Mobile menu motion (9.3.4): slide-fade in, rows follow one after another; quick fade out.
   [hidden] is set at once when closing (screen readers see it closed); .is-closing keeps it painted
   for the fade only. All of it is switched off for prefers-reduced-motion (base.css + main.js). */
.pgs-mobile-menu:not([hidden]) {
	animation: pgs-menu-in .28s var(--pgs-ease);
}

.pgs-mobile-menu[hidden].is-closing {
	display: block;
	pointer-events: none;
	animation: pgs-menu-out .2s var(--pgs-ease) forwards;
}

.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__item,
.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__actions,
.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__socials {
	animation: pgs-fade-down .32s var(--pgs-ease) both;
}

.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__item:nth-child(2) { animation-delay: 40ms; }
.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__item:nth-child(3) { animation-delay: 80ms; }
.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__item:nth-child(4) { animation-delay: 120ms; }
.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__item:nth-child(5) { animation-delay: 160ms; }
.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__item:nth-child(n+6) { animation-delay: 200ms; }
.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__actions { animation-delay: 160ms; }
.pgs-mobile-menu:not([hidden]) .pgs-mobile-menu__socials { animation-delay: 200ms; }

@keyframes pgs-menu-in {
	from { opacity: 0; transform: translateY(-12px); }
	to   { opacity: 1; transform: none; }
}

@keyframes pgs-menu-out {
	to { opacity: 0; transform: translateY(-12px); }
}

/* Reduced motion: no slide / fade, and no stagger delays (base.css only shortens durations). */
@media (prefers-reduced-motion: reduce) {
	.pgs-mobile-menu,
	.pgs-mobile-menu * {
		animation: none !important;
	}
}

/* Mobile menu without JavaScript (9.3.5): a "Menu" link opens the same panel through :target,
   full screen above the header, with a "Close menu" link at the top. */
.pgs-menu-link,
.pgs-mobile-menu__close-link {
	display: none;
}

html:not(.pgs-js) .pgs-menu-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--pgs-border-strong);
	border-radius: var(--pgs-radius-pill);
	color: var(--pgs-text);
	font-weight: 600;
	text-decoration: none;
}

@media (min-width: 1024px) {
	html:not(.pgs-js) .pgs-menu-link {
		display: none;
	}
}

/* Narrow phones: icon only (the word stays for screen readers). */
@media (max-width: 380px) {
	html:not(.pgs-js) .pgs-menu-link {
		justify-content: center;
		width: 44px;
		padding: 0;
	}

	.pgs-menu-link__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

html:not(.pgs-js) .pgs-mobile-menu:target {
	top: 0;
	z-index: 90;
	display: block;
	border-top: 0;
}

html:not(.pgs-js) .pgs-mobile-menu__close-link {
	display: inline-flex;
	align-items: center;
	align-self: flex-end;
	gap: 6px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--pgs-border-strong);
	border-radius: var(--pgs-radius-pill);
	color: var(--pgs-text);
	font-weight: 600;
	text-decoration: none;
}

/* Open mobile menu: the page behind does not scroll; the scrollbar's width is kept so nothing shifts. */
.pgs-menu-open,
.pgs-menu-open body {
	overflow: hidden;
}

.pgs-menu-open body {
	padding-right: var(--pgs-scrollbar, 0px);
}

/* WhatsApp float (9.5.4): hidden while the mobile menu is open, so it never sits on top of the
   menu links (it is also inert then); comes back when the menu closes. Without JavaScript the
   menu is open while it is the :target. The fade is in components.css.
   Also hidden while a page's own WhatsApp button is on screen (.pgs-float-hidden on <html>, e.g.
   the course enrollment card, 10.5.5) — the same chat, and it would cover that button. */
.pgs-menu-open .pgs-whatsapp-float,
.pgs-float-hidden .pgs-whatsapp-float,
html:not(.pgs-js):has(.pgs-mobile-menu:target) .pgs-whatsapp-float {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

/* ==========================================================================
   Footer (9.4) — navy; 1 column on phones → 2 on tablets → 4 from 1024px.
   Title with a short green bar, chevron links, round contact icons, centred bottom bar.
   ========================================================================== */
.pgs-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(56px, 8vw, 88px) 0;
	background: var(--pgs-bg);
	color: var(--pgs-text-body);
	font-size: 0.9375rem;
}

/* A faint brand glow in the corner keeps the large navy area from feeling flat. */
.pgs-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(40% 60% at 100% 0%, rgba(96, 184, 2, .10), transparent 70%),
		radial-gradient(45% 70% at 0% 100%, rgba(11, 58, 158, .35), transparent 70%);
	pointer-events: none;
}

.pgs-footer__grid {
	display: grid;
	gap: 44px 32px;
}

@media (min-width: 640px) {
	.pgs-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Desktop: proportions follow how many columns have content (empty ones are left out). */
@media (min-width: 1024px) {
	.pgs-footer__grid {
		gap: 48px;
	}

	/* All five columns (2026-10-29): the brand block is a full-width row on top (logo, motto and
	   text left, social icons right), the four link columns share the row below. */
	.pgs-footer__grid--cols-5 { grid-template-columns: 1fr 0.9fr 1fr 1.35fr; }

	.pgs-footer__grid--cols-5 .pgs-footer__brand {
		display: grid;
		grid-template-columns: minmax(0, 560px) auto;
		grid-column: 1 / -1;
		justify-content: space-between;
		align-items: center;
		column-gap: 48px;
		padding-bottom: 40px;
		border-bottom: 1px solid rgba(255, 255, 255, .08);
	}

	.pgs-footer__grid--cols-5 .pgs-footer__brand > * {
		grid-column: 1;
	}

	.pgs-footer__grid--cols-5 .pgs-footer__brand > .pgs-footer__socials {
		grid-column: 2;
		grid-row: 1 / span 3;
		margin: 0;
	}
	.pgs-footer__grid--cols-3 { grid-template-columns: 1.4fr 1fr 1.35fr; }
	.pgs-footer__grid--cols-2 { grid-template-columns: 1.4fr 2.35fr; }
}

/* Four columns (brand · Quick Links · Useful Links · Support) need 1200px; below that they stay
   2 × 2 (2026-10-29: at 1024px the email and the social icons were cramped). */
@media (min-width: 1200px) {
	.pgs-footer__grid--cols-4 { grid-template-columns: 1.6fr 1fr 1fr 1.4fr; }
}

/* A lone brand column (nothing else set) stays a readable width. */
.pgs-footer__grid--cols-1 {
	grid-template-columns: minmax(0, 480px);
}

.pgs-footer__col {
	min-width: 0;
}

.pgs-footer__about {
	max-width: 36ch;
	margin-top: 14px;
	line-height: 1.75;
}

/* ---- Column title: heading + short green bar ---- */
.pgs-footer__title {
	position: relative;
	margin-bottom: 22px;
	padding-bottom: 12px;
	color: var(--pgs-text);
	font-family: var(--pgs-font-head);
	font-size: 1.1875rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.pgs-footer__title::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 36px;
	height: 3px;
	border-radius: 3px;
	background: var(--pgs-grad-green);
}

/* ---- Link lists with a chevron ---- */
.pgs-footer__links,
.pgs-footer__contact {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Classes in two short columns (6th–12th fit without a long list). */
/* Classes: one list (2026-10-29 — the second column became the Legal column). */

.pgs-footer__links a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	color: var(--pgs-text-body);
	text-decoration: none;
	transition: color var(--pgs-duration) var(--pgs-ease);
}

/* Phones / tablets: full 44px touch targets. */
@media (max-width: 1023px) {
	.pgs-footer__links a {
		min-height: 44px;
	}
}

.pgs-footer__chev {
	width: 14px;
	height: 14px;
	color: var(--pgs-accent);
	transition: transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-footer__links a:hover {
	color: var(--pgs-text);
}

.pgs-footer__links a:hover .pgs-footer__chev {
	transform: translateX(3px);
}

.pgs-footer__links a[aria-current="page"] {
	color: var(--pgs-text);
	font-weight: 600;
}

.pgs-footer__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	margin-top: 6px;
	color: var(--pgs-link);
	font-weight: 700;
	text-decoration: none;
}

.pgs-footer__all:hover {
	color: var(--pgs-text);
}

.pgs-footer__all .pgs-icon--arrow {
	transition: transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-footer__all:hover .pgs-icon--arrow {
	transform: translateX(3px);
}

/* ---- Support: round icon + bold label + value ---- */
.pgs-footer__contact {
	gap: 16px;
}

.pgs-footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	min-height: 44px;
	color: var(--pgs-text-body);
	text-decoration: none;
}

.pgs-footer__contact-icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--pgs-tint-green);
	color: var(--pgs-accent);
	font-size: 1.125rem;
	transition:
		background-color var(--pgs-duration) var(--pgs-ease),
		color var(--pgs-duration) var(--pgs-ease);
}

.pgs-footer__contact-text {
	display: grid;
	gap: 2px;
	min-width: 0;
	padding-top: 1px;
	line-height: 1.5;
}

.pgs-footer__contact-text strong {
	color: var(--pgs-text);
	font-size: 0.875rem;
	font-weight: 700;
}

.pgs-footer__contact-text > span {
	overflow-wrap: anywhere; /* long emails never push the page sideways */
}

a.pgs-footer__contact-item:hover .pgs-footer__contact-icon {
	background: var(--pgs-green);
	color: var(--pgs-navy-deep);
}

a.pgs-footer__contact-item:hover .pgs-footer__contact-text > span {
	color: var(--pgs-text);
}

/* ---- Socials: filled round icons ---- */
.pgs-footer__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.pgs-footer__socials a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--pgs-tint-green);
	color: var(--pgs-accent);
	transition:
		background-color var(--pgs-duration) var(--pgs-ease),
		color var(--pgs-duration) var(--pgs-ease),
		transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-footer__socials a:hover {
	background: var(--pgs-green);
	color: var(--pgs-navy-deep);
	transform: translateY(-2px);
}

/* ---- App store badges: styled like the official Google Play / App Store badges ---- */
.pgs-footer__apps-title {
	margin: 24px 0 10px;
	color: var(--pgs-text);
	font-size: 0.875rem;
	font-weight: 700;
}

.pgs-footer__apps,
.pgs-app-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pgs-footer__app,
.pgs-app-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 6px 12px 6px 10px;
	border: 1px solid #A6A6A6;
	border-radius: 10px;
	background: #000000;
	color: #FFFFFF;
	font-family: var(--pgs-font-head);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.1;
	white-space: nowrap;
	letter-spacing: -0.01em;
	text-decoration: none;
	transition:
		border-color var(--pgs-duration) var(--pgs-ease),
		box-shadow var(--pgs-duration) var(--pgs-ease),
		transform var(--pgs-duration) var(--pgs-ease);
}

.pgs-footer__app:hover,
.pgs-app-badge:hover {
	border-color: #FFFFFF;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
	color: #FFFFFF;
	transform: translateY(-2px);
}

.pgs-footer__app .pgs-icon,
.pgs-app-badge .pgs-icon {
	width: 24px;
	height: 24px;
	fill: currentColor;
	stroke: none;
}

/* Brand colours of the two stores' marks. (.pgs-app-badge = the same badges elsewhere, e.g. the home steps — 11.4.2.) */
.pgs-footer__app .pgs-icon:has(use[href$="#brand-googleplay"]),
.pgs-app-badge .pgs-icon:has(use[href$="#brand-googleplay"]) {
	color: #34A853;
}

.pgs-footer__app span,
.pgs-app-badge span:not(.pgs-sr-only) {
	display: grid;
	gap: 1px;
}

.pgs-footer__app small,
.pgs-app-badge small {
	color: #FFFFFF;
	font-family: var(--pgs-font-body);
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.4px;
}

/* Phones: both badges share the row. */
@media (max-width: 479px) {
	.pgs-footer__app,
	.pgs-app-badge {
		flex: 1 1 0;
		min-width: 0;
		padding-inline: 10px;
		font-size: 0.9375rem;
	}
}

/* ---- Bottom bar: centred © · legal links · motto, divider inside the content width ---- */
.pgs-footer__bottom {
	margin-top: clamp(44px, 6vw, 64px);
}

.pgs-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 28px;
	position: relative;
	padding-block: 22px;
	text-align: center;
}

/* Divider lined up with the content (not the container padding), like the columns above. */
.pgs-footer__bottom-inner::before {
	content: "";
	position: absolute;
	top: 0;
	right: 16px;
	left: 16px;
	height: 1px;
	background: var(--pgs-border);
}

@media (min-width: 768px) {
	.pgs-footer__bottom-inner::before {
		right: var(--pgs-gutter);
		left: var(--pgs-gutter);
	}
}

@media (max-width: 767px) {
	.pgs-footer__bottom-inner {
		flex-direction: column;
	}

	/* With the WhatsApp float (9.5): room under the last line, so at the very bottom of the page
	   the button (16px gap + up to 62px tall + any offset) never covers the copyright / legal links. */
	.pgs-footer:has(~ .pgs-whatsapp-float) .pgs-footer__bottom-inner {
		padding-bottom: calc(88px + var(--pgs-float-offset, 0px) + env(safe-area-inset-bottom, 0px));
	}
}

.pgs-footer__copy {
	margin: 0;
	color: var(--pgs-text-body);
	font-size: var(--pgs-fs-small);
	line-height: 1.6;
}

.pgs-footer__site {
	color: var(--pgs-accent);
	font-weight: 700;
}

.pgs-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pgs-footer__legal a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--pgs-text-body);
	font-size: var(--pgs-fs-small);
	text-decoration: none;
}

.pgs-footer__legal a:hover {
	color: var(--pgs-accent);
}

/* Motto under the logo. */
.pgs-footer__motto {
	margin: 10px 0 0;
	color: var(--pgs-accent);
	font-family: var(--pgs-font-label);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}
