/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafc;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

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

.nav-brand h2 {
  color: #2563eb;
  font-weight: 700;
}

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

.nav-links a {
  text-decoration: none;
  color: #64748b;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #2563eb;
}

/* Article Header */
.article {
  margin-top: 80px;
}

.article-header {
  background: white;
  padding: 60px 0;
  border-bottom: 1px solid #e2e8f0;
}

.breadcrumb {
  margin-bottom: 2rem;
  color: #64748b;
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.breadcrumb span {
  margin: 0 0.5rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.category {
  background: #2563eb;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.date,
.read-time {
  color: #64748b;
  font-size: 0.875rem;
}

.article-header h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: #1e293b;
}

.article-excerpt {
  font-size: 1.25rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 800px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: #1e293b;
}

.author-title {
  font-size: 0.875rem;
  color: #64748b;
}

/* Featured Image */
.featured-image {
  margin-bottom: 3rem;
}

.featured-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* Article Content */
.article-content {
  background: white;
  padding: 60px 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
}

.article-body {
  max-width: none;
}

.article-body h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: #1e293b;
}

.article-body h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: #1e293b;
}

.article-body p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #374151;
}

.article-body ul,
.article-body ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-body blockquote {
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-style: italic;
  border-radius: 0 10px 10px 0;
}

.article-body blockquote p {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  color: #1e293b;
}

.article-body blockquote cite {
  font-size: 0.875rem;
  color: #64748b;
  font-style: normal;
}

.article-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 2rem 0;
  font-family: "Monaco", "Menlo", monospace;
}

.article-body code {
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: "Monaco", "Menlo", monospace;
  font-size: 0.875rem;
  color: #e11d48;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.content-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 2rem 0;
}

.article-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.tag {
  background: #f1f5f9;
  color: #475569;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.3s ease;
}

.tag:hover {
  background: #e2e8f0;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.sidebar-section {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1e293b;
}

.toc {
  list-style: none;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.3s ease;
}

.toc a:hover {
  color: #2563eb;
}

.related-posts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-post {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.related-post img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.related-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.related-content h4 a {
  color: #1e293b;
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-content h4 a:hover {
  color: #2563eb;
}

.related-date {
  font-size: 0.75rem;
  color: #64748b;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-form input {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
}

.newsletter-form button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.newsletter-form button:hover {
  background: #1d4ed8;
}

/* Comments Section */
.comments {
  background: white;
  padding: 60px 0;
  border-top: 1px solid #e2e8f0;
}

.comments h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1e293b;
}

.comment-form {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 3rem;
}

.comment-form h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #1e293b;
}

.form-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-form input,
.comment-form textarea {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.comment-form textarea {
  resize: vertical;
  margin-bottom: 1rem;
}

.comment-form button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.comment-form button:hover {
  background: #1d4ed8;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.comment {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 15px;
}

.comment-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.comment-author {
  font-weight: 600;
  color: #1e293b;
}

.comment-date {
  font-size: 0.875rem;
  color: #64748b;
}

.comment-content p {
  line-height: 1.6;
  color: #374151;
}

/* Footer */
.footer {
  background: #1e293b;
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: white;
}

.footer-section p {
  color: #94a3b8;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  color: #94a3b8;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 2rem;
  text-align: center;
  color: #94a3b8;
}

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

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

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .article-header h1 {
    font-size: 2rem;
  }

  .article-excerpt {
    font-size: 1rem;
  }

  .form-group {
    grid-template-columns: 1fr;
  }

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

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

  .article-header {
    padding: 40px 0;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }

  .article-content {
    padding: 40px 0;
  }

  .sidebar-section {
    padding: 1.5rem;
  }

  .comment-form {
    padding: 1.5rem;
  }

  .comment {
    padding: 1rem;
  }

  .comments {
    padding: 40px 0;
  }
}
