/* ==========================================================
   Home page responsive fixes (loaded only by index.php)
   ========================================================== */

/* General safety: never let media overflow the viewport */
img,
iframe{
	max-width: 100%;
}

html,
body{
	overflow-x: hidden;
}

/* Upcoming events poster (was an inline width:37%) */
.event-poster{
	width: 37%;
	height: auto;
	display: inline-block;
}

/* Google map */
.home-map iframe{
	display: block;
	width: 100%;
	height: 450px;
}

/* ---------- MAX 1000px (tablet / mobile menu) ---------- */
@media only screen and (max-width: 1000px){

	/* Mobile menu: fit the screen instead of a fixed 400px */
	.nav-inner div.nav-menu{
		height: auto;
		max-height: calc(100vh - 75px);
		overflow-y: auto;
	}

	.nav-inner .logo a img{
		max-height: 55px;
	}

	.event-poster{
		width: 60%;
	}

	/* Facts: three even columns */
	#facts .inner .facts .fact,
	#facts .inner .facts .fact:last-child{
		width: 30%;
		min-width: 0;
		margin: 25px 1% 0;
		padding: 20px 10px;
	}

	#facts .inner .facts .fact h1{
		font-size: 48px;
	}

	#facts .inner .facts .fact h3{
		font-size: 17px;
	}
}

/* ---------- MAX 800px ---------- */
@media only screen and (max-width: 800px){

	/* What we do: stack text and gearbox image */
	.w-second-area{
		margin-top: 35px;
	}

	.w-second-area .w-left,
	.w-second-area .w-right{
		width: 100%;
		float: none;
		text-align: center;
	}

	.w-second-area .w-right{
		margin-top: 30px;
	}

	.w-second-area .w-right img{
		width: 80%;
		max-width: 500px;
	}

	/* About boxes: tidy spacing in 2 columns */
	#about .about-boxes .about-box{
		padding: 0 15px;
		margin-top: 30px;
	}

	/* Testimonials */
	.testimonials ul.text-slider li.text h1{
		font-size: 24px;
		line-height: 1.4;
	}

	.event-poster{
		width: 80%;
	}
}

/* ---------- MAX 640px (phones) ---------- */
@media only screen and (max-width: 640px){

	.inner{
		padding-top: 30px;
		padding-bottom: 30px;
	}

	.header{
		font-size: 28px;
		line-height: 1.25;
	}

	.description{
		font-size: 15px;
	}

	/* Hero */
	.home-inner.v2{
		padding: 0 20px;
	}

	.home-button-1{
		margin: 15px 3px 0;
		padding: 8px 16px;
	}

	/* About */
	#about .about-boxes{
		margin-top: 30px;
	}

	#about .about-boxes .about-box a.about-icon{
		width: 100px;
		height: 100px;
		line-height: 100px;
	}

	#about .about-boxes .about-box a.about-icon img{
		max-width: 60%;
	}

	#about .about-boxes .about-box h3{
		font-size: 18px;
	}

	/* Facts: stack */
	#facts .inner .facts .fact,
	#facts .inner .facts .fact:last-child{
		display: block;
		width: 100%;
		margin: 10px 0 0;
		padding: 15px 0;
	}

	#facts .inner .facts .fact h1{
		font-size: 42px;
	}

	/* Testimonials */
	.testimonials ul.text-slider li.text h1{
		font-size: 19px;
	}

	.testimonials .t-arrow{
		border-top-width: 20px;
		border-left-width: 20px;
		border-right-width: 20px;
		margin-left: -20px;
	}

	/* Events */
	.event-poster{
		width: 100%;
	}

	/* Contact form */
	#contact .contact{
		margin-top: 35px;
	}

	#contact .contact form .left,
	#contact .contact form .right{
		padding-left: 0;
		padding-right: 0;
	}

	#contact .contact form .col-xs-12{
		padding-left: 0;
		padding-right: 0;
	}

	#contact .contact form .form{
		font-size: 16px;
	}

	#contact .contact form .textarea{
		height: 160px;
	}

	#contact .contact form button.contact-form-button{
		width: 100%;
	}

	/* Address: long emails / phone numbers must wrap */
	#address .address-soft{
		width: 100%;
		padding: 30px 15px;
	}

	#address .address-soft h2.phone-text{
		font-size: 17px;
		line-height: 1.5;
		overflow-wrap: break-word;
		word-wrap: break-word;
	}

	#address .address-soft a.social{
		width: 50px;
		height: 50px;
		line-height: 52px;
		font-size: 22px;
	}

	/* Map */
	.home-map iframe{
		height: 300px;
	}

	/* Footer */
	footer.footer{
		padding: 25px 15px;
	}
}

/* ---------- MAX 480px ---------- */
@media only screen and (max-width: 480px){

	/* About boxes: single column */
	#about .about-boxes .about-box{
		width: 100%;
	}

	.w-second-area .w-right img{
		width: 100%;
	}

	#address .address-soft h2.phone-text{
		font-size: 15px;
	}

	.home-map iframe{
		height: 250px;
	}
}

/* ---------- MAX 360px: shrink reCAPTCHA (fixed 304px wide) ---------- */
@media only screen and (max-width: 360px){

	#contact .g-recaptcha{
		transform: scale(0.85);
		-webkit-transform: scale(0.85);
		transform-origin: 0 0;
		-webkit-transform-origin: 0 0;
	}
}
