/*
Theme Name: Hearthwell Living
Theme URI: https://fulmemo.com/
Author: Fulmemo
Author URI: https://fulmemo.com/
Description: A fast, accessible, content-first theme for practical home and lifestyle publishing on Fulmemo.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: hearthwell-living
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

:root {
	--hw-accent: #9c5f3c;
	--hw-accent-dark: #754127;
	--hw-bg: #f7f4ee;
	--hw-surface: #ffffff;
	--hw-text: #292722;
	--hw-muted: #6d6961;
	--hw-border: #ded8cd;
	--hw-header-height: 4.5rem;
	--hw-radius: 0.75rem;
	--hw-shadow: 0 10px 30px rgba(43, 36, 28, 0.08);
	--hw-content: 74rem;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--hw-bg);
	color: var(--hw-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.7;
}

a {
	color: var(--hw-accent-dark);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.14em;
}

a:hover,
a:focus {
	color: var(--hw-accent);
}

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

button,
input,
textarea,
select {
	font: inherit;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	background: var(--hw-surface);
	color: var(--hw-text);
	display: block;
	height: auto;
	left: 0.5rem;
	padding: 0.75rem 1rem;
	top: 0.5rem;
	width: auto;
	z-index: 100000;
}

.site-header {
	backdrop-filter: blur(10px);
	background: var(--hw-surface);
	background: color-mix(in srgb, var(--hw-surface) 94%, transparent);
	border-bottom: 1px solid var(--hw-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.admin-bar .site-header {
	top: 32px;
}

.header-inner,
.site-content,
.footer-inner {
	margin-inline: auto;
	max-width: var(--hw-content);
	padding-inline: 1.25rem;
}

.header-inner {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	min-height: var(--hw-header-height);
	position: relative;
}

.site-branding {
	flex: 0 1 auto;
	margin-right: auto;
	max-width: min(18rem, 42vw);
	min-width: 0;
}

.site-title {
	display: inline-block;
	font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
	font-size: clamp(1.2rem, 2.4vw, 1.55rem);
	font-weight: 700;
	line-height: 1.15;
	text-decoration: none;
	white-space: nowrap;
}

.site-description {
	color: var(--hw-muted);
	font-size: 0.78rem;
	line-height: 1.3;
	margin: 0.15rem 0 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.custom-logo {
	max-height: 2.75rem;
	width: auto;
}

.main-navigation {
	flex: 1 1 auto;
	min-width: 0;
}

.main-navigation .menu,
.main-navigation > ul {
	align-items: center;
	display: flex;
	flex-wrap: nowrap;
	gap: 0.15rem 0.9rem;
	justify-content: flex-end;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-navigation li {
	flex: 0 0 auto;
	margin: 0;
}

.main-navigation a {
	display: inline-block;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.2;
	padding: 0.35rem 0;
	text-decoration: none;
	white-space: nowrap;
}

.main-navigation .page_item,
.main-navigation .menu-item {
	list-style: none;
}

.menu-toggle,
.theme-toggle {
	background: transparent;
	border: 1px solid var(--hw-border);
	border-radius: 0.4rem;
	color: inherit;
	cursor: pointer;
	flex: 0 0 auto;
	line-height: 1;
	padding: 0.45rem 0.7rem;
}

.menu-toggle {
	display: none;
	margin-left: 0;
	order: 2;
}

.theme-toggle {
	margin-left: 0;
	order: 3;
}

.main-navigation {
	order: 1;
}

.reading-progress {
	background: var(--hw-accent);
	height: 3px;
	left: 0;
	position: fixed;
	top: 0;
	transform: scaleX(0);
	transform-origin: left;
	width: 100%;
	z-index: 1000;
}

.site-content {
	display: grid;
	gap: 2rem;
	grid-template-columns: minmax(0, 1fr) 19rem;
	padding-block: 2.5rem;
}

.site-main {
	min-width: 0;
}

.page-header,
.article-card,
.single-article,
.page-article,
.comments-area,
.not-found,
.author-box,
.related-posts,
.newsletter-box {
	background: var(--hw-surface);
	border: 1px solid var(--hw-border);
	border-radius: var(--hw-radius);
	box-shadow: var(--hw-shadow);
	margin-bottom: 1.5rem;
	padding: clamp(1.25rem, 4vw, 2rem);
}

.page-title,
.entry-title {
	font-family: Georgia, serif;
	line-height: 1.2;
	margin: 0 0 0.75rem;
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-meta,
.entry-footer,
.archive-description {
	color: var(--hw-muted);
	font-size: 0.9rem;
}

.entry-thumbnail {
	aspect-ratio: 16 / 9;
	border-radius: calc(var(--hw-radius) / 1.5);
	margin-bottom: 1.25rem;
	object-fit: cover;
	width: 100%;
}

.entry-content {
	font-family: Georgia, serif;
	font-size: clamp(1.05rem, 2vw, 1.16rem);
}

.entry-content > * {
	margin-bottom: 1.35em;
}

.entry-content h2,
.entry-content h3 {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.3;
	scroll-margin-top: 6rem;
}

.entry-content .alignwide {
	margin-left: 50%;
	max-width: min(100vw - 2rem, 68rem);
	transform: translateX(-50%);
	width: 130%;
}

.entry-content .alignfull {
	margin-left: 50%;
	max-width: 100vw;
	transform: translateX(-50%);
	width: 100vw;
}

.breadcrumbs {
	color: var(--hw-muted);
	font-size: 0.85rem;
	margin-bottom: 1rem;
}

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
	content: "/";
	margin-left: 0.35rem;
}

.toc {
	background: var(--hw-bg);
	border-left: 4px solid var(--hw-accent);
	border-radius: 0.35rem;
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
}

.toc-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.toc ol {
	margin-bottom: 0;
}

.share-links {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1.5rem 0;
}

.button,
.share-links a,
input[type="submit"] {
	background: var(--hw-accent);
	border: 0;
	border-radius: 0.35rem;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	font-weight: 700;
	padding: 0.55rem 0.9rem;
	text-decoration: none;
}

.widget-area {
	min-width: 0;
}

.sidebar-inner {
	position: sticky;
	top: calc(var(--hw-header-height) + 1.5rem);
}

.widget {
	background: var(--hw-surface);
	border: 1px solid var(--hw-border);
	border-radius: var(--hw-radius);
	margin-bottom: 1.25rem;
	padding: 1.25rem;
}

.widget-title {
	font-size: 1.1rem;
	margin-top: 0;
}

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

.ad-slot {
	align-items: center;
	background: repeating-linear-gradient(135deg, var(--hw-bg), var(--hw-bg) 8px, var(--hw-surface) 8px, var(--hw-surface) 16px);
	border: 1px dashed var(--hw-border);
	color: var(--hw-muted);
	display: flex;
	font-size: 0.75rem;
	justify-content: center;
	margin-block: 1.5rem;
	min-height: 7rem;
	text-align: center;
}

.pagination .nav-links,
.post-navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.page-numbers {
	background: var(--hw-surface);
	border: 1px solid var(--hw-border);
	border-radius: 0.35rem;
	padding: 0.5rem 0.8rem;
	text-decoration: none;
}

.page-numbers.current {
	background: var(--hw-accent);
	color: #fff;
}

.site-footer {
	background: #24221f;
	color: #eee9e1;
	padding-block: 2.5rem;
}

.site-footer a {
	color: #fff;
}

.footer-widgets {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, 1fr);
}

.site-info {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	margin-top: 1.5rem;
	padding-top: 1.5rem;
}

.back-to-top {
	background: var(--hw-accent);
	border: 0;
	border-radius: 50%;
	bottom: 1rem;
	color: #fff;
	cursor: pointer;
	height: 2.75rem;
	opacity: 0;
	position: fixed;
	right: 1rem;
	transform: translateY(1rem);
	transition: 0.2s;
	visibility: hidden;
	width: 2.75rem;
	z-index: 90;
}

.back-to-top.is-visible {
	opacity: 1;
	transform: translateY(0);
	visibility: visible;
}

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

.comment-body {
	border-bottom: 1px solid var(--hw-border);
	padding-block: 1rem;
}

.comment-form input:not([type="submit"]),
.comment-form textarea,
.search-form input[type="search"],
.newsletter-box input[type="email"] {
	background: var(--hw-surface);
	border: 1px solid var(--hw-border);
	border-radius: 0.35rem;
	color: var(--hw-text);
	max-width: 100%;
	padding: 0.65rem;
	width: 100%;
}

body.dark-mode {
	--hw-bg: #171817;
	--hw-surface: #222421;
	--hw-text: #eeeae3;
	--hw-muted: #b5b0a7;
	--hw-border: #3c3f3b;
	--hw-accent: #d39069;
	--hw-accent-dark: #e1a782;
	--hw-shadow: none;
	color-scheme: dark;
}

@media (max-width: 1100px) {
	.menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.main-navigation {
		background: var(--hw-surface);
		border-bottom: 1px solid var(--hw-border);
		display: none;
		left: 0;
		padding: 0.75rem 1.25rem 1.25rem;
		position: absolute;
		right: 0;
		top: 100%;
		width: 100%;
		z-index: 120;
	}

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

	.main-navigation .menu,
	.main-navigation > ul {
		align-items: stretch;
		flex-direction: column;
		gap: 0;
		justify-content: flex-start;
	}

	.main-navigation a {
		border-bottom: 1px solid var(--hw-border);
		display: block;
		padding: 0.85rem 0;
		white-space: normal;
	}

	.site-description {
		display: none;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}

	.site-content {
		grid-template-columns: 1fr;
		padding-block: 1.5rem;
	}

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

	.sidebar-inner {
		position: static;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		transition-duration: 0.01ms !important;
	}
}
