/*
Theme Name: اتاق بازی
Theme URI: https://skrs.ir/
Author: پایگاه روانشناسی کودکان
Description: اتاق بازی برای روانشناسی کودک
Version: 1.0.0
Text Domain: otagh
*/

:root {
	--sky: #c8e7f5;
	--wall: #eaf6fb;
	--coral: #ff6b6b;
	--mint: #3db89a;
	--sun: #ffd166;
	--wood: #b8895a;
	--wood-dark: #8a6240;
	--ink: #243447;
	--muted: #6a7a88;
	--panel: #ffffff;
	--line: #d5e6ef;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	background:
		linear-gradient(180deg, var(--sky) 0 180px, var(--wall) 180px);
	color: var(--ink);
	font-family: Tahoma, "Segoe UI", sans-serif;
	line-height: 1.75;
}
a { color: #1f7a68; }
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);
}

/* Playroom header — window wall, not a floating brand plate */
.room {
	position: relative;
	overflow: hidden;
	background:
		linear-gradient(180deg, #9fd4ea 0%, #c8e7f5 55%, #eaf6fb 100%);
	border-bottom: 10px solid var(--wood);
	box-shadow: inset 0 -18px 0 rgba(138, 98, 64, 0.18);
}
.room-sky {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 18% 28%, rgba(255, 209, 102, 0.55), transparent 22%),
		radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.5), transparent 18%);
}
.cloud {
	position: absolute;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 40px;
	animation: drift 12s ease-in-out infinite alternate;
}
.cloud.c1 { width: 90px; height: 28px; top: 28px; left: 12%; }
.cloud.c2 { width: 70px; height: 22px; top: 48px; left: 55%; animation-delay: 1.5s; }
.cloud.c3 { width: 60px; height: 18px; top: 22px; right: 14%; animation-delay: 0.8s; }
@keyframes drift {
	from { transform: translateX(0); }
	to { transform: translateX(14px); }
}

.room-inner {
	position: relative;
	z-index: 1;
	max-width: 1120px;
	margin: 0 auto;
	padding: 18px 16px 0;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
	gap: 18px;
	align-items: end;
}
.brand-block {
	padding-bottom: 14px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--ink);
}
.logo {
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	filter: drop-shadow(0 4px 0 rgba(255, 107, 107, 0.25));
}
.brand-name {
	display: block;
	font-size: 24px;
	font-weight: bold;
	line-height: 1.3;
	color: #1d4f63;
}
.brand-desc {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: #4d6b7a;
}
.room-note {
	margin-top: 10px;
	display: inline-block;
	background: var(--sun);
	color: #5a4308;
	padding: 5px 10px;
	font-size: 12px;
	font-weight: bold;
	border: 2px solid #e0b84a;
	box-shadow: 3px 3px 0 rgba(255, 107, 107, 0.2);
}

/* Window scene with toys on the sill */
.window {
	position: relative;
	background: #8ecae6;
	border: 6px solid #5f8fa8;
	border-bottom: 0;
	border-radius: 10px 10px 0 0;
	min-height: 150px;
	overflow: hidden;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.45);
}
.window-pane {
	position: absolute;
	inset: 10px 10px 28px;
	background:
		linear-gradient(180deg, #bde0fe 0%, #90e0ef 100%);
	border: 3px solid rgba(255, 255, 255, 0.55);
}
.window-cross {
	position: absolute;
	inset: 10px 10px 28px;
	background:
		linear-gradient(#fff, #fff) center/3px 100% no-repeat,
		linear-gradient(#fff, #fff) center/100% 3px no-repeat;
	opacity: 0.55;
	pointer-events: none;
}
.window-sun {
	position: absolute;
	top: 18px;
	left: 22px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--sun);
	box-shadow: 0 0 0 6px rgba(255, 209, 102, 0.35);
	animation: sun-pulse 3s ease-in-out infinite alternate;
}
@keyframes sun-pulse {
	from { transform: scale(1); }
	to { transform: scale(1.08); }
}
.sill {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 28px;
	background: linear-gradient(180deg, #f2d6b3, #d9b48a);
	border-top: 2px solid #c9a67a;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 8px;
	padding: 0 8px 2px;
}
.toy {
	display: block;
	animation: toy-bounce 2.8s ease-in-out infinite;
}
.toy.t2 { animation-delay: 0.4s; }
.toy.t3 { animation-delay: 0.9s; }
@keyframes toy-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-3px); }
}

.nav-wrap {
	position: relative;
	z-index: 1;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 16px 12px;
}
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-btn {
	display: none;
	width: 42px;
	height: 34px;
	border: 2px solid #1d4f63;
	background: #fff;
	cursor: pointer;
}
.nav-btn span {
	display: block;
	width: 18px;
	height: 2px;
	background: #1d4f63;
	margin: 6px auto;
}
.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	background: rgba(255, 255, 255, 0.55);
	padding: 8px;
	border: 2px dashed #7eb6cc;
}
.nav a {
	text-decoration: none;
	color: #1d4f63;
	padding: 7px 11px;
	background: #fff;
	border: 2px solid #b7d7e6;
	font-size: 13px;
	font-weight: bold;
}
.nav a.on,
.nav a:hover {
	background: var(--coral);
	border-color: #e25555;
	color: #fff;
}

/* Content left, sidebar RIGHT */
.shell {
	max-width: 1120px;
	margin: 0 auto;
	padding: 18px 16px 44px;
	display: flex;
	flex-direction: row;
	direction: ltr;
	gap: 18px;
	align-items: start;
}
.shell > main,
.shell > .side { direction: rtl; }
.shell > main { flex: 1; min-width: 0; }
.shell > .side { width: 290px; flex: 0 0 290px; }

/* Featured on the window ledge */
.ledge {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.8fr);
	background: var(--panel);
	border: 3px solid #7eb6cc;
	margin-bottom: 16px;
	overflow: hidden;
	box-shadow: 6px 6px 0 rgba(61, 184, 154, 0.25);
}
.ledge-copy { padding: 16px 18px 18px; }
.ledge-art {
	background: #d8eef7;
	min-height: 170px;
	overflow: hidden;
	border-left: 3px solid #7eb6cc;
}
.ledge-art a,
.ledge-art img {
	width: 100%;
	height: 100%;
	min-height: 170px;
	object-fit: cover;
	display: block;
}
.kicker {
	color: var(--coral);
	font-size: 12px;
	font-weight: bold;
}
.ledge h2 {
	margin: 6px 0 12px;
	font-size: 24px;
	line-height: 1.45;
}
.ledge h2 a {
	color: var(--ink);
	text-decoration: none;
}
.go {
	display: inline-block;
	background: var(--mint);
	color: #fff;
	text-decoration: none;
	padding: 8px 14px;
	font-weight: bold;
	border: 2px solid #2f9e84;
	box-shadow: 3px 3px 0 rgba(255, 107, 107, 0.2);
}
.go:hover { background: #34a88c; }

.shelf-label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	color: var(--wood-dark);
	font-size: 13px;
	font-weight: bold;
}
.shelf-label::before {
	content: "";
	width: 18px;
	height: 10px;
	background: var(--wood);
	border-radius: 2px;
	box-shadow: 0 2px 0 var(--wood-dark);
}

/* Bookshelf rows */
.shelves {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.book {
	display: grid;
	grid-template-columns: 42px 92px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 12px 10px 14px;
	text-decoration: none;
	color: inherit;
	background: var(--panel);
	border: 2px solid var(--line);
	border-bottom: 0;
	position: relative;
}
.book:last-child { border-bottom: 2px solid var(--line); }
.book::after {
	content: "";
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: -2px;
	height: 8px;
	background: linear-gradient(180deg, var(--wood), var(--wood-dark));
	border-radius: 0 0 3px 3px;
	z-index: 1;
}
.book:hover { background: #f3fbff; }
.book-spine {
	width: 36px;
	height: 70px;
	background: linear-gradient(90deg, var(--coral), #ff8e8e);
	color: #fff;
	font-weight: bold;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px 8px 8px 3px;
	box-shadow: inset -3px 0 0 rgba(0, 0, 0, 0.08);
}
.book:nth-child(3n+2) .book-spine { background: linear-gradient(90deg, var(--mint), #63d0b4); }
.book:nth-child(3n) .book-spine { background: linear-gradient(90deg, #4d96ff, #7eb6ff); }
.book-cover {
	width: 92px;
	height: 70px;
	background: #d8eef7;
	overflow: hidden;
	border: 2px solid #b7d7e6;
}
.book-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.book h3 {
	margin: 2px 0 4px;
	font-size: 16px;
	line-height: 1.45;
}
.meta { color: var(--muted); font-size: 12px; }

.stack {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.card {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 12px 10px;
	text-decoration: none;
	color: inherit;
	background: var(--panel);
	border: 2px solid var(--line);
	border-bottom-width: 1px;
}
.card:hover { background: #f3fbff; }
.card-art {
	width: 92px;
	height: 70px;
	background: #d8eef7;
	overflow: hidden;
	border: 2px solid #b7d7e6;
}
.card-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.card h3 { margin: 2px 0 4px; font-size: 16px; line-height: 1.45; }

.page-head h1 {
	margin: 0 0 14px;
	font-size: 22px;
	padding-right: 10px;
	border-right: 5px solid var(--coral);
}

.entry {
	background: var(--panel);
	padding: 18px 18px 24px;
	border: 2px solid var(--line);
	border-right: 5px solid var(--mint);
}
.entry-title { margin: 6px 0 8px; font-size: 24px; line-height: 1.45; }
.entry-thumb { margin: 12px 0 16px; }
.entry-content { font-size: 15px; }

.side .widget {
	background: var(--panel);
	border: 2px solid var(--line);
	border-top: 5px solid var(--coral);
	padding: 12px 12px 14px;
	margin-bottom: 12px;
	box-shadow: 3px 3px 0 rgba(61, 184, 154, 0.12);
}
.side .widget:nth-child(2n) { border-top-color: var(--mint); }
.side .widget:nth-child(3n) { border-top-color: #4d96ff; }
.widget-title {
	margin: 0 0 10px;
	font-size: 14px;
	color: #1d4f63;
	padding-bottom: 6px;
	border-bottom: 2px dashed #b7d7e6;
}
.side ul { margin: 0; padding: 0 16px 0 0; }
.side li { margin: 0 0 6px; }
.side a { text-decoration: none; }
.side input[type="search"],
.side input[type="text"] {
	width: 100%;
	padding: 8px;
	border: 2px solid var(--line);
	background: #fff;
}
.side input[type="submit"],
.side button {
	background: var(--coral);
	color: #fff;
	border: 0;
	padding: 8px 12px;
	cursor: pointer;
	margin-top: 6px;
	font-weight: bold;
}
.behtarinseo a { word-break: break-word; }

.site-footer {
	padding: 16px;
	text-align: center;
	background: #1d4f63;
	color: #c8e7f5;
	font-size: 13px;
	border-top: 6px solid var(--wood);
}
.site-footer p { margin: 0; }

.nav-links,
.pagination {
	margin-top: 18px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.nav-links a,
.pagination a,
.pagination span {
	display: inline-block;
	padding: 6px 10px;
	background: #fff;
	border: 2px solid var(--line);
	text-decoration: none;
	color: var(--ink);
}
.pagination .current {
	background: var(--mint);
	color: #fff;
	border-color: #2f9e84;
}

@media (max-width: 900px) {
	.room-inner { grid-template-columns: 1fr; }
	.window { min-height: 130px; }
	.shell {
		flex-direction: column;
		direction: rtl;
	}
	.shell > .side { width: 100%; flex: none; }
	.ledge { grid-template-columns: 1fr; box-shadow: 0 6px 0 rgba(61, 184, 154, 0.25); }
	.ledge-art { border-left: 0; border-top: 3px solid #7eb6cc; }
	.ledge-art a, .ledge-art img { min-height: 150px; }
}

@media (max-width: 560px) {
	.nav-btn { display: block; margin-bottom: 8px; }
	.nav { display: none; }
	.nav-toggle:checked ~ .nav { display: flex; }
	.book { grid-template-columns: 36px minmax(0, 1fr); }
	.book-cover { display: none; }
	.ledge h2 { font-size: 20px; }
	.brand-name { font-size: 20px; }
}
