/* Mobile / tablet layout for takelagespb.ru
   Desktop styles stay untouched above 1024px. */

.nav-toggle,
.nav-check,
.m-bar {
	display: none;
}

@media screen and (max-width: 1024px) {
	html, body {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
		max-width: 100%;
		overflow-x: hidden;
	}

	body {
		background: #e5e5e5;
	}

	.wrapper,
	.wrapper * {
		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		box-sizing: border-box;
	}

	.wrapper {
		width: 100% !important;
		max-width: 100%;
		min-height: 0;
		background: #fff;
		-webkit-box-shadow: none;
		box-shadow: none;
		overflow-x: hidden;
	}

	img {
		max-width: 100%;
		height: auto;
	}
	.fancybox-wrap img,
	.fancybox-inner img,
	.fancybox-image {
		max-width: 100% !important;
		height: auto !important;
	}

	#header {
		height: auto !important;
		min-height: 0;
		padding: 12px 12px 0;
		background: none;
		overflow-x: hidden;
		overflow-y: visible;
	}

	#header:before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		height: 160px;
		background: url("/images/bg-header.jpg") no-repeat 50% 0;
		background-size: cover;
		z-index: 0;
		pointer-events: none;
	}

	#header > * {
		z-index: 1;
	}

	.logo,
	.phones,
	.address,
	.slider,
	#nav {
		position: relative;
		z-index: 1;
	}

	.nav-toggle {
		z-index: 30;
	}

	.header-brand {
		display: inline-block;
		max-width: calc(100% - 58px);
		padding: 6px 12px 8px 8px;
		background: rgba(12, 18, 8, 0.55);
		border-radius: 8px;
		position: relative;
		z-index: 2;
		vertical-align: top;
	}

	.logo {
		position: relative;
		top: auto;
		left: auto;
		display: block;
		padding: 18px 0 0 72px;
		height: 56px;
		font-size: 20px;
		background-size: 64px auto;
		max-width: 100%;
		color: #fff;
	}

	.logo:hover,
	.logo span,
	.logo:hover span {
		color: #fff;
	}

	.phones {
		position: relative;
		left: auto;
		top: auto;
		display: block;
		margin: 4px 0 0 72px;
		padding: 0;
		font-size: 15px;
		background: none;
		border-radius: 0;
	}

	.phones a,
	.phones a span {
		color: #fff !important;
	}

	.phones a {
		display: inline-block;
		line-height: 22px;
		margin-right: 12px;
		padding: 2px 0;
	}

	.address {
		position: relative;
		right: auto;
		top: auto;
		margin: 10px -12px 0;
		padding: 8px 14px;
		font-size: 13px;
		line-height: 1.4;
		background: #eef3ea;
		color: #2c2c2c;
		border-top: 1px solid #d5e0ce;
		border-bottom: 1px solid #d5e0ce;
	}

	.address br {
		display: none;
	}

	.nav-check {
		display: block;
		position: absolute;
		left: -9999px;
		width: 1px;
		height: 1px;
		margin: 0;
		padding: 0;
		opacity: 0;
		pointer-events: none;
	}

	.nav-toggle {
		display: block;
		position: absolute;
		top: 16px;
		right: 12px;
		z-index: 40;
		width: 48px;
		height: 48px;
		padding: 12px 10px;
		border: 0;
		border-radius: 4px;
		background: #457524;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
		pointer-events: auto;
	}

	.nav-toggle span {
		display: block;
		height: 3px;
		margin: 5px 0;
		background: #fff;
		border-radius: 2px;
	}

	#nav {
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		background: #3d5c28;
		display: none;
		width: auto;
		margin: 8px -12px 0;
	}

	.address {
		width: auto;
	}

	.nav-open #nav,
	.nav-check:checked ~ #nav {
		display: block;
	}

	.nav-open .nav-toggle span:nth-child(1),
	.nav-check:checked ~ .nav-toggle span:nth-child(1) {
		-webkit-transform: translateY(8px) rotate(45deg);
		transform: translateY(8px) rotate(45deg);
	}

	.nav-open .nav-toggle span:nth-child(2),
	.nav-check:checked ~ .nav-toggle span:nth-child(2) {
		opacity: 0;
	}

	.nav-open .nav-toggle span:nth-child(3),
	.nav-check:checked ~ .nav-toggle span:nth-child(3) {
		-webkit-transform: translateY(-8px) rotate(-45deg);
		transform: translateY(-8px) rotate(-45deg);
	}

	#nav ul {
		white-space: normal;
		text-align: left;
		font-size: 14px;
	}

	#nav ul li {
		display: block;
		margin: 0;
		font-size: 15px;
		border-bottom: 1px solid rgba(255,255,255,0.12);
	}

	#nav ul li a,
	#nav ul li a:hover,
	#nav ul li a.current {
		color: #fff;
		background: none;
		border-radius: 0;
		text-transform: none;
	}

	#nav ul li a span,
	#nav ul li a.current span {
		padding: 12px 16px;
		background: none;
	}

	#nav ul li a:hover,
	#nav ul li a.current {
		background: #2f4a1c;
	}

	.slider {
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		width: auto !important;
		max-width: none;
		height: auto;
		min-height: 110px;
		margin: 10px -12px 0;
		padding: 8px 0;
		background: #eef3ea;
		overflow: hidden;
	}

	.page-foto .slider {
		display: none !important;
		height: 0 !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden;
	}

	#container-slider,
	#container-slider3 {
		position: relative !important;
		left: 0 !important;
		top: 0 !important;
		width: 100% !important;
		max-width: 100%;
		height: auto !important;
		overflow-x: auto;
		overflow-y: hidden;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
		padding: 0 8px;
		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		box-sizing: border-box;
	}

	#container-slider a,
	.is-mobile-slider #container-slider a {
		position: relative !important;
		display: inline-block !important;
		left: auto !important;
		top: auto !important;
		width: auto !important;
		height: auto !important;
		margin: 0 6px 0 0;
	}

	#container-slider a img {
		height: 88px;
		width: auto;
		max-width: none;
		display: block;
	}

	#carouselLeft,
	#carouselRight,
	#carouselLeft3,
	#carouselRight3 {
		display: none !important;
	}

	#content {
		width: 100% !important;
		padding: 16px 12px 20px;
		float: none;
	}

	#maincol,
	#rightcol {
		float: none !important;
		width: 100% !important;
		text-align: left;
	}

	#maincol {
		margin-bottom: 18px;
	}

	#maincol table {
		width: 100% !important;
		max-width: 100%;
		display: block;
		overflow-x: auto;
	}

	#maincol iframe,
	#maincol object,
	#maincol embed {
		max-width: 100%;
	}

	.cta-smeta,
	.cta-smeta-text,
	.cta-smeta-btn {
		display: block;
		width: 100%;
	}
	.cta-smeta {
		padding: 12px;
	}
	.cta-smeta-text {
		padding: 0 0 10px;
	}
	.cta-smeta-btn {
		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		box-sizing: border-box;
		padding: 12px 16px;
		font-size: 15px;
		white-space: normal;
	}

	.writeuse-form {
		padding: 16px 12px 14px;
	}

	.writeuse-form input[type="text"],
	.writeuse-form input[type="tel"],
	.writeuse-form input[type="email"],
	.writeuse-form textarea,
	.form input[type="text"],
	.form input[type="tel"],
	.form input[type="email"],
	.form textarea,
	.writeuse-form .field-wrap {
		width: 100% !important;
		max-width: 100%;
	}

	.writeuse-form input[type="text"],
	.writeuse-form input[type="tel"],
	.writeuse-form input[type="email"],
	.writeuse-form textarea,
	.form input[type="text"],
	.form input[type="tel"],
	.form input[type="email"],
	.form textarea {
		font-size: 16px !important;
		line-height: 22px;
		padding: 10px 12px;
		margin-bottom: 10px;
	}

	.writeuse-form textarea,
	.form textarea {
		height: 150px !important;
		min-height: 150px;
	}

	.page-klients #maincol ul {
		padding: 0 !important;
		margin: 0 0 12px !important;
	}

	.page-klients #maincol ul li {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 0 8px 0 !important;
		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		box-sizing: border-box;
	}

	.writeuse-form .bttn,
	.form .bttn {
		width: 100%;
		font-size: 16px;
		padding: 12px 16px;
	}

	.services-list ul li a {
		padding: 14px 10px 14px 22px;
		font-size: 14px;
	}

	#footer {
		width: 100% !important;
		margin: 0;
		padding: 16px 12px 80px;
		background: #eef3ea;
		line-height: 18px;
		font-size: 13px;
	}

	#footer table,
	#footer tbody,
	#footer tr,
	#footer td {
		display: block;
		width: 100% !important;
		text-align: left;
	}

	#footer td {
		padding: 6px 0;
	}

	.copyright.left {
		float: none;
	}

	.m-bar {
		display: table;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 50;
		width: 100%;
		background: #457524;
		-webkit-box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
		box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
	}

	.m-bar a {
		display: table-cell;
		width: 50%;
		color: #fff;
		text-align: center;
		text-decoration: none;
		font-size: 13px;
		font-weight: bold;
		line-height: 18px;
		padding: 12px 6px;
		border-right: 1px solid rgba(255,255,255,0.2);
	}

	.m-bar a:last-child {
		border-right: 0;
	}

	.form-ok-dialog {
		width: 86%;
		max-width: 320px;
		margin: 30% auto 0;
	}

	.page-faq #maincol h1,
	.page-articles #maincol h1,
	.page-article #maincol h1 {
		font-size: 17px;
		line-height: 1.3;
	}

	.page-article #maincol p,
	.page-faq .faq-q,
	.page-faq .faq-a,
	.page-articles .ul-article li a {
		font-size: 14px;
		line-height: 1.5;
	}

	.fancybox-overlay {
		z-index: 10000 !important;
	}
	.fancybox-wrap {
		z-index: 10001 !important;
		max-width: calc(100vw - 16px) !important;
	}
	.fancybox-outer,
	.fancybox-inner,
	.fancybox-skin {
		max-width: 100% !important;
		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		box-sizing: border-box;
	}
}

@media screen and (max-width: 640px) {
	.logo {
		padding-left: 58px;
		font-size: 18px;
		background-size: 52px auto;
	}

	.header-brand {
		max-width: calc(100% - 56px);
		padding: 6px 10px 8px 6px;
	}

	.phones {
		margin-left: 58px;
		max-width: none;
	}

	.phones a {
		display: block;
		font-size: 16px;
		margin-right: 0;
	}

	.address {
		margin-left: -12px;
		margin-right: -12px;
	}

	#header:before {
		height: 186px;
	}

	#container-slider a img {
		height: 72px;
	}

	#maincol {
		text-align: left;
	}

	#maincol img {
		display: block;
		margin: 8px auto;
	}
	#maincol table img {
		display: inline-block;
		margin: 0;
	}

	.page-articles .ul-article li a {
		padding: 10px 28px 10px 12px;
	}

	.page-klients #maincol ul li {
		display: block !important;
		width: 100% !important;
		margin: 0 0 8px 0 !important;
	}

	.page-klients #maincol img {
		display: inline-block;
		margin: 4px 1%;
		max-width: 48%;
		height: auto;
		vertical-align: middle;
	}

	.page-foto #maincol table {
		display: table;
		overflow: visible;
	}
	.page-foto #maincol table td {
		padding: 4px;
		text-align: center;
		vertical-align: middle;
	}
	.page-foto #maincol table img {
		max-width: 100%;
		height: auto;
	}

	.fancybox-overlay {
		z-index: 10000 !important;
	}
	.fancybox-wrap {
		z-index: 10001 !important;
	}
	.fancybox-opened .fancybox-inner img,
	.fancybox-inner img {
		max-width: 100% !important;
		max-height: 72vh !important;
		width: auto !important;
		height: auto !important;
	}

}

@media screen and (max-width: 400px) {
	.m-bar a {
		font-size: 12px;
		padding: 11px 4px;
	}
}
