/*
Theme Name: MoboBD
Theme URI: https://mobobd.com
Author: Dev Shujon
Author URI: https://devshujon.com
Description: A lightweight companion theme for Comparix Pro.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mobobd
Tags: full-width-template, custom-logo, custom-menu, translation-ready, blog, one-column, two-columns, footer-widgets, block-styles, wide-blocks

MoboBD is a thin WordPress theme shell designed to work with Comparix Pro.
*/

/* ==========================================================================
   Design tokens — theme shell only; Comparix Pro owns product UI (--cx-*).
   ========================================================================== */

:root {
	--mobobd-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mobobd-font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

	--mobobd-container: 1200px;
	--mobobd-gutter: clamp(1rem, 3vw, 1.5rem);
	--mobobd-header-h: 64px;

	--mobobd-primary: #2563eb;
	--mobobd-primary-hover: #1d4ed8;
	--mobobd-accent: #0ea5e9;

	--mobobd-bg: #ffffff;
	--mobobd-surface: #f8fafc;
	--mobobd-text: #0f172a;
	--mobobd-text-muted: #64748b;
	--mobobd-border: #e2e8f0;
	--mobobd-link: var(--mobobd-primary);
	--mobobd-link-hover: var(--mobobd-primary-hover);

	--mobobd-radius: 8px;
	--mobobd-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	--mobobd-transition: 0.2s ease;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--mobobd-bg: #0b1120;
		--mobobd-surface: #111827;
		--mobobd-text: #f1f5f9;
		--mobobd-text-muted: #94a3b8;
		--mobobd-border: #1e293b;
		--mobobd-link: #60a5fa;
		--mobobd-link-hover: #93c5fd;
		--mobobd-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);

		color-scheme: dark;
	}
}

/* ==========================================================================
   Base — avoid html/body height:100% (breaks Comparix compare scroll).
   ========================================================================== */

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

html {
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	overflow-x: hidden;
	font-family: var(--mobobd-font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--mobobd-text);
	background: var(--mobobd-bg);
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--mobobd-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color var(--mobobd-transition);
}

a:hover,
a:focus-visible {
	color: var(--mobobd-link-hover);
}

:focus-visible {
	outline: 2px solid var(--mobobd-primary);
	outline-offset: 2px;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.mobobd-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	width: 100%;
}

.mobobd-main {
	flex: 1 0 auto;
	width: 100%;
}

.mobobd-container {
	width: 100%;
	max-width: var(--mobobd-container);
	margin-inline: auto;
	padding-inline: var(--mobobd-gutter);
}

.mobobd-main--full .mobobd-container,
.mobobd-main--full .mobobd-content {
	max-width: none;
	padding-inline: 0;
}

.mobobd-content {
	padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

/* ==========================================================================
   Header
   ========================================================================== */

.mobobd-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--mobobd-bg);
	border-bottom: 1px solid var(--mobobd-border);
	box-shadow: var(--mobobd-shadow);
}

.mobobd-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--mobobd-header-h);
}

.mobobd-brand {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--mobobd-text);
	text-decoration: none;
	flex-shrink: 0;
}

.mobobd-brand:hover,
.mobobd-brand:focus-visible {
	color: var(--mobobd-text);
	text-decoration: none;
}

.mobobd-brand__logo,
.custom-logo {
	max-height: 40px;
	width: auto;
}

.custom-logo-link {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.mobobd-nav {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

@media (min-width: 769px) {
	.mobobd-nav-details > summary {
		display: none;
	}

	.mobobd-nav-details .mobobd-nav {
		display: flex;
		position: static;
		padding: 0;
		border: 0;
		box-shadow: none;
		background: transparent;
		min-width: auto;
	}
}

.mobobd-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.125rem 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobobd-nav__list a {
	display: block;
	padding: 0.5rem 0.75rem;
	color: var(--mobobd-text);
	text-decoration: none;
	border-radius: var(--mobobd-radius);
	font-size: 0.9375rem;
	font-weight: 500;
}

.mobobd-nav__list a:hover,
.mobobd-nav__list a:focus-visible,
.mobobd-nav__list .current-menu-item > a,
.mobobd-nav__list .current_page_item > a {
	background: var(--mobobd-surface);
	color: var(--mobobd-primary);
	text-decoration: none;
}

.mobobd-nav-details {
	position: relative;
}

.mobobd-nav-details > summary {
	list-style: none;
}

.mobobd-nav-details > summary::-webkit-details-marker {
	display: none;
}

@media (min-width: 769px) {
	.mobobd-nav-toggle {
		display: none;
	}
}

@media (max-width: 768px) {
	.mobobd-nav-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 1px solid var(--mobobd-border);
		border-radius: var(--mobobd-radius);
		background: var(--mobobd-surface);
		color: var(--mobobd-text);
		cursor: pointer;
	}

	.mobobd-nav-toggle__icon {
		display: block;
		width: 20px;
		height: 2px;
		background: currentColor;
		position: relative;
	}

	.mobobd-nav-toggle__icon::before,
	.mobobd-nav-toggle__icon::after {
		content: "";
		position: absolute;
		left: 0;
		width: 100%;
		height: 2px;
		background: currentColor;
	}

	.mobobd-nav-toggle__icon::before {
		top: -6px;
	}

	.mobobd-nav-toggle__icon::after {
		top: 6px;
	}

	.mobobd-nav-details .mobobd-nav {
		position: absolute;
		top: calc(100% + 0.5rem);
		right: 0;
		min-width: min(100vw - 2rem, 280px);
		flex-direction: column;
		align-items: stretch;
		padding: 0.75rem;
		background: var(--mobobd-bg);
		border: 1px solid var(--mobobd-border);
		border-radius: var(--mobobd-radius);
		box-shadow: var(--mobobd-shadow);
	}

	.mobobd-nav-details:not([open]) .mobobd-nav {
		display: none;
	}

	.mobobd-nav__list {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.mobobd-nav__list a {
		padding: 0.75rem;
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */

.mobobd-footer {
	flex-shrink: 0;
	margin-top: auto;
	background: var(--mobobd-surface);
	border-top: 1px solid var(--mobobd-border);
}

.mobobd-footer__widgets {
	padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.mobobd-footer__widgets .mobobd-container {
	display: grid;
	gap: 2rem;
}

@media (min-width: 640px) {
	.mobobd-footer__widgets .mobobd-container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.mobobd-footer__widgets .mobobd-container {
		grid-template-columns: repeat(3, 1fr);
	}
}

.mobobd-footer__widgets .widget-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 700;
}

.mobobd-footer__widgets .widget {
	margin: 0;
}

.mobobd-footer__bottom {
	padding-block: 1.25rem;
	border-top: 1px solid var(--mobobd-border);
	font-size: 0.875rem;
	color: var(--mobobd-text-muted);
}

.mobobd-footer__bottom .mobobd-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.mobobd-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.mobobd-footer__menu a {
	color: var(--mobobd-text-muted);
	text-decoration: none;
}

.mobobd-footer__menu a:hover,
.mobobd-footer__menu a:focus-visible {
	color: var(--mobobd-text);
}

/* ==========================================================================
   Content — posts, pages, archives (not Comparix product UI)
   ========================================================================== */

.mobobd-entry__header {
	margin-bottom: 1.5rem;
}

.mobobd-entry__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.mobobd-entry__meta {
	font-size: 0.875rem;
	color: var(--mobobd-text-muted);
}

.mobobd-entry__content > :first-child {
	margin-top: 0;
}

.mobobd-entry__content > :last-child {
	margin-bottom: 0;
}

.mobobd-entry__content h2,
.mobobd-entry__content h3,
.mobobd-entry__content h4 {
	margin-top: 1.75em;
	margin-bottom: 0.5em;
	line-height: 1.3;
}

.mobobd-entry__content p,
.mobobd-entry__content ul,
.mobobd-entry__content ol {
	margin-block: 1em;
}

.mobobd-entry__content blockquote {
	margin: 1.5em 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--mobobd-primary);
	background: var(--mobobd-surface);
	border-radius: 0 var(--mobobd-radius) var(--mobobd-radius) 0;
}

.mobobd-entry__content pre,
.mobobd-entry__content code {
	font-family: var(--mobobd-font-mono);
	font-size: 0.875em;
}

.mobobd-entry__content pre {
	overflow-x: auto;
	padding: 1rem;
	background: var(--mobobd-surface);
	border-radius: var(--mobobd-radius);
	border: 1px solid var(--mobobd-border);
}

.mobobd-entry__thumbnail {
	margin-bottom: 1.5rem;
	border-radius: var(--mobobd-radius);
	overflow: hidden;
}

.mobobd-posts {
	display: grid;
	gap: 2rem;
}

.mobobd-post-card {
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--mobobd-border);
}

.mobobd-post-card__title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 700;
}

.mobobd-post-card__title a {
	color: var(--mobobd-text);
	text-decoration: none;
}

.mobobd-post-card__title a:hover,
.mobobd-post-card__title a:focus-visible {
	color: var(--mobobd-primary);
}

.mobobd-post-card__excerpt {
	color: var(--mobobd-text-muted);
	margin: 0;
}

.mobobd-pagination {
	margin-top: 2rem;
}

.mobobd-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mobobd-pagination a,
.mobobd-pagination span {
	display: inline-block;
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--mobobd-border);
	border-radius: var(--mobobd-radius);
	text-decoration: none;
	color: var(--mobobd-text);
}

.mobobd-pagination a:hover,
.mobobd-pagination a:focus-visible {
	border-color: var(--mobobd-primary);
	color: var(--mobobd-primary);
}

.mobobd-pagination .current {
	background: var(--mobobd-primary);
	border-color: var(--mobobd-primary);
	color: #fff;
}

/* ==========================================================================
   Search form
   ========================================================================== */

.mobobd-search-form {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.mobobd-search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 0.625rem 0.875rem;
	border: 1px solid var(--mobobd-border);
	border-radius: var(--mobobd-radius);
	background: var(--mobobd-bg);
	color: var(--mobobd-text);
	font: inherit;
}

.mobobd-search-form button {
	padding: 0.625rem 1.25rem;
	border: none;
	border-radius: var(--mobobd-radius);
	background: var(--mobobd-primary);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.mobobd-search-form button:hover,
.mobobd-search-form button:focus-visible {
	background: var(--mobobd-primary-hover);
}

/* ==========================================================================
   404 & empty states
   ========================================================================== */

.mobobd-not-found {
	text-align: center;
	padding-block: clamp(2rem, 6vw, 4rem);
}

.mobobd-not-found__code {
	font-size: clamp(3rem, 10vw, 6rem);
	font-weight: 800;
	line-height: 1;
	color: var(--mobobd-text-muted);
	margin: 0 0 0.5rem;
}

.mobobd-not-found__title {
	margin: 0 0 1rem;
}

.mobobd-not-found__text {
	color: var(--mobobd-text-muted);
	margin: 0 0 1.5rem;
}

.mobobd-button {
	display: inline-block;
	padding: 0.625rem 1.25rem;
	border-radius: var(--mobobd-radius);
	background: var(--mobobd-primary);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}

.mobobd-button:hover,
.mobobd-button:focus-visible {
	background: var(--mobobd-primary-hover);
	color: #fff;
	text-decoration: none;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.mobobd-skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--mobobd-primary);
	color: #fff;
	text-decoration: none;
}

.mobobd-skip-link:focus {
	top: 0;
}

.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;
}

/* ==========================================================================
   Elementor & Comparix coexistence
   ========================================================================== */

.elementor-page .mobobd-content {
	padding-block: 0;
}

/* Comparix compare bar clearance */
body.mobobd-has-cx-bar {
	padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Align wide blocks with theme container */
.alignwide {
	max-width: var(--mobobd-container);
	margin-inline: auto;
}

.alignfull {
	max-width: none;
	margin-inline: calc(-1 * var(--mobobd-gutter));
	width: calc(100% + 2 * var(--mobobd-gutter));
}
