:root {
  --brown-gradient: linear-gradient(180deg, rgba(109,65,33,1) 0%, rgba(144,99,67,1) 54%, rgba(168,126,96,1) 100%);
  --main-color2: #437090;
  --main-color3: #36516D;
}

body {
	background-color: white;
}

nav {
	background: var(--brown-gradient);
}

nav a, nav li:hover > a, nav ul ul a:hover, .sukutaulu, .sukutaulu td, footer {
	color: white;
}


@media only screen and (min-width: 1265px) {
	nav ul ul {
		background: linear-gradient(180deg, rgba(67,112,144,1) 0%, rgba(90,160,197,1) 40%, rgba(82,147,183,1) 100%);
	}
	nav li:hover > a {
		background-color: var(--main-color2);
	}
	nav ul ul a:hover {
		background-color: var(--main-color3);
	}

}

.table .thead-dark th {
	background-color: var(--main-color3);
}

a, nav a:active {
	color: var(--main-color3);
}

a:hover, #backtotop a {
	color: black;
}

.sukutaulu, .sukutaulu td {
	border-color: #dadada;
	background-color: var(--main-color3);
}
footer {
	background-color: #444;
}



html {
	margin: 0;
	padding: 0;
	scroll-behavior: smooth;
}
body {
	font-family: 'Source Sans Pro', sans-serif;
	font-weight: 400;
	font-size: 17px;
	line-height: 1.5;
	margin: 0;
	padding: 0;
}
#logo {
	color: white;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: 'Acme', sans-serif;
	font-size: 40px; 
	padding-left: 10px;
	text-shadow: 0 0 4px rgba(0,0,0,0.7);
	height: 70px;
}

nav {
	width: 100%;
}

#hamppari {
	position: absolute;
	top: -10000px;
}

nav ul li {
	list-style-type: none;
}


@media only screen and (max-width: 1264px) { /* mobiili */

	nav > ul {
		display: none;
		margin: 0;
	}

	nav #hamppari:checked + label + ul {
		display: block;
	}

	nav a {
		color: white;
		background-color: rgba(255,255,255,0.05);
		text-decoration: none;
		text-align: left;
		display: block;
		padding: 10px 20px;
	}

	nav a:active {
		text-decoration: none;
	}

	nav ul {
		padding: 10px;
	}

	nav ul li {
		margin-top: 5px;
	}

	nav ul ul {
		padding: 0;
	}

	nav ul ul a {
		padding-left: 40px;
	}

	header, header img {
		height: 200px;
	}

	.fa-bars {
		color: white;
	}

	.menu {
		padding: 10px;
		margin: 0;
		float: right;
	}

}
@media only screen and (min-width: 1265px) {
	nav {
		height: 70px;
		position: sticky;
		top: 0;
		z-index: 1;
	}
	nav a {
		font-size: 20px;
		text-align: center;
		padding: 0 16px;
		text-decoration: none;
		line-height: 70px;
		height: 70px;
		display: block;
	}
	
	nav li:hover > a {
		text-decoration: none;
		transition-property: transform, background-color, box-shadow, line-height, height;
		transition-duration: 0.3s;
	}
	nav ul {
		display: inline-block;
		vertical-align: top;
		margin: 0;
		padding: 0;
	
	}
	
	nav ul li {
		display: inline-block;
		position: relative;
	}
	
	nav ul ul {
		display: block;
		position: absolute;
		top: 50%;
		right: 10000px;
		opacity: 0;
		z-index: -1;
		transition-property: top, opacity;
		transition-duration: 0.3s;
	
	}
	nav ul ul li {
		width: 100%;
		height: auto;
		white-space: nowrap;
	}
	
	nav ul li:hover ul {
		right: auto;
		left: 0;
		top: 100%;
		opacity: 1;
	}
	
	nav ul ul a {
		text-align: left;
		height: 50px;
		line-height: 50px;
	}
	

	.menu, #hamppari {
		display: none;
	}

	header, header img {
		height: 600px;
		width: 100%;
	}

}

@media only screen and (min-width: 574px) {
	.float-right {
	padding-left: 10px;
	}

	.float-left {
	padding-right: 10px; 
	}

}

@media only screen and (max-width: 574px) {
	.float-right, .float-left {
		float: none!important;
	}
}



header img {
	object-fit: cover;
}

main {
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;
	padding: 20px;
	
}

h1, h2, h3 {
	font-family: 'Acme', sans-serif;
	padding: 10px 0;
}

img {
max-width: 100%;
}


a {
	text-decoration: none;
}

a:hover {
	text-decoration: none;
}
ul li .fa-paw {
	margin-right: 5px;
}

.fa-ul {
	margin-left: 1em;
}

.haastattelu {
	font-size: 15px;
	font-style: italic;
}

.sukutaulu, .sukutaulu td {
	border-width: 1px;
	border-style: solid;
}

.sukutaulu td {
	padding: 0 5px;
}

.sukutauluhead th {
	font-size: 18px;
}


footer {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100px;
	text-align: center;
	font-size: 15px;
}

#backtotop {
	position: fixed;
	right: 4%;
	bottom: 2%;
	opacity: 0;
	transition: opacity .5s ease-out;
}
#backtotop a {
	text-decoration: none;
}
#backtotop.show {
	opacity: 0.5;
}
