@charset "utf-8";

/* -------------------------------------------------------------------------------- */
/*																					*/
/* UUSENERGIA NETTISIVUJEN TYYLITIEDOSTO 											*/
/*																					*/
/* Versio 30.5.2025 																*/
/*																					*/
/* -------------------------------------------------------------------------------- */


/* -------------------------------------------------------------------------------- */
/*																					*/
/* VARSINAISET SIVUSTON TYYLIASETUKSET ALKAVAT										*/
/*																					*/
/* Käytetään ns. responsiivista suunnittelua (engl. responsive design),				*/
/* eli sivusto mukautuu näytön kokoon.												*/
/* Ratkaisukohta 640 pixeliä, eli 40rem 											*/
/* Käytetään css-grid rows-ominaisuutta												*/
/* Rivit ovat header, .content ja footer, jotka kiedotaan grid-container-divillä	*/
/* -------------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------------- */
/*																					*/
/* LÄHTÖTILANNE																		*/
/* Tätä käytetään kännyköissä sellaisenaan											*/
/*																					*/
/* -------------------------------------------------------------------------------- */
 	

body 
{
	font-size: medium; /* 16px */
	font-family: "Lucida Grande", Verdana, Arial, sans-serif;
	line-height: 1.5;
	background: #F5FFF5;	
	margin: 0;
}

.clear 	
{
	clear: both;
}

.grid-container
{
	max-width:75ch;  
	border-radius: 10px;
	margin:5px auto;
}

@supports (display: grid)
{
	.grid-container
	{
		display: grid;
		grid-template-rows: auto auto auto;
	}

	header
	{
		background: linear-gradient(rgba(255, 255, 170, 0.4), rgba(255, 255, 170, 0.2)), url("../images/pohja.png"); 
	}

	main, footer
	{
		background: linear-gradient(to right, rgba(255,255,0,0.1), rgba(255,255,0,0.5));
	}

}

header
{
	margin: 2px;
	border: 2px solid lime;
	border-radius: 10px;
	background: url("../images/pohja.png");	
}

header img
{
	width: 12%;
	float: right;
	margin-top: 0.2rem;
}

nav
{
	margin: 2px;
}

main
{
	margin: 2px;
	border: 2px solid lime;
	padding: 10px; 
	border-radius: 10px;
}

footer
{
	margin: 2px;
	padding: 30px;
	border: 2px solid lime;
	border-radius: 10px;
	color: darkgreen;
	font-weight: bold;
	font-size: 1.2rem;
	letter-spacing: 2px;
	text-align: center;
}

h1 
{
	font-size: 2rem;
	font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
	padding: 1.25rem 0.625rem 0.375em 0.625rem;
	font-family: Garamond, Georgia,"Times New Romain", serif;
	font-weight: bold;
	color: #00CC00;	
	letter-spacing: 3px;
	text-shadow: -1px 0 blue, 0 1px blue, 1px 0 blue, 0 -1px blue;
}

header p 
{
	font-size: 1.125rem;
	font-size: clamp(1.125rem, 0.9375rem + 0.9375vw, 1.5rem);
	font-weight: bold;
	color: white;
	text-shadow: -1px 0 blue, 0 1px blue, 1px 0 blue, 0 -1px blue;
	padding: 0 0 0 0.625rem;
	margin-bottom: 1.875rem;
}

h2 
{
	font-size: 1.125rem;
	font-size: clamp(1rem, 0.8875rem + 1.1875vw, 1.6rem);
	color: black;
	font-weight: bold;
	padding: 1rem 0 1rem 0;
}

h3 
{
	font-size: 1rem;
	font-weight: bold;	
	padding: 0.7rem 0 0.5rem 0;
}

p
{
	padding: 0 0 0.5rem 0;
}

a
{
	cursor: pointer;
}

a:focus {
  outline: auto 5px Highlight; /* for non-webkit browsers */
  outline: auto 5px -webkit-focus-ring-color; /* for webkit browsers */
}

a:hover
{
	transition: all ease-in-out 250ms;
}

.linkki
{
text-decoration: underline;
	color: blue;	
}
li
{
	padding-bottom: 3px;
	list-style: none;
}

.youtube-link img
{
	width: 50px;
	padding: 0;
	margin: 0;
}

.pikalinkit a
{
	text-decoration: underline;
	color: blue;
}


.pikalinkit span
{
	text-decoration: none;
	font-size: 1.5rem;
	display: inline-block;
	padding-left: 2px;
}

.linkki
{
	text-decoration: underline;
	color: blue;
}

.huomio 
{
	padding-left: 2rem;
	font-size: 0.9rem;
}

.alareuna
{
	display: block;
	text-align: center;
	margin-top: 0rem;
	margin-bottom: 1rem;
}

.alareuna a 
{
	border: 2px solid #00CC00;
	text-decoration: none;
	color: darkgreen;
	font-weight: bold;
	padding: 0.5rem;
	margin: 0;
	border-radius: 5px;
}

.alareuna span
{
	text-decoration: none;
	font-size: 1.8rem;
	display: inline-block;
	padding-left: 2px;
}

.alareuna a:hover
{
	background: white;
}

#omakanava img
{
	width: 30px;
	margin-bottom: -0.5rem;
	padding: 0;
}

/* -------------------------------------------------------------------------------- */
/* Pystysuuntainen navigointipalkki 												*/
/* -------------------------------------------------------------------------------- */

nav
{
    display: none;
	width: 99%;
}

.mainNav 
{
	display: block;
	float: none;
	margin: 0;
	padding: 10px 5px;
	list-style: none;
}
	  
.mainNav li 
{
	float: none;
	margin: 2px 0 0 0;
	padding: 0;
	min-width: 10rem;
}

.mainNav a 
{
	float: none;
	display: block;
	margin: 0;
	padding: 8px 8px;
	color: black;
	font-weight: bold;
	text-decoration: none;
	border: 2px solid #00CC00;
	border-radius: 5px;
	background: white;
}

.mainNav a:hover,
.mainNav a:focus-visible
{
	color: black;
	padding-bottom: 8px;
	background: rgba(248, 252, 202, 0.7);
	border: 2px solid blue;
}

/* -------------------------------------------------------------------------------- */
/* Navigoinnin Dropdown tyylit		 												*/
/* -------------------------------------------------------------------------------- */

.mainNav li ul
{
	visibility: hidden;
	display: none;
	max-width: 7rem;
	height: fit-content;
	flex-wrap: nowrap;
	flex-direction: column;	
}

.mainNav li ul li
{
	display: block; 
	font-size: 0.9rem;
	min-width: 9rem;
	padding: 0 0 0 1rem;
	height: fit-content;
	flex-wrap: nowrap;
	flex-direction: column;
}


.mainNav li a:hover
	{
		display: block;
	}	  

  	
.mainNav li:hover>ul,
.mainNav li:focus>ul
{
	display: flex;
	flex-wrap: nowrap;
	flex-direction: column;	
	visibility: visible;
	opacity: 1;
}
	
/* -------------------------------------------------------------------------------- */
/* Senhetkisen sivun osoitus navigoinnissa											*/
/* -------------------------------------------------------------------------------- */

body.index .mainNav a#index,
body.tekniikka .mainNav a#tekniikka,
body.blogi .mainNav a#blogi,
body.lisatietoa .mainNav a#lisatietoa,
body.suuret .mainNav a#suuret,
body.uusimmat .mainNav a#uusimmat,
body.seuraavat .mainNav a#seuraavat,
body.vanhimmat .mainNav a#vanhimmat,
body.perustiedot .mainNav a#perustiedot,
body.generaattorit .mainNav a#generaattorit,
body.moottorit .mainNav a#moottorit,
body.materiaalit .mainNav a#materiaalit
{
	padding-bottom: 8px;
	border: 2px solid green;
	color: darkgreen;
	font-weight: bold;
	background: rgba(248, 252, 202, 0.5);
}

/* -------------------------------------------------------------------------------- */
/* Mobiili navigoinnin kuva-asetus	 												*/
/* -------------------------------------------------------------------------------- */

.mobile-menu-btn
{
	display: flex;
	background-color: #fff;
	justify-content: center;
	width: 5rem;
	
	margin: 10px 0 12px 10px;
	border: 2px solid green;
	color: green;
	font-weight: bold;
	padding: 0.6rem 0.5rem 0.5rem 0.5rem;
	border-radius: 5px;
	z-index: 200;
}

.mobile-menu-btn:hover
{
	cursor: pointer;
	color: black;
	background: rgba(248, 252, 202, 0.7);
	transition: all ease-in-out 200ms;
}


.oheiskuvia
{
	display: none;
	text-align: center;
	padding-left: 1rem;
}

.pienikuva
{
	display: none;
}

.keskikuva
{
	display: none;
}

.tietosuojaseloste a
{
	text-decoration: underline;
	color: blue;
}

* -------------------------------------------------------------------------------- */
/* Taulukon perusasetukset															*/
/* -------------------------------------------------------------------------------- */

table
{
	width: 100%;
	background: white;
	border-collapse: collapse;
}

caption
{
	background: linear-gradient(to right, rgba(255,255,0,0.1), rgba(255,255,0,0.3));
	padding: 1rem 1rem 0.5rem 1rem;
	margin-top: 2rem;
	text-align: left;
	font-size: 1.2rem;
	font-weight: bold;
}

th
{
	text-align: left;
	padding: 0.5rem;
}

td img
{
	width: 30px;
	margin-bottom: -0.5rem;
}

tr
{
	background: hsla(59, 92%, 47%, 0.3);
	padding: 0.5rem;
}

tr:hover
{
	background: hsla(59, 92%, 47%, 0.5);
	transition: all ease-in-out 350ms;
}

tr:nth-of-type(2n)
{
	background: hsla(59, 92%, 47%, 0.2);
}

tr:nth-of-type(2n):hover
{
	background: hsla(59, 92%, 47%, 0.0);
}

/* -------------------------------------------------------------------------------- */
/*																					*/
/* KUN NÄYTTÖ ALLE 40rem															*/
/* eli käytännössä alle 640 pixeliä													*/
/* Tässä osiossa asetetaan taulukon asetuksia kapealla näytöllä						*/
/* -------------------------------------------------------------------------------- */

@media only screen and (max-width: 40em)
{
	th 
	{
		display: none;
	}

	td
	{
		display: block;
		padding: 0.5rem;
	}

	td:first-child
	{
		padding-top: 1rem;
	}

	td:last-child
	{
		padding-bottom: 1rem;
	}

	td::before
	{
		content: attr(data-cell) ": ";
		font-weight: bold;
	}
	
}

/* -------------------------------------------------------------------------------- */
/*																					*/
/* KUN NÄYTTÖ YLI 40em																*/
/* eli käytännössä yli 640 pixeliä													*/
/*																					*/
/* -------------------------------------------------------------------------------- */

@media only screen and (min-width: 40em)
{
	main 
	{
		padding: 1.25rem;
	}

	footer 
	{
		padding: 1.25rem;
	}

	/* -------------------------------------------------------------------------------- */
	/* Yksityiskohtaiset asetukset														*/
	/* -------------------------------------------------------------------------------- */

	h1 
	{
		font-size: 3rem;
		font-size: clamp(2rem, 1.4375rem + 2.8125vw, 3.125rem);
		padding: 1.5rem 1rem 0 1rem;
	}

	header p 
	{
		font-size: 1.5rem;
		font-size: clamp(1.25rem, 0.875rem + 1.875vw, 1.5rem);
		padding: 0 0 1.25rem 1.5rem;
	}

	.oheiskuvia
	{
		display: block;
		float: right;
		font-style: italic;
		font-size: 0.9rem;
	}

	.pienikuva, .keskikuva
	{
		display: block;
		width: 150px;
		border: none;
		border-radius: 10px;
		border: 1px solid green;
		text-align: center;
		
	}

	.keskikuva
	{
		width: 250px;
	}

	/* -------------------------------------------------------------------------------- */
	/* Vaakasuuntainen navigointipalkki 												*/
	/* -------------------------------------------------------------------------------- */

	nav
	{
		display: block;
	}

	.mobile-menu-btn
	{
		display: none;
	} 

	.mainNav 
	{
		float: left;
		display: block;
		margin-left: 5px;
	}

	.mainNav li 
	{
		float: left;
		margin: 2px 2px 0 0;
		min-width: 5rem;
		max-width: 10rem;
	}

	/* -------------------------------------------------------------------------------- */
	/* Navigoinnin Dropdown tyylit		 												*/
	/* -------------------------------------------------------------------------------- */

	.mainNav li ul:hover
	{
		visibility: visible;
		justify-content: space-between;
		display: block;
	}

	.mainNav li ul li
	{
		visibility: visible;
		min-width: 8.5rem;
		opacity: 1;
		display: flex;
	}

	.mainNav li:focus>ul,
	.mainNav li:hover>ul
	{
		display: flex;
		visibility: visible;
		opacity: 1;
	}

	/* -------------------------------------------------------------------------------- */
	/* Taulukon asetukset leveällä näytöllä												*/
	/* -------------------------------------------------------------------------------- */

	table
	{
		width: 100%;
		background: white;
		border-collapse: collapse;
	}

	caption
	{
		background: white;
		padding: 1rem;
		padding-left: 0.5rem;
		margin-top: 2rem;
		text-align: left;
		font-size: 1.2rem;
		font-weight: bold;
	}

	th
	{
		text-align: left;
		padding: 0.5rem;
		font-weight: 700;
	}

	td
	{
		padding: 0.5rem;
		min-width: 12rem;
	}

	#link /* Lisatietoa sivun taulukon Youtube-linkkisarake */
	{
		min-width: 5rem;
	}

	td img
	{
		width: 30px;
		float: left;
	}

	tr
	{
		padding: 1rem;
	}

}

/* -------------------------------------------------------------------------------- */
/*																					*/
/* PRINTTAUSASETUKSET																*/
/*																					*/
/* -------------------------------------------------------------------------------- */

@media print 
{

	h2
	{
		page-break-after: avoid;
	}

	h3
	{
		page-break-after: avoid;
	}

	p
	{
		page-break-inside: avoid;
	}

	nav 
	{
		display: none;
	}

	header
	{
		border: none;
		border-top: 1px solid blue;
		border-bottom: 1px solid blue;
		border-radius: unset;
	}

	.mobile-menu-btn
	{
		display:none;
	}

	.content
	{
		border: none;
	}

	.alareuna
	{
		display: none;
	}

	footer 
	{
		border: none;
		border-top: 1px solid blue;
		border-bottom: 1px solid blue;
		border-radius: unset;
	}
} 

/* -------------------------------------------------------------------------------- */
/* Printtausasetukset loppuu 														*/ 
/* -------------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------------- */
/*																					*/
/* UUSENERGIA OY:N NETTISIVUJEN TYYLITIEDOSTO LOPPUU								*/
/*																					*/
/* -------------------------------------------------------------------------------- */