/*
Theme Name: TribeEngine
Author: EngineThemes Labs
Description: Mobile-first WordPress community theme with threads, profiles, moderation, notifications, and direct messaging.
Version: 1.0.0
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tribeengine

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* -----------------------------------------------------------------------
   0. CSS custom properties — the only place you should need to touch
      for basic re-theming.
----------------------------------------------------------------------- */
:root {
	--color-text: #1a1a1a;
	--color-text-muted: #595959;
	--color-bg: #ffffff;
	--color-bg-alt: #f5f5f5;
	--color-border: #dcdcdc;
	--color-accent: #0058a3;
	--color-accent-hover: #003f75;

	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-heading: var(--font-body);

	--content-width: 45rem;
	--wide-width: 60rem;
	--spacing: 1.5rem;
}

/* -----------------------------------------------------------------------
   1. Minimal reset
----------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--color-accent);
}

a:hover,
a:focus {
	color: var(--color-accent-hover);
}

ul,
ol {
	padding-left: 1.25em;
}

table {
	width: 100%;
	border-collapse: collapse;
}

/* -----------------------------------------------------------------------
   2. Accessibility helpers
----------------------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	left: -9999px;
	top: 0;
	z-index: 999999;
}

.skip-link:focus {
	background: var(--color-bg);
	border-radius: 0 0 4px 0;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.4);
	clip: auto !important;
	clip-path: none;
	color: var(--color-text);
	display: block;
	font-size: 0.9rem;
	font-weight: 700;
	height: auto;
	left: 0;
	line-height: normal;
	padding: 1em 1.5em;
	position: fixed;
	width: auto;
}

/* -----------------------------------------------------------------------
   3. Layout
----------------------------------------------------------------------- */
.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-header,
.site-content,
.site-footer {
	width: 100%;
	max-width: var(--wide-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--spacing);
	padding-right: var(--spacing);
}

.site-content {
	display: flex;
	flex: 1 0 auto;
	gap: var(--spacing);
	padding-top: var(--spacing);
	padding-bottom: var(--spacing);
	align-items: flex-start;
}

.site-main {
	flex: 1 1 var(--content-width);
	min-width: 0;
}

.widget-area {
	flex: 0 1 16rem;
}

@media (max-width: 700px) {
	.site-content {
		flex-direction: column;
	}
}

/* -----------------------------------------------------------------------
   4. Header & navigation
----------------------------------------------------------------------- */
.site-header {
	padding-top: var(--spacing);
	padding-bottom: var(--spacing);
	border-bottom: 1px solid var(--color-border);
}

.site-branding .site-title {
	font-size: 1.5rem;
	margin: 0;
}

.site-branding .site-title a {
	text-decoration: none;
	color: var(--color-text);
}

.site-branding .site-description {
	margin: 0.25rem 0 0;
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

.main-navigation {
	margin-top: var(--spacing);
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
}

.main-navigation ul ul {
	display: none;
}

.main-navigation a {
	text-decoration: none;
	color: var(--color-text);
	font-weight: 600;
}

.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	padding: 0.5em 1em;
	cursor: pointer;
	font: inherit;
}

@media (max-width: 700px) {
	.menu-toggle {
		display: inline-block;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		gap: 0.75rem;
		margin-top: 0.75rem;
	}

	.main-navigation.is-open ul {
		display: flex;
	}
}

/* -----------------------------------------------------------------------
   5. Entries (posts / pages)
----------------------------------------------------------------------- */
.entry-title {
	margin-top: 0;
	line-height: 1.25;
}

.entry-meta,
.entry-footer {
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

.entry-meta a,
.entry-footer a {
	color: inherit;
}

.post-thumbnail {
	margin: var(--spacing) 0;
}

article + article {
	margin-top: 0.5rem;
	padding-top: 3rem;
	border-top: 1px solid var(--color-border);
}

.page-links {
	clear: both;
	margin: var(--spacing) 0;
}

/* -----------------------------------------------------------------------
   6. Comments
----------------------------------------------------------------------- */
.comments-area {
	margin-top: 3rem;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	margin: 0 0 0 1.5rem;
	padding: 0;
}

.comment-body {
	padding: 1rem 0;
	border-bottom: 1px solid var(--color-border);
}

.comment-author.vcard {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.comment-author img {
	border-radius: 50%;
}

.comment-metadata {
	font-size: 0.85rem;
	color: var(--color-text-muted);
}

.comment-awaiting-moderation {
	font-style: italic;
	color: var(--color-text-muted);
}

/* -----------------------------------------------------------------------
   7. Widgets & sidebar
----------------------------------------------------------------------- */
.widget {
	margin-bottom: var(--spacing);
	padding-bottom: var(--spacing);
	border-bottom: 1px solid var(--color-border);
}

.widget-title {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* -----------------------------------------------------------------------
   8. Search form
----------------------------------------------------------------------- */
.search-form {
	display: flex;
	gap: 0.5rem;
}

.search-form .search-field {
	flex: 1 1 auto;
	padding: 0.5em;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	font: inherit;
}

.search-submit {
	padding: 0.5em 1em;
	border: 1px solid var(--color-accent);
	background: var(--color-accent);
	color: #fff;
	border-radius: 4px;
	cursor: pointer;
	font: inherit;
}

.search-submit:hover {
	background: var(--color-accent-hover);
	border-color: var(--color-accent-hover);
}

/* -----------------------------------------------------------------------
   9. Pagination
----------------------------------------------------------------------- */
.pagination,
.comment-navigation,
.post-navigation {
	margin-top: var(--spacing);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 0.4em 0.8em;
	margin: 0 0.15em;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	text-decoration: none;
	color: var(--color-text);
}

.pagination .page-numbers.current {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: #fff;
}

/* -----------------------------------------------------------------------
   10. Footer
----------------------------------------------------------------------- */
.site-footer {
	margin-top: auto;
	padding-top: var(--spacing);
	padding-bottom: var(--spacing);
	border-top: 1px solid var(--color-border);
	font-size: 0.9rem;
	color: var(--color-text-muted);
}

#footer-menu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 0;
	margin: 0 0 1rem;
}
