/* Professional Blog Styling - Custom CSS */

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

/* Typography improvements */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.7;
  color: #3a2a1a;
  background-color: #faf8f5;
}

/* Header and navigation styling */
.site-header {
  background: linear-gradient(135deg, #d97636 0%, #c45a27 100%);
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(217, 118, 54, 0.2);
  padding: 1rem 0;
}

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

.site-title {
  font-weight: 700;
  font-size: 1.8rem;
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.site-title:hover {
  opacity: 0.9;
}

.site-navigation {
  display: flex;
  gap: 2rem;
}

.site-navigation a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.site-navigation a:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* Main content area */
.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: calc(100vh - 200px);
}

/* Hero section */
.hero {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.2rem;
  color: #718096;
  max-width: 600px;
  margin: 0 auto;
}

/* Section headers */
.recent-posts h2,
.page-header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 2rem;
  text-align: center;
}

/* Article styling */
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-meta {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

/* Content typography */
.article-content h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #3a2a1a;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e8d5c4;
}

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

.article-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Code blocks */
.article-content pre {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.article-content code {
  background: #f7fafc;
  color: #e53e3e;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

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

/* Blockquotes */
.article-content blockquote {
  border-left: 4px solid #d97636;
  background: #fff5ed;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #5a4a3a;
}

/* Lists */
.article-content ul, .article-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Links */
.article-content a {
  color: #c45a27;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.article-content a:hover {
  border-bottom-color: #d97636;
}

/* Post list styling */
.post-list {
  margin: 2rem 0;
}

.post-list-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post-list-item h2 a {
  color: #1a202c;
  text-decoration: none;
  font-weight: 600;
}

.post-list-item h2 a:hover {
  color: #d97636;
}

/* Footer */
.site-footer {
  background: #f5efe8;
  border-top: 1px solid #e8d5c4;
  padding: 2rem 0;
  margin-top: 4rem;
  color: #7a6a5a;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 2rem;
}

/* Article navigation */
.article-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.nav-prev,
.nav-next {
  color: #d97636;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-prev:hover,
.nav-next:hover {
  background: #fff5ed;
  color: #c45a27;
}

/* Reading time and meta improvements */
.reading-time {
  color: #a0aec0;
  font-size: 0.9rem;
}

.tags {
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  background: #edf2f7;
  color: #4a5568;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.category {
  background: #d97636;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  display: inline-block;
}

/* No posts message */
.no-posts {
  text-align: center;
  padding: 4rem 2rem;
  color: #718096;
}

/* Responsive design */
@media (max-width: 768px) {
  /* Header adjustments for mobile */
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .site-navigation {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-navigation a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  /* Main content adjustments */
  .main-content {
    padding: 1.5rem 1rem;
  }

  /* Hero adjustments */
  .hero {
    padding: 2rem 0;
  }

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

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

  /* Article header adjustments */
  .article-header h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  /* Content typography adjustments */
  .article-content h2 {
    font-size: 1.5rem;
  }

  .article-content h3 {
    font-size: 1.2rem;
  }

  .article-content p {
    font-size: 1rem;
  }

  /* Code blocks - enable horizontal scrolling */
  .article-content pre {
    padding: 1rem;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
  }

  /* Post list adjustments */
  .post-list-item {
    padding: 1.5rem 1rem;
  }

  .post-list-item h3 {
    font-size: 1.3rem;
  }

  /* Section headers */
  .recent-posts h2,
  .page-header h1 {
    font-size: 1.8rem;
  }

  /* Article navigation */
  .article-navigation {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .nav-prev,
  .nav-next {
    text-align: center;
    width: 100%;
  }

  /* Footer adjustments */
  .footer-container {
    padding: 0 1rem;
  }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
  .site-title {
    font-size: 1.3rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

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

  .article-content h2 {
    font-size: 1.3rem;
  }

  .article-content h3 {
    font-size: 1.1rem;
  }

  .article-content p {
    font-size: 0.95rem;
  }

  .article-content pre {
    padding: 0.75rem;
    font-size: 0.8rem;
    margin: 1rem -1rem;
    border-radius: 0;
  }

  .post-list-item {
    padding: 1rem;
    border-radius: 8px;
  }
}

/* Tablet landscape and small desktop */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-content {
    padding: 2rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Ensure images are responsive */
.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
}

/* Ensure tables are responsive */
.article-content table {
  width: 100%;
  overflow-x: auto;
  display: block;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .article-content table {
    font-size: 0.9rem;
  }
}

/* Prevent long words from breaking layout */
.article-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure long URLs don't break layout */
.article-content a {
  word-break: break-word;
}

/* Button styling */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #d97636;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background: #c45a27;
  color: white;
}

/* Form styling */
input, textarea {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #d97636;
  box-shadow: 0 0 0 3px rgba(217, 118, 54, 0.1);
}