/* Alatunniste (footer): selkeämpi jäsennys.
   Vain tämän templaten tyylit; isäntä-CSS:n määrityksiin ei kosketa.
   Rakenne tulee Coresta: #footer > .container >
     div 1: logo + yhteystiedot (CMS)
     div 2: ul.nav (rekisterit) + ul.nav (sivut)  - vain kirjautumattomille
     div 3: CMS-lisäsisältö (tekijänoikeus, suunnittelija, merkit)
   Puhelimessa kaikki allekkain keskitettynä, tietokoneella kolmessa sarakkeessa. */

footer.container-fluid #footer .container {
	padding-top: 44px;
	padding-bottom: 28px;
	text-align: center;
	line-height: 1.6;
}
/* Coren ylimääräiset rivinvaihdot pois, välit tehdään marginaaleilla */
footer.container-fluid #footer .container > br {
	display: none;
}

/* 1. Logo ja yhteystiedot */
footer.container-fluid #footer .container > div:nth-of-type(1) img {
	display: block; /* yritysnimi logon alle */
	width: 88px;
	height: auto;
	padding: 0 !important;
	margin: 0 auto 14px;
}
footer.container-fluid #footer .container > div:nth-of-type(1) {
	font-size: 16px;
	line-height: 1.75;
}
footer.container-fluid #footer .container > div:nth-of-type(1) strong {
	font-size: 18px;
}

/* 2. Linkit: sivut ensin, rekisterit sen jälkeen pienemmällä */
footer.container-fluid #footer .container > div:nth-of-type(2) {
	display: -ms-flexbox;
	display: flex;
	-ms-flex-direction: column;
	flex-direction: column;
	margin-top: 26px;
}
footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav {
	margin: 0;
	padding: 18px 0;
	border-top: 1px solid rgba(255, 255, 255, .28);
	list-style: none;
}
footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav:nth-of-type(2) {
	-ms-flex-order: 1;
	order: 1; /* sivut */
}
footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav:nth-of-type(1) {
	-ms-flex-order: 2;
	order: 2; /* rekisterit */
}
footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav > li {
	display: block;
	float: none;
}
footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav > li > a {
	display: inline-block;
	padding: 7px 10px;
	color: #ffffff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}
footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav:nth-of-type(1) > li > a {
	font-size: 14px;
	font-weight: 400;
	padding-top: 4px;
	padding-bottom: 4px;
	opacity: .9;
}
/* Isäntä-CSS:ssä a:hover { color: #e2e2e2 !important }, joten tässä tarvitaan !important */
footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav > li > a:hover,
footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav > li > a:focus {
	color: #ffcc56 !important;
	background-color: transparent !important;
	text-decoration: underline;
}

/* 3. Tekijänoikeus, suunnittelija ja merkit */
footer.container-fluid #footer .container > div:nth-of-type(3) {
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, .28);
	font-size: 13px;
	line-height: 1.7;
}
footer.container-fluid #footer .container > div:nth-of-type(3) img {
	max-width: 100%;
	height: auto;
	margin-top: 12px;
}
footer.container-fluid #footer .container > div:nth-of-type(3) a {
	color: #ffffff;
}
footer.container-fluid #footer .container > div:nth-of-type(3) a:hover {
	color: #ffcc56 !important;
}

/* Tietokone: kolme saraketta (logo ja yhteystiedot | sivut | rekisterit), alla tekijänoikeusrivi.
   Vanhat selaimet ilman gridiä näyttävät puhelimen asettelun. */
@media (min-width: 992px) {
	@supports (display: grid) {
		footer.container-fluid #footer .container {
			display: grid;
			grid-template-columns: 1fr 2fr;
			grid-column-gap: 40px;
			-webkit-column-gap: 40px;
			column-gap: 40px;
			align-items: start;
			text-align: left !important; /* Coren rivissä style="text-align:center" */
		}
		/* Bootstrapin clearfix-pseudoelementit eivät saa viedä ruudukon paikkoja */
		footer.container-fluid #footer .container::before,
		footer.container-fluid #footer .container::after {
			display: none;
		}
		footer.container-fluid #footer .container > div:nth-of-type(1) {
			grid-column: 1;
			grid-row: 1;
		}
		footer.container-fluid #footer .container > div:nth-of-type(2) {
			grid-column: 2;
			grid-row: 1;
			text-align: left !important;
		}
		footer.container-fluid #footer .container > div:nth-of-type(1) img {
			margin: 0 0 14px;
		}
		footer.container-fluid #footer .container > div:nth-of-type(2) {
			-ms-flex-direction: row;
			flex-direction: row;
			margin-top: 0;
		}
		footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav {
			-ms-flex: 1 1 0;
			flex: 1 1 0;
			padding: 0;
			border-top: 0;
		}
		footer.container-fluid #footer .container > div:nth-of-type(2) ul.nav > li > a {
			padding-left: 0;
			padding-right: 0;
		}
		footer.container-fluid #footer .container > div:nth-of-type(3) {
			grid-column: 1 / -1;
			grid-row: 2;
			margin-top: 30px;
			text-align: center;
		}
	}
}