#header {
	box-sizing: border-box;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 960px;
	height: auto;
	min-height: 140px;
	padding: 16px 20px;
	background: linear-gradient(135deg, #ffd31a, #ffec91);
}

#logo {
	float: none;
	width: auto;
	height: auto;
	text-align: right;
}

#logo h1, #logo h2 {
	float: none;
	margin: 0;
	padding: 0;
	color: #124e68;
}

#logo h1 {
	font-size: 2.6em;
	line-height: 1.15;
}

#logo h2 {
	font-size: 1.35em;
	line-height: 1.4;
}

#menu {
	float: none;
}

#login .category-search {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
}

.category-search-field {
	position: relative;
	flex: 1 1 100%;
	min-width: 0;
}

#login .category-search input[type="text"],
#login .category-search select {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 8px;
	border: 1px solid #aebdcb;
	border-radius: 4px;
	font-size: 16px;
}

.category-search-button {
	min-height: 44px;
	padding: 8px 18px;
	border: 0;
	border-radius: 4px;
	background: #ffd31a;
	color: #124e68;
	font: inherit;
	font-weight: bold;
	cursor: pointer;
}

.category-suggestions {
	position: absolute;
	z-index: 10;
	top: 100%;
	right: 0;
	left: 0;
	max-height: 240px;
	overflow-y: auto;
	margin: 2px 0 0;
	padding: 0;
	border: 1px solid #aebdcb;
	border-radius: 4px;
	background: #fff;
	list-style: none;
	text-align: right;
}

.category-suggestions li {
	padding: 10px 12px;
	color: #172f40;
	cursor: pointer;
}

.category-suggestions li:hover,
.category-suggestions li[aria-selected="true"] {
	background: #e6f0ff;
}

.category-search-status {
	color: #8a1b1b;
	font-size: 0.9em;
}

@media (max-width: 1000px) {
	*, *::before, *::after {
		box-sizing: border-box;
	}

	body {
		margin: 0;
	}

	#header, #content, #footer {
		width: 100%;
	}

	#header {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		min-height: 0;
		padding: 16px;
	}

	#menu {
		float: none;
	}

	#menu object, #menu embed {
		display: none;
	}

	#menu ul {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		padding: 0;
		direction: rtl;
	}

	#menu ul[style] {
		padding-top: 0 !important;
	}

	#menu li {
		flex: 1 1 120px;
	}

	#menu a {
		display: flex;
		float: none;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 44px;
		height: auto;
		margin: 0;
		padding: 8px;
		border-radius: 6px;
		background: #fff3bb;
	}

	#menu a:hover, #menu .active a {
		background: #fff;
	}

	#content {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 16px;
		padding: 16px;
	}

	#sidebar, #main, #sidebar2 {
		float: none;
		min-width: 0;
		padding: 0;
	}

	#sidebar {
		width: 180px;
	}

	#main {
		flex: 1 1 480px;
		width: auto;
	}

	#sidebar2 {
		width: 100%;
	}

	#content > div[style*="clear"] {
		display: none;
	}

	#footer {
		height: auto;
		padding: 16px;
	}

	img, object, embed, iframe {
		max-width: 100%;
	}

	img {
		height: auto;
	}

	#main, #sidebar, #sidebar2, #footer {
		overflow-wrap: anywhere;
	}

	#main table, #main textarea, #main input, #main select,
	#PopUp, #PopUp textarea {
		max-width: 100%;
	}

	.card-header, .card-header-gold {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 4px 12px;
		height: auto;
		min-height: 33px;
		padding: 4px 8px;
	}

	.card-header-left, .card-header-right {
		float: none;
		min-width: 0;
		padding: 0;
	}

	.card-header-gold {
		background-color: #f9e6a4;
	}

	.card-header {
		background-color: #f3f6fd;
	}

	#sponsors ul {
		columns: 2;
		column-gap: 24px;
	}

	#sponsors li {
		break-inside: avoid;
	}
}

@media (max-width: 680px) {
	body {
		font-size: 16px;
	}

	#header {
		padding: 14px 12px 12px;
	}

	#logo h1 {
		font-size: 2em;
	}

	#logo h2 {
		font-size: 1.05em;
	}

	#content {
		gap: 14px;
		padding: 12px;
	}

	#sidebar, #main, #sidebar2 {
		flex: 0 0 100%;
		width: 100%;
	}

	#sidebar .boxed .content {
		padding: 12px;
	}

	#login form:not(.category-search) {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	#login form:not(.category-search) select {
		flex: 1;
		min-width: 0;
		max-width: 100%;
		min-height: 44px;
		font-size: 16px;
	}

	.category-search-field {
		flex: 1 1 160px;
	}

	#login form a, #login form input[type="image"] {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}

	#login .content > br, #ad120x600 {
		display: none;
	}

	.post .title {
		font-size: 1.2em;
		line-height: 1.4;
		padding: 10px 12px;
	}

	.post .story {
		padding: 12px;
		line-height: 1.6;
	}

	.card-header, .card-header-gold {
		direction: rtl;
	}

	.card-header-right {
		order: -1;
	}

	.card-header h2, .card-header-gold h2 {
		font-size: 1.05em;
	}

	.post .meta p {
		float: none;
		padding: 12px;
	}

	#main table {
		width: 100%;
		table-layout: fixed;
	}

	.form_style tr, .form_style td {
		display: block;
		width: 100%;
	}

	.form_style td {
		text-align: right;
	}

	.form_style input:not([type="checkbox"]):not([type="image"]),
	.form_style select, .form_style textarea {
		width: 100% !important;
		min-height: 44px;
		font-size: 16px;
	}

	.form_style textarea {
		min-height: 140px;
	}

	.form-autocomplete-field {
		width: 100%;
	}

	#PopUp {
		width: 100% !important;
		height: auto !important;
	}

	#sponsors .content {
		padding: 12px;
	}

	#sponsors li a {
		display: inline-block;
		padding: 4px 0;
	}
}

@media (max-width: 360px) {
	#sponsors ul {
		columns: 1;
	}
}
