/*
Theme Name: Woodcraft & Home Journal
Theme URI: https://thewoodworkingshows.com/
Author: Woodcraft & Home Journal
Description: A premium, fast, mobile-first editorial theme for woodworking, home improvement, DIY, tools, home and garden, lifestyle, business, technology and travel stories.
Version: 2.0.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sitezen
Tags: blog, news, custom-logo, custom-menu, featured-images, footer-widgets, translation-ready
*/

/* =========================================================
   1. Tokens & base
   ========================================================= */
:root {
  --sz-red: #C21E2C;
  --sz-ink: #191D24;
  --sz-ink-2: #22262E;
  --sz-paper: #F7F6F2;
  --sz-card: #FFFFFF;
  --sz-mut: #6B7078;
  --sz-line: #E5E2DA;
  --sz-line-dark: rgba(255, 255, 255, .09);
  --f-serif: 'Newsreader', 'Source Serif 4', Georgia, serif;
  --f-sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 12px;
  --shadow: 0 10px 28px rgba(16, 20, 24, .10);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sz-paper);
  color: var(--sz-ink);
  font-family: var(--f-sans);
  font-size: clamp(15px, 0.3vw + 14px, 17px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: break-word;
}

img { max-width: 100%; height: auto; }
iframe, embed, video { max-width: 100%; }

a { color: var(--sz-red); text-decoration: none; transition: color .2s; }
a:hover { color: #8f1520; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-serif);
  line-height: 1.5;
  color: var(--sz-ink);
  margin: 0 0 .5em;
}

::selection { background: var(--sz-red); color: #fff; }

.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Accessibility */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden; position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--sz-red); color: #fff;
  padding: 10px 16px; border-radius: 6px; z-index: 999;
  transition: top .2s;
}
.skip-link:focus { top: 8px; color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--sz-red); outline-offset: 2px;
}

/* =========================================================
   8. Cards
   ========================================================= */
.card-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.card {
  background: var(--sz-card); border: 1px solid var(--sz-line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card.sticky { border-color: var(--sz-red); }
.card-media {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 10; background: #E9E7E0;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 16px 17px 19px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title { margin: 0; font-size: clamp(1.04rem, 0.96rem + 0.45vw, 1.15rem); line-height: 1.55; font-weight: 700; }
.card-title a { color: var(--sz-ink); }
.card-title a:hover { color: var(--sz-red); }
.card-excerpt { margin: 0; color: var(--sz-mut); font-size: .9rem; line-height: 1.7; }

/* Category badge — auto colour per category via --cat */
.cat-badge {
  --cat: var(--sz-red);
  display: inline-block; align-self: flex-start;
  background: var(--cat); color: #fff;
  font-family: var(--f-sans); font-size: .72rem; font-weight: 700;
  line-height: 1.45; padding: 4px 11px; border-radius: 4px; letter-spacing: .02em;
}
.cat-badge:hover { color: #fff; filter: brightness(.88); }

/* Meta row */
.meta {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  color: var(--sz-mut); font-size: .8rem;
}
.meta > * { display: inline-flex; align-items: center; position: relative; }
.meta > * + *::before { content: "•"; color: #C4C1B8; margin-right: 16px; }
.meta a { color: inherit; }
.meta a:hover { color: var(--sz-red); }

/* Placeholder thumbnail */
.ph-thumb {
  --cat: var(--sz-red);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--cat);
  background: linear-gradient(135deg, var(--cat), color-mix(in srgb, var(--cat) 45%, #14181d));
}
.ph-thumb span {
  font-family: var(--f-serif); font-weight: 800; font-size: 2.7rem;
  color: rgba(255, 255, 255, .9);
}

/* No results */
.no-results {
  background: var(--sz-card); border: 1px dashed var(--sz-line);
  border-radius: var(--radius); padding: 34px 26px; text-align: center;
}
.no-results .search-form { justify-content: center; margin-top: 14px; }

/* =========================================================
   9. Sidebar & widgets
   ========================================================= */
.widget {
  background: var(--sz-card); border: 1px solid var(--sz-line);
  border-radius: var(--radius); padding: 19px 19px 14px; margin-bottom: 24px;
}
.widget-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; font-weight: 800;
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--sz-ink);
}
.widget-title::before {
  content: ""; flex: none; width: 9px; height: 19px;
  background: var(--sz-red); border-radius: 3px;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 9px 0; border-bottom: 1px dashed var(--sz-line); font-size: .93rem; }
.widget ul li:last-child { border-bottom: 0; }
.widget ul ul { padding-left: 16px; }
.widget a { color: var(--sz-ink); }
.widget a:hover { color: var(--sz-red); }
.widget select { width: 100%; }
.widget .search-form { display: flex; }
.widget .search-field { flex: 1; border-radius: 7px 0 0 7px; }
.widget .search-submit { border-radius: 0 7px 7px 0; }

/* Mini post list */
.mini-list { display: flex; flex-direction: column; }
.mini-post { display: flex; gap: 13px; padding: 11px 0; border-bottom: 1px dashed var(--sz-line); }
.mini-post:last-child { border-bottom: 0; }
.mini-thumb {
  position: relative; flex: none; width: 80px; height: 60px;
  border-radius: 7px; overflow: hidden; background: #E9E7E0;
}
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-thumb .ph-thumb span { font-size: 1.3rem; }
.mini-title { margin: 0 0 3px; font-size: .92rem; line-height: 1.55; font-weight: 700; }
.mini-title a { color: var(--sz-ink); }
.mini-title a:hover { color: var(--sz-red); }
.mini-date { color: var(--sz-mut); font-size: .76rem; }

/* =========================================================
   10. Single post & pages
   ========================================================= */
.single-post-article, .page-article, .comments-area {
  background: var(--sz-card); border: 1px solid var(--sz-line);
  border-radius: var(--radius); padding: clamp(20px, 4vw, 38px);
}
.comments-area { margin-top: 28px; }
.entry-header { margin-bottom: 18px; }
.entry-title {
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  line-height: 1.45; margin: 10px 0 12px; font-weight: 800;
}
.entry-thumb { margin: 4px 0 22px; }
.entry-thumb img { width: 100%; border-radius: 10px; }
.entry-thumb figcaption { text-align: center; color: var(--sz-mut); font-size: .82rem; margin-top: 8px; }

.entry-content { font-size: clamp(1rem, 0.95rem + 0.4vw, 1.1rem); line-height: 1.8; }
.entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.5em; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
  margin: 1.4em 0; padding: 16px 22px;
  background: #FBF9F4; border-left: 4px solid var(--sz-red);
  border-radius: 0 10px 10px 0; font-family: var(--f-serif); font-size: 1.08em;
}
.entry-content blockquote > :last-child { margin-bottom: 0; }
.entry-content img { border-radius: 10px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content pre {
  background: var(--sz-ink); color: #E7E9EC; padding: 18px;
  border-radius: 10px; overflow: auto; font-size: .88em; line-height: 1.7;
}
.entry-content code { background: #EFEDE6; padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--sz-line); padding: 9px 12px; text-align: left; }
.entry-content th { background: #F3F1EA; }
.entry-content hr { border: 0; border-top: 1px solid var(--sz-line); margin: 2em 0; }

.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--sz-mut); font-size: .82rem; text-align: center; margin-top: 6px; }
.alignleft { float: left; margin: 6px 22px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 22px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item { margin: 0; }
.bypostauthor { display: block; }

.entry-footer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--sz-line); }
.tag-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; }
.tag-links a {
  background: #F1EFE8; color: var(--sz-ink);
  padding: 5px 13px; border-radius: 999px; font-weight: 600;
}
.tag-links a:hover { background: var(--sz-red); color: #fff; }

/* Author box */
.author-box {
  display: flex; gap: 17px; align-items: flex-start;
  background: #FBF9F4; border: 1px solid var(--sz-line);
  border-radius: var(--radius); padding: 20px; margin-top: 26px;
}
.author-box img { border-radius: 50%; flex: none; }
.author-box h3 { margin: 0 0 4px; font-size: 1.05rem; }
.author-box p { margin: 0; color: var(--sz-mut); font-size: .9rem; }

/* Post navigation */
.post-navigation { margin-top: 28px; }
.post-navigation .nav-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.post-navigation a {
  display: block; background: var(--sz-card); border: 1px solid var(--sz-line);
  border-radius: 10px; padding: 14px 17px; color: var(--sz-ink);
  font-weight: 600; font-size: .92rem; line-height: 1.6;
}
.post-navigation a:hover { border-color: var(--sz-red); color: var(--sz-red); }
.post-navigation .nav-next { text-align: right; }

/* Related */
.related-posts { margin-top: 34px; }

/* =========================================================
   11. Comments
   ========================================================= */
.comments-title, .comment-reply-title { font-size: 1.25rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: clamp(14px, 4vw, 40px); }
.comment-body {
  border-bottom: 1px dashed var(--sz-line); padding: 16px 0;
}
.comment-author { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { font-size: .78rem; margin: 4px 0 8px; }
.comment-metadata a { color: var(--sz-mut); }
.comment-content { font-size: .95rem; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { font-size: .82rem; margin-top: 6px; }
.reply a { font-weight: 700; }
.comment-form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; }
.comment-form p { margin: 0 0 15px; }
.logged-in-as, .comment-notes { color: var(--sz-mut); font-size: .85rem; }

/* =========================================================
   12. Forms & buttons
   ========================================================= */
input[type="text"], input[type="email"], input[type="url"],
input[type="search"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; padding: 10px 14px;
  border: 1px solid #D9D6CD; border-radius: 8px;
  background: #fff; color: var(--sz-ink);
  font: 1em var(--f-sans); transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--sz-red); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sz-red) 16%, transparent);
}
button, input[type="submit"], .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--sz-red); color: #fff; border: 0; cursor: pointer;
  font: 700 .95rem var(--f-sans); padding: 11px 22px; border-radius: 8px;
  transition: background .2s, transform .15s;
}
button:hover, input[type="submit"]:hover, .btn:hover {
  background: color-mix(in srgb, var(--sz-red) 84%, #000); color: #fff;
}
button:active { transform: translateY(1px); }
.search-form { display: flex; gap: 0; }
.search-form .search-field { border-radius: 8px 0 0 8px; }
.search-form .search-submit { border-radius: 0 8px 8px 0; padding: 0 16px; }
.search-form .search-submit svg { width: 16px; height: 16px; }

/* Pagination */
.pagination, .comments-pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 14px;
  background: var(--sz-card); border: 1px solid var(--sz-line);
  border-radius: 9px; color: var(--sz-ink); font-weight: 700; font-size: .92rem;
}
.page-numbers:hover { border-color: var(--sz-red); color: var(--sz-red); }
.page-numbers.current { background: var(--sz-red); border-color: var(--sz-red); color: #fff; }
.page-numbers.dots { border: 0; background: none; }

/* Back to top */
.to-top {
  position: fixed; right: max(20px, env(safe-area-inset-right));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; padding: 0;
  background: var(--sz-ink); color: #fff; font-size: 1.1rem;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--sz-red); }

   20. Options layer: footer designs, share row, header toggles
   ========================================================= */
/* Header toggles */
.sz-no-sticky .navbar { position: static; }
.sz-no-sticky.admin-bar .navbar { top: auto; }
.sz-no-dates .meta time, .sz-no-dates .mini-date, .sz-no-dates .hero-meta { display: none; }
.top-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.top-msg { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Share row (single posts) */
.share-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--sz-line);
}
.share-label { font-weight: 700; font-size: .88rem; margin-right: 3px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; padding: 0; position: relative;
  background: #F1EFE8; color: var(--sz-ink); border: 0; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.share-btn:hover { background: var(--sz-red); color: #fff; transform: translateY(-2px); }
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.sz-dark .share-btn { background: rgba(255, 255, 255, .09); }
.sitezen-skin-magazine .share-btn { border-radius: 3px; }
.sz-copy-done {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%) translateY(4px);
  background: var(--sz-ink); color: var(--sz-paper); font-size: .7rem; font-weight: 700;
  padding: 3px 9px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.sz-copy.copied .sz-copy-done { opacity: 1; transform: translateX(-50%) translateY(0); }

.mode-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.mode-toggle svg { width: 17px; height: 17px; fill: currentColor; }
.mode-toggle .ic-moon, .mode-toggle .ic-sun { display: inline-flex; }
.mode-toggle .ic-sun { display: none; }
.sz-night .mode-toggle .ic-sun { display: inline-flex; }
.sz-night .mode-toggle .ic-moon { display: none; }
.sitezen-skin-magazine .mode-toggle, .sitezen-skin-lifestyle .mode-toggle { color: var(--sz-ink); }
.sitezen-skin-magazine .mode-toggle:hover, .sitezen-skin-lifestyle .mode-toggle:hover { background: rgba(0, 0, 0, .07); color: var(--sz-red); }

/* Breadcrumbs */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  margin: 0 0 12px; font-size: .8rem; color: var(--sz-mut);
}
.crumbs a { color: var(--sz-mut); }
.crumbs a:hover { color: var(--sz-red); }
.crumbs a::after { content: "›"; margin-left: 7px; opacity: .6; }
.crumbs span {
  color: var(--sz-ink); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 48ch;
}

/* View counts in meta */
.meta-views svg { width: 13px; height: 13px; fill: currentColor; margin-right: 5px; vertical-align: -2px; }

