@charset "utf-8";

@font-face {
	font-family: 'Vazirmatn';
	src: url('fonts/Vazirmatn-Regular.woff2') format('woff2'),
	url('fonts/Vazirmatn-Regular.woff') format('woff');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Vazirmatn';
	src: url('fonts/Vazirmatn-Bold.woff2') format('woff2'),
	url('fonts/Vazirmatn-Bold.woff') format('woff');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

body {
	direction: rtl;
	font-family: 'Vazirmatn', Tahoma, Geneva, sans-serif;
	font-size: 14px;
	background: url(images/top_bar.gif) repeat-x -5px 0;
	margin: 0;
	padding: 0;
}

#header {
	width: 100%;
	height: 300px;
	background: url(images/header.jpg) no-repeat center -4px;
	background-size: contain;
	position: relative;
	box-sizing: border-box;
}

.hamburger {
	width: 40px;
	height: 30px;
	position: absolute;
	top: 27px;
	right: 20px;
	cursor: pointer;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 6px 5px;
	border-radius: 5px;
	background-color: #fff;
}

.hamburger span {
	display: block;
	height: 5px;
	background: #333;
	border-radius: 3px;
	box-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.hamburger::before {
	content: "";
	position: absolute;
	top: 38px;
	right: 16px;
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-top: 15px solid #FFF;
	z-index: 1100;
}

.menu_bar {
	margin-top: 101px;
	margin-right: 20px;
	font-weight: bold;
	font-size: 14px;
	color: #FFF;
	position: absolute;
	top: 0;
	right: 0;
	display: none;
	flex-wrap: nowrap;
	gap: 15px;
	transition: max-height 0.3s ease;
	z-index: 1000;
}

.menu_bar.open {
	max-height: 1000px;
	display: flex;
}

.menu_bar:not(.open) {
	max-height: 0;
	overflow: hidden;
	padding: 0;
}

.menu_bar a {
	color: #FFF;
	text-decoration: none;
	white-space: nowrap;
	padding: 0 5px;
}

.menu_bar a:hover {
	color: #FFF;
	text-decoration: underline;
}

#page {
	display: flex;
	flex-wrap: wrap;
	margin: 0 auto;
	max-width: 940px;
	box-sizing: border-box;
	padding: 10px;
}

.main {
	order: 0;
	flex: 1 1 675px;
	padding: 10px;
	box-sizing: border-box;
	line-height: 1.5em;
	word-wrap: break-word;
	border: 0;
}

.sidebar_left {
	order: 1;
	width: 240px;
	padding: 10px;
	box-sizing: border-box;
	line-height: 1.5em;
}

.sidebar_left a:hover {
	color: #E60000;
	text-shadow: #666 2px 3px 3px;
}

.post_title {
	background: #FFF5EC;
	font-weight: bold;
	width: 100%;
	margin: 5px 0;
	padding: 7px;
	font-size: 14px;
}

.post_middle {
	margin-bottom: 5px;
	margin-right: 5px;
}

.post_bottom {
	background: #F9F9F9;
	font-style: italic;
	font-size: 12px;
	width: 100%;
	margin-bottom: 20px;
	padding: 3px;
	color: #666;
	text-align: left;
}

@media (max-width: 768px) {
	#page {
		flex-direction: column;
		padding: 0;
		overflow: hidden;
	}

	#header {
		background: url(images/header.jpg) no-repeat right -5px;
		background-size: contain;
		width: 900px;
	}

	.main {
		order: 0;
		width: 100%;
		padding: 10px 5px;
        flex: 0;
        margin: -35px 0 0 0;
	}

	.sidebar_left {
		order: 1;
		width: 100%;
		padding: 10px 5px;
        margin: -20px 0 0 0;
	}

	.hamburger::before {
		content: "";
		position: absolute;
		top: 38px;
		right: 16px;
		width: 0;
		height: 0;
		border-left: 0;
		border-right: 0;
		border-top: 15px solid #FFF;
		z-index: 1100;
	}

	.menu_bar {
		position: relative;
		max-height: 0;
		background-color: #FFF;
		flex-direction: column;
		border-radius: 10px;
		padding: 10px;
		display: none;
		cursor: pointer;
		color: #000;
	}

	.menu_bar a {
		color: #000;
		padding: 5px 0;
	}

	.menu_bar.open::before {
		content: "";
		position: absolute;
		top: -12px;
		right: 16px;
		width: 0;
		height: 0;
		border-left: 10px solid transparent;
		border-right: 10px solid transparent;
		border-bottom: 15px solid #FFF;
		z-index: 1100;
	}

	.menu_bar.open {
		height: auto;
		max-height: 1000px;
		display: flex;
		min-width: 200px;
		width: max-content;
	}

	.post_title {
		width: auto;
	}

	.post_middle {
		width: auto;
	}

	.post_bottom {
		width: auto;
        margin-bottom: 0px;
	}
}

a {
	text-decoration: none;
	color: #333;
}

.answer {
	border: 1px dashed #999;
	width: 100%;
	padding: 5px;
	margin: -15px 0 25px 0;
	display: block;
}

.answer:before {
	content: "پاسخ:";
}

.footer {
	border: 1px solid #999;
	width: 100%;
	margin: 3px;
	padding: 3px;
	text-align: center;
	box-sizing: border-box;
}

.sidebar_left, .main {
	float: none;
}

.overlay {
	display: none;
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	background-color: rgba(0, 0, 0, 0.4);
	z-index: 999;
}

body.menu-open .overlay {
	display: block;
}

#msg {
	width: 83%;
	min-width: 245px;
	margin: 0 0 0 40px;
}

#security_code {
	width: 72%;
	min-width: 100px;
}