/*
 * Modern design layer for Magazine Basic ("Nordic editorial").
 * Loaded after style.css and mobile.css. Applies on every screen size.
 */

:root {
	--si-ink: #14212b;
	--si-text: #2c3a45;
	--si-muted: #667480;
	--si-line: #e3e8ec;
	--si-bg: #f3f6f8;
	--si-surface: #ffffff;
	--si-blue: #005b99;
	--si-blue-dark: #06395e;
	--si-blue-soft: #eaf2f8;
	--si-yellow: #fecc02;
	--si-radius: 18px;
	--si-shadow: 0 1px 2px rgba(20, 33, 43, 0.05), 0 10px 28px rgba(20, 33, 43, 0.07);
	--si-display: "Fraunces", Georgia, "Times New Roman", serif;
	--si-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =Base
-------------------------------------------------------------- */
html,
body {
	height: auto;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	font-family: var(--si-body);
	font-size: 17px;
	line-height: 1.7;
	color: var(--si-text);
	-webkit-font-smoothing: antialiased;
}

body.custom-background {
	background-image: none !important;
	background-color: var(--si-bg) !important;
}

::selection {
	background: var(--si-yellow);
	color: var(--si-ink);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--si-display);
	font-weight: 600;
	color: var(--si-ink);
	letter-spacing: -0.01em;
}

a {
	color: var(--si-blue);
	transition: color 0.15s ease, background-color 0.15s ease;
}

a:hover {
	color: var(--si-blue-dark);
}

body #page {
	flex: 1 0 auto;
	width: 100%;
	min-height: 0;
	margin: 0 auto;
	background: transparent;
	box-shadow: none;
}

.menus,
#site-description,
.entry-meta,
.post-category,
.post-format,
.page-title,
.archive-meta,
.rss-date,
ul .rsswidget {
	font-family: inherit;
}

/* =Header
-------------------------------------------------------------- */
.title-logo-wrapper {
	float: none;
	width: 100%;
}

#header #site-title {
	margin: 36px 0 10px;
	padding: 0 20px;
	font-family: var(--si-display);
	font-weight: 600;
	font-size: 40px;
	font-size: clamp(30px, 5vw, 48px);
	line-height: 1.05;
	letter-spacing: -0.02em;
}

#header #site-title a {
	color: var(--si-ink) !important;
}

/* Small Swedish flag drawn in CSS, in front of the site name */
#header #site-title a::before {
	content: "";
	display: inline-block;
	width: 0.92em;
	height: 0.6em;
	margin-right: 0.32em;
	border-radius: 0.09em;
	background:
		linear-gradient(var(--si-yellow), var(--si-yellow)) 36% 0 / 12.5% 100% no-repeat,
		linear-gradient(var(--si-yellow), var(--si-yellow)) 0 50% / 100% 20% no-repeat,
		#006aa7;
	box-shadow: 0 1px 3px rgba(20, 33, 43, 0.2);
}

#header #site-description {
	padding: 0 20px;
	color: var(--si-muted) !important;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
}

.header-group {
	margin-bottom: 26px;
}

/* =Navigation (desktop)
-------------------------------------------------------------- */
@media (min-width: 769px) {
	#nav-wrapper {
		padding: 0 20px;
	}

	#site-navigation.menus {
		padding: 6px;
		font-size: 14.5px;
		font-weight: 600;
		background: var(--si-blue-dark);
		border-radius: 14px;
		box-shadow: 0 8px 22px rgba(6, 57, 94, 0.22);
	}

	#site-navigation li {
		border: 0;
	}

	#site-navigation li:hover,
	#site-navigation li li:hover {
		background: transparent;
	}

	#site-navigation li a {
		padding: 10px 14px;
		color: #ffffff;
		text-shadow: none;
		border-radius: 9px;
	}

	#site-navigation li:hover > a {
		background: rgba(255, 255, 255, 0.14);
	}

	#site-navigation .menu > li.current-menu-item > a,
	#site-navigation .menu > li.current-menu-ancestor > a {
		background: var(--si-yellow);
		color: var(--si-ink);
	}

	#site-navigation ul ul {
		width: 272px;
		max-height: 72vh;
		padding: 6px;
		overflow-y: auto;
		background: var(--si-surface);
		border-radius: 14px;
		box-shadow: 0 2px 6px rgba(6, 57, 94, 0.1), 0 20px 44px rgba(6, 57, 94, 0.24);
	}

	#site-navigation ul ul li a {
		padding: 9px 12px;
		font-weight: 400;
		line-height: 1.35;
		color: var(--si-ink);
	}

	#site-navigation ul ul li:hover > a {
		background: var(--si-blue-soft);
		color: var(--si-blue);
	}

	#site-sub-navigation {
		padding: 10px 2px 0;
		font-family: inherit;
		font-size: 12.5px;
		font-weight: 600;
		letter-spacing: 0.08em;
		background: none;
		border: 0;
		box-shadow: none;
	}

	#site-sub-navigation li:hover,
	#site-sub-navigation li li:hover {
		background: transparent;
	}

	#site-sub-navigation li,
	#site-sub-navigation li a {
		color: var(--si-muted);
	}

	#site-sub-navigation li a:hover {
		color: var(--si-blue);
	}

	#primary.c9 {
		width: 70%;
	}

	#secondary.c3 {
		width: 30%;
	}
}

@media (min-width: 769px) and (max-width: 960px) {
	#primary.c9,
	#secondary.c3 {
		width: 100%;
	}
}

/* =Content
-------------------------------------------------------------- */
#main {
	margin-top: 30px;
	padding-bottom: 48px;
}

#primary article {
	padding: 38px 42px 30px;
	background: var(--si-surface);
	border: 0;
	border-radius: var(--si-radius);
	box-shadow: var(--si-shadow);
}

#primary .entry-title {
	margin: 0 0 0.55em;
	font-size: 34px;
	font-size: clamp(27px, 3.6vw, 44px);
	line-height: 1.12;
	letter-spacing: -0.02em;
}

#primary .entry-title a {
	color: var(--si-ink) !important;
}

#primary .entry-title a:hover {
	color: var(--si-blue) !important;
}

.entry-meta {
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 400;
	color: var(--si-muted);
}

.entry-meta a {
	border-bottom: 0;
}

.post-category,
.post-format,
.page-title,
.archive-meta {
	font-weight: 600;
	letter-spacing: 0.1em;
	color: var(--si-muted);
}

#primary .entry-content {
	padding-bottom: 0;
	border-bottom: 0;
}

#primary .entry-content p {
	margin: 0 0 1.15em;
}

#primary .entry-content h1,
#primary .entry-content h2,
#primary .entry-content h3,
#primary .entry-content h4 {
	margin: 1.7em 0 0.5em;
	line-height: 1.22;
}

#primary .entry-content h1 { font-size: clamp(25px, 3vw, 34px); }
#primary .entry-content h2 { font-size: clamp(23px, 2.6vw, 30px); }
#primary .entry-content h3 { font-size: clamp(20px, 2.1vw, 24px); }
#primary .entry-content h4 { font-size: 19px; }

#primary .entry-content a {
	color: var(--si-blue);
	border-bottom: 0;
	text-decoration: underline;
	text-decoration-color: rgba(0, 91, 153, 0.35);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

#primary .entry-content a:hover {
	text-decoration-color: var(--si-yellow);
}

#primary .entry-content a.image-anchor {
	text-decoration: none;
}

.entry-content img {
	border: 0;
	border-radius: 12px;
}

.wp-caption-text {
	margin: 6px 0 0;
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--si-muted);
}

blockquote {
	margin: 1.4em 0;
	padding: 16px 22px;
	font-size: 1em;
	color: var(--si-ink);
	background: var(--si-blue-soft);
	border-left: 4px solid var(--si-yellow);
	border-radius: 0 12px 12px 0;
}

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

td, th {
	padding: 10px 12px;
	border: 1px solid var(--si-line);
}

th {
	background: var(--si-blue-soft);
	color: var(--si-ink);
}

pre {
	padding: 14px 16px;
	background: #f6f8fa;
	border: 1px solid var(--si-line);
	border-radius: 10px;
}

.more-link,
#posts-pagination a,
.form-submit input[type="submit"],
.comment-reply-link {
	padding: 10px 20px;
	font-size: 14.5px;
	font-weight: 600;
	color: #ffffff !important;
	text-shadow: none;
	background: var(--si-blue);
	border: 0 !important;
	border-radius: 999px;
	box-shadow: none;
}

.more-link:hover,
#posts-pagination a:hover,
.form-submit input[type="submit"]:hover,
.comment-reply-link:hover {
	background: var(--si-blue-dark);
}

input,
textarea,
select {
	border: 1px solid #cfd7de;
	border-radius: 10px;
	color: var(--si-ink);
}

input,
textarea {
	padding: 10px 14px;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--si-blue);
	box-shadow: 0 0 0 3px rgba(0, 91, 153, 0.18);
}

/* =Sidebar
-------------------------------------------------------------- */
#secondary .widget {
	margin-bottom: 26px;
	padding-bottom: 10px;
	overflow: hidden;
	background: var(--si-surface);
	border: 0;
	border-radius: var(--si-radius);
	box-shadow: var(--si-shadow);
}

#secondary .widget-title {
	margin: 0;
	padding: 24px 24px 12px;
	font-size: 21px;
	line-height: 1.25;
	text-transform: none;
	text-shadow: none;
	border-bottom: 0;
	box-shadow: none;
}

#secondary .widget-title::after {
	content: "";
	display: block;
	width: 40px;
	height: 4px;
	margin-top: 12px;
	background: var(--si-yellow);
	border-radius: 2px;
}

#secondary .widget a {
	color: var(--si-ink);
}

#secondary .widget a:hover {
	color: var(--si-blue);
}

#secondary .wp-block-latest-posts.wp-block-latest-posts__list {
	margin: 0;
	padding: 0 24px 6px !important;
	font-size: 15px !important;
	text-align: left;
}

#secondary .wp-block-latest-posts__list li {
	padding: 15px 0;
	border-bottom: 1px solid var(--si-line);
}

#secondary .wp-block-latest-posts__list li:last-child {
	border-bottom: 0;
}

#secondary .wp-block-latest-posts__post-title {
	display: block;
	padding: 0;
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

#secondary .wp-block-latest-posts__post-date {
	margin-top: 5px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--si-muted);
}

#secondary .wp-block-latest-posts__post-excerpt {
	display: -webkit-box;
	margin: 7px 0 0;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.55;
	color: var(--si-text);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

/* =Footer
-------------------------------------------------------------- */
#footer {
	flex: none;
	height: auto;
	padding: 26px 0;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.78);
	text-shadow: none;
	background: var(--si-blue-dark);
	border-top: 4px solid var(--si-yellow);
}

#footer a {
	color: #ffffff;
	border-bottom: 0;
}

#footer a:hover {
	text-decoration: underline;
}

.copyright {
	margin: 0;
}

/* =Tablet and below
-------------------------------------------------------------- */
@media (max-width: 960px) {
	#secondary {
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
	}
}

/* =Phones
-------------------------------------------------------------- */
@media (max-width: 768px) {
	#mobile-menu,
	#drop-down-search {
		background: var(--si-blue-dark);
	}

	#mobile-menu {
		border-bottom-color: var(--si-yellow);
	}

	#nav-wrapper .menus,
	#nav-wrapper .menus li a {
		background: #0a4672;
	}

	#nav-wrapper .menus li a {
		font-weight: 600;
	}

	#nav-wrapper .menus li a:hover,
	#nav-wrapper .menus li a:active {
		background: #0f5486;
	}

	#nav-wrapper .menus ul ul,
	#nav-wrapper .menus ul ul li a {
		background: var(--si-blue-dark);
	}

	#nav-wrapper .menus ul ul li a {
		font-weight: 400;
	}

	#header #site-title {
		margin-top: 24px;
		padding: 0 18px;
	}

	#header #site-description {
		padding: 0 18px;
		font-size: 12.5px;
	}

	.header-group {
		margin-bottom: 18px;
	}

	#main {
		margin-top: 0;
		padding-bottom: 28px;
	}

	.c1, .c2, .c3, .c4, .c5, .c6, .c7, .c8, .c9, .c10, .c11, .c12 {
		padding-left: 12px;
		padding-right: 12px;
	}

	#primary article {
		padding: 24px 20px 18px;
		border-radius: 14px;
	}

	#secondary .widget {
		border-radius: 14px;
	}

	#secondary .widget-title {
		padding: 20px 20px 10px;
	}

	#secondary .wp-block-latest-posts.wp-block-latest-posts__list {
		padding: 0 20px 4px !important;
	}

	#footer {
		padding: 22px 0 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	a {
		transition: none;
	}
}
