/*
Theme Name: Ascend Blog Theme
Theme URI: https://www.ascendaccountingadvisory.com
Author: Ascend Accounting Advisory, LLC
Description: Custom blog theme matching the Ascend Accounting Advisory website design.
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS VARIABLES ─────────────────────────────── */
:root {
  --navy: #1b3a8c;
  --navy-dark: #122870;
  --navy-deep: #0d1f5c;
  --teal: #2fb8c8;
  --teal-light: #e0f6f8;
  --sky: #a8d4f0;
  --sky-light: #dceefb;
  --periwinkle-light: #e2e6f7;
  --white: #ffffff;
  --off-white: #f7f9fc;
  --text-dark: #0f1f4b;
  --text-mid: #3a4a72;
  --text-light: #6b7ba4;
  --border: #dce3f5;
}

/* ── RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
}

/* ── TOP BANNER ────────────────────────────────── */
.top-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;
  height: 38px;
  background: #0d1f5c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}
.top-banner-sep { color: var(--teal); opacity: 0.7; }
.top-banner-sub { color: var(--sky); font-weight: 400; letter-spacing: 0.18em; }

/* ── NAV ───────────────────────────────────────── */
.sitenav {
  position: fixed;
  top: 38px;
  left: 0; right: 0;
  z-index: 99;
  height: 56px;
  background: #ffffff;
  border-bottom: 2px solid #dce3f5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: 0 2px 12px rgba(27,58,140,0.08);
}
.sitenav a {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 1.75rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #3a4a72;
  letter-spacing: 0.04em;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.sitenav a:hover,
.sitenav a.current-page {
  color: #1b3a8c;
  border-bottom-color: #1b3a8c;
  background: #f7f9fc;
}
.sitenav a.cta {
  background: #1b3a8c;
  color: #ffffff;
  margin-left: 1rem;
  border-radius: 4px;
  height: 36px;
  padding: 0 1.25rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-bottom: none;
}
.sitenav a.cta:hover {
  background: #122870;
  border-bottom: none;
}

/* ── BODY OFFSET FOR FIXED HEADER ──────────────── */
body {
  padding-top: 94px; /* 38px banner + 56px nav */
}

/* ── BLOG WRAPPER ──────────────────────────────── */
.blog-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 6vw 6rem;
}

/* ── PAGE HEADER ───────────────────────────────── */
.page-header {
  text-align: center;
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 2px solid var(--border);
}
.page-header .eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 0.65rem;
}
.page-header h1 {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.page-header p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto;
}

/* ── POST CARDS (Blog Index) ───────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.post-card {
  background: var(--off-white);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(27,58,140,0.11);
}
.post-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--sky-light) 0%, var(--periwinkle-light) 100%);
  overflow: hidden;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.post-card-meta .sep { color: var(--border); }
.post-card-body h2 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.post-card-body h2 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
.post-card-body h2 a:hover { color: var(--navy); }
.post-excerpt {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.75;
  flex: 1;
  margin-bottom: 1.25rem;
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  transition: gap 0.2s, color 0.2s;
}
.read-more::after { content: '→'; }
.read-more:hover { color: var(--teal); gap: 0.7rem; }

/* ── SINGLE POST ───────────────────────────────── */
.single-post-header {
  background: var(--navy-deep);
  padding: 3.5rem 6vw 4rem;
  margin-bottom: 0;
}
.single-post-header .eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 0.8rem;
}
.single-post-header h1 {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  max-width: 800px;
  margin-bottom: 1.25rem;
}
.single-post-meta {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.single-post-meta strong { color: var(--sky); }

.post-featured-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── POST CONTENT ──────────────────────────────── */
.post-content-wrap {
  max-width: 760px;
  margin: 3.5rem auto;
  padding: 0 6vw;
}
.post-content {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--text-mid);
}
.post-content h2 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin: 2.5rem 0 1rem;
}
.post-content h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}
.post-content p { margin-bottom: 1.35rem; }
.post-content a { color: var(--navy); text-decoration: underline; transition: color 0.2s; }
.post-content a:hover { color: var(--teal); }
.post-content ul, .post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.post-content li { font-size: 0.97rem; line-height: 1.75; }
.post-content blockquote {
  border-left: 4px solid var(--teal);
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  background: var(--sky-light);
  border-radius: 0 6px 6px 0;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-dark);
}
.post-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1.5rem 0;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── POST FOOTER / CTA ─────────────────────────── */
.post-cta {
  background: var(--navy);
  border-radius: 8px;
  padding: 2.5rem;
  margin: 3rem 0;
  text-align: center;
}
.post-cta h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.post-cta p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
  font-weight: 300;
}
.btn-primary {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover {
  background: #28a5b4;
  transform: translateY(-2px);
}

/* ── BACK LINK ─────────────────────────────────── */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}
.back-to-blog::before { content: '←'; }
.back-to-blog:hover { color: var(--white); }

/* ── PAGINATION ────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.pagination a { color: var(--navy); border: 1.5px solid var(--border); }
.pagination a:hover { background: var(--sky-light); border-color: var(--navy); }
.pagination span.current { background: var(--navy); color: var(--white); border: 1.5px solid var(--navy); }

/* ── NO POSTS ──────────────────────────────────── */
.no-posts {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-light);
}
.no-posts h2 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 0.75rem;
}

/* ── FOOTER ────────────────────────────────────── */
footer {
  background: #0d1f5c;
  color: var(--white);
  padding: 3rem 6vw 2rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
}
.footer-brand .name {
  font-family: 'Raleway', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}
.footer-brand .tag {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 0.2rem;
}
.footer-brand .addr {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.75rem;
  line-height: 1.65;
}
.footer-brand .addr a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
}
.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--white); }
.footer-bottom {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 768px) {
  .post-grid { grid-template-columns: 1fr; }
  .sitenav { justify-content: flex-start; overflow-x: auto; padding: 0 1rem; }
  .sitenav a { padding: 0 1rem; font-size: 0.82rem; white-space: nowrap; }
}
