/*
Theme Name: اتاق کنجکاوی
Theme URI: https://jalebz.ir/
Author: جالبز
Description: قالب اتاق کنجکاوی — تفریحی، سرگرمی و علمی برای برند جالبز
Version: 1.0.0
Text Domain: otagh-konj
*/

@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600;700;800&display=swap");

:root {
	--wall: #14323a;
	--wall-deep: #0d2329;
	--desk: #3a271c;
	--desk-edge: #24160f;
	--brass: #c9a14a;
	--brass-soft: #e2c478;
	--lamp: #ffd58a;
	--teal: #1aa896;
	--teal-deep: #0e6f63;
	--paper: #e9eef2;
	--ink: #142028;
	--muted: #5a6a74;
	--shelf: #2b1c14;
	--card: #f7fafb;
	--line: #c5d0d6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background:
		radial-gradient(ellipse at 20% 0%, rgba(26, 168, 150, .12), transparent 42%),
		linear-gradient(180deg, var(--wall-deep) 0%, var(--wall) 180px, #d7dee4 180px, var(--paper) 100%);
	color: var(--ink);
	font-family: "Vazirmatn", Tahoma, sans-serif;
	line-height: 1.75;
}
a { color: var(--teal-deep); text-decoration: none; }
a:hover { color: var(--teal); }
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);
}

.site { min-height: 100vh; }

/* —— Workbench header scene —— */
.workbench {
	position: relative;
	isolation: isolate;
	min-height: 280px;
	overflow: hidden;
	background: linear-gradient(180deg, #0b1c22 0%, #16343c 55%, #2a1c14 55%, #3a271c 100%);
	border-bottom: 4px solid var(--brass);
}
.workbench-art {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.workbench-glow {
	position: absolute;
	left: 12%;
	top: 8%;
	width: 220px;
	height: 220px;
	background: radial-gradient(circle, rgba(255, 213, 138, .35), transparent 68%);
	filter: blur(4px);
	pointer-events: none;
}
.nameplate {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 16px;
	max-width: 720px;
	margin: 28px 4% 0 auto;
	padding: 14px 18px 16px;
	background:
		linear-gradient(180deg, #1a2f36 0%, #12262c 100%);
	border: 2px solid var(--brass);
	box-shadow:
		0 0 0 4px rgba(201, 161, 74, .18),
		0 18px 0 rgba(0, 0, 0, .28);
	transform: rotate(-1.2deg);
}
.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--brass-soft);
}
.logo {
	width: 86px;
	height: 72px;
	flex: 0 0 86px;
	filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35));
}
.brand-name {
	display: block;
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--lamp);
	text-shadow: 0 2px 0 #0a161a;
}
.brand-desc {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	font-weight: 600;
	color: #9eb8bf;
}

/* —— Toolbelt nav (separate bar) —— */
.toolbelt {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 4%;
	background:
		repeating-linear-gradient(
			90deg,
			#2a1c14 0 18px,
			#24160f 18px 20px
		);
	border-top: 3px solid #4a3426;
	border-bottom: 6px solid #120c09;
	box-shadow: inset 0 8px 0 rgba(255, 255, 255, .04);
}
.toolbelt .nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	width: 100%;
}
.toolbelt .nav a {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 6px 14px;
	background: linear-gradient(180deg, #4a3426, #312218);
	border: 1px solid #6a4a32;
	border-bottom-width: 3px;
	border-radius: 4px 4px 2px 2px;
	color: #f0e2c4;
	font-size: 14px;
	font-weight: 700;
	box-shadow: 0 1px 0 rgba(255, 213, 138, .15);
}
.toolbelt .nav a:hover,
.toolbelt .nav a.on {
	background: linear-gradient(180deg, var(--teal), var(--teal-deep));
	border-color: #0a5a50;
	color: #fff;
}
.nav-toggle { display: none; }
.nav-btn {
	display: none;
	width: 44px;
	height: 38px;
	border: 1px solid #6a4a32;
	background: #312218;
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.nav-btn span,
.nav-btn span:before,
.nav-btn span:after {
	display: block;
	width: 18px;
	height: 2px;
	background: #f0e2c4;
	position: relative;
}
.nav-btn span:before,
.nav-btn span:after {
	content: "";
	position: absolute;
	left: 0;
}
.nav-btn span:before { top: -6px; }
.nav-btn span:after { top: 6px; }

/* —— Layout: main left, shelf right —— */
.room {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 28px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 28px 4% 48px;
	align-items: start;
	/* physical: content left, shelf right (rule); keep RTL text inside */
	direction: ltr;
}
.room > main,
.room > .shelf {
	direction: rtl;
	min-width: 0;
}

/* Specimen trays (wide horizontal) */
.tray-stack {
	display: grid;
	gap: 18px;
	margin-bottom: 28px;
}
.specimen {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 0;
	background: var(--card);
	border: 1px solid var(--line);
	box-shadow: 8px 8px 0 rgba(20, 50, 58, .08);
	overflow: hidden;
}
.specimen:nth-child(even) {
	grid-template-columns: minmax(0, 1fr) 220px;
}
.specimen:nth-child(even) .specimen-art { order: 2; }
.specimen:nth-child(even) .specimen-copy { order: 1; }
.specimen-art {
	display: block;
	min-height: 160px;
	background:
		linear-gradient(135deg, #1a3a42 0%, #2a4a52 100%);
	overflow: hidden;
}
.specimen-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	min-height: 160px;
}
.specimen-copy {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	border-right: 4px solid var(--teal);
}
.specimen:nth-child(even) .specimen-copy {
	border-right: 0;
	border-left: 4px solid var(--brass);
}
.tag {
	display: inline-block;
	align-self: flex-start;
	padding: 2px 10px;
	background: #12343c;
	color: var(--lamp);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
}
.specimen h2 {
	margin: 0;
	font-size: clamp(18px, 2.4vw, 24px);
	line-height: 1.45;
	font-weight: 800;
}
.specimen h2 a { color: var(--ink); }
.specimen h2 a:hover { color: var(--teal-deep); }
.specimen .excerpt {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
}
.specimen .meta {
	font-size: 12px;
	color: var(--muted);
	font-weight: 600;
}

/* Compact notebook index */
.notebook {
	background: var(--card);
	border: 1px solid var(--line);
	box-shadow: inset 6px 0 0 var(--teal);
}
.notebook-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background: linear-gradient(90deg, #12343c, #1a4a52);
	color: var(--lamp);
	font-weight: 800;
	font-size: 15px;
}
.notebook-list { list-style: none; margin: 0; padding: 0; }
.note-row {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	padding: 12px 14px;
	border-top: 1px dashed var(--line);
}
.note-row:first-child { border-top: 0; }
.note-thumb {
	width: 88px;
	height: 64px;
	background: #d5dee4;
	overflow: hidden;
	border: 1px solid var(--line);
}
.note-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.note-row h3 {
	margin: 0;
	font-size: 16px;
	line-height: 1.45;
	font-weight: 700;
}
.note-row h3 a { color: var(--ink); }
.note-row .meta {
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
}
.note-row .tag {
	margin-bottom: 4px;
}

/* Shelf sidebar */
.shelf {
	position: sticky;
	top: 16px;
	background:
		linear-gradient(180deg, #3a271c, #2b1c14);
	border: 2px solid #4a3426;
	box-shadow:
		0 0 0 3px rgba(201, 161, 74, .2),
		0 16px 0 rgba(0, 0, 0, .18);
	padding: 12px 12px 16px;
}
.shelf-label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 12px;
	padding: 8px 10px;
	background: #120c09;
	border: 1px solid var(--brass);
	color: var(--brass-soft);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .04em;
}
.shelf .widget {
	background: #f3f6f8;
	border: 1px solid #c9b896;
	margin-bottom: 12px;
	padding: 10px 12px 12px;
	color: var(--ink);
}
.shelf .widget:last-child { margin-bottom: 0; }
.shelf .widget-title,
.shelf h4.widget-title {
	margin: 0 0 10px;
	padding: 6px 10px;
	background: linear-gradient(90deg, #12343c, #1f5058);
	color: var(--lamp);
	font-size: 13px;
	font-weight: 800;
	border-right: 3px solid var(--brass);
}
.shelf .widget ul { margin: 0; padding: 0 14px 0 0; }
.shelf .widget li { margin: 0 0 6px; }
.shelf .widget a { color: var(--ink); font-weight: 600; }
.shelf .widget a:hover { color: var(--teal-deep); }
.shelf .search-form { display: flex; gap: 6px; }
.shelf .search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid var(--line);
	background: #fff;
}
.shelf .search-form input[type="submit"] {
	padding: 8px 12px;
	border: 0;
	background: var(--teal-deep);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}
.behtarinseo { font-size: 13px; line-height: 1.7; }
.behtarinseo a { word-break: break-word; }

/* Entry / single */
.entry {
	background: var(--card);
	border: 1px solid var(--line);
	padding: 22px 22px 28px;
	box-shadow: 8px 8px 0 rgba(20, 50, 58, .08);
}
.entry-title {
	margin: 8px 0 6px;
	font-size: clamp(24px, 3.4vw, 34px);
	line-height: 1.35;
	font-weight: 800;
}
.entry-thumb { margin: 16px 0; }
.entry-content { font-size: 16px; }
.entry-content p { margin: 0 0 1em; }
.pagination,
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 22px;
}
.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 4px 12px;
	background: #12343c;
	color: #fff;
	font-weight: 700;
	font-size: 13px;
}
.pagination .current,
.nav-links .current { background: var(--teal); }

.site-footer {
	margin-top: 20px;
	padding: 22px 4%;
	background: #0d2329;
	color: #9eb8bf;
	text-align: center;
	font-size: 13px;
	border-top: 3px solid var(--brass);
}
.site-footer a { color: var(--lamp); }

@media (max-width: 920px) {
	.room {
		grid-template-columns: 1fr;
		padding-top: 20px;
	}
	.shelf { position: static; order: 2; }
	.room > main { order: 1; }
	.specimen,
	.specimen:nth-child(even) {
		grid-template-columns: 1fr;
	}
	.specimen:nth-child(even) .specimen-art,
	.specimen:nth-child(even) .specimen-copy { order: initial; }
	.specimen-copy,
	.specimen:nth-child(even) .specimen-copy {
		border: 0;
		border-top: 4px solid var(--teal);
	}
	.note-row {
		grid-template-columns: 72px minmax(0, 1fr);
	}
	.note-row .meta { display: none; }
}

@media (max-width: 640px) {
	.nameplate {
		margin: 18px 3% 0;
		transform: none;
		max-width: none;
	}
	.brand-name { font-size: 26px; }
	.nav-btn { display: inline-flex; }
	.toolbelt .nav {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		padding-top: 8px;
	}
	.nav-toggle:checked ~ .nav { display: flex; }
	.toolbelt { flex-wrap: wrap; }
}
