/*
Theme Name: Ipi Kulmakuppila
Theme URI:
Description: Theme for Ipi Kulmakuppila
Author: Timo Viikari
Author URI: http://www.greedy.fi/
Version: 1.0
*/

/* Reset */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font-weight: normal;
	vertical-align: baseline;
	-webkit-text-size-adjust: none;
}
html, body {
	width: 100%;
	height: 100%;
}
body {
	font-family: "Enriqueta", Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background: url(images/bg.jpg) no-repeat;
	background-attachment: fixed;
	background-size: cover;
	background-color: #e9e9e9;
}

/* general fonts */
h2 {
	font-size: 27px;
	line-height: 29px;
	font-weight: 700;
	color: #e14b0a;
	margin: 10px 0 30px 0;
	text-transform: uppercase;
}
h3 {
	font-size: 20px;
	line-height: 27px;
	font-weight: 700;
	color: #e14b0a;
}
p {
	font-size: 20px;
	line-height: 27px;
	color: #e14b0a;
	margin: 0 0 25px 0;
}
a {
	color: #004b64;
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
strong {
	font-weight: 700;
}

/* content width */
.pagewidth {
	max-width: 976px;
	margin: 0 auto;
	padding: 0 10px 50px 10px;
}
#content {
	margin: 105px 0 0 0;
	font-size: 20;
}

/* header */
#content .logo {
	margin: 0 0 37px 0;
}

/* navigation is in external stylesheet */

/* boxes */
#content .box {
	display: inline-block;
	vertical-align: top;
	width: 312px;
	height: 312px;
	margin: 5px;
	/*-webkit-transition: all 0.6s ease-in-out;
	-moz-transition: all 0.6s ease-in-out;
	-o-transition: all 0.6s ease-in-out;
	-ms-transition: all 0.6s ease-in-out;
	transition: all 0.6s ease-in-out;*/
}
#content .box.navi {
	height: 634px;
}
#content .box.text {
	width: 634px;
	height: 634px;
	background-color: #fff;
}
#content .box.text img {
	max-width: 100%;
	height: auto;
}
#content .box.link {
	background-color: #fff;
}
#content .box.link p {
	color: #004b64;
	font-size: 27px;
	line-height: 31px;
}
#content .box.link a {
	text-decoration: underline;
}
#content .box.calendar {
	background-color: #fff;
}
#content .box.calendar p {
	color: #e14b0a;
	font-size: 32px;
	line-height: 37px;
}
#content .box.calendar a {
	color: #e14b0a;
}
#content .box.address {
	background-color: #a5b4b4;
}
#content .box.address p {
	color: #fff;
	font-size: 17px;
	line-height: 21px;
}
#content .box.address strong {
	font-size: 18px;
	line-height: 25px;
}
#content .box.address a {
	color: #fff;
}

/* box margins */
#content .box.text .content {
	padding: 30px 80px 30px 40px;
}
#content .box.text.gallery .content {
	padding: 30px 39px 30px 40px;
}
#content .box.link .content, #content .box.calendar .content {
	padding: 30px 40px 30px 40px;
}
#content .box.address .content {
	padding: 165px 40px 30px 40px;
}

/* gallery */
#content .box.text.gallery {
	min-height: 634px;
}
#content .box.text.gallery ul {
	list-style: none;
}
#content .box.text.gallery li {
	margin: 0 0 15px 0;
}
#content .box.text.gallery p {
	font-size: 15px;
	line-height: 20px;
}
#content .box.text.gallery .pictures-medium {
	position: relative;
	margin: 0 0 9px 0;
}
#content .box.text.gallery .rslides_nav {
	position: absolute;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	top: 50%;
	left: 12px;
	text-indent: -9999px;
	text-decoration: none;
	width: 15px;
	height: 27px;
	background: transparent url('images/gallery-arrows.png') no-repeat left top;
	margin-top: -13px;
	overflow: hidden;
	z-index: 3;
}
#content .box.text.gallery .rsslides_nav:active {
	opacity: 1.0;
}
#content .box.text.gallery .rslides_nav.next {
	left: auto;
	background-position: 0 -27px;
	right: 12px;
}

/* fancy box modification */
.fancybox-opened .fancybox-skin {
	-webkit-box-shadow: none !important;
	-moz-box-shadow: none !important;
	box-shadow: none !important;
}
.fancybox-close {
	position: absolute;
	top: 0px;
	right: 0px;
	width: 36px;
	height: 36px;
	cursor: pointer;
	z-index: 8040;
}
.fancybox-close {
	background-image: url('images/btn-close.png');
	background-size: 15px 14px;
	background-repeat: no-repeat;
	background-position: center center;
}
.fancybox-nav {
	position: absolute;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	top: 50%;
	left: 12px;
	text-indent: -9999px;
	text-decoration: none;
	width: 15px;
	height: 27px;
	background: transparent url('images/gallery-arrows.png') no-repeat left top;
	margin-top: -13px;
	overflow: hidden;
	z-index: 3;
}
.fancybox-nav:hover span {
	visibility: hidden;	
}
.fancybox-next {
	left: auto;
	background-position: 0 -27px;
	right: 12px;
}
/** MEDIA QUERIES **/

@media screen and (max-width: 985px) {
	
	#content .pagewidth {
		max-width: 644px;
		margin: 0 auto;
		padding: 0 10px 50px 10px;
	}
}

@media screen and (max-width: 768px) {	
	
}

@media screen and (max-width: 667px) {
	
	#content {
		margin: 35px 0 0 0;
	}
	#content .pagewidth {
		padding: 0 10px 30px 10px;
	}
	#content .logo {
		margin: 0 0 35px 20px;	
	}
	#content .logo img {
		width: 200px;
		height: 152px;
	}
	#content .box {
		display: block !important;
		margin: 5px 0 5px 0;
	}
	#content .box.text {
		width: 100%;
		height: auto !important;
		margin: 0;
	}
	#content .box.text .content {
		padding: 20px 20px 55px 20px;
	}
	#content .box.text.gallery {
		min-height: 0px;
	}
	#content .box.text.gallery .content {
		padding: 20px 20px 55px 20px;
	}
	#content .box.image, #content .box.link, #content .box.calendar, #content .box.map, #content .box.address {
		display: none !important;
	}
	
	#content.frontpage .box.mobilefrontpage {
		display: block !important;
	}
	
	/* gallery */
	#content .box.text.gallery li {
		position: relative !important;
		display: block !important;
		opacity: 1 !important;
		float: none !important;
	}
	#content .box.text.gallery .rslides_nav {
		display: none;
	}
	.rslides img {
		float: none !important;
	}
	#content .box.text.gallery .pictures-medium {
		margin: 0 0 31px 0;
	}
	#content .box.text.gallery p {
		font-size: 12px;
		line-height: 15px;
	}
	
	h2 {
		font-size: 23px;
		line-height: 25px;
	}
	h3 {
		font-size: 16px;
		line-height: 23px;
	}
	p {
		font-size: 16px;
		line-height: 23px;
	}
}
@media screen and (max-width: 320px) {
	
	#content .logo img {
		width: 150px;
		height: 114px;
	}
	#content .box {
		display: inline-block;
		vertical-align: top;
		width: 300px;
		height: 300px;
	}
	#content .box img {
		max-width: 300px;
		max-height: 300px;
	}
}
