/*
Theme Name: MROT
Theme URI: https://www.mrot.pl/
Author: MROT
Description: Motyw Mazowieckiej Regionalnej Organizacji Turystycznej. Zgodny z WCAG 2.1 AA.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mrot
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--c-ink: #121a2e;
	--c-navy: #16213a;
	--c-navy-deep: #0d1424;
	--c-teal-dark: #0b4a60;
	--c-teal: #0b5f7a;
	--c-teal-bright: #0d6f8c;
	--c-red: #b8371f;
	--c-red-dark: #9a2d18;
	--c-coral: #e0533b;
	--c-bg: #f5f7fb;
	--c-surface: #fff;
	--c-tint: #eaf1f7;
	--c-line: #e3e8f2;
	--c-line-strong: #c4cbd9;
	--c-muted: #3c465e;
	--c-muted-2: #4a5470;
	--c-on-dark: #dbe3f0;

	--font-display: "Bricolage Grotesque", system-ui, sans-serif;
	--font-body: "Instrument Sans", system-ui, sans-serif;

	--wrap: 86.5rem;
	--gutter: 2rem;
	--radius-lg: 1.75rem;
	--shadow-card: 0 18px 40px rgba(18, 26, 46, 0.16);
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
}

html.font-large {
	font-size: 120%;
}

@media (min-width: 75em) {
	html {
		scroll-padding-top: 11.5rem;
	}
}

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--c-teal);
	text-underline-offset: 3px;
}

a:hover {
	color: var(--c-ink);
}

:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 0;
	box-shadow: 0 0 0 6px var(--c-ink);
	border-radius: 0.5rem;
}

@media (forced-colors: active) {
	:focus-visible {
		outline: 3px solid CanvasText;
	}
}

input::placeholder {
	color: #55607a;
	opacity: 1;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: 0.75rem;
	top: -5rem;
	z-index: 100;
	padding: 0.75rem 1.1rem;
	background: var(--c-ink);
	color: #fff;
	font-weight: 700;
	border-radius: 999px;
	text-decoration: none;
}

.skip-link:focus {
	top: 0.75rem;
	color: #fff;
}

/* Skip-link target: focused programmatically, not an interactive control. */
.site-main:focus {
	outline: none;
}

.container {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

@media (max-width: 40em) {
	:root {
		--gutter: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   Buttons, badges, headings
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	min-height: 3rem;
	padding: 0 1.4rem;
	border: 2px solid transparent;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn--primary {
	min-height: 3.5rem;
	padding: 0 0.6rem 0 1.6rem;
	background: linear-gradient(135deg, var(--c-red), var(--c-red-dark));
	color: #fff;
	font-size: 1.0625rem;
	box-shadow: 0 14px 30px rgba(184, 55, 31, 0.35);
}

.btn--primary [aria-hidden] {
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
}

.btn--primary:hover {
	background: #fff;
	color: var(--c-ink);
}

.btn--outline-light {
	min-height: 3.5rem;
	padding: 0 1.6rem;
	border-color: rgba(255, 255, 255, 0.7);
	color: #fff;
	font-size: 1.0625rem;
}

.btn--outline-light:hover {
	background: #fff;
	border-color: #fff;
	color: var(--c-ink);
}

.btn--dark {
	background: var(--c-navy);
	color: #fff;
}

.btn--dark:hover {
	background: var(--c-red);
	color: #fff;
}

.btn--light {
	background: #fff;
	color: var(--c-ink);
}

.btn--light:hover {
	background: #ffe1d9;
	color: var(--c-ink);
}

.badge {
	display: inline-block;
	padding: 0.2rem 0.75rem;
	border-radius: 999px;
	background: var(--c-red);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.5;
}

.badge--soft {
	background: var(--c-tint);
	color: var(--c-teal-dark);
	font-size: 0.8125rem;
}

.section-heading {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.section-heading__bar {
	width: 3.5rem;
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--c-teal-bright), var(--c-coral));
}

.section-heading__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
}

.section {
	padding-block: 1.5rem 5rem;
}

.section__stack {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
}

.section__lead {
	margin: 0;
	max-width: 46ch;
	font-size: 1.0625rem;
	color: var(--c-muted);
}

/* Reveal on scroll (only when JS is running). */
.js .reveal {
	opacity: 0;
	transform: translateY(36px);
	transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
	background: linear-gradient(90deg, var(--c-ink) 0%, var(--c-navy) 55%, var(--c-teal-dark) 100%);
	color: #fff;
	font-size: 0.875rem;
}

.topbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem 1.75rem;
	padding-block: 0.25rem;
}

.topbar__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	margin: 0 0 0 -0.6rem;
	padding: 0;
	list-style: none;
}

.topbar__nav a {
	display: inline-block;
	padding: 0.75rem 0.6rem;
	color: #fff;
	text-decoration: none;
}

.topbar__nav a:hover {
	color: #fff;
	text-decoration: underline;
}

.topbar__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.4rem;
}

.font-size {
	display: flex;
	gap: 2px;
	margin-inline: 0.4rem;
	padding: 3px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
}

.font-size__btn {
	min-width: 2.75rem;
	height: 2.25rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: 700 0.875rem var(--font-body);
	cursor: pointer;
}

.font-size__btn--large {
	font-size: 1.125rem;
}

.font-size__btn[aria-pressed="true"] {
	background: #fff;
	color: var(--c-ink);
}

.social {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social__link {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	color: #fff;
}

.social__link:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

/* ==========================================================================
   Header and navigation
   ========================================================================== */
.site-header {
	position: relative;
	z-index: 60;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--c-line);
	box-shadow: 0 10px 30px rgba(18, 26, 46, 0.06);
}

@media (min-width: 75em) {
	.site-header {
		position: sticky;
		top: 0;
		backdrop-filter: blur(14px);
	}
}

.site-header__inner {
	position: relative;
}

.site-header__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding-block: 0.75rem;
}

.brand {
	display: block;
	border-radius: 0.6rem;
}

.brand__img {
	display: block;
	width: auto;
	height: 5.25rem;
}

.search-form {
	flex: 1 1 17.5rem;
	max-width: 32.5rem;
	min-width: 0;
}

.search-form__field {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 5px 5px 5px 1.1rem;
	border: 2px solid var(--c-navy);
	border-radius: 999px;
	background: #fff;
	color: var(--c-navy);
}

.search-form__field svg {
	flex: none;
}

.search-form__input {
	flex: 1;
	min-width: 0;
	height: 3rem;
	padding: 0 0.5rem;
	border: 0;
	background: transparent;
	color: var(--c-ink);
	font: inherit;
	font-size: 1.0625rem;
}

.search-form__input:focus-visible {
	box-shadow: none;
	outline-offset: 2px;
	outline-color: var(--c-ink);
}

.search-form__submit {
	flex: none;
	height: 3rem;
	padding: 0 1.5rem;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--c-red), var(--c-red-dark));
	color: #fff;
	font: 700 1rem var(--font-body);
	cursor: pointer;
}

.search-form__submit:hover {
	background: var(--c-navy);
}

.funders {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.funders__label {
	max-width: 7.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--c-muted);
}

.funders__card {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	min-height: 4.5rem;
	padding: 0.5rem 1.1rem;
	border: 1px solid var(--c-line-strong);
	border-radius: 1.25rem;
	background: #fff;
	color: var(--c-ink);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(18, 26, 46, 0.06);
}

.funders__card--eu {
	padding: 0.5rem 1.4rem 0.5rem 0.5rem;
}

.funders__card:hover {
	border-color: var(--c-navy);
	box-shadow: 0 10px 26px rgba(18, 26, 46, 0.14);
	color: var(--c-ink);
}

.funders__card img {
	display: block;
	width: auto;
	height: 3.375rem;
	max-width: none;
}

.funders__card--eu img {
	width: 5rem;
	height: 3.5rem;
	object-fit: cover;
	border-radius: 0.75rem;
}

.main-nav {
	border-top: 1px solid var(--c-line);
	padding-block: 0.5rem;
}

.main-nav__toggle {
	display: none;
	min-height: 3rem;
	padding: 0 1.4rem;
	border: 2px solid var(--c-navy);
	border-radius: 999px;
	background: #fff;
	color: var(--c-ink);
	font: 700 1rem var(--font-body);
	cursor: pointer;
}

.main-nav__toggle[aria-expanded="true"] {
	background: var(--c-navy);
	color: #fff;
}

.main-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

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

.main-nav__link,
.main-nav__button {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 3rem;
	padding: 0.4rem 0.9rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--c-ink);
	font: 700 0.9375rem/1.2 var(--font-body);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.main-nav__link:hover,
.main-nav__button:hover {
	background: var(--c-tint);
	color: var(--c-ink);
}

.main-nav__button svg {
	flex: none;
	transition: transform 0.2s ease;
}

.main-nav__button.is-open {
	background: var(--c-navy);
	color: #fff;
}

.main-nav__button.is-open svg {
	transform: rotate(180deg);
}

@media (max-width: 62em) {
	html.js .main-nav__toggle {
		display: inline-block;
	}

	.js .main-nav__list {
		display: none;
		margin-top: 0.75rem;
	}

	.js .main-nav.is-open .main-nav__list {
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.main-nav__item {
		display: block;
	}

	.main-nav__link,
	.main-nav__button {
		width: 100%;
	}
}

/* Mega panel */
.mega {
	position: absolute;
	left: var(--gutter);
	right: var(--gutter);
	top: calc(100% + 0.6rem);
	z-index: 65;
	display: grid;
	grid-template-columns: minmax(0, 18.75rem) minmax(0, 1fr);
	overflow-y: auto;
	max-height: calc(100vh - 9rem);
	border-radius: 1.75rem;
	background: #fff;
	box-shadow: 0 40px 80px rgba(18, 26, 46, 0.25);
}

.mega[hidden] {
	display: none;
}

.mega__intro {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	overflow: hidden;
	padding: 2.25rem 2rem;
	background: linear-gradient(150deg, var(--c-navy) 0%, var(--c-teal-dark) 70%, var(--c-teal-bright) 100%);
	color: #fff;
}

.mega__intro::after {
	content: "";
	position: absolute;
	right: -60px;
	bottom: -60px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	border: 28px solid rgba(224, 83, 59, 0.35);
}

.mega__eyebrow {
	position: relative;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #bfe4ef;
}

.mega__title {
	position: relative;
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.08;
	text-wrap: balance;
}

.mega__groups {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.75rem), 1fr));
	gap: 1.75rem 2rem;
	padding: 2rem 2rem 2.25rem;
}

.mega__group-title {
	margin: 0 0 0.25rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #a32f19;
}

.mega__group-title a {
	color: inherit;
	text-decoration: none;
}

.mega__group-title a:hover {
	text-decoration: underline;
}

.mega__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mega__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	min-height: 2.75rem;
	margin-inline: -0.875rem;
	padding: 0.6rem 0.875rem;
	border-radius: 0.875rem;
	color: var(--c-ink);
	line-height: 1.3;
	text-decoration: none;
}

.mega__link::after {
	content: "→";
	color: var(--c-teal);
}

.mega__link:hover {
	background: var(--c-tint);
	color: var(--c-teal-dark);
}

@media (max-width: 62em) {
	.mega {
		position: static;
		display: block;
		max-height: none;
		margin: 0.25rem 0 0.5rem;
		border-radius: 1.25rem;
		box-shadow: none;
		border: 1px solid var(--c-line);
	}

	.mega__intro {
		display: none;
	}

	.mega__groups {
		padding: 1rem 1.25rem;
	}
}

html:not(.js) .mega[hidden] {
	display: block;
	position: static;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	position: relative;
	overflow: hidden;
	background: var(--c-ink);
	color: #fff;
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
	background-size: 26px 26px;
	pointer-events: none;
}

.hero__blob,
.hero__ring {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.hero__blob--1 {
	width: 620px;
	height: 620px;
	top: -220px;
	right: -160px;
	background: radial-gradient(circle, rgba(13, 111, 140, 0.65) 0%, rgba(13, 111, 140, 0) 65%);
	animation: drift1 4s ease-out 1 forwards;
}

.hero__blob--2 {
	width: 520px;
	height: 520px;
	bottom: -260px;
	left: 30%;
	background: radial-gradient(circle, rgba(224, 83, 59, 0.4) 0%, rgba(224, 83, 59, 0) 65%);
	animation: drift2 4s ease-out 1 forwards;
}

.hero__ring {
	width: 180px;
	height: 180px;
	top: 60px;
	left: 44%;
	border: 2px dashed rgba(255, 255, 255, 0.22);
	animation: spin 4s ease-out 1 forwards;
}

/* Decorative motion runs once and stops within 5 seconds (WCAG 2.2.2). */

@keyframes drift1 {
	to {
		transform: translate(-80px, 60px) scale(1.15);
	}
}

@keyframes drift2 {
	to {
		transform: translate(90px, -50px) scale(0.9);
	}
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
	gap: 3.5rem;
	align-items: center;
	padding-block: 4.5rem 5.5rem;
}

.hero__text {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.hero__badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 0.6rem;
	margin: 0;
	padding: 0.5rem 1rem 0.5rem 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	font-size: 0.875rem;
	font-weight: 700;
}

.hero__badge-big {
	display: grid;
	place-items: center;
	min-height: 1.625rem;
	padding: 0 0.6rem;
	border-radius: 999px;
	background: #fff;
	color: var(--c-ink);
	font-size: 0.8125rem;
}

.hero__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(2.4rem, 4.8vw, 4.1rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.hero__accent {
	background: linear-gradient(90deg, #ffb3a6, #ffd7a8);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

@media (forced-colors: active) {
	.hero__accent {
		color: inherit;
		background: none;
	}
}

.hero__lead {
	margin: 0;
	max-width: 52ch;
	font-size: 1.1875rem;
	line-height: 1.6;
	color: var(--c-on-dark);
	text-wrap: pretty;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.hero__media {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hero__media::before {
	content: "";
	position: absolute;
	inset: -18px;
	border-radius: 2.5rem;
	background: linear-gradient(135deg, rgba(13, 111, 140, 0.6), rgba(224, 83, 59, 0.5));
	filter: blur(28px);
	opacity: 0.8;
}

.hero__image {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.hero__facts {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
}

.hero__fact {
	flex: 1 1 9.5rem;
	padding: 0.85rem 1.1rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 1.1rem;
	background: rgba(18, 26, 46, 0.78);
}

.hero__fact dt {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #c4cee0;
}

.hero__fact dd {
	margin: 0.25rem 0 0;
	font-size: 1.0625rem;
	font-weight: 700;
}

.hero__wave {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	display: block;
	width: 100%;
	height: 3rem;
	fill: var(--c-bg);
}

/* ==========================================================================
   Shortcuts (tiles + pills)
   ========================================================================== */
.tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tiles__item {
	display: flex;
}

.tile {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 18.75rem;
	overflow: hidden;
	padding: 1.5rem;
	border-radius: var(--radius-lg);
	background: var(--c-navy);
	color: #fff;
	box-shadow: var(--shadow-card);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.tile:hover {
	transform: translateY(-6px);
	box-shadow: 0 28px 56px rgba(18, 26, 46, 0.28);
}

.tile__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tile__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, var(--c-ink) 0%, rgba(18, 26, 46, 0.9) 36%, rgba(11, 74, 96, 0.25) 75%, rgba(11, 74, 96, 0) 100%);
}

.tile__body {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
}

.tile__text {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.tile__kicker {
	align-self: flex-start;
	padding: 0.2rem 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	font-size: 0.8125rem;
	font-weight: 700;
}

.tile__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.625rem;
	line-height: 1.1;
	font-weight: 700;
	text-wrap: balance;
}

.tile__link {
	color: #fff;
	text-decoration: none;
}

.tile__link:hover {
	color: #fff;
}

/* The whole tile is the click target. */
.tile__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Where :has() is supported the ring is drawn around the whole tile instead of the title. */
@supports selector(:has(*)) {
	.tile__link:focus-visible {
		outline: none;
		box-shadow: none;
	}

	.tile:has(.tile__link:focus-visible) {
		outline: 3px solid #fff;
		box-shadow: 0 0 0 6px var(--c-ink);
	}
}

.tile__arrow {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.9rem;
	height: 2.9rem;
	border-radius: 50%;
	background: #fff;
	color: var(--c-ink);
	font-size: 1.2rem;
	font-weight: 700;
}

.pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 3rem;
	padding: 0 0.5rem 0 1.25rem;
	border: 1px solid var(--c-line-strong);
	border-radius: 999px;
	background: #fff;
	color: var(--c-ink);
	font-weight: 700;
	text-decoration: none;
	transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.pill [aria-hidden] {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--c-tint);
	color: var(--c-teal-dark);
	font-size: 0.9rem;
}

.pill:hover {
	background: var(--c-navy);
	border-color: var(--c-navy);
	color: #fff;
}

/* ==========================================================================
   News
   ========================================================================== */
.news {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 32rem), 1fr));
	gap: 1.5rem;
}

.news-feature {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 30rem;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--c-navy);
	color: #fff;
	box-shadow: var(--shadow-card);
}

.news-feature__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-feature__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, var(--c-ink) 0%, rgba(18, 26, 46, 0.92) 40%, rgba(18, 26, 46, 0) 85%);
}

.news-feature__body {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	padding: 2rem;
}

.news-feature__meta,
.news-item__meta,
.card__meta,
.entry__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 0.75rem;
	font-size: 0.875rem;
}

.news-feature__meta time {
	color: var(--c-on-dark);
}

.news-feature__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.625rem, 2.6vw, 2.25rem);
	line-height: 1.1;
	font-weight: 700;
	text-wrap: balance;
}

.news-feature__title a {
	color: #fff;
	text-decoration: none;
}

.news-feature__title a:hover {
	color: #fff;
	text-decoration: underline;
}

.news-feature__title a::after,
.news-item__title a::after,
.card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.news-feature__excerpt {
	margin: 0;
	max-width: 60ch;
	font-size: 1.0625rem;
	color: var(--c-on-dark);
}

/* Posts without a featured image show the MROT logo in the same box. */
.thumb-fallback {
	display: grid;
	place-items: center;
	padding: 1.5rem;
	background: var(--c-tint);
}

.thumb-fallback img.thumb-fallback__logo {
	width: 70%;
	max-width: 15rem;
	height: auto;
	max-height: 100%;
	object-fit: contain;
}

.card__thumb.thumb-fallback,
.news-item__thumb.thumb-fallback {
	background: var(--c-tint);
}

.news-item__thumb.thumb-fallback {
	padding: 0.75rem;
}

.news-item__thumb.thumb-fallback img.thumb-fallback__logo {
	width: 100%;
}

.news-feature__fallback {
	position: absolute;
	inset: 0 0 50% 0;
	background: transparent;
}

/* Excerpts are limited to two lines everywhere (full text stays in the DOM). */
.news-feature__excerpt,
.news-item__excerpt,
.card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.news__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.news__list > li {
	display: flex;
}

.news-item {
	position: relative;
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 9.4rem) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: center;
	padding: 0.9rem;
	border: 1px solid var(--c-line);
	border-radius: 1.5rem;
	background: #fff;
	box-shadow: 0 8px 24px rgba(18, 26, 46, 0.06);
}

.news-item__thumb {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 1.1rem;
	background: #dde3ee;
}

.news-item__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-item__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding-right: 0.5rem;
}

.news-item__meta time,
.card__meta time {
	color: var(--c-muted-2);
}

.news-item__title {
	margin: 0;
	font-size: 1.1875rem;
	line-height: 1.3;
	font-weight: 700;
	text-wrap: pretty;
}

.news-item__title a,
.card__title a {
	color: var(--c-ink);
	text-decoration: none;
}

.news-item__title a:hover,
.card__title a:hover {
	text-decoration: underline;
}

.news-item__excerpt {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--c-muted);
}

@media (max-width: 30em) {
	.news-item {
		grid-template-columns: 1fr;
	}

	.news-item__thumb {
		aspect-ratio: 16 / 9;
	}
}

/* ==========================================================================
   Members
   ========================================================================== */
.members {
	position: relative;
	overflow: hidden;
	background: linear-gradient(140deg, var(--c-ink) 0%, var(--c-navy) 45%, var(--c-teal-dark) 100%);
	color: #fff;
}

.members__ring {
	position: absolute;
	left: -120px;
	top: -120px;
	width: 360px;
	height: 360px;
	border-radius: 50%;
	border: 48px solid rgba(13, 111, 140, 0.35);
}

.members__glow {
	position: absolute;
	right: -80px;
	bottom: -140px;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(224, 83, 59, 0.35), transparent 65%);
}

.members__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2rem;
	padding-block: 5rem 5.5rem;
}

.members .section-heading__bar {
	background: linear-gradient(90deg, #7fd0e6, #ffb3a6);
}

.members__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
	gap: 1.5rem;
}

.member-cats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.4rem), 1fr));
	gap: 0.9rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.member-cats > li {
	display: flex;
}

.member-cat {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	min-height: 10.6rem;
	padding: 1.4rem;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 1.4rem;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	text-decoration: none;
	transition: background 0.3s ease, transform 0.3s ease;
}

.member-cat:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	transform: translateY(-4px);
}

.member-cat__num {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 0.75rem;
	background: linear-gradient(135deg, var(--c-teal-bright), var(--c-red));
	font-size: 0.9375rem;
	font-weight: 700;
}

.member-cat__title {
	font-size: 1.125rem;
	line-height: 1.25;
	font-weight: 700;
	text-wrap: balance;
}

.member-cat__desc {
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--c-on-dark);
}

.members__side {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

.map-card {
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: #fff;
	color: var(--c-ink);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.map-card__img {
	display: block;
	width: 100%;
	height: auto;
}

.map-card__body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem 1.25rem;
	padding: 1.4rem 1.6rem 1.6rem;
}

.map-card__text {
	flex: 1 1 15rem;
}

.map-card__title {
	margin: 0 0 0.4rem;
	font-family: var(--font-display);
	font-size: 1.625rem;
	line-height: 1.1;
	font-weight: 700;
}

.map-card__text p {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--c-muted);
}

.event {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	padding: 1.1rem;
	border-radius: 1.5rem;
	background: linear-gradient(135deg, var(--c-red), #8f2a16);
	color: #fff;
	box-shadow: 0 20px 40px rgba(143, 42, 22, 0.35);
}

.event__date {
	flex: none;
	width: 5.25rem;
	padding: 0.75rem 0;
	border-radius: 1.1rem;
	background: #fff;
	color: var(--c-ink);
	text-align: center;
}

.event__day {
	display: block;
	font-family: var(--font-display);
	font-size: 2.125rem;
	line-height: 1;
	font-weight: 800;
}

.event__month {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.event__text {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	min-width: 0;
}

.event__eyebrow {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #ffe1d9;
}

.event__title {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.3;
	font-weight: 700;
}

.event__link {
	align-self: flex-start;
	font-weight: 700;
	color: #fff;
}

.event__link:hover {
	color: #ffe1d9;
}

/* ==========================================================================
   Inner pages
   ========================================================================== */
.site-page {
	padding-block: 3rem 5rem;
}

.page-header {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 2rem;
}

.page-header__desc {
	max-width: 60ch;
	color: var(--c-muted);
}

.page-header__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
}

.entry {
	max-width: 50.625rem;
	margin-inline: auto;
	padding: 2.5rem;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	background: #fff;
	box-shadow: 0 8px 24px rgba(18, 26, 46, 0.06);
}

@media (max-width: 40em) {
	.entry {
		padding: 1.25rem;
		border-radius: 1.25rem;
	}
}

.entry .page-header {
	margin-bottom: 1.5rem;
}

.entry__position {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--c-muted);
}

.entry__thumb img {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 2rem;
	border-radius: var(--radius-lg);
}

.entry__content {
	font-size: 1.0625rem;
	line-height: 1.75;
	overflow-wrap: break-word;
}

.entry__content > * + * {
	margin-top: 1.25rem;
}

/*
 * Older posts carry inline colours and fonts pasted from other editors (grey text, Roboto).
 * Force readable, on-brand text so contrast stays at WCAG AA (1.4.3); links keep their own colour.
 */
.entry__content :where(p, li, span, strong, b, em, i, u, small, div, td, th, dd, dt, blockquote, figcaption, font) {
	color: var(--c-ink) !important;
	font-family: var(--font-body) !important;
}

.entry__content :where(h1, h2, h3, h4, h5, h6) {
	color: var(--c-ink) !important;
	font-family: var(--font-display) !important;
}

.entry__content a:not(.btn),
.entry__content a:not(.btn) :where(span, strong, b, em, i, u, font) {
	color: var(--c-teal) !important;
}

.entry__content a:not(.btn):hover,
.entry__content a:not(.btn):hover :where(span, strong, b, em, i, u, font) {
	color: var(--c-ink) !important;
}

/* Buttons inside content keep their own colours. */
.entry__content .btn :where(span) {
	color: inherit !important;
	font-family: inherit !important;
}

.entry__content h2,
.entry__content h3,
.entry__content h4 {
	font-family: var(--font-display);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.entry__content img {
	border-radius: 1rem;
}

.entry__content table {
	width: 100%;
	border-collapse: collapse;
}

.entry__content th,
.entry__content td {
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--c-line-strong);
	text-align: left;
}

/* Classic editor: galleries, image alignment and captions (older posts rely on them). */
.entry__content {
	display: flow-root;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(var(--gallery-cols, 3), minmax(0, 1fr));
	gap: 0.75rem;
	margin-block: 1.5rem;
}

.gallery-columns-1 { --gallery-cols: 1; }
.gallery-columns-2 { --gallery-cols: 2; }
.gallery-columns-3 { --gallery-cols: 3; }
.gallery-columns-4 { --gallery-cols: 4; }
.gallery-columns-5 { --gallery-cols: 5; }
.gallery-columns-6 { --gallery-cols: 6; }
.gallery-columns-7 { --gallery-cols: 7; }
.gallery-columns-8 { --gallery-cols: 8; }
.gallery-columns-9 { --gallery-cols: 9; }

.gallery-item {
	margin: 0;
	min-width: 0;
}

.gallery-icon a {
	display: block;
}

.gallery-icon img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0.75rem;
}

.gallery-caption,
.wp-caption-text {
	margin: 0.4rem 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--c-muted);
}

@media (max-width: 40em) {
	.gallery {
		grid-template-columns: repeat(min(var(--gallery-cols, 3), 2), minmax(0, 1fr));
	}
}

.alignleft {
	float: left;
	margin: 0.25rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.25rem 0 1rem 1.5rem;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption img {
	display: block;
}

@media (max-width: 40em) {
	.alignleft,
	.alignright {
		float: none;
		margin: 0 0 1rem;
	}
}

.entry__footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--c-line);
}

.alignwide {
	max-width: var(--wrap);
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: 1.5rem;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: 1.5rem;
	background: #fff;
	box-shadow: 0 8px 24px rgba(18, 26, 46, 0.06);
}

.card__thumb {
	aspect-ratio: 4 / 3;
	background: #dde3ee;
}

.card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card__body {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.25rem 1.4rem 1.5rem;
}

.card__title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.3;
	font-weight: 700;
}

.card__position {
	margin: 0;
	font-weight: 600;
	color: var(--c-muted);
}

.card__excerpt {
	margin: 0;
	color: var(--c-muted);
}

.subcat {
	margin-bottom: 2.5rem;
}

.subcat__title {
	margin: 0 0 0.75rem;
	font-family: var(--font-display);
	font-size: 1.625rem;
	line-height: 1.2;
}

.subcat__title a {
	color: var(--c-ink);
	text-decoration: none;
}

.subcat__title a:hover {
	text-decoration: underline;
}

.subcat__list {
	margin: 0;
	padding-left: 1.25rem;
	columns: 18rem;
	column-gap: 2rem;
}

.subcat__list li {
	break-inside: avoid;
	padding-block: 0.25rem;
}

.navigation.pagination,
.post-navigation,
.comments-navigation {
	margin-top: 2.5rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.post-navigation .nav-links {
	justify-content: space-between;
}

.post-navigation .nav-links a {
	display: flex;
	flex-direction: column;
	padding: 0.9rem 1.2rem;
	border: 1px solid var(--c-line-strong);
	border-radius: 1.1rem;
	background: #fff;
	color: var(--c-ink);
	text-decoration: none;
}

.nav-subtitle {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--c-teal);
}

.nav-title {
	font-weight: 700;
}

.page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 1rem;
	border: 1px solid var(--c-line-strong);
	border-radius: 999px;
	background: #fff;
	color: var(--c-ink);
	font-weight: 700;
	text-decoration: none;
}

a.page-numbers:hover {
	background: var(--c-navy);
	border-color: var(--c-navy);
	color: #fff;
}

.page-numbers.current {
	background: var(--c-navy);
	border-color: var(--c-navy);
	color: #fff;
}

.page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

.no-results .search-form {
	margin-top: 1rem;
}

/* Comments */
.comments {
	max-width: 50.625rem;
	margin: 3rem auto 0;
}

.comments__title {
	font-family: var(--font-display);
}

.comments__list,
.comments__list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comments__list .children {
	margin-left: 1.5rem;
}

.comments__list .comment-body {
	margin-bottom: 1rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--c-line);
	border-radius: 1.1rem;
	background: #fff;
}

.comment-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 2px solid var(--c-navy);
	border-radius: 0.8rem;
	background: #fff;
	color: var(--c-ink);
	font: inherit;
}

.comment-form .submit {
	min-height: 3rem;
	padding: 0 1.6rem;
	border: 0;
	border-radius: 999px;
	background: var(--c-navy);
	color: #fff;
	font: 700 1rem var(--font-body);
	cursor: pointer;
}

.comment-form .submit:hover {
	background: var(--c-red);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	background: var(--c-navy-deep);
	color: #fff;
}

.site-footer__stripe {
	height: 6px;
	background: linear-gradient(90deg, var(--c-teal-bright), var(--c-navy) 50%, var(--c-coral));
}

.site-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
	gap: 2.5rem;
	padding-block: 3.5rem 2.5rem;
}

.site-footer__about {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.site-footer__about img {
	display: block;
	width: auto;
	height: 5rem;
	align-self: flex-start;
}

.site-footer__about p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #c4cee0;
}

.site-footer__title {
	margin: 0 0 0.9rem;
	font-size: 1rem;
	font-weight: 700;
}

.site-footer__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer a {
	display: inline-block;
	padding: 0.4rem 0;
	color: #fff;
	font-size: 0.9375rem;
}

.site-footer a:hover {
	color: #ffb3a6;
}

.site-footer__bottom {
	border-top: 1px solid #26314d;
}

.site-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	padding-block: 1.25rem;
	font-size: 0.875rem;
	color: #c4cee0;
}

.site-footer__bottom-inner p {
	margin: 0;
}

.site-footer__bottom-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-widgets {
	padding-top: 0;
}

.home-widgets .widget-title {
	font-family: var(--font-display);
}
