html,
body {
	scroll-behavior: smooth;
}

body {
	font-family: "carlito", sans-serif;
	background: whitesmoke;
	margin: auto;
}
.name {
	font-style: italic;
	font-family: "georgia", serif;
	font-weight: normal;
}
.error {
	color: #e00;
}

h1, h2, h3, h4, h5, h6, .title {
	color: #3535a5;
	font-family: "georgia", serif;
	font-weight: normal;
}
a, a:visited, a:active {
	color: #06c;
}
a:hover, a:focus, a:active {
	color: #e00;
}

.content {
	max-width: 1280px;
	width: 90%;
	margin: auto;
}

/* Header bar */
header {
	border-bottom: 1px solid #ccc;
	background: white;
	position: sticky;
	top: 0;
	z-index: 3;
}
header div.content {
	display: grid;
	grid-template-columns: 1fr 6fr auto;
	text-align: center;
	line-height: 1;
	padding: 0.5rem 0rem;
	vertical-align: text-bottom;
}
header div.content > div {
	padding: 0.5rem;
}
header div.content > div a.title {
	text-align: left;
	white-space: nowrap;
	font-size: 2.25rem;
	text-decoration: none !important;
	color: #3535a5 !important;
}
header div.content > div:last-child {
	text-align: right;
}
header div.content > div:last-child img {
	padding: 0.4rem 1rem 0rem;
}
header div.content > div:last-child > a {
	padding: 0.5rem 1rem;
	border: 1px solid #ccc;
	border-radius: 2rem;
	display: block;
	width: max-content;
}
header div.content > div:last-child a {
	transition: background 0.4s ease;
	color: grey !important;
}
header div.content > div:last-child a:hover,
header div.content > div:last-child a:focus {
	background: #eee;
}
@media only screen and (max-width: 1080px) {
	header div.content {
		grid-template-columns: 1fr auto;
	}
	header div.content > div:first-child {
		grid-column: span 2;
	}
}
@media only screen and (max-width: 800px) {
	header div.content {
		width: 100%;
	}
}
@media only screen and (max-width: 720px) {
	body {
		width: 100%;
		max-width: 100%;
	}
	.content {
		width: 95%;
	}
	header div.content {
		box-sizing: border-box;
		grid-template-columns: 10fr 1fr 1fr;
		text-align: center;
		padding: 0rem;
	}
	header div.content > div:first-child {
		grid-column: span 1;
		text-align: left;
	}
	main, footer {
		width: 100%;
		margin: auto;
	}
}
@media only screen and (max-width: 480px) {
	header div.content > div a.title {
		font-size: 1.25rem;
		line-height: 1.8;
		text-align: center;
		display: block;
	}
	main {
		overflow-x: hidden;
	}
}

/* Navigation bar */
nav ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
	overflow: hidden;
}
nav ul li {
	float: left;
}
nav ul li > a {
	display: block;
	color: inherit !important;
	text-align: center;
	padding: 1rem 0.4rem calc(1rem - 2px);
	min-width: 10%;
	margin: 0rem 1rem;
	text-decoration: none;
	position: relative;
	outline: none;
	border-bottom: 2px solid transparent;
	transition: 0.2s ease;
}
nav ul li:not(:last-child) > a::after {
	content: "";
	transform: skewX(-20deg);
	border-right: 1px solid #ccc;
	position: absolute;
	top: 0.2rem;
	left: 1rem;
	width: 100%;
	height: 100%;
}
nav ul li > a.active {
	border-bottom-color: #3535a5;
}
nav ul li > a:not(.active):hover,
nav ul li > a:not(.active):focus {
	border-bottom-color: #ccc;
}
nav ul li > a:has(img) {
	padding: 0.8rem 0.5rem calc(0.8rem - 2px);
}

/* Breadcrumb bar */
nav.breadcrumb {
	border: none;
	position: initial;
}
nav.breadcrumb:has(li) {
	border-bottom: 1px solid #ccc
}
nav.breadcrumb ol {
	list-style-type: none;
	box-sizing: border-box;
}
nav.breadcrumb ol:has(li) {
	display: flex;
	gap: 0.25rem;
	padding: 0.5rem 1rem;
	white-space: nowrap;
	overflow-x: scroll;
	scrollbar-width: none;
}
@media only screen and (max-width: 480px) {
	nav.breadcrumb ol:has(li) {
		padding: 0.5rem 0rem;
	}
}
nav.breadcrumb ol li {
	display: inline-flex;
	white-space: nowrap;
	position: relative;
	padding-left: 1em;
}
nav.breadcrumb ol li:first-child {
	padding-left: 0;
}
nav.breadcrumb ol li:not(:first-child):not(:has(span.breadcrumb-next-prev))::before {
	content: '';
	display: block;
	position: absolute;
	top: 0px;
	bottom: 0px;
	left: 0em;
	width: .4375em;
	height: .4375em;
	margin: auto 0;
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
	border-style: solid;
	border-width: 1px 1px 0 0;
}
nav.breadcrumb ol li:has(span.breadcrumb-next-prev) {
	margin-left: auto;
	white-space: nowrap;
	flex: 0 0 auto;
}
nav.breadcrumb ol li a:not(:last-child) {
	display: inline-block;
	vertical-align: text-bottom;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	max-width: 10em;
}

/* Navigation dropdown */
nav div.dropdown {
	display: none;
}
@media only screen and (max-width: 720px) {
	nav div.dropdown {
		display: block;
		padding: 10px 0px;
	}
	nav div.dropdown button {
		outline: none;
		width: 48px;
		height: 32px;
		cursor: pointer;
		background-color: white;
		border: 1px solid black;
		padding-top: 4px;
		padding-left: 7px;
	}
	nav div.dropdown button.shown {
		background-color: #3535a5;
	}
	nav div.dropdown button span.icon-bar {
		display: block;
		width: 32px;
		height: 2px;
		background-color: black;
		margin-bottom: 4px;
	}
	nav div.dropdown button.shown span.icon-bar {
		background-color: white;
	}
	nav div.dropdown-outer {
		display: grid;
		grid-template-rows: 0fr;
		transition: grid-template-rows 0.5s ease;
		position: absolute;
		left: 0;
		top: calc(3rem + 5px);
		width: 100%;
		background-color: white;
	}
	nav div.dropdown-outer:has(div.dropdown-content.shown) {
		grid-template-rows: 1fr;
	}
	nav div.dropdown-outer div.dropdown-back {
		transition: 0.5s ease;
	}
	nav div.dropdown-outer:has(div.dropdown-content.shown) div.dropdown-back {
		position: absolute;
		width: 100%;
		height: 100vh;
		top: 0;
		left: 0;
		background: rgba(0,0,0,0.5);
		backdrop-filter: blur(4px);
		z-index: -1;
	}
	nav div.dropdown-content {
		overflow: hidden;
	}
	nav div.dropdown-content ul {
		width: 100%;
	}
	nav div.dropdown-content ul li {
		width: 100%;
		border-bottom: 1px solid #ccc;
	}
	nav ul li > a {
		padding: 14px 16px 14px 14px;
		border-bottom: none;
		border-left: 8px solid transparent;
		margin: 0;
	}
	nav ul li > a.active {
		border-left-color: #3535a5;
	}
}

/* Main */
main {
	background: white;
	padding-top: 1rem;
	padding-bottom: 2rem;
}
main hr {
	height: 1px;
	background-color: #ccc;
	border: 0;
}

/* Pagination */
div.pagination {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
	grid-column-gap: 1rem;
	padding: 1rem 0rem;
	box-sizing: border-box;
	border-top: 1px solid #ccc;
}
div.pagination span {
	width: 100%;
	text-align: center;
}
div.pagination span:first-of-type {
	text-align: right;
}
div.pagination span:last-of-type {
	text-align: left;
}
div.pagination-list {
	width: 100%;
	text-align: center;
}
@media only screen and (max-width: 360px) {
	div.pagination {
		grid-template-columns: 1fr;
	}
	div.pagination span:first-of-type,
	div.pagination span:last-of-type {
		text-align: center;
	}
}

/* Footer */
footer {
	background-color: whitesmoke;
}
footer div.content {
	padding: 4rem 1rem;
	box-sizing: border-box;
	line-height: 1.8;
}
footer div.content div.footer-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-column-gap: 1rem;
}
footer div.content div.footer-grid div a {
	display: block;
	width: max-content;
	text-decoration: none;
	color: black;
}
footer div.content div.footer-grid div a:hover,
footer div.content div.footer-grid div a:focus {
	color: #333;
}
@media only screen and (max-width: 960px) {
	footer div.content div.footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media only screen and (max-width: 640px) {
	footer div.content div.footer-grid {
		grid-template-columns: repeat(1, 1fr);
	}
}

/* Dropdown */
.drop-down {
	position: relative;
	display: inline-block;
}
.drop-down-button {
	cursor: pointer;
}
div.drop-down-content {
	display: none;
	position: absolute;
	background-color: white;
	border: 1px solid #ccc;
	border-radius: 4px;
	min-width: 160px;
	box-shadow: 0px 0px 4px rgba(0,0,0,0.2);
	z-index: 3;
	margin-top: 0.5rem;
	right: 0;
}
div.drop-down-content > * {
	display: block;
	padding: 12px 14px;
}
div.drop-down-content > :not(:first-child) {
	border-top: 1px solid #ccc;
}
div.drop-down-content.open {
	display: block;
}
div.drop-down-content::before,
div.drop-down-content::after {
	content: " ";
	position: absolute;
	bottom: 100%;
	right: 16px;
	border-width: 8px;
	border-style: solid;
	border-color: transparent transparent white transparent;
	transition: border-color 0.4s ease;
}
div.drop-down-content::before {
	right: 15px;
	border-width: 9px;
	border-color: transparent transparent #aaa transparent;
}
div.drop-down-content:has(a:first-child:hover)::after,
div.drop-down-content:has(a:first-child:focus)::after {
	border-color: transparent transparent #eee transparent;
}

/* Modal */
body:has(div.modal) {
	overflow: hidden;
}
div.modal {
	position: fixed;
	z-index: 5;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background: rgb(0,0,0,0.4);
	backdrop-filter: blur(4px);
}
div.modal div.modal-content {
	background: white;
	margin: 10% auto 0;
	padding: 1rem;
	border: 1px solid #ccc;
	width: 40%;
	position: relative;
	animation-name: modal;
	animation-duration: 0.4s;
	box-shadow: 0 0 4rem black;
}
div.modal div.modal-content span.close {
	color: #ccc;
	font-size: 32px;
	font-weight: bold;
	user-select: none;
	margin: 0rem 0.5rem;
	text-decoration: none;
	cursor: pointer;
	position: absolute;
	right: 1rem;
}
div.modal div.modal-content span.close:hover,
div.modal div.modal-content span.close:focus {
	color: black;
}
@keyframes modal {
	from { top: -300px; opacity: 0; }
	to { top: 0; opacity: 1; }
}
@media only screen and (max-width: 640px) {
	div.modal div.modal-content {
		width: calc(100% - 2rem);
		box-sizing: border-box;
	}
}

div.half-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-column-gap: 1rem;
	border-top: 1px solid #ccc;
	padding-top: 1rem;
}
@media only screen and (max-width: 640px) {
        div.half-grid {
		grid-template-columns: 1fr;
        }
}
