/*
Theme Name: ADM Theme
Theme URI: https://example.com
Author: ADM
Description: ADM agency site; homepage shell matches mockup, page content from editor; Multilanguage (BWS) with `lang-switch`.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adm-theme
*/

:root {
	--adm-bg: #ffffff;
	--adm-surface: #ffffff;
	--adm-text: #3b2f24;
	--adm-muted: #4f4f4f;
	--adm-accent: #d86f20;
	--adm-line: #ececec;
}

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

body {
	margin: 0;
	min-height: 100vh;
	font-family: Nunito, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	background: #fff url("assets/images/site-bg.png") repeat fixed;
	color: var(--adm-text);
	line-height: 1.6;
	overflow-x: hidden;
}

.adm-wrap {
	max-width: 1240px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
}

/* Shell header is fixed, so post content needs top clearance. */
body.single .adm-wrap {
	padding-top: 132px;
}

.adm-card {
	background: var(--adm-surface);
	border-radius: 16px;
	padding: 2rem;
	border: 1px solid var(--adm-line);
}

.adm-card h1 {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 600;
}

.adm-card p {
	margin: 0;
	color: var(--adm-muted);
}

.adm-card a {
	color: var(--adm-accent);
}

.adm-card-empty {
	max-width: 720px;
}

.adm-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.4rem 1.8rem;
}

.adm-post-card {
	min-width: 0;
}

.adm-post-thumb {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 0.8rem;
	background: #e6e1dc;
	aspect-ratio: 16 / 9;
}

.adm-post-thumb img,
.adm-post-thumb-fallback {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.adm-post-thumb-fallback {
	background: linear-gradient(135deg, #d9d3cc, #c1b8ae);
}

.adm-post-title {
	margin: 0 0 0.45rem;
	font-size: clamp(1.15rem, 1.6vw, 2rem);
	line-height: 1.22;
	letter-spacing: -0.01em;
}

.adm-post-title a {
	color: var(--adm-text);
	text-decoration: none;
}

.adm-post-title a:hover {
	color: var(--adm-accent);
}

.adm-post-excerpt {
	margin: 0;
	color: #303030;
	font-size: 1.05rem;
	line-height: 1.45;
}

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

.adm-pagination ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.adm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 0.75rem;
	border: 1px solid var(--adm-line);
	border-radius: 999px;
	text-decoration: none;
	color: var(--adm-text);
	background: #fff;
}

.adm-pagination .current {
	border-color: var(--adm-accent);
	background: #fff7f0;
	color: var(--adm-accent);
	font-weight: 700;
}

.adm-single-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 2rem;
	align-items: start;
}

.adm-single-content {
	min-width: 0;
}

.adm-single-kicker {
	margin: 0 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #9a7b5a;
}

.adm-single-title {
	margin: 0;
	font-size: clamp(1.8rem, 3.2vw, 2.8rem);
	line-height: 1.14;
}

.adm-single-meta {
	margin-top: 0.45rem;
	color: #8b8b8b;
	font-size: 0.95rem;
}

.adm-single-entry {
	margin-top: 1.25rem;
	color: #2d2d2d;
}

.adm-single-entry p {
	margin: 0 0 1rem;
	font-size: 1.1rem;
	line-height: 1.62;
}

.adm-single-sidebar {
	position: sticky;
	top: 110px;
}

.adm-widget + .adm-widget {
	margin-top: 1.6rem;
}

/* Override global shell rule `section { padding: 96px 0; }` for sidebar widgets. */
.adm-single-sidebar section.adm-widget {
	padding: 0;
}

.adm-widget-title {
	margin: 0 0 0.85rem;
	font-size: 2rem;
	line-height: 1.1;
}

.adm-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.adm-widget li + li {
	border-top: 1px solid var(--adm-line);
	padding-top: 0.65rem;
	margin-top: 0.65rem;
}

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

.adm-widget a:hover {
	color: var(--adm-accent);
}

/* Single post sidebar: compact row — 60×60 thumb left, title/meta/excerpt right (not stacked full-width). */
.adm-single-sidebar ul.wp-block-latest-posts__list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.adm-single-sidebar ul.wp-block-latest-posts__list.is-grid,
.adm-single-sidebar .wp-block-latest-posts.is-grid .wp-block-latest-posts__list {
	display: flex;
	flex-direction: column;
}

.adm-single-sidebar ul.wp-block-latest-posts__list > li:has(.wp-block-latest-posts__featured-image) {
	display: grid;
	grid-template-columns: 60px 1fr;
	column-gap: 12px;
	row-gap: 4px;
	align-items: start;
}

.adm-single-sidebar .wp-block-latest-posts__featured-image {
	grid-column: 1;
	grid-row: 1 / -1;
	width: 60px;
	height: 60px;
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	background: #e6e1dc;
	float: none;
}

.adm-single-sidebar .wp-block-latest-posts__featured-image a {
	display: block;
	width: 100%;
	height: 100%;
	font-weight: inherit;
}

.adm-single-sidebar .wp-block-latest-posts__featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.adm-single-sidebar ul.wp-block-latest-posts__list > li:has(.wp-block-latest-posts__featured-image) .wp-block-latest-posts__post-title,
.adm-single-sidebar ul.wp-block-latest-posts__list > li:has(.wp-block-latest-posts__featured-image) .wp-block-latest-posts__post-date,
.adm-single-sidebar ul.wp-block-latest-posts__list > li:has(.wp-block-latest-posts__featured-image) .wp-block-latest-posts__post-author,
.adm-single-sidebar ul.wp-block-latest-posts__list > li:has(.wp-block-latest-posts__featured-image) .wp-block-latest-posts__post-excerpt {
	grid-column: 2;
}

.adm-single-sidebar ul.wp-block-latest-posts__list > li:has(.wp-block-latest-posts__featured-image) .wp-block-latest-posts__post-title {
	margin: 0;
}

.adm-single-sidebar ul.wp-block-latest-posts__list > li:has(.wp-block-latest-posts__featured-image) .wp-block-latest-posts__post-excerpt {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--adm-muted);
	line-height: 1.4;
}

/* Fallback “latest posts” in single.php */
.adm-latest-posts-fallback .adm-sidebar-post-row {
	display: grid;
	grid-template-columns: 60px 1fr;
	column-gap: 12px;
	align-items: start;
	text-decoration: none;
	color: inherit;
}

.adm-latest-posts-fallback .adm-sidebar-post-thumb {
	width: 60px;
	height: 60px;
	border-radius: 8px;
	overflow: hidden;
	background: #e6e1dc;
	flex-shrink: 0;
}

.adm-latest-posts-fallback .adm-sidebar-post-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.adm-latest-posts-fallback .adm-sidebar-post-title {
	display: block;
	font-weight: 600;
	line-height: 1.35;
	min-width: 0;
}

@media (max-width: 1024px) {
	.adm-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.adm-single-layout {
		grid-template-columns: 1fr;
	}
	.adm-single-sidebar {
		position: static;
	}
	.adm-widget-title {
		font-size: 1.6rem;
	}
}

@media (max-width: 680px) {
	.adm-wrap {
		padding: 1.5rem 1rem 2.25rem;
	}
	body.single .adm-wrap {
		padding-top: 118px;
	}
	.adm-post-grid {
		grid-template-columns: 1fr;
		gap: 1.2rem;
	}
}
