/* CSS Variables for consistent theming */
:root {
  --primary-text: #1a1a1a;
  --primary-color: #4A6CF7;
  --background-light: #f8f9fa;
  --border-color: #e0e0e0;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-medium: #cccccc;
  --gray-dark: #666666;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--primary-text);
  background-color: var(--white);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.site-header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-text);
  text-decoration: none;
}

.main-nav ul {
  display: flex;
  list-style: none;
}

.main-nav li {
  margin-left: 30px;
}

.main-nav a {
  text-decoration: none;
  color: var(--primary-text);
  font-weight: 500;
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-color);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-text);
  margin: 3px 0;
  transition: var(--transition);
}

/* Hero Section */
.blog-hero {
  background-color: var(--background-light);
  padding: 60px 0;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-text);
}

.blog-hero p {
  font-size: 1.2rem;
  color: var(--gray-dark);
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Controls */
.blog-controls {
  margin: 40px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}

.search-container {
  flex: 1;
  min-width: 250px;
}

.search-container input {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 1rem;
  transition: var(--transition);
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.category-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.blog-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 25px;
}

.card-tag {
  display: inline-block;
  padding: 5px 15px;
  background: var(--background-light);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.card-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--primary-text);
}

.card-excerpt {
  color: var(--gray-dark);
  margin-bottom: 20px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--gray-dark);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.read-more:hover {
  color: #3a5af5;
  text-decoration: underline;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 40px 0;
}

.pagination button {
  padding: 10px 20px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.pagination button:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.current-page {
  font-weight: 600;
  color: var(--primary-color);
}

/* Footer */
.site-footer {
  background: #1a1a1a;
  color: #f8f9fa;
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo a {
  color: white;
  font-size: 1.8rem;
  background: linear-gradient(90deg, #4A6CF7, #8A6CF7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-description {
  color: #cccccc;
  margin: 20px 0;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #333;
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-column h3 {
  color: white;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: #cccccc;
  text-decoration: none;
  transition: var(--transition);
}

.footer-column a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.footer-legal-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-legal-links a {
  color: #cccccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-legal-links a:hover {
  color: var(--primary-color);
}

/* Blog Post Styles */
.breadcrumb {
  margin: 20px 0;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--gray-dark);
  margin: 0 10px;
}

.post-header {
  margin: 40px 0;
  text-align: center;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-text);
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--gray-dark);
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.featured-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin: 30px 0;
}

.post-content {
  max-width: 800px;
  margin: 0 auto 50px;
}

.post-content h2 {
  font-size: 1.8rem;
  margin: 40px 0 20px;
  color: var(--primary-text);
}

.post-content h3 {
  font-size: 1.4rem;
  margin: 30px 0 15px;
  color: var(--primary-text);
}

.post-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.post-content ul,
.post-content ol {
  margin: 20px 0 20px 40px;
}

.post-content li {
  margin-bottom: 10px;
}

.post-content code {
  background: var(--background-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.post-content a {
  color: var(--primary-color);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Table of Contents */
.toc {
  background: var(--background-light);
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

.toc ul {
  list-style: none;
  margin: 0;
}

.toc li {
  margin-bottom: 10px;
}

.toc a {
  color: var(--primary-text);
  text-decoration: none;
  transition: var(--transition);
}

.toc a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

/* Author Bio */
.author-bio {
  display: flex;
  gap: 20px;
  background: var(--background-light);
  border-radius: 12px;
  padding: 30px;
  margin: 40px 0;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h4 {
  margin-bottom: 10px;
}

.author-info p {
  margin-bottom: 15px;
  color: var(--gray-dark);
}

.author-profile-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.author-profile-link:hover {
  text-decoration: underline;
}

/* Related Posts */
.related-posts {
  margin: 50px 0;
}

.related-posts h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

/* Comments Section */
.comments-section {
  margin: 50px 0;
}

.comments-section h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

.comment-form {
  background: var(--background-light);
  border-radius: 12px;
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.submit-btn {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover {
  background: #3a5af5;
}

/* Social Share */
.social-share {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 40px 0;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.twitter {
  background: #1DA1F2;
}

.linkedin {
  background: #0077B5;
}

.facebook {
  background: #1877F2;
}

.share-btn:hover {
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .site-header .container {
    flex-wrap: wrap;
  }

  .main-nav {
    width: 100%;
    margin-top: 20px;
  }

  .main-nav ul {
    justify-content: center;
  }

  .main-nav ul li {
    margin: 0 10px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }

  .blog-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .post-title {
    font-size: 2rem;
  }

  .author-bio {
    flex-direction: column;
    text-align: center;
  }

  .toc {
    position: static !important;
    margin: 30px 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .blog-hero {
    padding: 40px 0;
  }

  .blog-hero h1 {
    font-size: 1.8rem;
  }

  .card-content {
    padding: 20px;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .post-meta {
    flex-direction: column;
    gap: 10px;
  }

  .social-share {
    flex-wrap: wrap;
  }
}