/* Themonkylab Base — foundation styles (child themes override brand) */

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

html {
	scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ml-font-heading);
	line-height: 1.2;
	margin: 0 0 0.5em;
}

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

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

.ml-container {
	width: min(var(--ml-container-max, 1300px), calc(100% - 2rem));
	margin-inline: auto;
}

body.ml-layout-full .ml-container {
	width: 100%;
	max-width: none;
	padding-inline: 1rem;
	margin-inline: 0;
}

.ml-site-header {
	z-index: 100;
	width: 100%;
	color: var(--ml-color-header-text);
	border-bottom: 1px solid var(--ml-color-header-border);
	transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ml-header-bg--solid {
	background: var(--ml-color-header);
}

.ml-header-bg--transparent,
.ml-header-bg--transparent-scroll {
	background: transparent;
	border-bottom-color: transparent;
}

.ml-header-bg--transparent-scroll.is-scrolled,
.ml-site-header.is-scrolled.ml-header-bg--transparent-scroll {
	background: var(--ml-color-header);
	border-bottom-color: var(--ml-color-header-border);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.ml-header-pos--static {
	position: relative;
}

.ml-header-pos--sticky {
	position: sticky;
	top: 0;
}

.ml-header-pos--fixed {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
}

.ml-header-pos--absolute {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}

.ml-header-offset {
	height: var(--ml-header-offset, 72px);
}

.ml-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1rem 0;
}

.ml-header-inner--centered {
	flex-direction: column;
	justify-content: center;
	text-align: center;
	gap: 0.75rem;
}

.ml-header-inner--centered .ml-nav ul {
	justify-content: center;
}

.ml-header-inner--minimal {
	padding: 0.65rem 0;
}

.ml-header-inner--minimal .ml-logo,
.ml-header-inner--minimal .ml-logo-text,
.ml-header-inner--minimal .custom-logo-link img {
	max-height: 36px;
	font-size: 1.05rem;
}

.ml-logo,
.ml-logo-text {
	max-height: 48px;
	width: auto;
	text-decoration: none;
	color: var(--ml-color-header-text);
	font-family: var(--ml-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
}

.custom-logo-link img {
	max-height: 48px;
	width: auto;
}

.ml-nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--ml-color-header-link);
	color: var(--ml-color-header-link);
	padding: 0.4rem 0.75rem;
	cursor: pointer;
}

.ml-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.25rem;
}

.ml-nav,
.ml-nav a {
	font-family: var(--ml-font-menu);
}

.ml-nav a {
	text-decoration: none;
	color: var(--ml-color-header-link);
	font-weight: 500;
}

.ml-main {
	padding: 2.5rem 0 4rem;
	min-height: 50vh;
}

.ml-hero {
	padding: 4rem 0;
	background: linear-gradient(160deg, var(--ml-color-header), var(--ml-color-bg));
}

.ml-hero__title {
	font-size: clamp(2rem, 5vw, 3.25rem);
	color: var(--ml-color-primary);
}

.ml-hero__subtitle {
	max-width: 36rem;
	color: var(--ml-color-secondary);
	font-size: 1.125rem;
}

.ml-btn {
	display: inline-block;
	margin-top: 1.25rem;
	padding: 0.75rem 1.5rem;
	background: var(--ml-color-accent);
	color: #fff;
	text-decoration: none;
	font-family: var(--ml-font-button);
	font-weight: 600;
	border: none;
	cursor: pointer;
}

.ml-btn:hover {
	filter: brightness(0.95);
}

.ml-section {
	padding: 3rem 0;
}

.ml-site-footer {
	background: var(--ml-color-footer);
	color: var(--ml-color-footer-text);
	padding: 3rem 0 1.5rem;
}

.ml-site-footer a {
	color: var(--ml-color-footer-link);
	text-decoration: none;
}

.ml-site-footer a:hover {
	opacity: 0.85;
}

.ml-site-footer ul,
.ml-site-footer .menu,
.ml-footer-menu ul,
.ml-footer-simple__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ml-site-footer li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ml-footer-menu ul,
.ml-footer-menu .menu,
.ml-footer-menu__list {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ml-footer-menu a {
	font-weight: 500;
}

.ml-footer-grid {
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr;
	gap: 2rem;
}

.ml-footer-simple {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.ml-footer-simple__menu,
.ml-footer-simple .menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ml-footer-minimal {
	text-align: center;
	padding-top: 0.5rem;
}

.ml-footer-minimal .ml-footer-copy {
	margin-top: 0;
	border-top: 0;
}

.ml-social {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.ml-footer-copy {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 0.875rem;
	opacity: 0.8;
}

.ml-blog-grid {
	display: grid;
	gap: 2rem;
}

.ml-blog-grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ml-blog-grid--cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ml-blog-grid--cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ml-blog-list .ml-entry + .ml-entry {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ml-entry__thumb {
	overflow: hidden;
	margin-bottom: 1rem;
}

.ml-entry__thumb img {
	width: 100%;
	object-fit: cover;
}

.ml-ratio-landscape img {
	aspect-ratio: 16 / 10;
}

.ml-ratio-square img {
	aspect-ratio: 1 / 1;
}

.ml-ratio-portrait img {
	aspect-ratio: 3 / 4;
}

.ml-entry__meta {
	font-size: 0.875rem;
	color: var(--ml-color-secondary);
	margin: 0.35rem 0 0.75rem;
}

.ml-entry__cats {
	font-size: 0.8rem;
	margin-bottom: 0.5rem;
}

.ml-single-layout {
	display: grid;
	gap: 2rem;
}

.ml-single-layout--sidebar {
	grid-template-columns: minmax(0, 1fr) 280px;
}

.ml-featured--full {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-bottom: 2rem;
}

.ml-featured--full img {
	width: 100%;
	max-height: 480px;
	object-fit: cover;
}

.ml-related {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ml-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}

@media (max-width: 960px) {
	.ml-blog-grid--cols-3,
	.ml-blog-grid--cols-4,
	.ml-single-layout--sidebar,
	.ml-related__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 768px) {
	.ml-nav-toggle {
		display: inline-block;
	}

	.ml-nav {
		display: none;
		width: 100%;
	}

	.ml-nav.is-open {
		display: block;
	}

	.ml-header-inner {
		flex-wrap: wrap;
	}

	.ml-header-inner--centered {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
		text-align: left;
	}

	.ml-nav ul {
		flex-direction: column;
		padding: 0.5rem 0 1rem;
	}

	.ml-footer-grid,
	.ml-blog-grid--cols-2,
	.ml-blog-grid--cols-3,
	.ml-blog-grid--cols-4,
	.ml-single-layout--sidebar,
	.ml-related__grid {
		grid-template-columns: 1fr;
	}
}
