/* ========================================
   MODERN BLOG STYLING - 2025 DESIGN
   Replace existing blog-styles.css with this
   ======================================== */

/* CSS Variables for consistent theming */
:root {
  --primary-color: #2563eb;
  --secondary-color: #f59e0b;
  --accent-color: #10b981;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-card: #ffffff;
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --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);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Dark mode variables */
[data-theme="dark"] {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-card: #1f2937;
  --border-light: #374151;
  --border-medium: #4b5563;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  margin: 0;
  padding: 0;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Site Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .site-header {
  background-color: rgba(31, 41, 55, 0.95);
}

.site-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Article Container */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--bg-primary);
}

/* Post Header */
.post-header {
  margin-bottom: 3rem;
  text-align: center;
}

.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

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

.category {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.category.pantry-staples {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.category.baking-essentials {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.category.fresh-produce {
  background: linear-gradient(135deg, #10b981, #059669);
}

.post-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 1rem 0;
  color: var(--text-primary);
}

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

.hero-image {
  font-size: 4rem;
  margin: 2rem 0;
  text-align: center;
  filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.1));
}

/* Table of Contents */
.table-of-contents {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.table-of-contents h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.table-of-contents li {
  margin: 0.5rem 0;
}

.table-of-contents a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: block;
  padding: 0.375rem 0;
  border-radius: var(--radius-sm);
}

.table-of-contents a:hover {
  background: var(--primary-color);
  color: white;
  padding-left: 0.75rem;
  transform: translateX(0.25rem);
}

/* Post Content */
.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 3rem 0 1.5rem 0;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem 0;
  color: var(--text-primary);
}

.post-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: var(--text-primary);
}

.post-content p {
  margin: 1.5rem 0;
  line-height: 1.8;
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin: 0.75rem 0;
  line-height: 1.7;
}

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

.post-content blockquote {
  border-left: 4px solid var(--primary-color);
  background: var(--bg-secondary);
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  box-shadow: var(--shadow-sm);
}

.post-content blockquote p {
  margin: 0;
  color: var(--text-secondary);
}

/* App Callout */
.app-callout {
  background: linear-gradient(135deg, var(--accent-color), #059669);
  color: white;
  padding: 2rem;
  border-radius: var(--radius-xl);
  margin: 3rem 0;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.app-callout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.app-callout:hover::before {
  transform: translateX(100%);
}

.app-callout h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.app-callout p {
  margin: 0 0 1.5rem 0;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--accent-color);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: #f9fafb;
}

/* Grid Layouts */
.post-content > div[style*="display: grid"] {
  gap: 1.5rem;
  margin: 2rem 0;
}

.post-content > div[style*="display: grid"] > div {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

/* Post Footer */
.post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.social-share {
  margin-bottom: 3rem;
  text-align: center;
}

.social-share h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-button {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.share-twitter {
  background: #1da1f2;
  color: white;
}

.share-facebook {
  background: #1877f2;
  color: white;
}

.share-linkedin {
  background: #0077b5;
  color: white;
}

.share-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Related Posts */
.related-posts {
  margin: 3rem 0;
}

.related-posts h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

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

.related-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
}

.related-card h4 a {
  color: var(--text-primary);
  text-decoration: none;
}

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

.related-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Newsletter Signup */
.newsletter-bottom {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.newsletter-bottom h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.newsletter-bottom p {
  margin: 0 0 1.5rem 0;
  color: var(--text-secondary);
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.newsletter-form button {
  padding: 0.875rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .site-nav {
    padding: 1rem;
  }
  
  .article-container {
    padding: 1rem;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .hero-image {
    font-size: 3rem;
  }
  
  .post-content {
    font-size: 1rem;
  }
  
  .post-content h2 {
    font-size: 1.5rem;
  }
  
  .post-content h3 {
    font-size: 1.25rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .share-buttons {
    flex-direction: column;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .app-callout {
    padding: 1.5rem;
  }
  
  .table-of-contents {
    padding: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .site-header,
  .social-share,
  .newsletter-bottom,
  .app-callout {
    display: none;
  }
  
  .article-container {
    max-width: none;
    padding: 0;
  }
  
  .post-content {
    font-size: 12pt;
    line-height: 1.5;
  }
}