/*
 * Reszponzív kiegészítés 980px alatti képernyőkre.
 * 980px felett nem lép életbe, ott a style.css eredeti elrendezése marad.
 * Az adminban szerkesztett tartalmak és a sablonok inline fix szélességeit
 * felülírja, ezért szerepel itt sok helyen !important.
 */
@media screen and (max-width: 979px) {

	html {
		-webkit-text-size-adjust:100%;
		text-size-adjust:100%;
	}

	body {
		font-size:14px;
		line-height:1.6em;
	}

	#page,
	#page * {
		box-sizing:border-box;
	}

	#page {
		width:auto;
	}

	#header_left,
	#header_right {
		display:none;
	}

	.left {
		float:none;
	}

	/* Fejléc: logó középen, menü alatta több sorba törve, nyelvválasztó a jobb felső sarokban */
	#header {
		position:relative;
		width:auto;
		height:auto;
		padding:10px 60px 0 60px;
		background-color:#002200;
		text-align:center;
	}

	#logo {
		float:none;
		width:95px;
		height:80px;
		margin:0 auto;
		background-size:95px 80px;
	}

	#menu {
		float:none;
		display:flex;
		flex-wrap:wrap;
		justify-content:center;
		margin:8px -60px 0 -60px;
		padding:0;
	}

	#menu li {
		height:auto;
		padding:12px 0;
	}

	#menu li a {
		margin-left:12px;
		margin-right:12px;
	}

	#menu li ul {
		margin-top:12px;
		z-index:10;
	}

	#lang_change {
		position:absolute;
		top:12px;
		right:10px;
		float:none;
		margin:0;
	}

	#header_tel {
		position:absolute;
		top:12px;
		left:10px;
		float:none;
		margin:0;
		font-size:13px;
	}

	/* Fejléckép */
	#top_image {
		width:auto;
		height:auto;
		padding:8px;
		margin-top:0;
	}

	#top_image img {
		width:100%;
		height:auto;
		margin-top:0 !important;
	}

	/* Tartalom doboz */
	#content {
		width:auto;
		min-height:0;
		margin-top:10px;
		padding:15px;
		border-width:8px;
		overflow:hidden;
		word-wrap:break-word;
	}

	#content h1,
	#content h2.h3 {
		font-size:20px;
		line-height:1.3em;
	}

	#content img {
		max-width:100%;
		height:auto !important;
	}

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

	#content [style*="justify"] {
		text-align:left !important;
	}

	/* Az adminban táblázattal tördelt tartalmak egymás alá kerülnek.
	   A háttérképes táblázatok (pl. az oszlopok rajzai) képként maradnak meg. */
	#content table:not([background]) {
		display:block;
		width:auto !important;
		height:auto !important;
	}

	#content table:not([background]) > tbody,
	#content table:not([background]) > tbody > tr,
	#content table:not([background]) > tbody > tr > td,
	#content table:not([background]) > tbody > tr > th {
		display:block;
		width:auto !important;
		height:auto !important;
	}

	/* a cellakeretek egymás alatt üres dobozokká válnának, csak a táblázat külső kerete marad */
	#content table:not([background]) > tbody > tr > td,
	#content table:not([background]) > tbody > tr > th {
		border:0;
	}

	#content table:not([background]) > colgroup {
		display:none;
	}

	#content table[background] {
		max-width:100%;
		margin:0 auto 10px auto;
		float:none;
	}

	/* Főoldal: szöveg és referencialista egymás alatt */
	#c1,
	#c2 {
		float:none !important;
		width:auto !important;
		height:auto !important;
		min-height:0 !important;
		margin:0 !important;
		padding:0 !important;
		border:none !important;
	}

	#c1 img[style*="float"] {
		max-width:45%;
	}

	#c2 {
		margin-top:20px !important;
		padding-top:15px !important;
		border-top:8px solid #E7ECDF !important;
	}

	#c2 table > tbody {
		column-count:2;
		column-gap:20px;
	}

	/* Kapcsolat oldal és más, inline lebegtetett oszlopok egymás alá */
	#content div[style*="float:left"],
	#content div[style*="float: left"] {
		float:none !important;
		width:auto !important;
	}

	#content iframe[src*="google.com/maps"] {
		width:100%;
		height:300px;
	}

	.contact_input,
	.contact_textarea {
		width:100%;
		max-width:420px;
		font-size:16px;
	}

	.contact_input {
		height:40px;
		line-height:40px;
	}

	.contact_submit {
		width:auto;
		height:44px;
		line-height:44px;
		padding:0 30px;
	}

	.contact_securimage {
		max-width:100%;
		margin-top:8px;
		margin-bottom:0;
	}

	/* Galéria és referencia pálya képek */
	/* két hasábos rács; a sablon fix 5/8 képenkénti sortörései itt nem kellenek */
	.fotok_elem {
		float:none;
		display:inline-block;
		vertical-align:top;
		width:calc(50% - 10px);
		margin:0 3px 6px 3px !important;
	}

	.fotok_elem + .clear {
		display:none;
	}

	.fotok_elem img {
		display:block;
		width:100%;
	}

	/* Lábléc */
	#footer {
		width:auto;
		height:auto;
		line-height:1.5em;
		margin:10px 0;
		padding:12px;
	}
}

/* Tableten a referencialista négy hasábos */
@media screen and (min-width: 600px) and (max-width: 979px) {

	#c2 table > tbody {
		column-count:4;
	}
}

/* Kisebb telefonokon a lebegtetett tartalmi képek teljes szélességűek */
@media screen and (max-width: 480px) {

	#content {
		padding:12px;
		border-width:6px;
	}

	#content img[style*="float"],
	#content img[align] {
		float:none !important;
		display:block;
		max-width:100%;
		margin:0 auto 10px auto !important;
	}

	#c1 img[style*="float"] {
		max-width:100%;
	}
}
