/* ===== Blog Shared Styles ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #fff;
  color: hsl(220, 20%, 10%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

:root {
  --primary: hsl(160, 84%, 44%);
  --primary-fg: #fff;
  --accent: hsl(186, 94%, 50%);
  --foreground: hsl(220, 20%, 10%);
  --muted: hsl(220, 10%, 46%);
  --secondary-bg: hsl(210, 20%, 96%);
  --border: hsl(220, 13%, 91%);
  --dark-bg: hsl(220, 25%, 8%);
  --dark-bg2: hsl(220, 20%, 14%);
  --dark-fg: hsl(0, 0%, 96%);
  --dark-muted: hsl(220, 15%, 40%);
  --gradient-brand: linear-gradient(135deg, hsl(155, 80%, 55%), hsl(186, 94%, 50%));
  --shadow-brand: 0 8px 32px -8px hsla(160, 84%, 44%, 0.35);
  --shadow-card: 0 1px 3px hsla(220, 20%, 10%, 0.06), 0 8px 24px hsla(220, 20%, 10%, 0.04);
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.gradient-text { background: var(--gradient-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: hsla(0, 0%, 100%, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px hsla(220, 20%, 10%, 0.06);
  height: 72px;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.navbar .logo { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--foreground); transition: opacity 0.2s; }
.nav-links a:hover { opacity: 0.7; }
.nav-links .nav-cta {
  background: var(--gradient-brand); color: var(--primary-fg);
  padding: 0.625rem 1.25rem; border-radius: 0.5rem;
  font-weight: 600; box-shadow: var(--shadow-brand);
}
.mobile-toggle { display: none; padding: 0.5rem; }
.mobile-menu { display: none; background: hsla(0,0%,100%,0.95); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; }
.mobile-menu.open { display: flex; flex-direction: column; gap: 0.75rem; }
.mobile-menu a { font-size: 0.875rem; font-weight: 500; color: var(--foreground); padding: 0.5rem 0; }
.mobile-menu .nav-cta { background: var(--gradient-brand); color: var(--primary-fg); padding: 0.625rem 1.25rem; border-radius: 0.5rem; font-weight: 600; text-align: center; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .navbar .logo { height: 36px; }
  .navbar, .nav-inner { height: 60px; }
}

/* Footer */
.footer { border-top: 1px solid hsla(220,15%,40%,0.15); padding: 3rem 0; background: linear-gradient(180deg, hsl(220,25%,8%) 0%, hsl(220,20%,14%) 100%); color: hsl(0,0%,96%); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer .logo { height: 28px; margin-bottom: 1rem; }
.footer .desc { font-size: 0.875rem; color: var(--dark-muted); max-width: 24rem; }
.footer h4 { font-weight: 600; font-size: 0.875rem; margin-bottom: 1rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul a { font-size: 0.875rem; color: var(--dark-muted); transition: color 0.2s; }
.footer ul a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid hsla(220,15%,40%,0.15); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p, .footer-bottom a { font-size: 0.75rem; color: var(--dark-muted); }
.footer-bottom a:hover { color: var(--primary); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* Blog listing */
.blog-hero { padding: 7rem 0 3rem; text-align: center; }
.blog-hero h1 { font-size: 2.5rem; font-weight: 800; }
.blog-hero p { font-size: 1.125rem; color: var(--muted); max-width: 40rem; margin: 1rem auto 0; }
/* Blog layout with sidebar */
.blog-layout { display: flex; gap: 2.5rem; }
.blog-main { flex: 1; min-width: 0; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.blog-sidebar { width: 20rem; flex-shrink: 0; }

/* Sidebar boxes */
.sidebar-box { border-radius: 1rem; border: 1px solid var(--border); background: #fff; padding: 1.5rem; margin-bottom: 1.5rem; }
.sidebar-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--foreground); margin-bottom: 1rem; }
.sidebar-categories { list-style: none; }
.sidebar-categories li { margin-bottom: 0.25rem; }
.cat-btn { font-size: 0.875rem; color: var(--muted); padding: 0.25rem 0; display: block; width: 100%; text-align: left; transition: color 0.2s; }
.cat-btn:hover, .cat-btn.active { color: var(--primary); font-weight: 600; }
.filter-info { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--muted); }
.filter-info strong { color: var(--primary); }
.filter-clear { font-size: 0.75rem; color: var(--muted); text-decoration: underline; margin-left: 0.5rem; }
.filter-clear:hover { color: var(--foreground); }
.no-results { text-align: center; color: var(--muted); padding: 3rem 0; }
.sidebar-popular { list-style: none; }
.sidebar-popular li { margin-bottom: 1rem; }
.sidebar-popular a { font-size: 0.875rem; font-weight: 600; color: var(--foreground); line-height: 1.4; display: block; transition: color 0.2s; }
.sidebar-popular a:hover { color: var(--primary); }
.popular-date { font-size: 0.75rem; color: var(--muted); }
.sidebar-cta { border-radius: 1rem; background: var(--gradient-brand); padding: 1.5rem; text-align: center; }
.sidebar-cta h3 { font-size: 1.125rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.sidebar-cta p { font-size: 0.875rem; color: rgba(255,255,255,0.9); margin-bottom: 1rem; }
.sidebar-cta-btn { display: inline-block; background: #fff; color: var(--primary); font-weight: 600; padding: 0.625rem 1.5rem; border-radius: 0.5rem; font-size: 0.875rem; transition: opacity 0.2s; }
.sidebar-cta-btn:hover { opacity: 0.9; }

@media (max-width: 1024px) {
  .blog-layout { flex-direction: column; }
  .blog-sidebar { width: 100%; }
}
.blog-card { display: block; border-radius: 1rem; border: 1px solid var(--border); overflow: hidden; background: #fff; box-shadow: var(--shadow-card); transition: transform 0.3s, box-shadow 0.3s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 4px 12px hsla(220,20%,10%,0.08), 0 16px 40px hsla(220,20%,10%,0.06); }
.blog-card .cover { height: 12rem; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.blog-card .cover h3 { color: #fff; font-size: 1rem; font-weight: 700; text-align: center; }
.blog-card .body { padding: 1.25rem; }
.blog-card .tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 9999px; background: hsla(160,84%,44%,0.1); color: var(--primary); margin-bottom: 0.75rem; }
.blog-card .title { font-size: 1rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.5rem; line-height: 1.4; }
.blog-card .excerpt { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.75rem; line-height: 1.5; }
.blog-card .meta { font-size: 0.75rem; color: var(--muted); }

/* Article page */
.article-wrapper { max-width: 720px; margin: 0 auto; padding: 6rem 1.5rem 3rem; }
.breadcrumb { font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); }
.article-tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 9999px; background: hsla(160,84%,44%,0.1); color: var(--primary); margin-bottom: 1rem; }
.article-wrapper h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.article-meta { font-size: 0.875rem; color: var(--muted); margin-bottom: 2rem; }
.article-cover { width: 100%; height: 16rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; margin-bottom: 2.5rem; }
.article-cover h2 { color: #fff; font-size: 1.5rem; font-weight: 700; text-align: center; padding: 0 2rem; }

/* Article content */
.article-content h2 { font-size: 1.5rem; font-weight: 800; margin: 2.5rem 0 1rem; color: var(--foreground); }
.article-content h3 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--foreground); }
.article-content p { color: hsla(220,20%,10%,0.85); line-height: 1.8; margin-bottom: 1.25rem; }
.article-content strong { font-weight: 700; color: var(--foreground); }
.article-content em { font-style: italic; }
.article-content ul, .article-content ol { margin: 0 0 1.25rem 1.5rem; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { color: hsla(220,20%,10%,0.85); line-height: 1.8; margin-bottom: 0.5rem; }
.article-content blockquote { border-left: 4px solid var(--primary); padding: 1rem 1.25rem; margin: 1.5rem 0; background: hsla(160,84%,44%,0.05); border-radius: 0 0.75rem 0.75rem 0; }
.article-content blockquote p { margin: 0; font-style: italic; color: hsla(220,20%,10%,0.9); }
.article-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; border-radius: 0.75rem; overflow: hidden; border: 1px solid var(--border); }
.article-content th { background: var(--secondary-bg); padding: 0.75rem 1rem; text-align: left; font-weight: 600; font-size: 0.875rem; }
.article-content td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); font-size: 0.875rem; }

/* Mid-article CTA */
.mid-cta { margin: 2.5rem 0; padding: 1.5rem 2rem; border-radius: 1rem; background: hsla(160,84%,44%,0.05); border: 1px solid hsla(160,84%,44%,0.2); text-align: center; }
.mid-cta h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.mid-cta p { font-size: 0.875rem; color: var(--muted); margin-bottom: 1rem; }
.mid-cta a { display: inline-block; background: var(--gradient-brand); color: #fff; font-weight: 600; padding: 0.625rem 1.5rem; border-radius: 0.5rem; font-size: 0.875rem; box-shadow: var(--shadow-brand); }

/* End CTA */
.end-cta { margin-top: 3rem; padding: 2rem; border-radius: 1rem; background: var(--gradient-brand); text-align: center; }
.end-cta h3 { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.end-cta p { color: rgba(255,255,255,0.9); font-size: 0.875rem; margin-bottom: 1rem; }
.end-cta a { display: inline-block; background: #fff; color: var(--primary); font-weight: 600; padding: 0.75rem 2rem; border-radius: 0.5rem; }

/* Share buttons */
.share-bar { margin-top: 2rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.share-bar span { font-size: 0.875rem; font-weight: 600; }
.share-btn { padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; transition: opacity 0.2s; }
.share-btn:hover { opacity: 0.8; }
.share-whatsapp { background: hsla(142,70%,49%,0.1); color: #25D366; }
.share-linkedin { background: hsla(210,90%,40%,0.1); color: #0077B5; }
.share-copy { background: var(--secondary-bg); color: var(--muted); }

/* Post navigation */
.post-nav { display: flex; gap: 1rem; margin-top: 2.5rem; }
.post-nav a { flex: 1; padding: 1.25rem; border-radius: 0.75rem; border: 1px solid var(--border); transition: border-color 0.3s; }
.post-nav a:hover { border-color: hsla(160,84%,44%,0.3); }
.post-nav .nav-label { font-size: 0.75rem; color: var(--muted); display: block; margin-bottom: 0.25rem; }
.post-nav .nav-title { font-size: 0.875rem; font-weight: 600; color: var(--foreground); }
.post-nav .next { text-align: right; }

/* Related posts */
.related-section { max-width: 960px; margin: 3rem auto 0; padding: 0 1.5rem 4rem; }
.related-section h2 { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 2rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

@media (max-width: 640px) {
  .blog-hero h1 { font-size: 2rem; }
  .article-wrapper h1 { font-size: 1.75rem; }
  .post-nav { flex-direction: column; }
}
