/*
Theme Name: دیوار آتش
Theme URI: https://aghajanisic.ir/
Author: صبانت
Description: دیوار آتش — امنیت سایت و وردپرس
Version: 1.0.0
Text Domain: divaratash
*/

:root {
	--ink: #e6eef8;
	--muted: #8fa3b8;
	--bg: #0b1420;
	--panel: #121e2e;
	--wall: #172636;
	--line: #2a3f56;
	--teal: #2ec4a6;
	--teal-dim: #1a7a68;
	--amber: #e6a23c;
	--alert: #e85d4c;
	--steel: #3d5a73;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	background:
		linear-gradient(180deg, #0a121c 0%, var(--bg) 45%, #0e1a28 100%);
	color: var(--ink);
	font-family: "Consolas", "Courier New", Tahoma, monospace;
	line-height: 1.7;
}
a { color: var(--teal); text-decoration: none; }
a:hover { color: #7dffe6; }
img { max-width: 100%; height: auto; display: block; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}

/* Firewall wall header */
.firewall {
	position: relative;
	overflow: hidden;
	min-height: 236px;
	background:
		linear-gradient(180deg, #081018 0%, #101c2a 55%, #152433 100%);
	border-bottom: 3px solid var(--teal-dim);
}
.firewall-mesh {
	position: absolute; inset: 0;
	background:
		repeating-linear-gradient(
			0deg,
			transparent,
			transparent 11px,
			rgba(46, 196, 166, 0.05) 11px,
			rgba(46, 196, 166, 0.05) 12px
		),
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 17px,
			rgba(61, 90, 115, 0.18) 17px,
			rgba(61, 90, 115, 0.18) 18px
		);
	opacity: .9;
}
.firewall-bricks {
	position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
	background:
		repeating-linear-gradient(
			90deg,
			#1a2d40 0 48px,
			#132233 48px 50px
		),
		linear-gradient(180deg, transparent, rgba(46,196,166,.12));
	border-top: 2px solid var(--steel);
	z-index: 1;
}
.firewall-pulse {
	position: absolute; left: 0; right: 0; top: 38%; height: 3px;
	background: linear-gradient(90deg, transparent, var(--teal), var(--amber), var(--teal), transparent);
	opacity: .75;
	animation: pulse-scan 3.2s linear infinite;
	z-index: 2;
}
@keyframes pulse-scan {
	0% { transform: translateX(-30%); opacity: .3; }
	50% { opacity: .9; }
	100% { transform: translateX(30%); opacity: .3; }
}
.firewall-brand {
	position: relative; z-index: 4;
	max-width: 1120px; margin: 0 auto;
	padding: 28px 16px 72px;
	display: flex; align-items: center; gap: 16px;
}
.firewall-brand .logo {
	width: 70px; height: 70px; flex: 0 0 auto;
	filter: drop-shadow(0 0 12px rgba(46, 196, 166, .35));
}
.brand-core {
	min-width: 0;
	padding: 8px 0;
}
.brand-core .name {
	display: block;
	font-size: 1.5rem;
	font-weight: 700;
	color: #f2f7fc;
	letter-spacing: .02em;
	line-height: 1.25;
	font-family: Tahoma, "Segoe UI", sans-serif;
}
.brand-core .tag {
	display: block;
	margin-top: 4px;
	font-size: .82rem;
	color: var(--muted);
	font-family: Tahoma, sans-serif;
}
.status-chips {
	margin-inline-start: auto;
	display: flex; flex-direction: column; gap: 6px;
	font-family: Consolas, monospace;
	font-size: .72rem;
}
.status-chips span {
	padding: 4px 10px;
	border: 1px solid var(--line);
	background: rgba(18, 30, 46, .85);
	color: var(--teal);
}
.status-chips span.warn { color: var(--amber); border-color: #6a4d1e; }
.status-chips span.hot { color: var(--alert); border-color: #6a2e28; }

/* Nav strip */
.fw-nav {
	background: #0e1a28;
	border-bottom: 1px solid var(--line);
}
.fw-nav-inner {
	max-width: 1120px; margin: 0 auto;
	padding: 0 14px;
	display: flex; align-items: center;
}
.nav-toggle { display: none; }
.nav-btn {
	display: none; width: 40px; height: 40px;
	align-items: center; justify-content: center; cursor: pointer;
}
.nav-btn span {
	display: block; width: 20px; height: 2px; background: var(--teal);
	box-shadow: 0 6px 0 var(--teal), 0 -6px 0 var(--teal);
}
.nav {
	display: flex; flex-wrap: wrap;
	padding: 6px 0;
	font-family: Tahoma, sans-serif;
}
.nav a {
	color: var(--muted);
	padding: 8px 12px;
	font-size: .9rem;
	border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.on {
	color: var(--teal);
	border-bottom-color: var(--teal);
}

/* LTR shell */
.shell {
	max-width: 1120px;
	margin: 18px auto 40px;
	padding: 0 14px;
	display: flex;
	flex-direction: row;
	gap: 20px;
	align-items: flex-start;
	direction: ltr;
}
.shell > main,
.shell > .rules {
	direction: rtl;
	text-align: right;
	font-family: Tahoma, "Segoe UI", sans-serif;
}
.shell > main { flex: 1 1 auto; min-width: 0; }
.shell > .rules { flex: 0 0 300px; width: 300px; }

/* Traffic status strip */
.traffic-bar {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 16px;
	padding: 10px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-inline-start: 4px solid var(--teal);
}
.traffic-bar .cell {
	padding: 8px 10px;
	background: rgba(11, 20, 32, .6);
	border: 1px solid var(--line);
	font-size: .8rem;
}
.traffic-bar .cell strong {
	display: block;
	font-family: Consolas, monospace;
	font-size: .72rem;
	color: var(--teal);
	margin-bottom: 2px;
	letter-spacing: .04em;
}
.traffic-bar .cell span { color: var(--muted); font-size: .78rem; }
.section-label {
	font-family: Consolas, monospace;
	font-size: .95rem;
	color: var(--teal);
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 1px dashed var(--line);
	letter-spacing: .04em;
}

/* Defense grid — not lead+rows */
.defense-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.packet {
	display: flex;
	flex-direction: column;
	background: var(--panel);
	border: 1px solid var(--line);
	border-top: 3px solid var(--steel);
	overflow: hidden;
	color: inherit;
	min-height: 100%;
	transition: border-color .15s ease, transform .15s ease;
}
.packet:hover {
	border-color: var(--teal);
	transform: translateY(-2px);
	color: inherit;
}
.packet-art {
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, #152433, #0e1a28);
	overflow: hidden;
	position: relative;
}
.packet-art img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.packet-art .empty {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	opacity: .4;
}
.packet-art .empty svg { width: 44px; height: 44px; }
.packet-body {
	padding: 12px 14px 14px;
	display: flex; flex-direction: column; gap: 5px; flex: 1;
}
.packet-body .kicker {
	font-size: .72rem;
	color: var(--amber);
	font-family: Consolas, monospace;
	letter-spacing: .03em;
}
.packet-body h2, .packet-body h3 {
	margin: 0;
	font-size: 1rem;
	line-height: 1.45;
	font-family: Tahoma, sans-serif;
	color: var(--ink);
	font-weight: 700;
}
.packet-body .meta {
	font-size: .76rem;
	color: var(--muted);
	font-family: Consolas, monospace;
}
.packet-body .excerpt {
	margin: 4px 0 0;
	font-size: .86rem;
	color: var(--muted);
	line-height: 1.6;
}
.packet.hero {
	grid-column: 1 / -1;
	flex-direction: row;
	border-top-color: var(--teal);
}
.packet.hero .packet-art {
	flex: 0 0 40%;
	aspect-ratio: auto;
	min-height: 190px;
}
.packet.hero .packet-body {
	flex: 1;
	justify-content: center;
	padding: 18px 20px;
}
.packet.hero .packet-body h2 { font-size: 1.3rem; }

/* Rules sidebar */
.rules {
	background: var(--panel);
	border: 1px solid var(--line);
	border-top: 3px solid var(--amber);
	padding: 14px;
}
.rules-head {
	display: flex; align-items: center; gap: 10px;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--line);
}
.rules-head svg { width: 34px; height: 34px; flex: 0 0 auto; }
.rules-head strong {
	display: block;
	font-family: Consolas, monospace;
	font-size: .98rem;
	color: var(--amber);
	letter-spacing: .03em;
}
.widget {
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px dashed var(--line);
}
.widget:last-child { border-bottom: 0; margin-bottom: 0; }
.widget-title {
	margin: 0 0 8px;
	font-size: .88rem;
	color: var(--teal);
	font-family: Consolas, monospace;
	border-inline-start: 3px solid var(--teal-dim);
	padding-inline-start: 8px;
}
.widget ul { margin: 0; padding: 0 1.1em 0 0; }
.widget li { margin-bottom: 6px; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--teal); }
.widget input[type="search"],
.widget input[type="text"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--line);
	background: #0b1420;
	color: var(--ink);
	font-family: Tahoma, sans-serif;
}
.behtarinseo { font-size: .85rem; line-height: 1.7; color: var(--ink); }
.behtarinseo a { color: var(--teal); }
.behtarinseo table { width: 100%; border-collapse: collapse; }
.behtarinseo td { padding: 4px 0; vertical-align: top; }
.behtarinseo div[style*="border"] {
	border-color: var(--line) !important;
	background: rgba(11,20,32,.5);
	margin-bottom: 4px;
	padding: 4px;
}

/* Entry */
.entry {
	background: var(--panel);
	border: 1px solid var(--line);
	border-top: 3px solid var(--teal);
	padding: 20px 22px 28px;
}
.entry-title {
	margin: 6px 0 8px;
	font-family: Tahoma, sans-serif;
	font-size: 1.5rem;
	color: #f2f7fc;
	line-height: 1.35;
}
.entry .kicker { color: var(--amber); font-size: .8rem; font-family: Consolas, monospace; }
.entry .meta { color: var(--muted); font-size: .85rem; margin-bottom: 14px; font-family: Consolas, monospace; }
.entry-thumb { margin: 0 0 16px; }
.entry-thumb img { width: 100%; }
.entry-content { font-size: .98rem; }
.entry-content p { margin: 0 0 1em; }
.entry-content h2, .entry-content h3 { color: var(--teal); font-family: Tahoma, sans-serif; }
.entry-content a { color: var(--teal); }

.site-footer {
	max-width: 1120px;
	margin: 0 auto 28px;
	padding: 14px 18px;
	text-align: center;
	font-family: Tahoma, sans-serif;
	font-size: .85rem;
	color: var(--muted);
	border-top: 1px solid var(--line);
}
.nav-links {
	display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
	font-family: Tahoma, sans-serif;
}
.nav-links a {
	padding: 6px 12px;
	border: 1px solid var(--line);
	background: var(--panel);
	color: var(--ink);
}
.nav-links a:hover { border-color: var(--teal); color: var(--teal); }
.comments-area { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); }

@media (max-width: 900px) {
	.shell { flex-direction: column; }
	.shell > .rules { flex: 1 1 auto; width: 100%; }
	.packet.hero { flex-direction: column; }
	.packet.hero .packet-art { flex: none; min-height: 160px; }
	.traffic-bar { grid-template-columns: 1fr 1fr; }
	.status-chips { display: none; }
}
@media (max-width: 640px) {
	.defense-grid { grid-template-columns: 1fr; }
	.traffic-bar { grid-template-columns: 1fr; }
	.firewall-brand { padding-bottom: 64px; }
	.nav-btn { display: flex; }
	.nav { display: none; width: 100%; flex-direction: column; }
	.nav-toggle:checked ~ .nav { display: flex; }
}
