/*  
Sticky Footer Solution
by Steve Hatcher 
http://stever.ca
http://www.cssstickyfooter.com
*/

* {
	margin:0;padding:0;
	}

html, body {
	height: 100%;
	}

#wrap {
	min-height: 100%;
	max-width: 1200px;
	margin: 0 auto;
	width:100%;
	position:relative;
	}

/*Opera Fix*/
body:before {
	content:"";
	height:100%;
	float:left;
	width:0;
	margin-top:-32767px;
  }	

/* Text */

* {
	color:#624F53;
}

h1,h2,h3,h4,h5,#nav a {
	font-family:'Julius Sans One', Arial, Helvetica, sans-serif;
	font-variant: all-small-caps;
	color: #62999C;
}
	
h1 {
	font-size:5em;
	line-height:60%;
	text-align:center;
	color:#624F53;
	text-shadow: 2px 2px 2px #DDD0E2;
	}
	
h1 span {
	font-size:0.4em;
	}
	

	
h2 {
	color:#62999C;
	font-size:2.4em;
	font-weight:bold;
	padding-bottom:12px;
	}
	
h3 {
	color:#62999C;
	font-size:1.4em;
	font-weight:bold;
	padding-top:12px;
	padding-bottom:12px;
	}
	
h4 {
	color:#62999C;
	font-size:1.2em;
	font-weight:bold;
	padding-top:12px;
	padding-bottom:6px;
	}	

.highlight-word {
  color: #226b6f !important; /* Or any color you like */
}

#nav a {
	font-size:1.8em;
	vertical-align:50%;
	font-weight: bold;
	}

#nav a:hover, #nav a.current {
	background-color: #e0f7f8; /* light teal background */
  border-top: 5px solid #62999c; /* keep your existing green */
  padding-top: 19px;
  color: #333;
}
	
a {
	color:#62999c;
	}
	
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
A:active {text-decoration: none;}
A:hover {text-decoration: none;  color:#624F53;}

p a {
	color:#624F53;
	font-weight:bold;
	padding:0;
	}
	
p A:hover {text-decoration: none; color:#624F53;}

p {
	font-family: 'Open Sans', Arial, Helvetica, sans-serif;
	font-size:0.95em;
	line-height:150%;
	padding-bottom:18px;
	margin-bottom: 0.6em;
	}
	
li {
	margin-left:18px;
	}
	
p span {
	font-weight:bold;
	}
	
.email {
	}

.tele {
	}	


@media screen and (min-width: 769px) {
    /* STYLES HERE */
		
	#header {
	/*height:112px; /* 144px - 32px */
		padding:57px 0 25px;
	background: url('images/Kotisivuun.png') repeat;
		}	
		
	#nav {
  border-top: solid 1px #62999c;
  width: 100%;
  text-align: center;
  padding-top: 24px;
}
		
	#nav a {
		height:16px;
		padding:24px 16px 0 16px;
		}

	#main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}


	#main-wrapper {
  max-width: 656px; /* Adjust as needed to match nav width */
  margin: 0 auto;    /* This centers it horizontally */
  padding: 0 20px;   /* Optional: spacing from edges on small screens */
}
	.hero-section {
  margin-bottom: 20px;
  text-align: center;
}
	
.intro-section {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
	.image-wrapper {
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  margin-top: 20px;
}
	.intro-image {
  flex: 0 0 300px;
}
	.isokuva {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0; /* prevent double rounding */
  box-shadow: none; /* ensure no shadow */
}

.intro-text {
  flex: 1;
  min-width: 300px;
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 20px;
}

	.intro-text p {
  margin-bottom: 0.8em;
  text-align: justify;
  hyphens: auto;
}
	@media (max-width: 768px) {
  .intro-section {
    flex-direction: column;
    align-items: center;
  }
}
	table td{
		width:100px;
		font-style:italic;
		}

	.leipis {
  column-gap: 40px;
  text-align: justify;
  hyphens: auto;
}
	.leipis p {
  text-align: justify;
}
	
	.highlight-word {
  color: #226b6f !important; /* Or any color you like */
}

.sidebar {
  flex: 1 1 300px;
  min-width: 280px;
  padding-left: 20px;
}
	
.sidebar table {
  width: 100%;
  border-collapse: collapse;
}
	.sidebar td {
  vertical-align: top;
  padding: 4px 8px;
}
	#footer {
		height:20px;
		text-align:center;
		clear:both;
		position:relative;
		bottom:0;
		margin-top:-50px;
		} 
		

	#yhteydenottokaavake {
		width:300px;
		position:relative;
		height:350px;
		display:block;
		padding-bottom:24px;
		}

	#yhteydenottokaavake p{
		padding-top:6px;
		padding-bottom:0;
		}
		
	input {
		max-width:400px;
		}
		
	textarea {
		width:400px;
		height:150px;
		}
		
	.success {
		color:#accc57;
		font-weight:bold;
		}

	.failure {
		color:#900900;
		font-weight:bold;
		}
		
	.submit {
		margin-top:6px;
		left:350px;
		position:relative;
		}
		
	.clear {
		clear:both;
		}
}

@media screen and (min-width: 481px) and (max-width: 768px) { 

	#header {
	/*height:112px; /* 144px - 32px */
		padding:57px 0 25px;
	background: url('images/Kotisivuun.png') repeat;
		}	
		
	#nav {
		padding-top:24px;
		height:48px; /* 104px - 32px */
		clear:both;
		/*width:656px;*/
		margin:0 auto;
		text-align:center;
		border-top:solid 1px #62999c;
		}
		
	#nav a {
		height:16px;
		padding:24px 16px 0 16px;
		}

	#main {
		width:960px;
		min-height:320px;
		padding-bottom: 50px; /* must be same height as the footer */
		padding-top:32px;
		margin:0 auto;
		}  

	.isokuva {
  width: 100%;
  height: auto;
  border-radius: 12px; /* Rounded corners */
}
		
	table td{
		width:60px;
		font-style:italic;
		}

	.leipis {
		width:58%;
		float: left;
		clear: left;
	}

	.sidebar {
		width: 30%;
		float: right;
		clear: right;
	}


	#footer {
		height:20px;
		text-align:center;
		clear:both;
		position:relative;
		bottom:0;
		margin-top:-50px;
		} 
		
 .sidebar {
 	clear: both;
 	float: left;

 }
}


 @media only screen and (max-width: 480px) {


	#header {
	/*height:112px; /* 144px - 32px */
		padding:24px 0;
	background:transparent url('images/Kotisivuun.png') repeat scroll;
		}	

	h1 {
		line-height:90%;
	}

	h1 span {
		line-height:40%;
	}
		
	#nav {
		padding-top:24px;
		clear:both;
		/*width:656px;*/
		margin:0 auto;
		text-align:center;
		border-top:solid 1px #62999c;
		border-bottom:solid 1px #62999c;
		}
		
	#nav a {
		height:16px;
		padding:24px 16px 0 16px;
		color: #226b6f; /* a stronger teal */
		text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
		}

	#nav a:hover, #nav a.current {
		border-top:none;
		padding-top:25px;
	}

	#main {
		min-height:320px;
		padding-bottom: 50px; /* must be same height as the footer */
		padding-top:32px;
		margin:0 15px;
		}  

	.isokuva {
		width:100%;
		float: left;
		clear:both;
		display: none;
	}
		
	table td{
	width:100px;
	font-style:italic;
		}

	.leipis {
  font-size: 0.95em;
  line-height: 1.4;
  max-width: 700px;
}

	.sidebar {
		float: right;
		clear: right;
	}


	#footer {
		height:20px;
		text-align:center;
		clear:both;
		position:relative;
		bottom:0;
		margin-top:-50px;
		} 
		
 .sidebar {
 	clear: both;
 	float: left;

 }

 }


}
