/*
Theme Name: Isandor Rimworld
Theme URI: https://github.com/your-repo/isandorrimworld
Author: Your Name
Author URI: https://yoursite.com
Description: A WordPress theme that closely replicates Rimworld's UI — dark panels, gold borders, utilitarian layout, in-game and main menu style.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: isandorrimworld
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, one-column, two-columns, dark
*/

/* --------------------------------------------------------------------------
   Rimworld UI replicant — dark theme, gold/bronze borders, modular panels
   In-game: dark grey sidebar + top/bottom bars; Main menu: gold-bordered buttons
   -------------------------------------------------------------------------- */
:root {
	/* Dark space / in-game UI */
	--rw-bg: #0f1116;
	--rw-bg-space: #0a0c10;
	--rw-panel: #252830;
	--rw-panel-light: #2d3139;
	--rw-panel-dark: #1e2128;
	--rw-sidebar: #1a1d23;
	--rw-sidebar-stripe: rgba(255, 255, 255, 0.02);
	/* Gold/bronze borders (main menu style) */
	--rw-gold: #c9a227;
	--rw-gold-light: #e0b82e;
	--rw-gold-dark: #8b6914;
	--rw-border: #3d3d3d;
	--rw-border-subtle: #2a2a2a;
	/* Text */
	--rw-text: #e8e8e8;
	--rw-text-muted: #a0a0a0;
	/* Accents: game UI */
	--rw-accent: var(--rw-gold);
	--rw-accent-hover: var(--rw-gold-light);
	--rw-positive: #4a7c4a;
	--rw-negative: #b33a3a;
	--rw-warning: #c95c2a;
	--rw-shadow: rgba(0, 0, 0, 0.4);
	--rw-border-width: 1px;
	--rw-gold-border-width: 2px;
	--rw-font-sans: "Segoe UI", "Roboto", system-ui, sans-serif;
	--rw-font-display: "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	background: var(--rw-bg);
	background-image: radial-gradient(ellipse at 50% 0%, rgba(40, 45, 55, 0.6) 0%, transparent 50%),
	                  linear-gradient(180deg, var(--rw-bg-space) 0%, var(--rw-bg) 100%);
	min-height: 100vh;
	color: var(--rw-text);
	font-family: var(--rw-font-sans);
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
	padding: 0;
	position: relative;
}

/* Background video (full viewport, behind content) */
.site-background-video-wrap {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	overflow: hidden;
}
.site-background-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

a {
	color: var(--rw-gold-light);
	text-decoration: none;
}
a:hover {
	color: var(--rw-gold);
	text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--rw-font-display);
	font-weight: 600;
	line-height: 1.3;
	margin-top: 0;
	color: var(--rw-text);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

img {
	height: auto;
	max-width: 100%;
	vertical-align: middle;
}

/* Site layout: full-width with inner content wrapper */
.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.site-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* ========== Top bar (Rimworld in-game top bar) ========== */
.site-header {
	background: var(--rw-panel-dark);
	border-bottom: var(--rw-gold-border-width) solid var(--rw-gold);
	box-shadow: 0 2px 0 0 var(--rw-gold-dark), 0 4px 12px var(--rw-shadow);
	padding: 0.5rem 1rem;
	margin-bottom: 0;
	flex-shrink: 0;
}

.site-branding {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
}

.site-logo-link {
	display: block;
	line-height: 0;
}
.site-logo {
	display: block;
	max-height: 48px;
	width: auto;
	max-width: 100%;
	height: auto;
}

.site-title {
	font-family: var(--rw-font-display);
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.site-title a {
	color: var(--rw-text);
	text-decoration: none;
}
.site-title a:hover {
	color: var(--rw-gold);
	text-decoration: none;
}

.site-description {
	color: var(--rw-text-muted);
	font-size: 0.8rem;
	margin: 0.25rem 0 0 0;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Main nav — top bar style: compact, icon-like labels */
.main-navigation {
	border: none;
	padding: 0;
	margin: 0;
}
.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
}
.main-navigation a {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	color: var(--rw-text);
	border: 1px solid transparent;
	background: transparent;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a {
	border-color: var(--rw-gold);
	background: rgba(201, 162, 39, 0.15);
	color: var(--rw-gold-light);
	text-decoration: none;
}

/* ========== Content area: left sidebar + main (game layout) ========== */
.content-area {
	display: flex;
	flex: 1;
	width: 100%;
	padding: 0;
	gap: 0;
	min-height: 0;
}

/* ========== Left sidebar (Rimworld category panel) ========== */
.widget-area-left {
	width: 260px;
	min-width: 260px;
	flex-shrink: 0;
	background: var(--rw-sidebar);
	background-image: repeating-linear-gradient(
		90deg,
		transparent,
		transparent 2px,
		var(--rw-sidebar-stripe) 2px,
		var(--rw-sidebar-stripe) 4px
	);
	border-right: var(--rw-gold-border-width) solid var(--rw-gold);
	padding: 0.75rem 0;
	overflow-y: auto;
}

/* ========== Main column (content + top/bottom slots) ========== */
.main-column {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* Main area top slot — above the main content */
.content-top.widget-area {
	padding: 0.75rem 1rem;
	margin: 0;
	border-bottom: var(--rw-gold-border-width) solid var(--rw-gold);
	background: var(--rw-panel-dark);
}
.content-top .widget {
	margin-bottom: 0.5rem;
}
.content-top .widget:last-child {
	margin-bottom: 0;
}

/* Main area bottom slot — below the main content */
.content-bottom.widget-area {
	padding: 0.75rem 1rem;
	margin: 0;
	border-top: var(--rw-gold-border-width) solid var(--rw-gold);
	background: var(--rw-panel-dark);
}
.content-bottom .widget {
	margin-bottom: 0.5rem;
}
.content-bottom .widget:last-child {
	margin-bottom: 0;
}

/* ========== Right sidebar ========== */
.widget-area-right {
	width: 260px;
	min-width: 260px;
	flex-shrink: 0;
	background: var(--rw-sidebar);
	background-image: repeating-linear-gradient(
		-90deg,
		transparent,
		transparent 2px,
		var(--rw-sidebar-stripe) 2px,
		var(--rw-sidebar-stripe) 4px
	);
	border-left: var(--rw-gold-border-width) solid var(--rw-gold);
	padding: 0.75rem 0;
	overflow-y: auto;
}

/* Shared widget styling for all sidebars and content slots */
.widget-area {
	box-sizing: border-box;
}

.widget-area .widget {
	padding: 0.5rem 0.75rem 0.75rem;
	margin: 0 0.5rem 0.75rem;
	border: 1px solid var(--rw-border);
	background: var(--rw-panel);
}

.widget-title {
	font-size: 0.75rem;
	font-weight: 700;
	margin: 0 0 0.5rem 0;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid var(--rw-border);
	color: var(--rw-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.widget li {
	padding: 0.2rem 0;
	border-bottom: 1px solid var(--rw-border-subtle);
	font-size: 0.85rem;
}
.widget li:last-child {
	border-bottom: none;
}
.widget a {
	color: var(--rw-text);
}
.widget a:hover {
	color: var(--rw-gold-light);
}

/* ========== Main content ========== */
.site-main {
	flex: 1;
	min-width: 0;
	padding: 1rem;
	margin-bottom: 0;
}
.main-column .site-main {
	margin-bottom: 0;
}

/* Posts / pages — dark panel with gold border */
article.post,
article.page {
	padding: 1.25rem;
	margin-bottom: 1rem;
	border: var(--rw-gold-border-width) solid var(--rw-gold);
	background: var(--rw-panel);
	box-shadow: 0 0 0 1px var(--rw-border) inset, 0 2px 8px var(--rw-shadow);
}

.entry-header {
	margin-bottom: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--rw-border);
}

.entry-title {
	font-size: 1.35rem;
	margin: 0 0 0.25rem 0;
	text-transform: uppercase;
}
.entry-title a {
	color: var(--rw-text);
}
.entry-title a:hover {
	color: var(--rw-gold-light);
	text-decoration: none;
}

.entry-meta {
	color: var(--rw-text-muted);
	font-size: 0.8rem;
	text-transform: uppercase;
}

.entry-content {
	margin-top: 0.75rem;
}
.entry-content p {
	margin-top: 0;
	margin-bottom: 0.75rem;
}

.sticky {
	box-shadow: 0 0 0 2px var(--rw-gold), 0 4px 12px var(--rw-shadow);
}

/* Pagination — gold-bordered buttons */
.pagination,
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0;
}

.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	border: var(--rw-gold-border-width) solid var(--rw-gold);
	background: var(--rw-panel);
	color: var(--rw-text);
	font-size: 0.85rem;
	text-transform: uppercase;
}
.pagination a:hover,
.nav-links a:hover {
	background: linear-gradient(180deg, rgba(201, 162, 39, 0.25) 0%, rgba(201, 162, 39, 0.1) 100%);
	text-decoration: none;
}
.pagination .current,
.nav-links .current {
	background: linear-gradient(180deg, var(--rw-gold-light) 0%, var(--rw-gold-dark) 100%);
	color: #1a1a1a;
	border-color: var(--rw-gold);
}

/* Comments */
.comments-area {
	padding: 1.25rem;
	margin-top: 1.5rem;
	border: var(--rw-gold-border-width) solid var(--rw-gold);
	background: var(--rw-panel);
	box-shadow: 0 0 0 1px var(--rw-border) inset;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.comment-body {
	padding: 0.75rem 1rem;
	margin-bottom: 0.75rem;
	border: 1px solid var(--rw-border);
	background: var(--rw-panel-dark);
}

.comment-meta {
	font-size: 0.8rem;
	color: var(--rw-text-muted);
	margin-bottom: 0.35rem;
}

/* Forms — dark inputs, gold focus */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--rw-border);
	background: var(--rw-panel-dark);
	color: var(--rw-text);
	font-family: inherit;
	font-size: 0.9rem;
}
input:focus,
textarea:focus {
	outline: none;
	border-color: var(--rw-gold);
	box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25);
}

/* Buttons — 3D gold-bordered (main menu style) */
button,
input[type="submit"],
input[type="button"],
.wp-block-button__link,
.button {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: var(--rw-gold-border-width) solid var(--rw-gold);
	background: linear-gradient(180deg, var(--rw-panel-light) 0%, var(--rw-panel-dark) 100%);
	color: var(--rw-text);
	font-family: inherit;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	cursor: pointer;
	box-shadow: 0 1px 0 0 var(--rw-gold-dark);
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:hover {
	background: linear-gradient(180deg, rgba(201, 162, 39, 0.3) 0%, rgba(201, 162, 39, 0.15) 100%);
	border-color: var(--rw-gold-light);
	color: var(--rw-gold-light);
	text-decoration: none;
}

/* Footer — bottom bar (Rimworld action bar style) */
.site-footer {
	background: var(--rw-panel-dark);
	border-top: var(--rw-gold-border-width) solid var(--rw-gold);
	padding: 0.75rem 1rem;
	margin-top: auto;
	color: var(--rw-text-muted);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	flex-shrink: 0;
}
.site-footer .site-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem 1rem;
}
.site-footer a {
	color: var(--rw-text-muted);
}
.site-footer a:hover {
	color: var(--rw-gold-light);
}

/* Footer nav as icon row (Rimworld bottom bar style) */
.footer-nav {
	margin-bottom: 0.5rem;
}
.footer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.25rem;
}
.footer-nav a {
	font-size: 0.8rem;
}

/* Mobile: stack sidebars and slots */
@media (max-width: 767px) {
	.content-area {
		flex-direction: column;
	}
	.widget-area-left,
	.widget-area-right {
		width: 100%;
		min-width: 0;
		order: 1;
	}
	.widget-area-left {
		border-right: none;
		border-bottom: var(--rw-gold-border-width) solid var(--rw-gold);
	}
	.widget-area-right {
		border-left: none;
		border-top: var(--rw-gold-border-width) solid var(--rw-gold);
	}
	.main-column {
		order: 0;
	}
}

/* Screen reader text */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}
