/**
 * Battrend — Tinhte-inspired typography & layout.
 */

:root {
	--battrend-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--battrend-text: #2d3748;
	--battrend-text-muted: #9d9d9d;
	--battrend-accent: #3c5894;
	--battrend-accent-hover: #2d4373;
	--battrend-border: #e2e8f0;
	--battrend-content-width: 720px;
}

body {
	font-family: var(--battrend-font);
	color: var(--battrend-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Header */

.battrend-header {
	border-bottom: 1px solid var(--battrend-border);
}

.battrend-header__inner {
	gap: 1rem;
}

.battrend-header .wp-block-site-title a {
	font-family: var(--battrend-font);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--battrend-text);
	text-decoration: none;
}

.battrend-header .wp-block-site-title a:hover {
	color: var(--battrend-accent);
}

.battrend-header .wp-block-navigation {
	font-family: var(--battrend-font);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}

.battrend-header .wp-block-navigation .wp-block-navigation__container {
	gap: 1.25rem;
}

.battrend-header .wp-block-navigation__responsive-container-open,
.battrend-header .wp-block-navigation__responsive-container-close {
	display: none;
}

.battrend-header .wp-block-navigation__responsive-container:not(.hidden-by-default) {
	display: block;
	position: static;
	width: auto;
	height: auto;
	padding: 0;
	background: transparent;
}

.battrend-header .wp-block-navigation__responsive-dialog {
	position: static;
	transform: none;
	margin: 0;
	padding: 0;
}

.battrend-header .wp-block-navigation a {
	color: var(--battrend-text);
	text-decoration: none;
}

.battrend-header .wp-block-navigation a:hover,
.battrend-header .wp-block-navigation .current-menu-item > a {
	color: var(--battrend-accent);
}

/* Footer */

.battrend-footer {
	border-top: 1px solid var(--battrend-border);
	font-family: var(--battrend-font);
	font-size: 15px;
	line-height: 1.5;
	color: var(--battrend-text-muted);
}

.battrend-footer__meta {
	margin: 0;
}

.battrend-footer p {
	margin: 0;
	color: var(--battrend-text-muted);
}

/* Homepage / query loop — media object list */

.battrend-post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.battrend-post-list > .wp-block-post {
	margin: 0 0 2.5rem;
	padding: 0 0 2.5rem;
	border-bottom: 1px solid var(--battrend-border);
}

.battrend-post-list > .wp-block-post:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.battrend-post-item {
	display: grid !important;
	grid-template-columns: minmax(140px, 280px) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: start;
}

.battrend-post-item .wp-block-post-featured-image,
.battrend-post-item__thumb {
	margin: 0;
	min-width: 0;
	width: 100%;
	max-width: 280px;
	overflow: hidden;
	border-radius: 8px;
}

.battrend-post-item .wp-block-post-featured-image a,
.battrend-post-item__thumb a {
	display: block;
	line-height: 0;
}

.battrend-post-item .wp-block-post-featured-image img,
.battrend-post-item__thumb img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.battrend-post-item__body {
	min-width: 0;
	max-width: none;
	width: auto;
}

.battrend-post-item__body.is-layout-constrained {
	max-width: none !important;
}

.battrend-post-item .wp-block-post-title {
	font-family: var(--battrend-font);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 0.5rem;
	word-break: normal;
	overflow-wrap: break-word;
}

.battrend-post-item .wp-block-post-title a {
	display: inline;
	color: var(--battrend-text);
	text-decoration: none;
	white-space: normal;
}

.battrend-post-item .wp-block-post-title a:hover {
	color: var(--battrend-accent);
}

.battrend-post-item__excerpt,
.battrend-post-item .wp-block-post-excerpt {
	font-size: 16px;
	line-height: 1.5;
	color: var(--battrend-text-muted);
	margin: 0;
}

.battrend-post-item__excerpt p,
.battrend-post-item .wp-block-post-excerpt p {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Archive / generic query loop */

.wp-block-query .wp-block-post-title {
	font-family: var(--battrend-font);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
}

.wp-block-query .wp-block-post-title a {
	color: var(--battrend-text);
	text-decoration: none;
}

.wp-block-query .wp-block-post-title a:hover {
	color: var(--battrend-accent);
}

main:not(.battrend-home) .wp-block-query .wp-block-post {
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--battrend-border);
}

main:not(.battrend-home) .wp-block-query .wp-block-post:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.wp-block-query .wp-block-post-excerpt {
	font-size: 16px;
	line-height: 1.5;
	color: var(--battrend-text-muted);
	margin-top: 0.5rem;
}

.wp-block-query .wp-block-post-date,
.wp-block-query .wp-block-post-author,
.wp-block-query .wp-block-post-author-name {
	font-size: 14px;
	line-height: 1.43;
	color: var(--battrend-text-muted);
}

/* Single post */

.battrend-single__header {
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--battrend-border);
}

.battrend-single__categories {
	margin: 0 0 0.75rem;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.battrend-single__categories a {
	color: var(--battrend-accent);
	text-decoration: none;
}

.battrend-single__categories a:hover {
	color: var(--battrend-accent-hover);
	text-decoration: underline;
}

.battrend-single__title {
	font-family: var(--battrend-font);
	font-size: 32px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 1rem;
	color: var(--battrend-text);
}

.battrend-single__meta {
	gap: 0.5rem 1rem;
	font-size: 14px;
	line-height: 1.43;
	color: var(--battrend-text-muted);
}

.battrend-single__meta .wp-block-post-date,
.battrend-single__meta .wp-block-post-author-name {
	margin: 0;
	font-size: inherit;
	color: inherit;
}

.battrend-single__content {
	font-size: 17px;
	line-height: 1.65;
	color: var(--battrend-text);
	text-align: justify;
}

.battrend-single__content > *:first-child {
	margin-top: 0;
}

.battrend-single__content p {
	margin: 0 0 1.25rem;
}

.battrend-single__content h2 {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.35;
	margin: 2.5rem 0 1rem;
	color: var(--battrend-text);
}

.battrend-single__content h3 {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	margin: 2rem 0 0.75rem;
	color: var(--battrend-text);
}

.battrend-single__content h4 {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	margin: 1.5rem 0 0.5rem;
}

.battrend-single__content ul,
.battrend-single__content ol {
	margin: 0 0 1.25rem;
	padding-left: 1.5rem;
}

.battrend-single__content li {
	margin-bottom: 0.5rem;
}

.battrend-single__content li:last-child {
	margin-bottom: 0;
}

.battrend-single__content blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--battrend-accent);
	background: #f7f9fc;
	border-radius: 0 8px 8px 0;
	color: var(--battrend-text);
}

.battrend-single__content blockquote p:last-child {
	margin-bottom: 0;
}

.battrend-single__content figure,
.battrend-single__content .wp-block-image {
	margin: 1.5rem 0;
	width: 100%;
	max-width: 100%;
}

.battrend-single__content figure.aligncenter,
.battrend-single__content .wp-block-image.aligncenter {
	margin-left: 0;
	margin-right: 0;
}

.battrend-single__content img {
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.battrend-single__content figcaption {
	margin-top: 0.5rem;
	font-size: 14px;
	line-height: 1.43;
	color: var(--battrend-text-muted);
	text-align: center;
}

.battrend-single__content a {
	color: var(--battrend-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.battrend-single__content a:hover {
	color: var(--battrend-accent-hover);
}

.battrend-single__content hr {
	margin: 2rem 0;
	border: none;
	border-top: 1px solid var(--battrend-border);
}

.battrend-single__content pre,
.battrend-single__content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.9em;
}

.battrend-single__content pre {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	background: #f1f5f9;
	border-radius: 8px;
	line-height: 1.5;
}

.battrend-single__content :not(pre) > code {
	padding: 0.15em 0.4em;
	background: #f1f5f9;
	border-radius: 4px;
}

.battrend-single__content table {
	width: 100%;
	margin: 1.5rem 0;
	border-collapse: collapse;
	font-size: 15px;
}

.battrend-single__content th,
.battrend-single__content td {
	padding: 0.625rem 0.875rem;
	border: 1px solid var(--battrend-border);
	text-align: left;
}

.battrend-single__content th {
	background: #f7f9fc;
	font-weight: 600;
}

.battrend-single__bottom {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--battrend-border);
}

.battrend-single__tags {
	margin: 0 0 1.5rem;
	font-size: 14px;
	line-height: 1.6;
	color: var(--battrend-text-muted);
}

.battrend-single__tags:empty,
.battrend-single__bottom:not(:has(.battrend-single__tags a)) .battrend-single__tags {
	display: none;
	margin: 0;
}

.battrend-single__tags a {
	display: inline-block;
	margin: 0.25rem 0.5rem 0.25rem 0;
	padding: 0.25rem 0.75rem;
	color: var(--battrend-text);
	text-decoration: none;
	background: #f7f9fc;
	border: 1px solid var(--battrend-border);
	border-radius: 999px;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.battrend-single__tags a:hover {
	color: var(--battrend-accent);
	border-color: var(--battrend-accent);
	background: #fff;
}

.battrend-single__nav {
	gap: 1rem;
	margin: 0;
}

.battrend-single__nav .post-navigation-link-previous,
.battrend-single__nav .post-navigation-link-next {
	flex: 1;
	min-width: min(100%, 280px);
}

.battrend-single__nav .post-navigation-link-next {
	text-align: right;
}

.battrend-single__nav a {
	display: block;
	padding: 1rem 1.25rem;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--battrend-text);
	text-decoration: none;
	background: #f7f9fc;
	border: 1px solid var(--battrend-border);
	border-radius: 8px;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.battrend-single__nav a:hover {
	color: var(--battrend-accent);
	border-color: var(--battrend-accent);
	background: #fff;
}

.battrend-single__nav .post-navigation-link__label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 12px;
	font-weight: 500;
	color: var(--battrend-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Archive / query titles */

.wp-block-query-title,
.wp-block-archive-title {
	font-family: var(--battrend-font);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
	margin-bottom: 1.5rem;
}

/* Responsive */

@media (max-width: 782px) {
	.battrend-single__title {
		font-size: 26px;
		line-height: 1.3;
	}

	.battrend-single__content {
		font-size: 16px;
		line-height: 1.6;
	}

	.battrend-single__content h2 {
		font-size: 21px;
	}

	.battrend-single__content h3 {
		font-size: 18px;
	}

	.battrend-single__nav .post-navigation-link-previous,
	.battrend-single__nav .post-navigation-link-next {
		flex: 1 1 100%;
		text-align: left;
	}

	.battrend-post-item {
		grid-template-columns: 1fr;
	}

	.battrend-post-item .wp-block-post-featured-image,
	.battrend-post-item__thumb {
		max-width: 100%;
	}

	.battrend-post-item .wp-block-post-title {
		font-size: 18px;
		line-height: 1.44;
	}

	.wp-block-query .wp-block-post-title {
		font-size: 18px;
		line-height: 1.44;
	}

	.battrend-header__inner {
		flex-wrap: wrap !important;
		row-gap: 0.5rem;
	}

	.battrend-header .wp-block-site-title {
		flex: 1 1 100%;
		width: 100%;
	}

	.battrend-header__nav {
		flex: 1 1 100%;
		width: 100%;
		justify-content: flex-start !important;
	}

	.battrend-header .wp-block-site-title a {
		font-size: 18px;
	}

	.battrend-header .wp-block-navigation {
		font-size: 14px;
	}
}
