/* Type scale --------------------------------------------------------------
   Elementor's Site Settings emit `.elementor-kit-{id} h2` style rules, which
   outrank these bare tag selectors. Set the same values under Site Settings >
   Typography so Elementor-built pages match; these cover everything Elementor
   does not render (archives, search, 404, comments). */

body {
	font-size: 18px;
	line-height: 1.6;
}

p {
	font-size: 18px;
}

h1,
h2 {
	font-size: 40px;
	font-weight: 700;
	line-height: 1.2;
}

/* Layout ------------------------------------------------------------------ */

/* Content starts flush with the top of the page. */
.site-main {
	padding-block: 0;
}

.site-main > .page-header {
	margin-bottom: var(--em-space-lg);
}

.page-header .entry-title,
.entry-header .entry-title {
	margin-bottom: var(--em-space-xs);
	line-height: 1.2;
}

/* Archive grid ------------------------------------------------------------ */

.posts-archive {
	display: grid;
	gap: var(--em-space-lg);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-item {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background-color: var(--em-color-surface);
	border: 1px solid var(--em-color-border);
	border-radius: var(--em-radius-lg);
	box-shadow: var(--em-shadow);
	transition: transform var(--em-transition), box-shadow var(--em-transition);
}

.post-item:hover,
.post-item:focus-within {
	box-shadow: 0 2px 4px rgba(27, 58, 92, .08), 0 16px 32px rgba(27, 58, 92, .12);
	transform: translateY(-2px);
}

.post-item .post-thumbnail img {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.post-item .post-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--em-space-sm);
	padding: var(--em-space-md);
}

.post-item .entry-title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.3;
}

.post-item .entry-title a {
	color: var(--em-color-brand);
	text-decoration: none;
}

.post-item .entry-title a:hover {
	color: var(--em-color-accent);
}

.post-item .excerpt {
	margin: 0;
	color: var(--em-color-muted);
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--em-space-xs) var(--em-space-md);
	color: var(--em-color-muted);
	font-size: .875rem;
}

/* Entry content ---------------------------------------------------------- */

.entry-content > * + * {
	margin-top: var(--em-space-md);
}

.entry-content :where(h2, h3, h4) {
	margin-top: var(--em-space-lg);
	color: var(--em-color-brand);
}

.entry-content img,
.entry-content iframe {
	max-width: 100%;
	border-radius: var(--em-radius);
}

.entry-content blockquote {
	margin-inline: 0;
	padding: var(--em-space-md) var(--em-space-lg);
	background-color: var(--em-color-surface-alt);
	border-inline-start: 3px solid var(--em-color-accent);
	border-radius: var(--em-radius);
	font-style: normal;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content :where(th, td) {
	padding: var(--em-space-sm);
	border-bottom: 1px solid var(--em-color-border);
	text-align: start;
}

/* Forms and buttons ------------------------------------------------------ */

:where(input, select, textarea):not([type="submit"]):not([type="button"]) {
	max-width: 100%;
	padding: var(--em-space-xs) var(--em-space-sm);
	background-color: var(--em-color-surface);
	border: 1px solid var(--em-color-border);
	border-radius: var(--em-radius);
	color: inherit;
	font: inherit;
	transition: border-color var(--em-transition);
}

:where(input, select, textarea):not([type="submit"]):focus {
	border-color: var(--em-color-brand);
}

:where(button, input[type="submit"], .wp-block-button__link) {
	padding: var(--em-space-xs) var(--em-space-lg);
	background-color: var(--em-color-brand);
	border: 0;
	border-radius: var(--em-radius);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--em-transition);
}

:where(button, input[type="submit"], .wp-block-button__link):hover {
	background-color: var(--em-color-brand-hover);
}

/* Overrides the parent reset.css, which paints every button hover/focus #c36.
   Selector list and specificity match the parent so source order decides, and
   the child stylesheet always loads after it. */
[type="button"]:focus,
[type="button"]:hover,
[type="submit"]:focus,
[type="submit"]:hover,
button:focus,
button:hover {
	background-color: var(--em-color-teal);
	color: #fff;
	text-decoration: none;
}

/* Pagination and comments ----------------------------------------------- */

.pagination {
	display: flex;
	justify-content: center;
	margin-top: var(--em-space-xl);
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: var(--em-space-xs);
	border: 1px solid var(--em-color-border);
	border-radius: var(--em-radius);
	color: var(--em-color-brand);
	text-decoration: none;
}

.pagination .page-numbers.current {
	background-color: var(--em-color-brand);
	border-color: var(--em-color-brand);
	color: #fff;
}

.comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .comment-body {
	padding-block: var(--em-space-md);
	border-bottom: 1px solid var(--em-color-border);
}

/* Sticky header state set by assets/js/main.js. */
body[data-scrolled="true"] .site-header {
	box-shadow: var(--em-shadow);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}

@media print {
	.site-header,
	.site-footer,
	.pagination,
	.comments-area {
		display: none;
	}
}
