/**
 * CherryBerry ERP — blog, page content, comments and search styles.
 *
 * 1. Content typography
 * 2. Blog layout and sidebar
 * 3. Single post furniture
 * 4. Pagination
 * 5. Comments
 * 6. Search and 404
 * 7. Contact page
 * 8. Responsive
 */

/* ============================================================
   1. CONTENT TYPOGRAPHY
   ============================================================ */
.entry-content {
	font-size: 16.5px;
	line-height: 1.75;
	color: var(--slate);
}

.entry-content > * + * { margin-top: 22px; }

.entry-content h2 {
	font-size: clamp(23px, 2.8vw, 32px);
	margin-top: 44px;
	margin-bottom: -4px;
	color: var(--ink);
}

.entry-content h3 {
	font-size: clamp(19px, 2.2vw, 24px);
	margin-top: 36px;
	margin-bottom: -6px;
	color: var(--ink);
}

.entry-content h4 {
	font-size: 18px;
	margin-top: 30px;
	margin-bottom: -8px;
	color: var(--ink);
}

.entry-content a {
	color: var(--cherry);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.entry-content a:hover {
	color: var(--cherry-deep);
	text-decoration-thickness: 2px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 24px;
	display: grid;
	gap: 10px;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li::marker { color: var(--cherry); }
.entry-content li > ul,
.entry-content li > ol { margin-top: 10px; }

.entry-content blockquote {
	margin: 32px 0;
	padding: 22px 26px;
	background: var(--bg-soft);
	border-left: 4px solid var(--cherry);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-size: 17px;
	color: var(--ink-2);
	font-style: normal;
}

.entry-content blockquote p + p { margin-top: 14px; }
.entry-content blockquote cite {
	display: block;
	margin-top: 12px;
	font-size: 14px;
	color: var(--slate-2);
	font-style: normal;
}

.entry-content img,
.entry-content figure { border-radius: var(--radius); }

.entry-content figure { margin: 32px 0; }

.entry-content figcaption {
	margin-top: 10px;
	font-size: 13.5px;
	color: var(--slate-2);
	text-align: center;
}

.entry-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .9em;
	background: var(--bg-soft-2);
	padding: 2px 6px;
	border-radius: 6px;
	color: var(--ink-2);
}

.entry-content pre {
	background: var(--ink);
	color: #E2E8F0;
	padding: 20px;
	border-radius: var(--radius);
	overflow-x: auto;
	font-size: 14px;
	line-height: 1.6;
}

.entry-content pre code {
	background: none;
	padding: 0;
	color: inherit;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	display: block;
	overflow-x: auto;
}

.entry-content th,
.entry-content td {
	padding: 12px 14px;
	border: 1px solid var(--line);
	text-align: left;
}

.entry-content th {
	background: var(--bg-soft);
	font-weight: 600;
	color: var(--ink);
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 40px 0;
}

.alignwide { max-width: min(1100px, 100%); }
.alignfull { max-width: 100%; }

.aligncenter {
	margin-inline: auto;
	display: block;
}

/* ============================================================
   2. BLOG LAYOUT AND SIDEBAR
   ============================================================ */
.blog-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(30px, 4vw, 56px);
	align-items: start;
}

.blog-layout--narrow { grid-template-columns: minmax(0, 1fr); }

.archive-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 22px;
}

.sidebar {
	position: sticky;
	top: 100px;
	display: grid;
	gap: 20px;
}

.widget {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-l);
	padding: 22px;
}

.widget-title,
.widget .wp-block-heading {
	font-size: 16px;
	margin-bottom: 14px;
	color: var(--ink);
	font-family: var(--display);
	font-weight: 800;
	line-height: 1.3;
}

.widget ul { display: grid; gap: 9px; }

/* Block widgets an administrator adds are given the same treatment as the
   theme's own, and are prevented from forcing the layout wider than the
   viewport on narrow screens. */
.sidebar,
.widget,
.widget * {
	min-width: 0;
}

.widget li,
.widget p,
.widget a {
	overflow-wrap: anywhere;
}

.widget .wp-block-latest-posts,
.widget .wp-block-categories,
.widget .wp-block-archives,
.widget .wp-block-latest-comments {
	display: grid;
	gap: 9px;
	padding: 0;
	list-style: none;
	margin: 0;
}

.widget .wp-block-latest-comments__comment { margin: 0; }

.widget .wp-block-latest-posts__post-title,
.widget .wp-block-categories a,
.widget .wp-block-archives a {
	font-size: 14.5px;
	color: var(--slate);
	line-height: 1.45;
}

.widget .wp-block-latest-posts__post-title:hover,
.widget .wp-block-categories a:hover,
.widget .wp-block-archives a:hover { color: var(--cherry); }

.widget .wp-block-latest-posts__post-date {
	display: block;
	font-size: 12.5px;
	color: var(--slate-2);
}

.widget .wp-block-search__inside-wrapper { gap: 8px; }

.widget .wp-block-search__input {
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 12px 14px;
	min-height: 46px;
	font-family: var(--sans);
	font-size: 15px;
	min-width: 0;
}

.widget .wp-block-search__button {
	background: var(--cherry);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 0 18px;
	min-height: 46px;
	font-weight: 600;
	cursor: pointer;
}

.widget li a {
	font-size: 14.5px;
	color: var(--slate);
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.widget li a:hover { color: var(--cherry); }

.widget-cta {
	background: var(--ink);
	border-color: transparent;
	color: rgba(255, 255, 255, .8);
	position: relative;
	overflow: hidden;
}

.widget-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(400px 240px at 80% 0%, rgba(232, 93, 122, .38), transparent 62%);
}

.widget-cta > * { position: relative; z-index: 1; }
.widget-cta .widget-title { color: #fff; }
.widget-cta p { font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.widget-cta .btn { width: 100%; }

.cat-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 11px;
	border-radius: 10px;
	font-size: 14.5px;
	color: var(--ink-2);
	font-weight: 500;
}

.cat-list a:hover { background: var(--bg-soft); color: var(--cherry); }

.cat-list .count {
	font-size: 12px;
	font-weight: 600;
	color: var(--slate-2);
	background: var(--bg-soft-2);
	border-radius: 999px;
	padding: 2px 9px;
}

.mini-post {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.mini-post + .mini-post {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--line-2);
}

.mini-post .mp-thumb {
	width: 64px;
	height: 64px;
	border-radius: 12px;
	overflow: hidden;
	flex-shrink: 0;
	background: var(--bg-soft-2);
}

.mini-post .mp-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mini-post h3 {
	font-size: 14.5px;
	line-height: 1.4;
	margin-bottom: 5px;
}

.mini-post h3 a { color: var(--ink); }
.mini-post h3 a:hover { color: var(--cherry); }
.mini-post time { font-size: 12.5px; color: var(--slate-2); }

/* ============================================================
   3. SINGLE POST FURNITURE
   ============================================================ */
.post-hero { padding-bottom: 0; }

.post-hero h1 {
	font-size: clamp(28px, 4vw, 44px);
	max-width: 24ch;
	margin-bottom: 18px;
}

.post-meta {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 14px;
	color: var(--slate-2);
}

.post-meta .meta-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.post-meta .cb-icon { width: 15px; height: 15px; color: var(--cherry); }
.post-meta a { color: var(--slate); font-weight: 500; }
.post-meta a:hover { color: var(--cherry); }

.post-cats {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.post-cats a {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--cherry);
	background: var(--cherry-soft);
	padding: 6px 12px;
	border-radius: 999px;
}

.post-cats a:hover { background: var(--cherry); color: #fff; }

.featured-media {
	margin-top: 36px;
	border-radius: var(--radius-l);
	overflow: hidden;
	box-shadow: var(--shadow-l);
	background: var(--bg-soft-2);
}

.featured-media img { width: 100%; height: auto; }

.post-tags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 40px;
	padding-top: 28px;
	border-top: 1px solid var(--line);
}

.post-tags .label {
	font-size: 14px;
	font-weight: 600;
	color: var(--ink);
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.post-tags .label .cb-icon { width: 15px; height: 15px; color: var(--cherry); }

.post-tags a {
	font-size: 13px;
	color: var(--slate);
	background: var(--bg-soft);
	border: 1px solid var(--line-2);
	padding: 6px 12px;
	border-radius: 999px;
	font-weight: 500;
}

.post-tags a:hover { border-color: var(--cherry); color: var(--cherry); }

.post-share {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
}

.post-share .label {
	font-size: 14px;
	font-weight: 600;
	color: var(--ink);
	margin-right: 4px;
}

.post-share a {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	border: 1px solid var(--line);
	display: grid;
	place-items: center;
	color: var(--slate);
	transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.post-share a:hover {
	border-color: var(--cherry);
	color: var(--cherry);
	transform: translateY(-2px);
}

.post-share .cb-icon { width: 18px; height: 18px; }

.author-box {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	margin-top: 40px;
	padding: 24px;
	background: var(--bg-soft);
	border: 1px solid var(--line-2);
	border-radius: var(--radius-l);
}

.author-box img {
	border-radius: 50%;
	flex-shrink: 0;
}

.author-box h2 { font-size: 17px; margin-bottom: 6px; }
.author-box p { font-size: 14.5px; line-height: 1.6; }

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin-top: 40px;
}

.post-nav a {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px 22px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-l);
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.post-nav a:hover {
	border-color: transparent;
	box-shadow: var(--shadow);
	transform: translateY(-3px);
}

.post-nav .dir {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--cherry);
	display: inline-flex;
	align-items: center;
	gap: 7px;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.post-nav .dir .cb-icon { width: 14px; height: 14px; }
.post-nav .next { text-align: right; }
.post-nav .next .dir { justify-content: flex-end; }

.post-nav span.title {
	font-family: var(--display);
	font-weight: 700;
	font-size: 15.5px;
	color: var(--ink);
	line-height: 1.4;
}

/* ============================================================
   4. PAGINATION
   ============================================================ */
.pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
}

.pagination .nav-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
}

.pagination .page-numbers {
	min-width: 46px;
	height: 46px;
	padding: 0 14px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink-2);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 14.5px;
	transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.pagination .page-numbers:hover {
	border-color: var(--cherry);
	color: var(--cherry);
}

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

.pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
}

/* ============================================================
   5. COMMENTS
   ============================================================ */
.comments-area {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--line);
}

.comments-title,
.comment-reply-title {
	font-size: clamp(20px, 2.4vw, 26px);
	margin-bottom: 24px;
}

.comment-list { display: grid; gap: 24px; }
.comment-list .children {
	display: grid;
	gap: 24px;
	margin-top: 24px;
	padding-left: clamp(16px, 4vw, 46px);
}

.comment-body {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-l);
	padding: 22px;
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.comment-meta img { border-radius: 50%; }
.comment-author { font-family: var(--display); font-weight: 700; color: var(--ink); }
.comment-metadata { font-size: 13px; color: var(--slate-2); }
.comment-content { font-size: 15px; line-height: 1.7; }
.comment-content p + p { margin-top: 14px; }

.reply { margin-top: 14px; }

.comment-reply-link {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--cherry);
}

.comment-form { display: grid; gap: 18px; margin-top: 24px; }

.comment-form label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--ink-2);
	margin-bottom: 7px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	font-family: var(--sans);
	font-size: 15px;
	color: var(--ink);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 13px 15px;
	min-height: 50px;
}

.comment-form textarea { min-height: 150px; resize: vertical; }

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--cherry);
	box-shadow: 0 0 0 3px rgba(206, 19, 56, .14);
}

.comment-form .form-submit input[type="submit"] {
	background: var(--cherry);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 14px 26px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	min-height: 48px;
	transition: background-color .2s ease, transform .2s ease;
}

.comment-form .form-submit input[type="submit"]:hover {
	background: var(--cherry-deep);
	transform: translateY(-2px);
}

.comment-notes,
.form-submit + .comment-notes { font-size: 13.5px; color: var(--slate-2); }

.comment-form-cookies-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.comment-form-cookies-consent label {
	margin-bottom: 0;
	font-weight: 500;
	font-size: 13.5px;
}

/* ============================================================
   6. SEARCH AND 404
   ============================================================ */
.search-form {
	display: flex;
	gap: 10px;
	max-width: 520px;
}

.search-form label { flex: 1; }

.search-form .search-field {
	width: 100%;
	font-family: var(--sans);
	font-size: 15px;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 13px 16px;
	min-height: 50px;
	background: #fff;
	color: var(--ink);
}

.search-form .search-field:focus {
	outline: none;
	border-color: var(--cherry);
	box-shadow: 0 0 0 3px rgba(206, 19, 56, .14);
}

.search-form .search-submit {
	background: var(--cherry);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 0 22px;
	min-height: 50px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: background-color .2s ease;
}

.search-form .search-submit:hover { background: var(--cherry-deep); }
.search-form .search-submit .cb-icon { width: 18px; height: 18px; }

.center .search-form { margin-inline: auto; }

.error-code {
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(80px, 16vw, 170px);
	line-height: 1;
	background: var(--grad-cherry);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--cherry);
	margin-bottom: 10px;
}

.helpful-links {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 32px;
}

.helpful-links a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #fff;
	font-size: 14.5px;
	font-weight: 500;
	color: var(--ink-2);
	min-height: 44px;
}

.helpful-links a:hover { border-color: var(--cherry); color: var(--cherry); }
.helpful-links .cb-icon { width: 16px; height: 16px; color: var(--cherry); }

.no-results {
	text-align: center;
	padding: 56px 24px;
	background: var(--bg-soft);
	border-radius: var(--radius-l);
	border: 1px solid var(--line-2);
}

.no-results h2 { font-size: 22px; margin-bottom: 10px; }
.no-results p { margin-bottom: 24px; }

/* ============================================================
   7. CONTACT PAGE
   ============================================================ */
.contact-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(30px, 4vw, 56px);
	align-items: start;
}

.contact-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-l);
	padding: clamp(24px, 3vw, 36px);
	box-shadow: var(--shadow-s);
}

.contact-card h2 { font-size: clamp(21px, 2.4vw, 26px); margin-bottom: 8px; }
.contact-card > p { margin-bottom: 26px; font-size: 15px; }

.info-stack { display: grid; gap: 16px; }

.info-item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
}

.info-item .iic {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--cherry-soft);
	color: var(--cherry);
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.info-item .iic .cb-icon { width: 21px; height: 21px; }
.info-item h3 { font-size: 15.5px; margin-bottom: 5px; }
.info-item p,
.info-item a { font-size: 14.5px; line-height: 1.6; color: var(--slate); }
.info-item a:hover { color: var(--cherry); }
.info-item .line + .line { margin-top: 3px; }

.map-embed {
	margin-top: 20px;
	border-radius: var(--radius-l);
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--bg-soft-2);
	aspect-ratio: 16 / 10;
}

.map-embed iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* ============================================================
   8. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
	.blog-layout,
	.contact-layout { grid-template-columns: 1fr; }

	.sidebar {
		position: static;
		grid-template-columns: repeat(2, 1fr);
		display: grid;
	}
}

@media (max-width: 768px) {
	.archive-grid { grid-template-columns: 1fr; }
	.sidebar { grid-template-columns: 1fr; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav .next { text-align: left; }
	.post-nav .next .dir { justify-content: flex-start; }

	.author-box { flex-direction: column; gap: 14px; }

	.search-form { flex-direction: column; }
	.search-form .search-submit { width: 100%; justify-content: center; }

	.entry-content { font-size: 16px; }

	.comment-list .children { padding-left: 14px; }
}
