/* =============================================
   NooriBooks Tech Blog - Main Stylesheet
   Google AdSense Ready | SEO Optimized
   ============================================= */

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

/* ---- CSS Variables ---- */
:root {
  --primary: #0f172a;
  --secondary: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #dbeafe;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.08), 0 10px 10px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Inter', sans-serif;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --primary: #f1f5f9;
  --secondary: #cbd5e1;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: #1e3a5f;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --bg-primary: #0a0f1e;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --border: #1e2d3d;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.3), 0 10px 10px rgba(0,0,0,0.2);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul, ol { padding-left: 1.5rem; }

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

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.2rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59,130,246,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] .site-header {
  background: rgba(10,15,30,0.95);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary) !important;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo span {
  color: var(--accent);
}

.logo-badge {
  background: var(--accent);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
  margin-top: 4px;
}

/* Nav */
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.main-nav a:hover, .main-nav a.active {
  background: var(--accent-light);
  color: var(--accent);
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Dark Mode Toggle */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: rotate(15deg); }

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}
.menu-toggle span {
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Hero Section ---- */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 50%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a2235 50%, #0a0f1e 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 700px; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h1 { margin-bottom: 1.25rem; color: var(--text-primary); }
.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 580px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-item { }
.stat-number { font-size: 1.6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent-light), #bfdbfe);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}

.card-body { padding: 1.5rem; }

.card-category {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.card-title a { color: var(--text-primary); }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.card-meta span { display: flex; align-items: center; gap: 0.3rem; }

/* ---- Article Grid ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* ---- Section ---- */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-secondary); }

.section-header { margin-bottom: 3rem; }
.section-tag {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
}
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-secondary); font-size: 1.05rem; max-width: 600px; }

/* ---- Featured Article ---- */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
}

.featured-image {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-radius: var(--radius);
  height: 280px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}

.featured-badge {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Sidebar ---- */
.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.75rem;
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  color: var(--text-primary);
}

/* ---- Category Pills ---- */
.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}
.categories-list a {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.categories-list a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ---- Popular Posts ---- */
.popular-post {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.popular-post:last-child { border-bottom: none; }
.popular-rank {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--border);
  min-width: 28px;
}
.popular-post-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}
.popular-post-title a { color: var(--text-primary); }
.popular-post-title a:hover { color: var(--accent); }
.popular-post-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ---- Newsletter ---- */
.newsletter-widget {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white;
  border-color: transparent;
}
.newsletter-widget .widget-title { color: white; border-color: rgba(255,255,255,0.3); }
.newsletter-widget p { color: rgba(255,255,255,0.85); font-size: 0.88rem; margin-bottom: 1rem; }
.newsletter-form { display: flex; flex-direction: column; gap: 0.6rem; }
.newsletter-form input {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  background: rgba(255,255,255,0.15);
  color: white;
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form input:focus { background: rgba(255,255,255,0.25); }
.newsletter-form button {
  padding: 0.7rem;
  background: white;
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
}
.newsletter-form button:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* ---- Article Page ---- */
.article-hero {
  padding: 4rem 0 3rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.article-breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.article-breadcrumb a { color: var(--text-muted); }
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb .sep { color: var(--border); }

.article-category-tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 1rem;
}

.article-hero h1 { margin-bottom: 1.25rem; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.article-meta span { display: flex; align-items: center; gap: 0.35rem; }
.article-meta .author { font-weight: 600; color: var(--text-secondary); }

/* Article Body */
.article-body {
  max-width: 800px;
}

.article-body h2 {
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
}

.article-body h3 {
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.article-body p { font-size: 1.02rem; line-height: 1.85; margin-bottom: 1.5rem; }

.article-body ul, .article-body ol {
  margin: 1.25rem 0 1.5rem 1.5rem;
}
.article-body li {
  margin-bottom: 0.6rem;
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body code {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: 'Courier New', monospace;
  color: var(--accent);
}

.article-body strong { color: var(--text-primary); font-weight: 700; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.92rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.article-body th {
  background: var(--accent);
  color: white;
  padding: 0.9rem 1.2rem;
  text-align: left;
  font-weight: 600;
}
.article-body td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:nth-child(even) td { background: var(--bg-secondary); }

/* Table of Contents */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}
.toc-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toc ol {
  padding-left: 1.25rem;
  margin: 0;
}
.toc li {
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}
.toc a { color: var(--text-secondary); }
.toc a:hover { color: var(--accent); }

/* Info Box */
.info-box {
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
}
[data-theme="dark"] .info-box { border-color: #1e3a5f; }
.info-box-icon { font-size: 1.25rem; flex-shrink: 0; }
.info-box-content { font-size: 0.92rem; color: var(--text-secondary); }
.info-box-content strong { color: var(--accent); display: block; margin-bottom: 0.25rem; }

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.5rem 0;
}
.tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
}
.tag:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* Author Box */
.author-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  margin: 3rem 0;
  box-shadow: var(--shadow);
}
.author-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.author-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.2rem; }
.author-title { font-size: 0.82rem; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.author-bio { font-size: 0.88rem; color: var(--text-secondary); }

/* ---- Breadcrumb ---- */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---- Page Hero ---- */
.page-hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
[data-theme="dark"] .page-hero {
  background: linear-gradient(135deg, #0d1b2a, #1a2235);
}
.page-hero h1 { margin-bottom: 1rem; }
.page-hero p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* ---- Contact Form ---- */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* ---- About Page ---- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.team-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
}
.team-name { font-weight: 700; margin-bottom: 0.2rem; }
.team-role { font-size: 0.82rem; color: var(--accent); font-weight: 600; }

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.value-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.value-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.value-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.value-card p { font-size: 0.88rem; }

/* Clickable category cards */
a.value-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  padding-bottom: 3rem;
}
a.value-card-link h3 { color: var(--text-primary); transition: color var(--transition); }
a.value-card-link:hover h3 { color: var(--accent); }
a.value-card-link:hover { color: inherit; }

.card-arrow {
  position: absolute;
  bottom: 1.25rem;
  left: 2rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: all var(--transition);
}
a.value-card-link:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ---- Legal Pages ---- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}
.legal-content h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.4rem;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.legal-content h3 { margin: 1.5rem 0 0.75rem; }
.legal-content p { margin-bottom: 1.2rem; font-size: 0.97rem; }
.legal-content ul { margin: 1rem 0 1.5rem 1.5rem; }
.legal-content li { margin-bottom: 0.5rem; font-size: 0.97rem; color: var(--text-secondary); }
.legal-date { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; }

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.page-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 0;
}
[data-theme="dark"] .site-footer { background: #060d1a; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-about .logo { color: white !important; margin-bottom: 1rem; }
.footer-about .logo span { color: var(--accent); }
.footer-desc { font-size: 0.88rem; line-height: 1.7; margin-bottom: 1.25rem; }

.social-links { display: flex; gap: 0.6rem; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition);
  text-decoration: none;
}
.social-link:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--accent); }

/* ---- Scroll to Top ---- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--accent-hover); transform: translateY(-3px); }

/* ---- Progress Bar ---- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ---- Related Articles ---- */
.related-section { padding: 4rem 0; background: var(--bg-secondary); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .with-sidebar { grid-template-columns: 1fr; }
  .featured-article { grid-template-columns: 1fr; padding: 2rem; }
  .featured-image { height: 200px; }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: fixed;
    top: 73px;
    left: 0; right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.75rem 1rem; width: 100%; border-radius: var(--radius-sm); }
  .menu-toggle { display: flex; }
  .hero { padding: 3rem 0; }
  .hero-stats { gap: 1.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; justify-content: center; }
  .author-box { flex-direction: column; }
}

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

.animate-fade-up { animation: fadeInUp 0.5s ease forwards; }
.animate-fade { animation: fadeIn 0.4s ease forwards; }

.stagger > * { opacity: 0; animation: fadeInUp 0.5s ease forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
