/*
Theme Name: Maxxed Blank
Theme URI: https://maxxed.studio
Author: Maxxed Studio
Author URI: https://maxxed.studio
Description: A blank starter theme with a boxed 1300px sticky header (logo left, full-width menu right), collapsible top header widget bar, 700px front-page hero, 1200px boxed body content, mosaic blog grid, and a 4-column widget footer. Comments disabled and classic/WPBakery editing by default.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maxxed-blank
Tags: custom-logo, custom-menu, sticky-header, footer-widgets, blog
*/

/* -------------------------------------------------
   0. Variables / Reset
------------------------------------------------- */
:root {
	--mb-header-height: 100px;
	--mb-top-header-height: 10px;
	--mb-hero-height: 700px;
	--mb-box-width: 1300px;
	--mb-content-width: 1200px;
	--mb-color-bg: #ffffff;
	--mb-color-text: #1a1a1a;
	--mb-color-muted: #666666;
	--mb-color-accent: #0a66ff;
	--mb-color-line: #e5e5e5;
	--mb-color-dark: #111111;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--mb-color-text);
	background: var(--mb-color-bg);
}

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

a {
	color: var(--mb-color-accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------
   1. Boxed containers
------------------------------------------------- */
.mb-container {
	width: 100%;
	max-width: var(--mb-box-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

.mb-content-container {
	width: 100%;
	max-width: var(--mb-content-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

/* -------------------------------------------------
   2. Top header (collapses on scroll)
------------------------------------------------- */
.mb-top-header {
	background: var(--mb-color-dark);
	color: #ffffff;
	height: var(--mb-top-header-height);
	overflow: hidden;
	transition: height 0.25s ease;
}

.mb-top-header .mb-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.mb-top-header a {
	color: #ffffff;
}

.mb-top-header .widget {
	margin: 0;
	font-size: 12px;
	line-height: 1;
}

.mb-top-header-left,
.mb-top-header-right {
	display: flex;
	align-items: center;
	gap: 16px;
}

/* Collapsed state once the page is scrolled */
body.mb-scrolled .mb-top-header {
	height: 0;
}

/* -------------------------------------------------
   3. Sticky main header
------------------------------------------------- */
.mb-site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	width: 100%;
}

.mb-main-header {
	background: var(--mb-color-bg);
	border-bottom: 1px solid var(--mb-color-line);
	height: var(--mb-header-height);
}

body.mb-scrolled .mb-main-header {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.mb-main-header .mb-container {
	display: flex;
	align-items: center;
	height: 100%;
	gap: 40px;
}

/* Logo upper/left */
.mb-branding {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	height: 100%;
}

.mb-branding .custom-logo {
	max-height: calc(var(--mb-header-height) - 30px);
	width: auto;
	display: block;
}

.mb-branding .site-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

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

/* Main menu fills the remaining header width, left to right */
.mb-main-navigation {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	height: 100%;
}

.mb-main-navigation > div,
.mb-main-navigation > ul {
	width: 100%;
}

.mb-main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	width: 100%;
	justify-content: space-between;
	align-items: center;
}

.mb-main-navigation li {
	position: relative;
}

.mb-main-navigation a {
	display: flex;
	align-items: center;
	height: var(--mb-header-height);
	padding: 0 10px;
	color: var(--mb-color-text);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.mb-main-navigation a:hover {
	color: var(--mb-color-accent);
}

/* Dropdowns */
.mb-main-navigation ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--mb-color-bg);
	border: 1px solid var(--mb-color-line);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	display: none;
	flex-direction: column;
	justify-content: flex-start;
	z-index: 1000;
}

.mb-main-navigation li:hover > ul {
	display: flex;
}

.mb-main-navigation ul ul li {
	width: 100%;
}

.mb-main-navigation ul ul a {
	height: auto;
	padding: 12px 16px;
	width: 100%;
}

/* Mobile toggle */
.mb-menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--mb-color-line);
	border-radius: 4px;
	padding: 8px 12px;
	font-size: 16px;
	cursor: pointer;
	margin-left: auto;
}

/* -------------------------------------------------
   4. Hero banner (front page)
------------------------------------------------- */
.mb-hero {
	width: 100%;
	height: var(--mb-hero-height);
	background-color: var(--mb-color-dark);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #ffffff;
	position: relative;
}

.mb-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
}

.mb-hero-inner {
	position: relative;
	z-index: 1;
	max-width: 900px;
	padding: 0 20px;
}

.mb-hero-title {
	margin: 0 0 16px;
	font-size: 56px;
	line-height: 1.1;
	font-weight: 800;
}

.mb-hero-subtitle {
	margin: 0;
	font-size: 20px;
	opacity: 0.9;
}

/* -------------------------------------------------
   5. Page / content layout
------------------------------------------------- */
.mb-site-main {
	padding: 48px 0;
}

.mb-page-title {
	margin: 0 0 32px;
	font-size: 36px;
	line-height: 1.2;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
	line-height: 1.25;
}

/* WPBakery full-width rows should still work inside the boxed content */
.mb-content-container .vc_row[data-vc-full-width] {
	position: relative;
}

/* -------------------------------------------------
   6. Blog mosaic grid
------------------------------------------------- */
.mb-mosaic {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 220px;
	grid-auto-flow: dense;
	gap: 20px;
}

.mb-mosaic-item {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	background: var(--mb-color-dark);
	grid-column: span 1;
	grid-row: span 1;
}

/* Mosaic pattern: every 1st of 6 is big, every 4th of 6 is wide, every 6th is tall */
.mb-mosaic-item:nth-child(6n + 1) {
	grid-column: span 2;
	grid-row: span 2;
}

.mb-mosaic-item:nth-child(6n + 4) {
	grid-column: span 2;
}

.mb-mosaic-item:nth-child(6n) {
	grid-row: span 2;
}

.mb-mosaic-thumb {
	position: absolute;
	inset: 0;
}

.mb-mosaic-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.mb-mosaic-item:hover .mb-mosaic-thumb img {
	transform: scale(1.05);
}

.mb-mosaic-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 20px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 60%);
	color: #ffffff;
	z-index: 1;
}

.mb-mosaic-overlay .mb-mosaic-meta {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.8;
	margin-bottom: 6px;
}

.mb-mosaic-overlay .mb-mosaic-title {
	margin: 0;
	font-size: 18px;
	line-height: 1.3;
}

.mb-mosaic-overlay .mb-mosaic-title a {
	color: #ffffff;
	text-decoration: none;
}

.mb-mosaic-overlay .mb-mosaic-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Pagination */
.mb-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.mb-pagination .page-numbers {
	padding: 8px 14px;
	border: 1px solid var(--mb-color-line);
	border-radius: 4px;
	color: var(--mb-color-text);
}

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

/* -------------------------------------------------
   7. Footer — 4 widget columns
------------------------------------------------- */
.mb-site-footer {
	background: var(--mb-color-dark);
	color: #cccccc;
	margin-top: 64px;
	padding: 56px 0 0;
}

.mb-site-footer a {
	color: #ffffff;
}

.mb-footer-widgets {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 40px;
	padding-bottom: 48px;
}

.mb-footer-col .widget {
	margin: 0 0 24px;
}

.mb-footer-col .widget-title {
	color: #ffffff;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0 0 16px;
}

.mb-footer-col .custom-logo,
.mb-footer-col .mb-footer-logo img {
	max-height: 60px;
	width: auto;
}

.mb-footer-col .site-title {
	margin: 0;
	font-size: 20px;
}

/* Vertical menu in footer (footer widget 2 default) */
.mb-footer-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mb-footer-menu ul ul {
	padding-left: 14px;
	margin-top: 10px;
}

.mb-site-footer .mb-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 20px 0;
	font-size: 13px;
	text-align: center;
}

/* -------------------------------------------------
   8. Misc / a11y
------------------------------------------------- */
.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;
}

.mb-blank-page .mb-site-main {
	padding: 0;
}

/* -------------------------------------------------
   9. Responsive
------------------------------------------------- */
@media (max-width: 1024px) {
	.mb-mosaic {
		grid-template-columns: repeat(2, 1fr);
	}

	.mb-footer-widgets {
		grid-template-columns: repeat(2, 1fr);
	}

	.mb-hero-title {
		font-size: 40px;
	}
}

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

	.mb-main-navigation {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		height: auto;
		background: var(--mb-color-bg);
		border-bottom: 1px solid var(--mb-color-line);
		display: none;
	}

	.mb-main-navigation.is-open {
		display: block;
	}

	.mb-main-navigation ul {
		flex-direction: column;
		align-items: stretch;
	}

	.mb-main-navigation a {
		height: auto;
		padding: 14px 20px;
	}

	.mb-main-navigation ul ul {
		position: static;
		display: block;
		border: 0;
		box-shadow: none;
		padding-left: 16px;
	}

	.mb-mosaic {
		grid-template-columns: 1fr;
	}

	.mb-mosaic-item,
	.mb-mosaic-item:nth-child(6n + 1),
	.mb-mosaic-item:nth-child(6n + 4),
	.mb-mosaic-item:nth-child(6n) {
		grid-column: span 1;
		grid-row: span 1;
		min-height: 260px;
	}

	.mb-footer-widgets {
		grid-template-columns: 1fr;
	}

	.mb-hero {
		height: 480px;
	}

	.mb-hero-title {
		font-size: 32px;
	}
}
