/* Blog Styles - Improved Version */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    color: var(--bg-primary);
    padding: 8rem 0 4rem 0;
    text-align: center;
    border-bottom: 3px solid var(--primary-800);
    position: relative;
  }
  
  .blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
  }
  
  .blog-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--bg-primary);
  }
  
  .blog-hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--bg-primary);
    line-height: 1.6;
    opacity: 0.95;
  }
  
  .blog-hero-cta {
    margin-top: 2rem;
  }
  
  /* Blog Layout */
  .blog-content {
    padding: 4rem 0;
    background-color: var(--bg-primary);
  }
  
  .blog-posts {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  /* Blog Post Cards */
  .blog-post {
    background: var(--surface-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    animation: fadeInUp 0.6s ease-out;
  }
  
  .blog-post:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-colored);
    border-color: var(--primary-300);
  }
  
  .post-content {
    padding: 2rem;
  }
  
  .post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
  }
  
  .post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .post-meta i {
    color: var(--primary-500);
  }
  
  .post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
  }
  
  .post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
  }
  
  .post-title a:hover {
    color: var(--primary-600);
  }
  
  .post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
  }
  
  .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-600);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
  }
  
  .read-more:hover {
    color: var(--primary-700);
    gap: 0.75rem;
  }
  
  .read-more i {
    transition: var(--transition);
  }
  
  /* Featured Post Styling */
  .featured-post {
    border-left: 4px solid var(--primary-500);
  }
  
  .featured-post .post-title {
    font-size: 1.75rem;
  }
  
  .featured-post .post-excerpt {
    font-size: 1.1rem;
  }
  
  /* Blog CTA Section */
  .blog-cta {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 4rem 0;
    text-align: center;
    border-top: 3px solid var(--primary-500);
  }
  
  .cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
  }
  
  .cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
  }
  
  .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* Individual Blog Post Styles */
  .blog-post-single {
    padding: 2rem 0 4rem;
    background-color: var(--bg-primary);
  }
  
  .breadcrumb {
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
  }
  
  .breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
  }
  
  .breadcrumb li:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: var(--text-tertiary);
  }
  
  .breadcrumb a {
    color: var(--primary-600);
    text-decoration: none;
  }
  
  .breadcrumb a:hover {
    text-decoration: underline;
  }
  
  .breadcrumb li[aria-current="page"] {
    color: var(--text-tertiary);
    font-weight: 500;
  }
  
  /* Post Header */
  .post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
  }
  
  .post-header .post-category {
    display: inline-block;
    background: var(--primary-500);
    color: var(--bg-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
  }
  
  .post-header .post-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
  }
  
  .post-header .post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }
  
  .post-header .post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
  }
  
  .post-header .post-meta i {
    color: var(--primary-500);
  }
  
  .post-header .post-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .post-tag {
    background: var(--primary-100);
    color: var(--primary-700);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
  }
  
  .post-tag:hover {
    background: var(--primary-200);
    color: var(--primary-800);
  }
  
  /* Post Featured Image */
  .post-featured-image {
    margin-bottom: 3rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
  }
  
  .post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
  }
  
  /* Post Content */
  .post-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 65ch;
    margin: 0 auto;
  }
  
  .post-content .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.6;
    padding: 1.5rem;
    background: var(--primary-50);
    border-left: 4px solid var(--primary-500);
    border-radius: var(--border-radius);
  }
  
  .post-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-500);
  }
  
  .post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
  }
  
  .post-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
  }
  
  .post-content p {
    margin-bottom: 1.5rem;
  }
  
  .post-content ul,
  .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
  }
  
  .post-content li {
    margin-bottom: 0.5rem;
  }
  
  .post-content strong {
    color: var(--text-primary);
    font-weight: 600;
  }
  
  .post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-500);
    border-radius: var(--border-radius);
    font-style: italic;
    color: var(--text-secondary);
  }
  
  .post-content code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
  }
  
  .post-content pre {
    background: var(--neutral-800);
    color: var(--neutral-100);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
  }
  
  .post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
  }
  
  /* Content Boxes */
  .callout-box {
    background: var(--primary-50);
    border-left: 4px solid var(--primary-500);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
  }
  
  .info-box {
    background: var(--warning-50);
    border-left: 4px solid var(--warning-500);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
  }
  
  .success-box {
    background: var(--success-50);
    border-left: 4px solid var(--success-500);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
  }
  
  .error-box {
    background: var(--error-50);
    border-left: 4px solid var(--error-500);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
  }
  
  .cta-box {
    background: var(--primary-500);
    color: var(--bg-primary);
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-colored);
  }
  
  .cta-box h3 {
    color: var(--bg-primary);
    margin-bottom: 1rem;
  }
  
  .cta-box p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
  }
  
  .cta-box .btn {
    background: var(--bg-primary);
    color: var(--primary-500);
  }
  
  .cta-box .btn:hover {
    background: var(--bg-secondary);
    color: var(--primary-600);
  }
  
  /* Post Navigation */
  .post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-light);
  }
  
  .nav-post {
    flex: 1;
    text-decoration: none;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
  }
  
  .nav-post:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-light);
  }
  
  .nav-post-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
  }
  
  .nav-post-title {
    color: var(--text-primary);
    font-weight: 600;
  }
  
  .nav-post.next {
    text-align: right;
  }
  
  /* Related Posts */
  .related-posts {
    margin: 4rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
  }
  
  .related-posts h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .related-post {
    background: var(--surface-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-light);
  }
  
  .related-post:hover {
    box-shadow: var(--shadow-light);
    transform: translateY(-2px);
  }
  
  .related-post-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
  }
  
  .related-post-excerpt {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  /* Animations */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Stagger animation for multiple posts */
  .blog-post:nth-child(1) { animation-delay: 0.1s; }
  .blog-post:nth-child(2) { animation-delay: 0.2s; }
  .blog-post:nth-child(3) { animation-delay: 0.3s; }
  .blog-post:nth-child(4) { animation-delay: 0.4s; }
  .blog-post:nth-child(5) { animation-delay: 0.5s; }
  .blog-post:nth-child(6) { animation-delay: 0.6s; }
  
  /* Accessibility Improvements */
  @media (prefers-reduced-motion: reduce) {
    .blog-post {
      animation: none;
    }
    
    .blog-post:hover,
    .related-post:hover,
    .nav-post:hover {
      transform: none;
    }
  }
  
  @media (prefers-contrast: high) {
    .blog-post {
      border: 2px solid var(--text-primary);
    }
    
    .post-content {
      color: var(--text-primary);
    }
    
    .post-title a {
      color: var(--text-primary);
    }
  }
  
  /* Dark mode specific adjustments */
  @media (prefers-color-scheme: dark) {
    .post-content code {
      background: var(--neutral-700);
      color: var(--neutral-100);
    }
    
    .callout-box {
      background: rgba(59, 130, 246, 0.1);
    }
    
    .info-box {
      background: rgba(245, 158, 11, 0.1);
    }
    
    .success-box {
      background: rgba(34, 197, 94, 0.1);
    }
    
    .error-box {
      background: rgba(239, 68, 68, 0.1);
    }
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .blog-hero {
      padding: 3rem 0;
    }
    
    .blog-content {
      padding: 2rem 0;
    }
    
    .post-content {
      padding: 1.5rem;
      font-size: 1rem;
    }
    
    .post-content .lead {
      font-size: 1.1rem;
      padding: 1rem;
    }
    
    .post-content h2 {
      font-size: 1.5rem;
    }
    
    .post-content h3 {
      font-size: 1.25rem;
    }
    
    .post-meta {
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .post-header .post-meta {
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .cta-buttons {
      flex-direction: column;
      align-items: center;
    }
    
    .cta-content h2 {
      font-size: 2rem;
    }
    
    .cta-content p {
      font-size: 1.1rem;
    }
    
    .post-navigation {
      flex-direction: column;
    }
    
    .nav-post.next {
      text-align: left;
    }
    
    .related-posts-grid {
      grid-template-columns: 1fr;
    }
  }
  
  @media (max-width: 480px) {
    .blog-hero-title {
      font-size: 2rem;
    }
    
    .blog-hero-subtitle {
      font-size: 1.1rem;
    }
    
    .post-title {
      font-size: 1.25rem;
    }
    
    .post-header .post-title {
      font-size: 1.75rem;
    }
    
    .post-content h2 {
      font-size: 1.25rem;
    }
    
    .post-content h3 {
      font-size: 1.1rem;
    }
    
    .callout-box,
    .info-box,
    .success-box,
    .error-box,
    .cta-box {
      padding: 1rem;
    }
    
    .cta-content h2 {
      font-size: 1.75rem;
    }
    
    .post-header {
      padding: 1.5rem 1rem;
    }
    
    .related-posts {
      padding: 1.5rem;
    }
  }