/*
Theme Name: Net Accounting Blog
Theme URI: https://www.netaccounting.ca/blog
Author: Net Accounting
Author URI: https://www.netaccounting.ca
Description: Custom blog theme for Net Accounting — matches the main site design system exactly.
Version: 1.0.0
License: Private
Text Domain: netaccounting
*/

/* ─── DESIGN TOKENS ─────────────────────────────── */
:root {
  --ink:          #0f0f1c;
  --ink-mid:      #1e2340;
  --ink-light:    #4e5560;
  --sage:         #007c6e;
  --sage-light:   #00a896;
  --sage-pale:    #e0f2f0;
  --cream:        #faf9f6;
  --white:        #ffffff;
  --border:       #e5e2da;
  --amber:        #d97706;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --radius:       12px;
  --max:          1160px;
  --shadow:       0 2px 16px rgba(15,15,28,0.08);
}

/* ─── RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage); text-decoration: none; }
a:hover { color: var(--sage-light); }

/* ─── NAV ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: calc(var(--max) + 12%);
  margin: 0 auto; padding: 0 6%;
  display: flex; align-items: center;
  height: 68px; gap: 2rem;
}
.nav-logo img { height: 44px; width: auto; }
.nav-back {
  font-size: 0.85rem; color: var(--ink-light);
  display: flex; align-items: center; gap: 0.4rem;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--sage); }
.nav-blog-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 400;
  color: var(--ink); margin-left: auto;
  font-style: italic;
}

/* ─── LAYOUT ─────────────────────────────────────── */
.site-main {
  max-width: calc(var(--max) + 12%);
  margin: 0 auto; padding: 0 6%;
}

/* ─── PAGE HEADER ────────────────────────────────── */
.blog-page-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}
.blog-page-header .section-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 0.9rem;
}
.blog-page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; color: var(--ink);
  line-height: 1.2; margin-bottom: 0.8rem;
}
.blog-page-header p {
  color: var(--ink-light); font-weight: 300;
  font-size: 1.05rem; max-width: 560px;
}

/* ─── BLOG INDEX GRID ────────────────────────────── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  padding-bottom: 100px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ─── POST CARD ──────────────────────────────────── */
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--sage-pale);
}
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-body { padding: 24px; }
.post-card-cat {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 0.6rem;
  display: block;
}
.post-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 400;
  color: var(--ink); line-height: 1.35;
  margin-bottom: 0.7rem;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--sage); }
.post-card-excerpt {
  font-size: 0.88rem; color: var(--ink-light);
  font-weight: 300; line-height: 1.7;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  font-size: 0.78rem; color: var(--ink-light);
  display: flex; align-items: center; gap: 0.5rem;
}
.post-card-meta .sep { opacity: 0.4; }

/* ─── SIDEBAR ────────────────────────────────────── */
.blog-sidebar { padding-top: 4px; }
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}
.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 400;
  color: var(--ink); margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-cats { list-style: none; }
.sidebar-cats li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.sidebar-cats li:last-child { border-bottom: none; }
.sidebar-cats a {
  color: var(--ink-light); font-weight: 300;
  display: flex; justify-content: space-between;
  transition: color 0.2s;
}
.sidebar-cats a:hover { color: var(--sage); }
.sidebar-cats .count {
  background: var(--sage-pale);
  color: var(--sage);
  font-size: 0.7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 50px;
}
.recent-posts-list { list-style: none; }
.recent-posts-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.recent-posts-list li:last-child { border-bottom: none; }
.recent-posts-list a { color: var(--ink-light); font-weight: 300; line-height: 1.5; }
.recent-posts-list a:hover { color: var(--sage); }

/* Email signup widget */
.sidebar-signup p {
  font-size: 0.85rem; color: var(--ink-light);
  font-weight: 300; line-height: 1.7;
  margin-bottom: 1rem;
}
.sidebar-signup input[type="email"] {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px; font-family: var(--font-body);
  font-size: 0.88rem; color: var(--ink);
  background: var(--cream);
  margin-bottom: 10px;
  outline: none; transition: border-color 0.2s;
}
.sidebar-signup input[type="email"]:focus { border-color: var(--sage); }
.sidebar-signup button {
  width: 100%; padding: 11px;
  background: var(--sage); color: var(--white);
  border: none; border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: background 0.2s;
}
.sidebar-signup button:hover { background: var(--sage-light); }

/* CTA widget */
.sidebar-cta {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  text-align: center;
}
.sidebar-cta h3 {
  color: var(--white) !important;
  border-bottom-color: rgba(255,255,255,0.1) !important;
  font-style: italic;
}
.sidebar-cta p {
  font-size: 0.85rem; color: rgba(255,255,255,0.65);
  font-weight: 300; line-height: 1.7;
  margin-bottom: 1.2rem;
}
.sidebar-cta a.btn-cta {
  display: block; padding: 12px;
  background: var(--sage); color: var(--white);
  border-radius: 50px; font-size: 0.88rem;
  font-weight: 500; text-align: center;
  transition: background 0.2s;
}
.sidebar-cta a.btn-cta:hover { background: var(--sage-light); }

/* ─── SINGLE POST ─────────────────────────────────── */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  padding-bottom: 100px;
}
.post-header { margin-bottom: 40px; }
.post-header .post-cats {
  display: flex; gap: 0.5rem;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.post-header .post-cat-tag {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sage);
  background: var(--sage-pale);
  padding: 4px 12px; border-radius: 50px;
}
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400; color: var(--ink);
  line-height: 1.25; margin-bottom: 1rem;
}
.post-meta {
  font-size: 0.82rem; color: var(--ink-light);
  display: flex; align-items: center;
  gap: 0.5rem; flex-wrap: wrap;
}
.post-featured-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 16/7;
}
.post-featured-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.post-content {
  font-size: 1.02rem; line-height: 1.85;
  color: var(--ink-light); font-weight: 300;
}
.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 400;
  color: var(--ink); margin: 2.5rem 0 1rem;
}
.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 400;
  color: var(--ink); margin: 2rem 0 0.8rem;
}
.post-content p { margin-bottom: 1.4rem; }
.post-content ul, .post-content ol {
  margin: 0 0 1.4rem 1.4rem;
}
.post-content li { margin-bottom: 0.5rem; }
.post-content strong { color: var(--ink); font-weight: 600; }
.post-content a { color: var(--sage); text-decoration: underline; text-underline-offset: 3px; }
.post-content blockquote {
  border-left: 3px solid var(--sage);
  margin: 2rem 0; padding: 1rem 1.5rem;
  background: var(--sage-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--ink-mid);
}

/* ─── POST NAVIGATION ─────────────────────────────── */
.post-nav {
  display: flex; justify-content: space-between;
  gap: 1rem; padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.post-nav a {
  font-size: 0.88rem; color: var(--ink-light);
  font-weight: 400; max-width: 45%;
}
.post-nav a:hover { color: var(--sage); }
.post-nav .nav-label {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sage); display: block;
  margin-bottom: 0.3rem;
}

/* ─── FOOTER ──────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  padding: 48px 6% 28px;
}
.footer-inner {
  max-width: calc(var(--max) + 12%);
  margin: 0 auto;
  display: flex; flex-wrap: wrap;
  justify-content: space-between;
  align-items: center; gap: 1rem;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem; color: rgba(255,255,255,0.4);
}
.footer-inner a {
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
.footer-inner a:hover { color: rgba(255,255,255,0.8); }

/* ─── PAGINATION ──────────────────────────────────── */
.pagination {
  display: flex; gap: 0.5rem;
  justify-content: center;
  padding: 2rem 0 3rem;
  grid-column: 1;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.88rem; color: var(--ink-light);
  transition: all 0.2s;
}
.pagination a:hover, .pagination .current {
  background: var(--sage);
  color: var(--white);
  border-color: var(--sage);
}

/* ─── NO POSTS ─────────────────────────────────────── */
.no-posts {
  text-align: center; padding: 80px 0;
  color: var(--ink-light);
}


/* ─── AUDIT BANNER ───────────────────────────────── */
.audit-banner {
  width: 100%;
  margin: 32px 0;
}
.audit-banner-inner {
  background: #0f0f1c;
  border-radius: 12px;
  padding: 36px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 4px 24px rgba(15,15,28,0.12);
}
.audit-banner-text { flex: 1; }
.audit-badge {
  display: inline-block;
  background: rgba(217,119,6,0.18);
  color: #d97706;
  border: 1px solid rgba(217,119,6,0.45);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 50px;
  margin-bottom: 1rem;
}
.audit-banner-text h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem; font-weight: 400;
  font-style: italic;
  color: #ffffff; margin-bottom: 0.5rem;
  line-height: 1.3;
}
.audit-banner-text p {
  font-size: 0.9rem; color: rgba(255,255,255,0.6);
  font-weight: 300; line-height: 1.6;
}
.audit-banner-btn {
  display: inline-flex; align-items: center;
  background: #007c6e; color: #ffffff;
  padding: 14px 32px; border-radius: 50px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9rem; font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}
.audit-banner-btn:hover {
  background: #00a896;
  color: #ffffff;
}
@media (max-width: 768px) {
  .audit-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }
  .audit-banner-btn { width: 100%; justify-content: center; }
}

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  .blog-layout, .single-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar { order: 2; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .audit-banner { margin: 0 0 28px; }
}
@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; }
  .blog-layout, .single-layout { gap: 40px; }
  .blog-page-header { padding: 40px 0 32px; margin-bottom: 40px; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 0 5%; }
  .site-main { padding: 0 5%; }
}
