/* Сивас – phones and tablets. Nothing here applies above 980px: the desktop stays as it was. */
@media (max-width: 980px) {
	body { background-attachment: scroll; }
	.background { position: static; }
	#main, #wrapper, #main-content, #logo-w, #bottom { width: auto; }
	#main { margin: 0; }
	#wrapper { padding: 0; }
	#botr { display: none; }

	/* header: logo and globe on the left, the menu button on the right, the menu opens below as a list */
	#logo-w { height: auto; display: flex; align-items: center; flex-wrap: wrap; padding: 10px 12px; gap: 6px; border-bottom: 1px solid #999; background: #fff; }
	#logo-w .sv-home, .logo, .logo2 { position: static; }
	.logo { display: block; width: 200px; height: auto; }
	.logo2 { width: 44px; height: auto; }
	.sv-menu-toggle {
		display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 9px 14px;
		font: bold 13px Georgia, serif; color: #333; background: #F2F2F2;
		border: 1px solid #999; border-radius: 3px; cursor: pointer;
	}
	.sv-menu-toggle[aria-expanded="true"] { background: #fff; }
	.sv-menu-bars, .sv-menu-bars::before, .sv-menu-bars::after { display: block; width: 16px; height: 2px; background: #333; position: relative; content: ""; }
	.sv-menu-bars::before { position: absolute; top: -5px; }
	.sv-menu-bars::after { position: absolute; top: 5px; }
	#navr { position: static; width: 100%; height: auto; display: none; }
	#navr.is-open { display: block; }
	#nav ul { float: none; border-bottom: 0; }
	#nav ul li { float: none; height: auto; border-bottom: 1px solid #ccc; }
	#nav ul li a { line-height: 44px; font-size: 14px; margin: 0; padding: 0 12px; }

	/* columns: content first, then the left column (menus, search), then the right one */
	#main-content { display: flex; flex-direction: column; margin: 0; padding: 0 0 10px; background: #fff; }
	#main-content > .full { order: 1; }
	#main-content > #leftbar-w { order: 2; }
	#main-content > #rightbar-w { order: 3; }
	#main-content > .clr { display: none; }
	#comp_80 { width: auto; float: none; margin: 14px 12px 0; }
	#leftbar-w, #rightbar-w { float: none; width: auto; margin: 10px 12px 0; }
	#leftbar .module ul.menu li a, #rightbar .module ul.menu li a { padding: 9px 0 9px 10px; font-size: 13px; }
	#leftbar .search .inputbox { width: 60%; padding: 6px; font-size: 14px; }
	#leftbar .search .button { padding: 6px 12px; font-size: 14px; }
	.sv-twitter { margin: 14px 0 0; }
	#rightbar-w .sv-gambit { margin: 10px 0 5px; }

	/* content never wider than the screen */
	#comp_80 table { max-width: 100%; }
	#comp_80 td { overflow-wrap: anywhere; }
	#comp_80 { overflow-wrap: break-word; }
	#comp_80 a { overflow-wrap: anywhere; }   /* long URLs written as link text */
	#comp_80 iframe, #comp_80 object, #comp_80 embed { max-width: 100%; }
	#comp_80 [style*="width"] { max-width: 100% !important; box-sizing: border-box; }
	h1.contentheading { font-size: 21px; line-height: 26px; padding-right: 0; }
	.buttonheading { position: static; margin: -4px 0 8px; }
	.buttonheading a { padding: 8px 10px 8px 0; }   /* finger-sized print/e-mail icons */
	.blog h5 a { display: inline-block; padding: 5px 0; }
	tr.sectiontableentry1 td, tr.sectiontableentry2 td { padding: 8px 4px; line-height: 1.45; }   /* finger-sized rows, the lock stays on the line */
	.gallery .gallery-item { width: calc((100% - 16px) / 3); }
	.sv-albums { grid-template-columns: 1fr; }
	.sv-cookie { flex-direction: column; gap: 10px; padding: 12px 16px; font-size: 14px; }
	.sv-cookie button { width: 100%; }
	.copy { margin: 14px 10px; }
}
@media (max-width: 480px) {
	body { font-size: 14px; line-height: 1.65em; }
	.logo { width: 170px; }
	.gallery .gallery-item { width: calc((100% - 8px) / 2); }
}
