/* Wersja mobilna (telefony, wąskie okna) – nadpisuje stałe szerokości szablonu templatemo (940/960 px).
   Wczytywany po pozostałych arkuszach (index.php); na szerokich ekranach nic nie zmienia. */

@media (max-width: 760px) {
	html, body { overflow-x: hidden; }
	body { font-size: 13px; -webkit-text-size-adjust: 100%; }
	img, iframe, video { max-width: 100%; }
	input, select, textarea, button { font-size: 16px; }   /* bez automatycznego powiększania pól w iOS */

	/* --- nagłówek: logo z nazwą, język, wyszukiwarka, menu w jednym przewijanym pasku --- */
	#templatemo_site_title_bar_wrapper { height: auto; background: #dfe6ee; border-bottom: 1px solid #c6d0dc; }
	#templatemo_site_title_bar { width: auto; height: auto; padding: 6px 10px 0; background: none; display: flex; flex-wrap: wrap; align-items: center; }
	#site_title { float: none; width: auto; padding: 0; text-align: left; order: 1; flex: 1 1 auto; }
	#site_title h1 a { justify-content: flex-start; gap: 8px; }
	#site_title h1 a img { width: 40px; height: 48px; }
	#site_title h1 a span { width: auto; font-size: 11px; line-height: 1.3; letter-spacing: .5px; }
	#templatemo_site_title_bar #lang_box { order: 2; float: none; width: auto; height: auto; margin: 0; padding: 0; font-size: 0; }
	#templatemo_site_title_bar #lang_box select { font-size: 14px; padding: 2px; }
	#templatemo_site_title_bar #search_box { order: 3; float: none; flex: 1 1 100%; height: auto; margin: 6px 0 0; padding: 0; }
	#search_box form { float: none; display: flex; gap: 6px; height: auto; }
	#searchfield { flex: 1 1 auto; width: auto !important; min-width: 0; height: 36px !important; box-sizing: border-box; font-size: 16px !important; }
	#searchbutton { flex: none; width: 90px !important; height: 36px !important; }
	#templatemo_site_title_bar #templatemo_menu { order: 4; float: none; flex: 1 1 100%; height: auto; padding: 6px 0 0; margin: 0 -10px;
		display: flex; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	#templatemo_site_title_bar #templatemo_menu::-webkit-scrollbar { display: none; }
	#templatemo_menu li { display: block; flex: none; }
	#templatemo_menu li:first-child a { margin-left: 10px; }
	#templatemo_menu li a { float: none; margin: 0 0 6px 6px; padding: 6px 10px 0; font-size: 13px; }

	/* pasek pod nagłówkiem (Poznań Project, wyszukiwanie rozszerzone) */
	#templatemo_banner_top { height: auto; background: #8ec5f5; }
	#templatemo_banner_top_inside { width: auto; height: auto; padding: 0 10px; display: flex; flex-wrap: wrap; justify-content: space-between; }
	#top_links { float: none; width: auto; margin: 0; font-size: 11px; line-height: 28px; }
	#top_links span { display: none; }
	#top_expand { float: none; width: auto; height: auto; }
	#search_slider { height: auto; background: #eef4fb; }
	#search_ext_body, #search_person_box, #search_place_box { width: auto !important; height: auto; max-width: 100%; }
	#search_ext_body { padding: 0 8px; box-sizing: border-box; }
	.search_person { border-bottom: 1px dotted #bbb; padding-bottom: 4px; }
	.search_person .person_option { float: none; display: inline-block; vertical-align: top; }
	.search_person .person_option input[type=text] { max-width: 150px; }
	.search_person .person_option[style*="width:200px"] { width: auto !important; min-width: 170px; }
	input[id^="personsim"] { width: 40px !important; }   /* „100” mieści się przy większej czcionce */
	#search_year_box > div[style*="width: 600px"] { width: auto !important; padding: 0 14px 0 10px !important; }
	#search_year_box input { width: 52px !important; }
	#search_ext_body [style*="width: 600px"], #search_ext_body [style*="width:600px"] { width: auto !important; max-width: 100%; }
	#templatemo_banner_bottom { height: 8px; }

	/* --- treść --- */
	#templatemo_content { width: auto; padding: 10px; }
	#templatemo_content #twitter_section p.head { width: auto; font-size: 20px !important; line-height: 1.3; }
	.section_w940, .section_w450 { float: none; width: auto; }
	.margin_r_40, .margin_r_20 { margin-right: 0; }
	.box { float: none; width: auto; padding: 0 0 14px; }
	.box_border { border-right: 0; border-bottom: 1px dotted #999; margin-bottom: 14px; }
	#templatemo_content [style*="width: 320px"], #templatemo_content [style*="width:320px"] { width: auto !important; float: none !important; }
	#templatemo_content table { display: block; max-width: 100%; overflow-x: auto; }   /* szerokie tabele przewijane w poziomie */
	h2 { font-size: 20px; line-height: 1.25; }

	/* wyniki wyszukiwania */
	.result_box { width: auto; padding: 10px 6px; box-sizing: border-box; }
	.lbox, .rbox, .result_box .lbox { float: none; width: auto !important; }
	.rbox { margin-top: 6px; }

	/* strona główna: „O projekcie”, pod nim wsparcie – przed „Twój profil” / „Dołącz do projektu” (main.php) */
	.about-mobile, .support-mobile { display: block; }
	.about-desktop, .support-desktop { display: none; }

	/* stopka */
	#templatemo_footer { width: auto; padding: 30px 12px 16px; }
	#templatemo_footer .section_w240 { float: none; width: auto; padding: 0 0 12px; }

	/* okienka (facebox) mieszczą się na ekranie */
	#facebox { left: 4px !important; right: 4px; }
	#facebox .popup, #facebox .content { max-width: calc(100vw - 16px); box-sizing: border-box; }
	#facebox .content { width: auto !important; overflow-x: auto; }
}
