/* =============================================
   CryptoGuide Blog - Main CSS
   Premium Dark Crypto Theme
   ============================================= */

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

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1629;
  --bg-card: #141a2e;
  --bg-card-hover: #1a2240;
  --accent-blue: #00d4ff;
  --accent-purple: #7c3aed;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e2d4a;
  --border-light: #2a3a5c;
  --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #0d1b3e 50%, #0a0e1a 100%);
  --gradient-card: linear-gradient(135deg, #141a2e, #1a2240);
  --gradient-accent: linear-gradient(135deg, #00d4ff, #7c3aed);
  --shadow-card: 0 4px 24px rgba(0, 212, 255, 0.08);
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
  --radius: 12px;
  --radius-lg: 16px;
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --nav-height: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: #f1f5f9;
}

a { color: var(--accent-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: #33ddff; }

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

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
}

.nav-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent-blue); }

/* ── Hero Section ── */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--accent-blue);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  max-width: 700px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.35);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s;
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

/* ── Post Grid ── */
.posts-section { padding: 60px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-secondary);
}

.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.post-cat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
  background: rgba(0, 212, 255, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
}

.post-read-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 10px;
  line-height: 1.4;
  flex: 1;
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--accent-blue); }

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.post-date { font-size: 0.78rem; color: var(--text-muted); }

/* ── Article Page ── */
.article-hero { padding: 60px 0 40px; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.article-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-byline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-featured-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 32px 0;
  border: 1px solid var(--border);
}

/* ── Article Content ── */
.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #cbd5e1;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: #f1f5f9;
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.8rem;
  color: #e2e8f0;
}

.article-content p { margin-bottom: 1.2rem; }

.article-content ul, .article-content ol {
  margin: 1.2rem 0 1.2rem 1.5rem;
}

.article-content li { margin-bottom: 0.5rem; }

.article-content strong { color: #f1f5f9; }

.article-content blockquote {
  border-left: 3px solid var(--accent-blue);
  padding: 16px 20px;
  margin: 1.5rem 0;
  background: rgba(0, 212, 255, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.article-content th {
  background: var(--bg-card);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #f1f5f9;
  border: 1px solid var(--border);
}

.article-content td {
  padding: 10px 16px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.article-content tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.article-content code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-blue);
}

.article-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

/* ── Disclaimer Box ── */
.disclaimer-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── TOC ── */
.toc-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 2rem 0;
}

.toc-box h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  margin-bottom: 12px;
}

.toc-list { list-style: none; }
.toc-list li { margin-bottom: 6px; }
.toc-list a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.toc-list a:hover { color: var(--accent-blue); }

/* ── Sidebar ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.sidebar { position: sticky; top: calc(var(--nav-height) + 24px); }

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.sidebar-widget-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Category Tags ── */
.cat-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.cat-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.cat-tag:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(0, 212, 255, 0.05);
}

/* ── Footer ── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  font-size: 0.87rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-blue); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Blog List ── */
.blog-list-page { padding: 60px 0; }

.page-header { margin-bottom: 40px; }

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s;
  text-decoration: none;
}

.page-btn.active, .page-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

/* ── Glow Divider ── */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  margin: 60px 0;
  opacity: 0.3;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.5s ease forwards; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 60px 0 50px; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
