/*
Theme Name: IRPJ Journal
Theme URI: https://irpj.euclid.int
Author: EUCLID (Euclid University)
Description: Academic journal theme for IRPJ, the Intergovernmental Research and Policy Journal. Colors and fonts follow euclid.int.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: irpj-journal
*/

:root {
	--navy: #1B487C;
	--royal: #294A87;
	--deep: #1D3557;
	--teal: #117A8B;
	--gold: #F1C50E;
	--tint: #F0F6FC;
	--gray: #F2F2F2;
	--line: #DDE3EA;
	--ink: #1B1B1B;
	--text: #333333;
	--muted: #555555;
	--white: #FFFFFF;
	--sans: "Fira Sans", Arial, sans-serif;
	--head: "PT Sans", Arial, sans-serif;
	--serif: Lora, Georgia, serif;
	--radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--white); }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: none; }
a:hover, a:focus-visible { color: var(--teal); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--deep); padding: 10px 16px; z-index: 1000; font-weight: 600; }
.skip-link:focus { left: 8px; top: 8px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 56px; padding-bottom: 56px; }
.section--tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.narrow { max-width: 880px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: var(--radius); font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.2; border: 2px solid transparent; cursor: pointer; text-decoration: none !important; transition: background-color .15s, color .15s; }
.btn--lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn--block { display: flex; width: 100%; }
.btn--accent { background: var(--teal); color: var(--white); }
.btn--accent:hover { background: #0D6372; color: var(--white); }
.btn--primary { background: var(--royal); color: var(--white); }
.btn--primary:hover { background: var(--deep); color: var(--white); }
.btn--outline { background: var(--white); color: var(--deep); border-color: var(--deep); }
.btn--outline:hover { background: var(--deep); color: var(--white); }
.btn--gold { background: var(--gold); color: var(--deep); }
.btn--gold:hover { background: #E0B500; color: var(--deep); }
.btn--ghost { margin-top: 24px; background: var(--white); color: var(--navy); border: 1px solid #C3C4C7; }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }

/* Top bar, masthead, nav */
.topbar { background: var(--gray); border-bottom: 1px solid #E0E0E0; font-size: 13px; color: var(--ink); }
.topbar__inner { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.topbar__links { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar a { color: var(--ink); }

.masthead { background: var(--white); }
.masthead__inner { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 16px; color: var(--navy); text-decoration: none !important; }
.brand:hover { color: var(--navy); }
.brand__text { display: flex; flex-direction: column; }
.brand__abbr { font-family: var(--head); font-weight: 700; font-size: 32px; line-height: 1; letter-spacing: .01em; }
.brand__name { font-size: 13px; color: var(--muted); margin-top: 4px; }
.masthead__tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search input[type="search"] { width: 290px; max-width: 100%; height: 44px; padding: 0 14px; border: 1px solid #C3C4C7; border-radius: var(--radius); font: inherit; font-size: 14px; }
.search--big { display: flex; gap: 10px; margin-bottom: 24px; }
.search--big input[type="search"] { flex: 1; width: auto; height: 50px; font-size: 16px; }

.mainnav { background: var(--royal); }
.mainnav__inner { display: flex; flex-wrap: wrap; gap: 0 2px; }
.mainnav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; color: var(--white); font-weight: 600; font-size: 15px; text-decoration: none !important; }
.mainnav a:hover, .mainnav a.is-current { background: var(--deep); color: var(--white); }
.mainnav a.is-current { box-shadow: inset 0 -3px 0 var(--gold); }

/* Hero */
.hero { background: var(--tint); border-bottom: 1px solid var(--line); }
.hero__inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero__text { flex: 999 1 560px; min-width: 0; }
.rule-gold { display: block; width: 56px; height: 4px; background: var(--gold); margin-bottom: 16px; }
.kicker { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--royal); }
.hero__title { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin: 0; }
.hero__lead { margin: 20px 0 0; font-size: 19px; max-width: 660px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.issuecard { flex: 1 1 340px; max-width: 420px; display: flex; gap: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--text); text-decoration: none !important; box-shadow: 0 1px 2px rgba(27, 72, 124, .06); }
.issuecard:hover { border-color: var(--navy); color: var(--text); }
.issuecard__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.issuecard__title { font-family: var(--head); font-weight: 700; font-size: 21px; color: var(--navy); line-height: 1.25; }
.issuecard__meta { font-size: 14px; color: var(--muted); }
.issuecard__link { margin-top: auto; font-weight: 600; color: var(--navy); font-size: 14px; }
.label, .box__label { display: block; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

.cover { width: 120px; height: 160px; flex: none; background: var(--navy); color: var(--white); border-radius: 3px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.cover__abbr { font-family: var(--head); font-weight: 700; font-size: 22px; }
.cover__rule { display: block; height: 3px; width: 34px; background: var(--gold); }
.cover__vol { font-size: 12px; line-height: 1.4; }
.cover--large { width: 100%; height: auto; aspect-ratio: 3 / 4; padding: 22px; }
.cover--large .cover__abbr { font-size: 30px; }
.cover__bottom { display: flex; flex-direction: column; gap: 10px; }
.cover__name { font-size: 13px; line-height: 1.45; }
.cover--large .cover__vol { color: #C9D3DF; font-size: 13px; }

/* Facts strip */
.facts { border-bottom: 1px solid var(--line); }
.facts__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.facts strong { display: block; font-family: var(--head); font-size: 21px; color: var(--navy); line-height: 1.25; }
.facts span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Layout */
.twocol { display: flex; flex-wrap: wrap; gap: 48px; }
.twocol__main { flex: 999 1 640px; min-width: 0; }
.twocol__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.twocol__side--left { flex: 1 1 240px; max-width: 300px; }
.threecol { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 48px; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 2px solid var(--navy); padding-bottom: 12px; margin-bottom: 4px; }
.sechead h2 { margin: 0; font-size: 30px; }
.sechead a { font-weight: 600; font-size: 14px; }
.h2 { font-size: 30px; margin: 0; }
.h3 { font-size: 24px; }
.sublead { margin: 8px 0 28px; color: var(--muted); }
.more { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 14px; }

/* Article cards */
.acard { padding: 22px 0; border-bottom: 1px solid var(--line); }
.acard__labels { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.acard__type { color: var(--teal); }
.acard__vol { color: var(--muted); }
.acard__title { font-family: var(--head); font-size: 21px; line-height: 1.32; margin: 8px 0 6px; }
.acard__title a { color: var(--ink); }
.acard__title a:hover { color: var(--navy); }
.acard__authors { margin: 0; font-size: 14px; color: var(--text); }
.acard__excerpt { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.acard__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.acard__strong { font-weight: 600; }

/* Boxes */
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--white); }
.box h2 { font-size: 22px; }
.box h2.label, .box h2.box__label { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.box p { margin: 0 0 10px; font-size: 15px; }
.box--navy { background: var(--navy); border-color: var(--navy); color: #E6EFF9; }
.box--navy h2 { color: var(--white); }
.linklist { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.linklist--light a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); }
.linklist--light a:hover { color: var(--gold); }
.vollist { list-style: none; margin: 0; padding: 0; }
.vollist a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: var(--radius); font-size: 15px; color: var(--text); text-decoration: none !important; }
.vollist a:hover { background: var(--tint); color: var(--navy); }
.vollist a[aria-current="page"] { background: var(--royal); color: var(--white); }
.vollist .count { color: inherit; opacity: .75; font-variant-numeric: tabular-nums; }

/* Subject tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 104px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--royal); border-radius: var(--radius); padding: 18px 20px; text-decoration: none !important; }
.tile:hover { border-color: var(--navy); border-top-color: var(--gold); }
.tile__name { font-family: var(--head); font-weight: 700; font-size: 18px; color: var(--navy); line-height: 1.3; }
.tile__more { font-size: 13px; color: var(--muted); }

/* People */
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.people li { display: flex; gap: 14px; align-items: center; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; background: #DCE8F5; color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* Page heads */
.pagehead { background: var(--tint); border-bottom: 1px solid var(--line); }
.pagehead .wrap { padding-top: 40px; padding-bottom: 36px; }
.pagehead h1 { font-size: clamp(30px, 4vw, 44px); margin: 0; }
.pagehead p { margin: 10px 0 0; font-size: 17px; max-width: 760px; }

/* Article page */
.arthead { background: var(--tint); border-bottom: 1px solid var(--line); }
.arthead .wrap { padding-top: 30px; padding-bottom: 38px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.badge { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; }
.badge--gold { background: var(--gold); color: var(--deep); }
.badge--outline { border: 1px solid var(--navy); color: var(--navy); padding: 3px 10px; }
.badge--plain { border: 1px solid #C3C4C7; color: var(--text); padding: 3px 10px; }
.arthead__title { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.2; margin: 18px 0 0; max-width: 1000px; }
.arthead__authors { margin-top: 18px; font-size: 16px; color: var(--ink); max-width: 1000px; }
.arthead__authors p { margin: 0 0 4px; }
.arthead__authors em { color: var(--muted); font-size: 14px; }
.arthead__meta { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 16px; font-size: 14px; }
.arthead__meta strong { font-weight: 600; margin-right: 4px; }

.artbody { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 40px; padding-bottom: 64px; }
.toc { flex: 1 1 200px; max-width: 230px; position: sticky; top: 20px; font-size: 14px; }
.toc__list { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 9px; line-height: 1.4; }
.toc__list .is-sub { padding-left: 12px; font-size: 13px; }
.artmain { flex: 999 1 560px; min-width: 0; max-width: 740px; }
.artmain__figure { margin: 0 0 28px; }
.rail { flex: 1 1 280px; max-width: 330px; display: flex; flex-direction: column; gap: 20px; }
.cite { font-size: 13px; line-height: 1.6; margin-bottom: 12px; overflow-wrap: anywhere; }
.cite p { margin: 0; }
.facts-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.facts-dl dt { color: var(--muted); }
.facts-dl dd { margin: 0; overflow-wrap: anywhere; }
.corr { font-size: 14px; overflow-wrap: anywhere; }
.corr p { margin: 0 0 4px; }
.related { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-family: var(--head); font-size: 16px; line-height: 1.35; }
.kw { margin-top: 36px; }
.kw p { margin: 0; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; font-size: 13px; padding: 6px 12px; border-radius: 3px; background: #E6EFF9; color: var(--navy); }

/* Long-form reading text */
.prose { font-family: var(--serif); font-size: 18px; line-height: 1.75; color: var(--ink); overflow-wrap: break-word; }
.prose h2, .prose h3, .prose h4 { font-family: var(--head); margin-top: 1.6em; }
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 21px; }
.prose p { margin: 0 0 1.1em; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--tint); }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); color: var(--text); }
.prose img { border-radius: 2px; }
.prose a { text-decoration: underline; text-decoration-color: rgba(27, 72, 124, .35); }
.prose--page { font-size: 17px; }

/* Elementor-built pages keep their own layout */
.pagebody--elementor { padding-top: 8px; padding-bottom: 40px; }

/* Issues page */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.covercard { display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none !important; }
.covercard:hover .cover { outline: 3px solid var(--gold); outline-offset: 3px; }
.covercard__title { font-family: var(--head); font-weight: 700; font-size: 19px; color: var(--navy); }
.covercard__meta { font-size: 14px; color: var(--muted); }

/* Pagination */
.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; }
.pagination .page-numbers.current { background: var(--royal); border-color: var(--royal); color: var(--white); }

/* Footer */
.sitefooter { background: var(--navy); color: #E6EFF9; font-size: 15px; }
.sitefooter__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 40px; }
.sitefooter__logo { display: block; width: 220px; margin-bottom: 14px; }
.sitefooter p { margin: 0 0 10px; }
.sitefooter__h { color: var(--white); font-family: var(--sans); font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.sitefooter ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sitefooter a { color: #E6EFF9; }
.sitefooter a:hover { color: var(--gold); }
.sitefooter__base { border-top: 1px solid #2D5A8E; font-size: 13px; }
.sitefooter__base .wrap { padding-top: 16px; padding-bottom: 16px; }

@media (max-width: 720px) {
	.wrap { padding: 0 18px; }
	.section { padding-top: 40px; padding-bottom: 40px; }
	.search input[type="search"] { width: 100%; }
	.masthead__tools, .search { width: 100%; }
	.masthead__tools .btn { width: 100%; }
	.mainnav a { padding: 0 11px; font-size: 14px; }
	.toc { position: static; max-width: none; }
	.rail, .twocol__side--left { max-width: none; }
	.prose { font-size: 17px; }
	.issuecard { max-width: none; }
}
