/* ========================================
   WhatsUpPick - AI News & Tech Blog
   CSS Stylesheet with Dark Mode Support
   ======================================== */

/* CSS Variables */
:root {
  /* Light Mode Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --accent-dark: #0891b2;

  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;

  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --transition: 0.2s ease;

  /* Layout */
  --max-width: 1280px;
  --content-width: 800px;
  --header-height: 64px;
}

/* Dark Mode Colors */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;

  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --border: #334155;
  --border-light: #1e293b;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-height);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

ul, ol {
  list-style: none;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

.container-narrow {
  max-width: var(--content-width);
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: background-color var(--transition), border-color var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.logo:hover {
  color: var(--primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: color var(--transition), background-color var(--transition);
}

.theme-toggle:hover {
  color: var(--text);
  background-color: var(--bg-secondary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 100%);
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-tags {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: border-color var(--transition), background-color var(--transition);
}

.hero-tag:hover {
  border-color: var(--primary);
  background-color: var(--bg-secondary);
}

/* ========================================
   Section Styles
   ======================================== */
.section {
  padding: 4rem 0;
}

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

.section-title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-link {
  font-size: 0.875rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.section-link:hover {
  text-decoration: underline;
}

/* ========================================
   Cards
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

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

.card-image {
  aspect-ratio: 16/9;
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  color: var(--text-muted);
  font-size: 3rem;
}

.card-content {
  padding: 1.25rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.card-category {
  color: var(--primary);
  font-weight: 600;
}

.card-date {
  color: var(--text-muted);
}

.card-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-title a {
  color: var(--text);
}

.card-title a:hover {
  color: var(--primary);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Featured Card */
.card-featured {
  grid-column: span 2;
}

.card-featured .card-image {
  aspect-ratio: 21/9;
}

.card-featured .card-title {
  font-size: 1.5rem;
}

.card-featured .card-excerpt {
  -webkit-line-clamp: 3;
}

/* ========================================
   Categories Section
   ======================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.category-card:hover {
  border-color: var(--primary);
  background-color: var(--bg-secondary);
  transform: translateY(-2px);
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.category-icon.ai-news {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
}

.category-icon.ai-tools {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  color: white;
}

.category-icon.devops {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
}

.category-icon.tutorials {
  background: linear-gradient(135deg, #10b981, #14b8a6);
  color: white;
}

.category-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.category-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* ========================================
   Posts List
   ======================================== */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.post-item:hover {
  border-color: var(--primary);
  background-color: var(--bg-secondary);
}

.post-item-image {
  width: 200px;
  height: 120px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.post-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}

.post-item-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.post-item-title a {
  color: var(--text);
}

.post-item-title a:hover {
  color: var(--primary);
}

.post-item-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* ========================================
   Article / Post Content
   ======================================== */
.article {
  padding: 2rem 0 4rem;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.article-category {
  color: var(--primary);
  font-weight: 600;
}

.article-date {
  color: var(--text-muted);
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

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

.article-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-content h2 {
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.article-content h3 {
  margin: 2rem 0 1rem;
}

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

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

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

.article-content ol li {
  list-style: decimal;
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--primary);
  background-color: var(--bg-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content code {
  padding: 0.2rem 0.4rem;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.article-content pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background-color: var(--bg-secondary);
  border-radius: var(--radius);
  overflow-x: auto;
}

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

.article-content img {
  margin: 1.5rem 0;
  border-radius: var(--radius);
}

/* ========================================
   Post Single (Blog Post Detail)
   ======================================== */
.post-single {
  padding: 2rem 0 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.post-header-image {
  width: 100%;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.post-header-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px;
  background-color: var(--bg-secondary);
  min-height: 300px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.post-meta .category {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.8125rem;
}

.post-meta .date {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-meta .read-time {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-meta .date::before {
  content: '📅';
  font-size: 0.875rem;
}

.post-meta .read-time::before {
  content: '⏱️';
  font-size: 0.875rem;
}

.post-single h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text);
}

.post-excerpt {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Post Content - Enhanced Typography */
.post-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content > * {
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-size: 1.875rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-weight: 700;
}

.post-content h3 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 600;
}

.post-content h4 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  color: var(--text);
  font-weight: 600;
}

.post-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content p:first-child {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.post-content strong {
  font-weight: 700;
  color: var(--text);
}

.post-content em {
  font-style: italic;
}

/* Lists */
.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.75rem;
  list-style: disc;
  line-height: 1.7;
  color: var(--text-secondary);
}

.post-content ol li {
  list-style: decimal;
}

.post-content li strong {
  color: var(--text);
}

/* Blockquotes */
.post-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  border-left: 4px solid var(--primary);
  background-color: var(--bg-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content blockquote p {
  margin: 0;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
.post-content code {
  padding: 0.25rem 0.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--accent-dark);
}

.post-content pre {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.6;
}

.post-content pre code {
  padding: 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
}

/* Images */
.post-content img {
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 100%;
  height: auto;
}

/* Tables */
.post-content table,
.comparison-table table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-content thead,
.comparison-table thead {
  background-color: var(--bg-secondary);
}

.post-content th,
.comparison-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

.post-content td,
.comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.post-content tr:last-child td,
.comparison-table tr:last-child td {
  border-bottom: none;
}

.post-content tbody tr:hover,
.comparison-table tbody tr:hover {
  background-color: var(--bg-secondary);
}

/* Dividers */
.post-content hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 3rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-tags .tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.post-tags .tag:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Post Sources */
.post-sources {
  margin: 3rem 0;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.post-sources h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 600;
}

.post-sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-sources li {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  position: relative;
}

.post-sources li::before {
  content: '🔗';
  position: absolute;
  left: 0;
  top: 0;
}

.post-sources a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.post-sources a:hover {
  border-bottom-color: var(--primary);
}

/* Post Navigation */
.post-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ========================================
   Page Header (for static pages)
   ======================================== */
.page-header {
  padding: 3rem 0;
  text-align: center;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-description {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin: 0;
}

.page-content {
  padding: 3rem 0;
}

.page-content h2 {
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.page-content h3 {
  margin: 1.5rem 0 0.75rem;
}

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

.page-content li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

.page-content ol li {
  list-style: decimal;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  margin-top: auto;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background-color: var(--bg);
  color: var(--text-muted);
  transition: all var(--transition);
}

.footer-social a:hover {
  background-color: var(--primary);
  color: white;
}

.footer-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

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

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: var(--text-muted);
}

.footer-legal a:hover {
  color: var(--primary);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: white;
}

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

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ========================================
   Forms
   ======================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--bg);
  color: var(--text);
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

/* ========================================
   Ad Placeholder (for future AdSense)
   ======================================== */
.ad-placeholder {
  padding: 2rem;
  background-color: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .card-featured {
    grid-column: span 1;
  }

  .card-featured .card-image {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    gap: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-link::after {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 2rem 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .post-item {
    flex-direction: column;
  }

  .post-item-image {
    width: 100%;
    height: 180px;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .post-single h1 {
    font-size: 1.875rem;
  }

  .post-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

  .post-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
  }

  .post-content {
    font-size: 1rem;
  }

  .post-sources {
    padding: 1.25rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .card-content {
    padding: 1rem;
  }

  .post-item {
    padding: 1rem;
  }
}
