/* Blog-specific styles */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-header {
  text-align: center;
  padding: 4rem 0;
  background: var(--gradient-1);
  color: white;
  margin-bottom: 3rem;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="white" opacity="0.1"/><circle cx="40" cy="70" r="1.5" fill="white" opacity="0.1"/></svg>');
  animation: float 6s ease-in-out infinite;
}

.blog-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.blog-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  position: relative;
  z-index: 10;
}

.blog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  justify-content: center;
}

.blog-nav-item {
  background: white;
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-nav-item:hover,
.blog-nav-item.active {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 94, 32, 0.3);
}

.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto 3rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  border: 2px solid rgba(27, 94, 32, 0.2);
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(27, 94, 32, 0.2);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.1rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.blog-post {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.blog-post::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-1);
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.blog-post-header {
  padding: 2rem 2rem 1rem;
}

.blog-post-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-post-meta i {
  font-size: 0.8rem;
}

.blog-post-excerpt {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-post-content {
  padding: 0 2rem 2rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease;
  opacity: 0;
}

.blog-post.expanded .blog-post-content {
  max-height: none;
  opacity: 1;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-post-actions {
  padding: 0 2rem 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.read-more-btn {
  background: var(--gradient-1);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.read-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(27, 94, 32, 0.3);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.blog-tag {
  background: rgba(27, 94, 32, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.no-results i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.loading i {
  font-size: 2rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Markdown content styles */
.markdown-content {
  font-family: "Inter", sans-serif;
  line-height: 1.8;
  color: var(--dark);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  color: var(--dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.markdown-content h1 {
  font-size: 2rem;
}
.markdown-content h2 {
  font-size: 1.5rem;
}
.markdown-content h3 {
  font-size: 1.25rem;
}
.markdown-content h4 {
  font-size: 1.1rem;
}

.markdown-content p {
  margin-bottom: 1rem;
  text-align: justify;
}

.markdown-content ul,
.markdown-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.markdown-content li {
  margin-bottom: 0.5rem;
}

.markdown-content code {
  background: rgba(27, 94, 32, 0.1);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: "Monaco", "Consolas", monospace;
  font-size: 0.9em;
}

.markdown-content pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.markdown-content blockquote {
  border-left: 4px solid var(--primary);
  background: rgba(27, 94, 32, 0.05);
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-container {
    padding: 1rem;
  }

  .blog-header {
    padding: 3rem 2rem;
    margin-bottom: 2rem;
  }

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

  .blog-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .blog-nav-item {
    white-space: nowrap;
  }

  .search-container {
    margin-bottom: 2rem;
  }

  .blog-post-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .blog-tags {
    margin-left: 0;
  }
}

.read-article-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #2e7d32, #388e3c);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
  position: relative;
  overflow: hidden;
}

.read-article-btn:hover {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.3);
  transform: translateY(-2px);
}

.read-article-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.read-article-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.read-article-btn:active::before {
  width: 300px;
  height: 300px;
}

.read-article-btn i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.read-article-btn:hover i {
  transform: translateX(2px);
}

.blog-post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #f5f5f5;
  color: #666;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.blog-tag:hover {
  background: #e8f5e8;
  color: #2e7d32;
}

@media (max-width: 768px) {
  .read-article-btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
  }

  .blog-post-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .read-article-btn {
    text-align: center;
    justify-content: center;
  }
}

.read-article-btn.outline {
  background: transparent;
  color: #2e7d32;
  border: 2px solid #2e7d32;
  box-shadow: none;
}

.read-article-btn.outline:hover {
  background: #2e7d32;
  color: white;
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.2);
}

.read-article-btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.read-article-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.read-article-btn.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
