/*
Theme Name: Genealoogia
Author: k3da.site
Description: Genealoogia teema WordPressile
Text Domain: genealoogia
Version: 1.0.0
*/
:root {
	--color-blue: #393b86;
	--color-orange: #e9a039;

	--color-main-background: rgb(251, 232, 200);

	--color-background: #e9a039;
	--color-text: #23282a;

	--color-light: #9d766c;

	--font-size: 17px;
	--content-area-max-width: 1280px;

	--logo-size: 330px;
}

/*****/

body {
	margin: 0;
	overflow-x: hidden;
	overflow-y: scroll;

	font-size: var(--font-size);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

	-webkit-tap-highlight-color: rgba(255, 255, 255, 0.255);

	color: var(--color-text);
	background-color: var(--color-main-background);

	background-image: url("img/little-pluses.png");
	background-blend-mode: screen;
}

body.sub-website.tallinn {
	color: black;
	background-color: var(--color-main-background);

	background-image: url("img/knitted-sweater.png");
	background-blend-mode: unset;
}

body.sub-website.tallinn.site-title a {
	font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
}

body.page.page-id-97 {
	background-color: var(--color-orange);
}

body.sub-website.tartu {
	color: black;
	background-color: var(--color-background);

	background-image: url("img/knitted-sweater.png");
	background-blend-mode: unset;
}

body.sub-website.viljandi {
	color: black;
	background-color: var(--color-background);

	background-image: url("img/knitted-sweater.png");
	background-blend-mode: unset;
}

body.sub-website.saaremaa {
	color: black;
	background-color: var(--color-background);

	background-image: url("img/knitted-sweater.png");
	background-blend-mode: unset;
}

body.sub-website.rapla {
	color: black;
	background-color: var(--color-background);

	background-image: url("img/knitted-sweater.png");
	background-blend-mode: unset;
}

body.sub-website.jarva {
	color: black;
	background-color: var(--color-background);

	background-image: url("img/knitted-sweater.png");
	background-blend-mode: unset;
}

/*****/

a {
	text-decoration: none;
	color: var(--color-blue);

	transition: all 333ms ease;
}
a:hover {
	text-decoration: underline;
	text-decoration-color: var(--color-orange);
}

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

p {
	line-height: 1.5;
}

button {
	cursor: pointer;
	font: inherit;
}

figcaption {
	font-size: 0.8rem;
}

nav a {
	padding-left: 1rem;
	padding-right: 1rem;

	height: 2.2rem;

	font-size: 1.1rem;
	letter-spacing: 0.07em;

	text-transform: uppercase;
	font-weight: bold;
	text-align: center;

	display: flex;
	align-items: center;
	justify-content: center;
}
nav .current-menu-item a,
nav a:hover,
nav a:active {
	color: black;
}

/*****/

/*HEADER*/
.site-header nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	height: var(--logo-size);
}

.site-header nav a[title="EGeS"] {
	width: var(--logo-size);
	height: var(--logo-size);

	padding: 1rem;
	box-sizing: border-box;

	position: absolute;
	top: 0;
}

.site-header nav .menu {
	margin: 0;
	padding: 0;
	list-style-type: none;

	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1rem var(--logo-size);
}

/* osakonnad as sub-websites */

.sub-website .site-header nav > a {
	color: black;

	font-size: 2rem;
	margin-top: 1rem;

	height: auto;

	display: grid;
	place-items: center;
	gap: 1rem;
}
.sub-website .site-header nav > a img {
	max-width: 150px;
	height: auto;
}

.sub-website .site-header nav > ul {
	margin: 0;
	padding: 0;

	margin-top: 1rem;

	max-width: var(--content-area-max-width);

	list-style-type: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;

	gap: 0.5rem;
}

/*****/

/*FOOTER*/
.site-footer {
	background-color: var(--color-blue);
	color: var(--color-orange);

	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	place-items: center;
	gap: 5rem;

	margin-top: 10rem;
	padding-top: 10rem;
	padding-bottom: 10rem;

	box-sizing: border-box;
	padding-left: 5vw;
	padding-right: 5vw;
}

.site-footer nav ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
}
.site-footer nav a {
	color: var(--color-orange);
	height: auto;
	padding: 0.5rem;
}
.site-footer nav a:hover {
	color: white;
}

.site-footer nav img[alt="EGeS"] {
	display: none;
}

/*hide, keep for accessibility*/
.site-footer nav a[title="EGeS"] {
	width: 1px;
	height: 1px;
	opacity: 0;
	position: absolute;
}

.site-footer > a[title="EGeS"] {
	max-width: calc(0.5 * var(--logo-size));
	height: auto;
}

/*****/

/*THE MAIN ARTICLE (CONTENT AREA)*/
.site-main > article {
}

.site-main h1,
.site-main h2,
.site-main h3 {
	font-variant: small-caps;
	/*word-break: break-all;*/
	margin-bottom: 1rem;
}

.site-main h1 {
	font-size: 3rem;
	margin-top: 6rem;
}
.site-main h2 {
	font-size: 2rem;
	margin-top: 4rem;
}
.site-main h3 {
	font-size: 1.1rem;
	margin-top: 2rem;
}

.site-main h1 + h2 {
	margin-top: 0;
}

.site-main h1:first-of-type {
	text-align: center;
}

.site-main > article > *:not(img) {
	width: 92%;

	max-width: var(--content-area-max-width);
	margin-left: auto;
	margin-right: auto;

	overflow-x: hidden;

	box-sizing: border-box;
}

/*****/

form[role="search"] {
	display: flex;
	justify-content: center;
	width: 100%;
	height: 2.2rem;
}
form[role="search"] input {
	flex-grow: 1;
}
form[role="search"] button {
	background-color: white;
	border: 1px solid black;
}

.screen-reader-text {
	width: 1px;
	height: 1px;
	opacity: 0;
}

.search-results > ul {
	padding: 0;
}
.search-results > ul > li {
	list-style-type: none;
}
.search-results > ul > li + li {
	margin-top: 5rem;
}
.search-results > ul > li > a:first-of-type {
	font-size: 2rem;
	font-weight: bold;
	font-variant: small-caps;
}

/*****/

/*Responsive*/
@media (max-width: 960px) {
	:root {
		--font-size: 16px;
		--logo-size: 220px;
	}

	.site-header nav {
	}
	.site-header nav .menu {
		row-gap: 0.5rem;
	}
}

@media (max-width: 640px) {
	:root {
		--font-size: 15px;
		--logo-size: 80vw;
	}

	.site-header nav {
		width: 100%;
		height: auto;
	}
	.site-header nav a[title="EGeS"] {
		position: unset;
		max-width: 180px;
		height: auto;
	}
	.site-header nav .menu {
		margin-top: 1rem;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
	}

	.site-footer {
		grid-template-columns: 1fr;
	}

	.site-main > article > h1 {
		font-size: 1.6rem;
		margin-top: 4rem;
	}
	.site-main > article > h2 {
		font-size: 1.2rem;
		margin-top: 3rem;
	}
	.site-main > article > h3 {
		font-size: 1rem;
		margin-top: 2rem;
	}
}

/*****/

/*Customize*/
* {
	scrollbar-color: var(--color-orange) var(--color-blue);
	scrollbar-width: thin;
}

::-webkit-scrollbar {
	width: 9px;
}
::-webkit-scrollbar-track {
	background: var(--color-blue);
}
::-webkit-scrollbar-thumb {
	background: var(--color-orange);
}

::-moz-selection {
	color: white;
	background: var(--color-blue);
}
::selection {
	color: white;
	background: var(--color-blue);
}
