/*
Theme Name:  Woodworking Weekend
Theme URI:   https://woodworkingweekend.com
Description: Clean, fast affiliate content theme for woodworking plans site. Warm wood-tone aesthetic. Optimised for SEO silo structure.
Version:     1.0.0
Author:      Woodworking Weekend
License:     GPL-2.0+
Text Domain: woodworking-weekend
*/

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
  --bg:          #f5f0eb;
  --bg-alt:      #ede6dc;
  --surface:     #ffffff;
  --dark:        #2c1f0e;
  --dark-mid:    #3d2c14;
  --mid:         #5a4030;
  --light-text:  #7a6050;
  --accent:      #c8a96e;
  --accent-dark: #b08a4a;
  --accent-light:#f0e4cc;
  --green:       #4a7c4e;
  --border:      #ddd5c8;
  --radius:      8px;
  --radius-lg:   14px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.11);
  --font-serif:  'Georgia', 'Times New Roman', serif;
  --font-sans:   system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max-w:       1120px;
  --content-w:   760px;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--dark);
  font-size: 1rem;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.4em; }

/* ═══════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 2rem 0 .75rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); margin: 1.5rem 0 .5rem; }
h4 { font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
p  { margin-bottom: 1.1rem; }

.entry-content h2 { border-left: 4px solid var(--accent); padding-left: 14px; }
.entry-content ul li { margin-bottom: .4rem; }
.entry-content ol li { margin-bottom: .4rem; }
.entry-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-family: var(--font-sans);
  font-size: .92rem;
}
.entry-content th {
  background: var(--dark);
  color: var(--bg);
  padding: 10px 14px;
  text-align: left;
}
.entry-content td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.entry-content tr:hover td { background: var(--bg-alt); }

/* ═══════════════════════════════════════════════
   LAYOUT CONTAINERS
═══════════════════════════════════════════════ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0;
}
.content-wrap.full-width {
  grid-template-columns: 1fr;
}
@media (max-width: 900px) {
  .content-wrap { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
#masthead {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 20px;
}
.site-branding { flex-shrink: 0; }
.site-title a {
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-title span { color: var(--accent); }
.site-description {
  color: var(--accent);
  font-size: .75rem;
  font-family: var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Navigation */
#site-navigation ul {
  list-style: none;
  display: flex;
  gap: 4px;
  padding: 0;
  flex-wrap: wrap;
}
#site-navigation ul li a {
  color: #d0c0b0;
  font-family: var(--font-sans);
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
  text-decoration: none;
  white-space: nowrap;
}
#site-navigation ul li a:hover,
#site-navigation ul li.current-menu-item a,
#site-navigation ul li.current-cat a {
  background: var(--dark-mid);
  color: var(--accent);
}
.nav-cta a {
  background: var(--accent) !important;
  color: var(--dark) !important;
  font-weight: 700 !important;
}
.nav-cta a:hover { background: var(--accent-dark) !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: var(--bg);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: .85rem;
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  #site-navigation { display: none; width: 100%; }
  #site-navigation.toggled { display: block; }
  #site-navigation ul { flex-direction: column; padding: 10px 0; }
  .header-inner { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════
   HERO — HOMEPAGE
═══════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  color: var(--bg);
  padding: 70px 20px 60px;
  text-align: center;
}
.hero-inner { max-width: 680px; margin: 0 auto; }
.hero h1 { color: var(--bg); margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.1rem;
  color: #c8b898;
  margin-bottom: 28px;
  line-height: 1.65;
}
.hero-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-form input[type="email"] {
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  min-width: 260px;
  font-family: var(--font-sans);
}
.hero-form button {
  background: var(--accent);
  color: var(--dark);
  border: none;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background .2s;
  white-space: nowrap;
}
.hero-form button:hover { background: var(--accent-dark); }
.hero-note { font-size: .78rem; color: #8a7a6a; margin-top: 10px; }

/* ═══════════════════════════════════════════════
   PILLAR CARDS — HOMEPAGE GRID
═══════════════════════════════════════════════ */
.pillars-section {
  padding: 50px 0;
  background: var(--bg);
}
.section-heading {
  text-align: center;
  margin-bottom: 32px;
}
.section-heading h2 { margin-bottom: 8px; }
.section-heading p { color: var(--mid); font-size: .95rem; }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
.pillar-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 22px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.pillar-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
}
.pillar-icon { font-size: 2.4rem; margin-bottom: 12px; line-height: 1; }
.pillar-card h3 { font-size: 1.1rem; margin: 0 0 8px; color: var(--dark); }
.pillar-card p { font-size: .88rem; color: var(--mid); margin: 0 0 14px; line-height: 1.55; }
.pillar-link {
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════
   RECENT POSTS GRID
═══════════════════════════════════════════════ */
.posts-section { padding: 50px 0; background: var(--bg-alt); }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}
.post-card:hover { box-shadow: var(--shadow-md); }
.post-card-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--bg-alt);
}
.post-card-thumb-placeholder {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.post-card-body { padding: 18px 18px 16px; }
.post-card-cat {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.post-card-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}
.post-card-title a { color: var(--dark); text-decoration: none; }
.post-card-title a:hover { color: var(--accent-dark); }
.post-card-excerpt { font-size: .85rem; color: var(--mid); line-height: 1.55; }

/* ═══════════════════════════════════════════════
   PAGE HERO (archive + single + page)
═══════════════════════════════════════════════ */
.page-hero {
  background: var(--dark);
  color: var(--bg);
  padding: 42px 20px 36px;
}
.page-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.page-hero h1 { color: var(--bg); margin-bottom: 10px; }
.page-hero .hero-meta {
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--accent);
}
.page-hero .hero-desc {
  color: #c8b898;
  max-width: 600px;
  margin-top: 8px;
  font-size: .95rem;
}

/* ═══════════════════════════════════════════════
   BREADCRUMBS
═══════════════════════════════════════════════ */
.breadcrumbs {
  background: var(--dark-mid);
  padding: 8px 0;
}
.breadcrumbs .container {
  font-family: var(--font-sans);
  font-size: .8rem;
  color: #a09080;
}
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 6px; }

/* ═══════════════════════════════════════════════
   ARTICLE — SINGLE POST
═══════════════════════════════════════════════ */
.entry-header { margin-bottom: 28px; }
.entry-meta {
  font-family: var(--font-sans);
  font-size: .82rem;
  color: var(--light-text);
  margin-top: 10px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.entry-meta .cat-badge {
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
}
.entry-meta .cat-badge:hover { background: var(--accent); color: var(--surface); }

/* Table of Contents */
.toc-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 28px 0;
}
.toc-box h4 {
  font-family: var(--font-sans);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--mid);
  margin: 0 0 12px;
}
.toc-box ol {
  margin: 0;
  padding-left: 1.2em;
}
.toc-box li { margin-bottom: 5px; font-size: .9rem; }
.toc-box a { color: var(--accent-dark); }

/* CTA Box inline */
.cta-inline {
  background: var(--dark);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin: 32px 0;
  text-align: center;
}
.cta-inline h3 { color: var(--bg); margin: 0 0 8px; }
.cta-inline p { color: #c8b898; font-size: .93rem; margin-bottom: 18px; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  padding: 12px 26px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: background .2s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: var(--surface); }
.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover { background: var(--accent); color: var(--dark); }

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.post-nav a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: .85rem;
  text-decoration: none;
  color: var(--dark);
  transition: border-color .2s;
}
.post-nav a:hover { border-color: var(--accent); text-decoration: none; }
.post-nav .nav-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--light-text);
  display: block;
  margin-bottom: 4px;
}
.post-nav .nav-next { text-align: right; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════
   ARCHIVE / CATEGORY PAGE
═══════════════════════════════════════════════ */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════ */
.sidebar { font-family: var(--font-sans); }
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 24px;
}
.widget-title {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mid);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light);
  margin-bottom: 14px;
}

/* Optin Widget */
.optin-widget {
  background: var(--dark);
  border: none;
  color: var(--bg);
  text-align: center;
}
.optin-widget .widget-title { color: var(--accent); border-color: var(--dark-mid); }
.optin-widget h4 { color: var(--bg); margin: 0 0 8px; }
.optin-widget p { color: #c8b898; font-size: .85rem; margin-bottom: 16px; line-height: 1.5; }
.optin-widget input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-family: inherit;
  font-size: .9rem;
}
.optin-widget button {
  width: 100%;
  background: var(--accent);
  color: var(--dark);
  border: none;
  border-radius: var(--radius);
  padding: 11px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.optin-widget button:hover { background: var(--accent-dark); }
.optin-widget .privacy { font-size: .7rem; color: #7a6a5a; margin-top: 8px; }

/* Recent posts widget */
.widget-posts { list-style: none; padding: 0; }
.widget-posts li { padding: 9px 0; border-bottom: 1px solid var(--border); }
.widget-posts li:last-child { border-bottom: none; padding-bottom: 0; }
.widget-posts a { color: var(--dark); font-size: .88rem; line-height: 1.4; }
.widget-posts a:hover { color: var(--accent-dark); text-decoration: none; }

/* Category widget */
.widget-cats { list-style: none; padding: 0; }
.widget-cats li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.widget-cats li:last-child { border-bottom: none; }
.widget-cats a {
  color: var(--mid);
  font-size: .88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.widget-cats a:hover { color: var(--accent-dark); text-decoration: none; }

/* Affiliate Disclosure */
.disclosure {
  font-size: .78rem;
  color: var(--light-text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 24px;
  font-family: var(--font-sans);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
#colophon {
  background: var(--dark);
  color: #a09080;
  padding: 50px 0 0;
  font-family: var(--font-sans);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-about .footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--bg);
  margin-bottom: 10px;
  display: block;
}
.footer-about .footer-logo span { color: var(--accent); }
.footer-about p { font-size: .85rem; line-height: 1.6; }
.footer-col h4 {
  color: var(--bg);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul a { color: #a09080; font-size: .85rem; text-decoration: none; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--dark-mid);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .78rem;
}
.footer-bottom a { color: #7a6a5a; }
.footer-bottom a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════
   UTILITY CLASSES
═══════════════════════════════════════════════ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 40px 0;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: .9rem;
  color: var(--mid);
  text-decoration: none;
  background: var(--surface);
  transition: all .2s;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════
   SKIP LINK (accessibility)
═══════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--dark);
  padding: 8px 16px;
  z-index: 9999;
  font-family: var(--font-sans);
}
.skip-link:focus { left: 0; }
