/* Blog CSS — matches CV Boost app design */
/* Fonts: Montserrat (headings) + Open Sans (body) — loaded via Google Fonts in HTML */

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

:root {
  --accent: #10b981;
  --accent-hover: #059669;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-secondary: #94a3b8;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --font-heading: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Navbar ─── */
.blog-nav {
  position: fixed;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.blog-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.blog-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.blog-nav-brand img {
  height: 2.5rem;
  width: auto;
}

.blog-nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.blog-nav-brand-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.blog-nav-brand-name span {
  color: var(--accent);
}

.blog-nav-brand-sub {
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.blog-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.blog-nav-links a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.blog-nav-cta {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: var(--white) !important;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none !important;
  transition: all 0.2s;
}

.blog-nav-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .blog-nav-links a:not(.blog-nav-cta) {
    display: none;
  }
}

/* ─── Hero (index page) ─── */
.blog-hero {
  padding: 7rem 1.5rem 3rem;
  text-align: center;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.blog-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.blog-hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto;
}

/* ─── Category Tabs ─── */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.category-tab {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
}

.category-tab:hover,
.category-tab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.05);
  text-decoration: none;
}

/* ─── Article Grid ─── */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Article Card ─── */
.article-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
}

.article-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-category {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.article-card-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.article-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 0.75rem;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ─── Pagination ─── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem 3rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a {
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--white);
}

.pagination a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.pagination .active {
  color: var(--white);
  background: var(--accent);
  border: 1px solid var(--accent);
}

/* ─── Breadcrumbs ─── */
.breadcrumbs {
  max-width: 48rem;
  margin: 0 auto;
  padding: 5.5rem 1.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumbs span.sep {
  margin: 0 0.5rem;
  color: var(--text-secondary);
}

/* ─── Article Page ─── */
.article-header {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.article-header .category-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.article-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .article-header h1 {
    font-size: 2.5rem;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-hero-image {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-hero-image img {
  width: 100%;
  border-radius: 1rem;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

/* ─── Article Content ─── */
.article-content {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(16, 185, 129, 0.2);
}

.article-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.article-content strong {
  color: var(--text);
  font-weight: 600;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(16, 185, 129, 0.04);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-content code {
  background: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.article-content a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--accent-hover);
}

/* ─── CTA Box ─── */
.cta-box {
  max-width: 48rem;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.cta-box-inner {
  background: linear-gradient(135deg, #065f46, #047857);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  color: var(--white);
}

.cta-box-inner h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cta-box-inner p {
  font-size: 0.9375rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

.cta-box-inner a {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--white);
  color: #065f46 !important;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 0.5rem;
  text-decoration: none !important;
  transition: all 0.2s;
}

.cta-box-inner a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ─── Related Articles ─── */
.related-section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Footer ─── */
.blog-footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 2rem 0;
}

.blog-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .blog-footer-inner {
    flex-direction: row;
  }
}

.blog-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.blog-footer-brand img {
  height: 2rem;
  width: auto;
}

.blog-footer-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.blog-footer-brand-name {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.blog-footer-brand-name span {
  color: var(--accent);
}

.blog-footer-brand-sub {
  font-size: 0.5625rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.blog-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 0.75rem;
}

.blog-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.blog-footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}
