/*
 * LearnIOE refresh — loaded after site.css (the legacy Bootstrap 3 bundle).
 * Keeps the indigo / teal / olive identity and the yellow-underlined section
 * titles; fixes readability (dark unjustified text, real type scale, loaded fonts).
 */

:root {
	/* the logo's three colours */
	--ioe-indigo: #28348a;
	--ioe-teal: #36a6aa;
	--ioe-yellow: #dedc00;
	--ioe-indigo-deep: #1d2668;
	--ioe-indigo-soft: #eceef8;
	/* teal dark enough for small text on white */
	--ioe-teal-text: #217a7e;
	--ioe-ink: #1f2433;
	--ioe-text: #343a4a;
	--ioe-muted: #5d6578;
	--ioe-line: #dfe3ea;
	--ioe-paper: #ffffff;
	--ioe-wash: #f4f5fa;
	--ioe-sans: 'Source Sans 3', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
	--ioe-serif: 'Lora', Georgia, 'Times New Roman', serif;
	--ioe-radius: 3px;
	--ioe-shadow: 0 1px 2px rgba(31, 36, 51, 0.04);
	--ioe-shadow-hover: 0 1px 2px rgba(31, 36, 51, 0.05), 0 10px 24px rgba(31, 36, 51, 0.08);
	--ioe-rule: #d6d9e2;

	/* topics share one accent so no topic looks highlighted */
	--topic-governance-regimes: var(--ioe-indigo);
	--topic-organizations: var(--ioe-indigo);
	--topic-institutions-exchange-coordination: var(--ioe-indigo);
	--topic-political-institutional-dynamics: var(--ioe-indigo);
}

/* ---------- Base typography ---------- */

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

body {
	background: var(--ioe-paper);
	color: var(--ioe-text);
	font-family: var(--ioe-sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

p,
.description,
.widget_about p,
.entry-content p,
blockquote p {
	color: var(--ioe-text);
	font-family: var(--ioe-sans);
	font-size: 17px;
	line-height: 1.7;
	text-align: left;
	hyphens: manual;
}

.description {
	color: var(--ioe-muted);
	font-size: 18px;
	line-height: 1.6;
	max-width: 70ch;
	margin-bottom: 28px;
}

strong,
b {
	color: var(--ioe-ink);
	font-weight: 600;
}

a {
	color: var(--ioe-indigo);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition:
		color 0.15s ease,
		background-color 0.15s ease;
}

a:hover,
a:focus {
	color: var(--ioe-teal-text);
}

p a,
.description a,
blockquote a {
	text-decoration: underline;
	text-decoration-color: rgba(51, 51, 153, 0.35);
}

p a:hover,
.description a:hover,
blockquote a:hover {
	text-decoration-color: currentColor;
}

:focus-visible {
	outline: 3px solid var(--ioe-yellow);
	outline-offset: 2px;
	border-radius: 2px;
}

h1,
h2,
h3,
h4 {
	color: var(--ioe-ink);
	font-family: var(--ioe-sans);
}

/* ---------- Section titles (keep the yellow underline signature) ---------- */

.section-title,
h1.section-title,
.widget-title {
	color: var(--ioe-ink);
	font-family: var(--ioe-sans);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.3;
	padding-bottom: 12px;
}

.section-title {
	font-size: 15px;
	margin: 8px 0 22px;
}

h1.section-title {
	color: var(--ioe-ink);
	font-family: var(--ioe-serif);
	font-size: clamp(30px, 3.4vw, 42px);
	font-weight: 500;
	letter-spacing: -0.012em;
	line-height: 1.15;
	text-transform: none;
	margin: 0 0 18px;
	padding-bottom: 18px;
}

.section-title:after,
.widget-title:after {
	background: var(--ioe-yellow);
	height: 2px;
	bottom: 0;
	width: 44px;
}

.section-title:before,
.widget-title:before {
	background: var(--ioe-line);
}

.widget-title {
	font-size: 13px;
	margin: 0 0 20px;
}

/* ---------- Page frame ---------- */

.video-contents .section-padding {
	padding: 48px 0 56px;
}

@media (max-width: 767px) {
	.video-contents .section-padding {
		padding: 28px 0 40px;
	}
	body,
	p,
	.entry-content p,
	blockquote p {
		font-size: 16.5px;
	}
	.description {
		font-size: 17px;
	}
}

/* ---------- Sidebar ---------- */

.sidebar {
	padding-left: 12px;
}

.sidebar > .row,
.sidebar .row {
	margin-left: 0;
	margin-right: 0;
}

.sidebar .widget {
	margin-bottom: 36px;
}

.sidebar .widget_about {
	background: var(--ioe-wash);
	border-left: 2px solid var(--ioe-yellow);
	border-radius: 0 var(--ioe-radius) var(--ioe-radius) 0;
	padding: 22px 24px 8px;
}

.sidebar .widget_about p {
	font-size: 16px;
	line-height: 1.65;
}

@media (max-width: 767px) {
	.sidebar {
		padding-left: 0;
		margin-top: 32px;
	}
}

/* ---------- Keyword tags ---------- */

.widget_tags .widget-details,
.tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tag-link,
.widget_tags .tag-link {
	float: none;
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 4px 11px;
	line-height: 1.35;
	background: transparent;
	color: var(--ioe-indigo-deep);
	border: 1px solid var(--ioe-rule);
	border-radius: 2px;
	font-family: var(--ioe-sans);
	font-size: 14.5px;
	font-weight: 400;
	text-decoration: none;
	text-transform: capitalize;
}

.tag-link:hover,
.tag-link:focus {
	background: var(--ioe-indigo);
	border-color: var(--ioe-indigo);
	color: #fff;
	text-decoration: none;
}

.more-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	font-weight: 600;
	font-size: 16px;
	color: var(--ioe-indigo);
	text-decoration: none;
}

.more-link:after {
	content: '→';
	transition: transform 0.15s ease;
}

.more-link:hover:after {
	transform: translateX(3px);
}

/* ---------- Buttons ---------- */

.ioe-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 24px;
	border-radius: 2px;
	background: var(--ioe-indigo);
	color: #fff;
	font-weight: 600;
	font-size: 13.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
}

.ioe-button:hover,
.ioe-button:focus {
	background: var(--ioe-indigo-deep);
	color: #fff;
	text-decoration: none;
}

.ioe-button:after {
	content: '→';
}

/* ---------- Video player ---------- */

.youtube-player {
	margin: 0;
	border-radius: var(--ioe-radius);
	box-shadow: var(--ioe-shadow);
}

.youtube-player .play {
	width: 84px;
	height: 84px;
	margin: -42px 0 0 -42px;
	background: rgba(51, 51, 153, 0.88);
	box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.22);
	transition:
		transform 0.2s ease,
		background-color 0.2s ease;
}

.youtube-player .play::after {
	left: 33px;
	top: 27px;
	border-width: 15px 0 15px 25px;
}

.youtube-player .youtube-poster:hover .play,
.youtube-player .youtube-poster:focus-visible .play {
	transform: scale(1.08);
	background: var(--ioe-teal);
}

.carousel-kit .carousel-indicators {
	bottom: 14px;
	z-index: 20;
}

.carousel-kit .carousel-indicators button {
	width: 10px;
	height: 10px;
	background: rgba(255, 255, 255, 0.6);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
	transition: width 0.2s ease;
}

.carousel-kit .carousel-indicators li.active button {
	width: 26px;
	border-radius: 2px;
	background: var(--ioe-yellow);
}

/* ---------- Rich text coming from the database ---------- */

.prose {
	max-width: 72ch;
}

.prose p,
.prose li {
	margin: 0 0 1em;
	color: #2b3040;
	font-family: var(--ioe-serif);
	font-size: 18.5px;
	line-height: 1.72;
	text-wrap: pretty;
}

.prose p:empty {
	display: none;
}

.prose span,
.prose font {
	font-family: inherit !important;
	font-size: inherit !important;
	color: inherit !important;
	line-height: inherit !important;
}

.prose.references p {
	font-size: 15.5px;
	line-height: 1.6;
	padding-left: 1.6em;
	text-indent: -1.6em;
	margin-bottom: 0.75em;
	color: var(--ioe-muted);
}

.prose.references em,
.prose.references i {
	color: var(--ioe-text);
}

/* ---------- Blockquotes (team page) ---------- */

blockquote {
	border-left: 2px solid var(--ioe-yellow);
	background: var(--ioe-wash);
	padding: 16px 22px;
	margin: 0 0 28px;
	border-radius: 0 var(--ioe-radius) var(--ioe-radius) 0;
}

blockquote p {
	font-size: 16.5px;
}

blockquote p:last-child {
	margin-bottom: 0;
}

/* ---------- Contributors grid ---------- */

.author_contribute {
	color: var(--ioe-muted);
	margin-bottom: 36px;
}

.author_contribute .pic img {
	width: 160px;
	height: 160px;
	object-fit: cover;
	border-radius: 50%;
	box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--ioe-line);
	transition: box-shadow 0.2s ease;
}

.author_contribute:hover .pic img {
	box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ioe-yellow);
}

.author_contribute .name {
	margin-top: 16px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
}

.author_contribute .name a {
	color: var(--ioe-ink);
	text-decoration: none;
	font-family: var(--ioe-serif);
}

.author_contribute .name a:hover {
	color: var(--ioe-indigo);
}

.author_contribute .name span {
	display: block;
	margin-top: 4px;
	font-size: 14.5px;
	font-weight: 400;
	font-style: normal;
	color: var(--ioe-muted);
}

/* ---------- Partner logos + footer ---------- */

.logos_partners {
	margin: 0;
	padding: 40px 0;
	border-top: 1px solid var(--ioe-line);
	background: var(--ioe-paper);
}

.site-footer .footer-bottom {
	background: var(--ioe-indigo-deep);
	color: rgba(255, 255, 255, 0.78);
}

.site-footer .footer-bottom .padding {
	padding: 40px 0 32px;
}

footer.site-footer,
footer.site-footer p {
	font-family: var(--ioe-sans);
}

footer.site-footer .footer-bottom a {
	color: #fff;
	font-family: var(--ioe-sans);
	font-weight: 500;
	text-decoration: none;
}

footer.site-footer .footer-bottom a:hover,
footer.site-footer .footer-bottom a:focus {
	color: var(--ioe-yellow);
}

/* ---------- Motion preferences ---------- */

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

/* ---------- Lecture grid (catalogues) ---------- */

.lecture-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lecture-grid > li {
	margin: 0;
	min-width: 0;
}

.lecture-list {
	display: grid;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 991px) {
	.lecture-grid.rows {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	.lecture-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
}

/* ---------- Long-form pages: keep a comfortable line length ---------- */

.video-contents .col-sm-12 > p,
.video-contents .col-sm-12 > ul,
.video-contents .col-sm-12 > ol,
.video-contents .col-sm-12 > h2 + p {
	max-width: 74ch;
}

/* ---------- Reading pages (Project, Usage, Team) ----------
 * A centred, journal-like column: serif body, centred title with the yellow
 * rule, drop cap on the opening paragraph.
 */

.reading {
	max-width: 700px;
	margin: 0 auto;
}

.reading-wide {
	max-width: 780px;
}

.reading-head {
	text-align: center;
	margin: 8px 0 44px;
}

.eyebrow,
.reading-head .eyebrow {
	margin: 0 0 12px;
	color: var(--ioe-teal-text);
	font-family: var(--ioe-sans);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	text-align: inherit;
}

.reading-head h1.section-title {
	margin: 0;
	padding-bottom: 26px;
	font-size: clamp(34px, 4.4vw, 50px);
	font-weight: 400;
	letter-spacing: -0.015em;
}

.reading-head h1.section-title:before {
	display: none;
}

.reading-head h1.section-title:after {
	left: 50%;
	width: 48px;
	margin-left: -24px;
}

.reading-body > p,
.reading-body .member p,
.reading-body dd {
	color: #2b3040;
	font-family: var(--ioe-serif);
	font-size: 19px;
	font-weight: 400;
	line-height: 1.75;
}

.reading-body > p {
	margin: 0 0 1.15em;
	hanging-punctuation: first;
	text-wrap: pretty;
}

.reading-body > p.lead::first-letter {
	float: left;
	margin: 0.08em 0.1em 0 0;
	color: var(--ioe-indigo);
	font-family: var(--ioe-serif);
	font-size: 3.55em;
	font-weight: 500;
	line-height: 0.82;
}

.reading-body h2.section-title {
	margin: 56px 0 26px;
	text-align: center;
}

.reading-body h2.section-title:before {
	display: none;
}

.reading-body h2.section-title:after {
	left: 50%;
	width: 32px;
	margin-left: -16px;
}

/* licence terms (Usage) */
.licence-terms {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 40px 0 0;
	border-top: 1px solid var(--ioe-rule);
	border-bottom: 1px solid var(--ioe-rule);
}

.licence-terms > div {
	padding: 22px 20px 20px;
	text-align: center;
}

.licence-terms > div + div {
	border-left: 1px solid var(--ioe-line);
}

.licence-terms dt {
	margin-bottom: 6px;
	color: var(--ioe-indigo);
	font-family: var(--ioe-sans);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.reading-body .licence-terms dd {
	margin: 0;
	color: var(--ioe-muted);
	font-size: 16.5px;
	font-style: italic;
	line-height: 1.5;
}

@media (max-width: 640px) {
	.licence-terms {
		grid-template-columns: minmax(0, 1fr);
	}
	.licence-terms > div + div {
		border-left: 0;
		border-top: 1px solid var(--ioe-line);
	}
}

/* team */
.team {
	margin: 0;
	padding: 0;
	list-style: none;
}

.member {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 28px;
	padding: 30px 0;
	border-top: 1px solid var(--ioe-line);
}

.member:first-child {
	border-top: 0;
	padding-top: 0;
}

.member > img,
.member-initials {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--ioe-rule);
}

.member-initials {
	display: grid;
	place-items: center;
	background: var(--ioe-indigo-soft);
	color: var(--ioe-indigo);
	font-family: var(--ioe-serif);
	font-size: 30px;
}

.reading-body .member .member-role {
	margin: 2px 0 2px;
	color: var(--ioe-teal-text);
	font-family: var(--ioe-sans);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.5;
}

.member-name {
	margin: 0 0 10px;
	font-family: var(--ioe-serif);
	font-size: 25px;
	font-weight: 500;
	line-height: 1.25;
	text-transform: none;
}

.reading-body .member p:last-child {
	margin: 0;
	font-size: 17.5px;
	line-height: 1.7;
}

@media (max-width: 560px) {
	.member {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
	.member > img,
	.member-initials {
		width: 80px;
		height: 80px;
	}
}

/* acknowledgements */
.credits {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 40px;
	margin: 0;
}

.credits dt {
	margin-bottom: 6px;
	color: var(--ioe-muted);
	font-family: var(--ioe-sans);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.5;
}

.reading-body .credits dd {
	margin: 0;
	font-size: 17.5px;
	line-height: 1.6;
}

@media (max-width: 560px) {
	.credits {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	.reading-head {
		margin-bottom: 32px;
	}
	.reading-body > p,
	.reading-body .member p,
	.reading-body dd {
		font-size: 18px;
		line-height: 1.7;
	}
}

/* ==========================================================================
 * IOEA family look: white masthead with the logo gradient rule, full-width
 * indigo bands for page titles, alternating section bands, Lora headings.
 * ========================================================================== */

body {
	overflow-x: clip;
}

.site-header {
	position: relative;
	z-index: 20;
}

/* Section titles: serif and mixed case, as on ioea.eu; the yellow rule stays */
h2.section-title,
.widget-title {
	font-family: var(--ioe-serif);
	font-size: 23px;
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1.3;
	text-transform: none;
}

.widget-title {
	font-size: 19px;
}

/* ---------- full-width bands (break out of the Bootstrap container) ---------- */

.band,
.page-band {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-left: calc(50vw - 50%);
	padding-right: calc(50vw - 50%);
}

.band {
	padding-top: 64px;
	padding-bottom: 64px;
}

.band.tinted {
	background: var(--ioe-wash);
	border-top: 1px solid #e9ebf3;
	border-bottom: 1px solid #e9ebf3;
}

.band h2 {
	margin: 0 0 24px;
	color: var(--ioe-ink);
	font-family: var(--ioe-serif);
	font-size: clamp(26px, 2.6vw, 32px);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.2;
	text-transform: none;
}

.band-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
}

.band-head h2 {
	margin: 0;
}

/* the home page ends on a tinted band: no white strip before the partners */
.video-contents .section-padding:has(> .container > .band:last-child) {
	padding-bottom: 0;
}

.band-eyebrow {
	margin: 0 0 12px;
	color: var(--ioe-yellow);
	font-family: var(--ioe-sans);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.band-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.band-eyebrow a:hover {
	color: #fff;
}

/* ---------- page title band ---------- */

.page-band {
	margin-top: -48px;
	margin-bottom: 44px;
	padding-top: 52px;
	padding-bottom: 48px;
	color: #fff;
	background:
		radial-gradient(ellipse 50% 120% at 100% 0%, rgba(54, 166, 170, 0.32), transparent 70%),
		linear-gradient(135deg, var(--ioe-indigo) 0%, var(--ioe-indigo-deep) 100%);
}

.page-band h1 {
	margin: 0;
	color: #fff;
	font-family: var(--ioe-serif);
	font-size: clamp(30px, 3.4vw, 42px);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.15;
	text-transform: none;
}

.page-band .lede {
	max-width: 46em;
	margin-top: 14px;
}

.page-band .lede p {
	margin: 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 18px;
	line-height: 1.6;
}

.page-band .lede a {
	color: #fff;
	text-decoration-color: rgba(222, 220, 0, 0.8);
}

.page-band.centered {
	text-align: center;
}

.page-band.centered .lede {
	margin-left: auto;
	margin-right: auto;
}

@media (max-width: 767px) {
	.page-band {
		margin-top: -28px;
		margin-bottom: 32px;
		padding-top: 36px;
		padding-bottom: 34px;
	}
	.band {
		padding-top: 44px;
		padding-bottom: 44px;
	}
	.band-head {
		align-items: flex-end;
	}
}

/* ---------- buttons (IOEA-style, in the logo colours) ---------- */

.ioe-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border: 1px solid transparent;
	border-radius: 4px;
	font-family: var(--ioe-sans);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color 0.15s ease,
		color 0.15s ease,
		border-color 0.15s ease;
}

.ioe-btn::after {
	content: '→';
}

.ioe-btn.primary {
	background: var(--ioe-yellow);
	color: var(--ioe-indigo-deep);
}

.ioe-btn.primary:hover,
.ioe-btn.primary:focus {
	background: #fff;
	color: var(--ioe-indigo-deep);
	text-decoration: none;
}

.ioe-btn.ghost {
	border-color: rgba(255, 255, 255, 0.5);
	color: #fff;
}

.ioe-btn.ghost:hover,
.ioe-btn.ghost:focus {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	text-decoration: none;
}

.ioe-btn.outline {
	padding: 9px 16px;
	border-color: var(--ioe-indigo);
	color: var(--ioe-indigo);
	font-size: 15px;
}

.ioe-btn.outline:hover,
.ioe-btn.outline:focus {
	background: var(--ioe-indigo);
	color: #fff;
	text-decoration: none;
}

.ioe-button {
	border-radius: 4px;
}

/* ---------- arrow link lists (as in the IOEA "About" block) ---------- */

.arrow-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 32px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.arrow-links a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--ioe-line);
	color: var(--ioe-indigo);
	font-weight: 600;
	text-decoration: none;
}

.arrow-links a::after {
	content: '→';
	transition: transform 0.15s ease;
}

.arrow-links a:hover {
	color: var(--ioe-teal-text);
}

.arrow-links a:hover::after {
	transform: translateX(3px);
}

@media (max-width: 560px) {
	.arrow-links {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* the global `p { text-align: left }` would win inside centred bands */
.page-band.centered .band-eyebrow,
.page-band.centered .lede p {
	text-align: center;
}
